Small fixed needed for client-side validation.
[fa-stable.git] / themes / default / renderer.php
index 473cf82f279063963f8a6cfb6991212e02c23ead..43b163bd4e926a2340e8eed1cd155b07f909aea9 100644 (file)
@@ -13,6 +13,7 @@
        {
                function wa_header()
                {
+//                     add_js_ufile("themes/default/renderer.js");
                        page(_("Main Menu"), false, true);
                }
 
@@ -24,7 +25,6 @@
                function menu_header($title, $no_menu, $is_index)
                {
                        global $path_to_root, $help_base_url, $db_connections;
-                       
                        // you can owerride the table styles from config.php here, if you want.
                        //global $table_style, $table_style2;
                        //$table_style  = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'";
                                foreach($applications as $app)
                                {
                                        $acc = access_string($app->name);
-                                       echo "<a ".($sel_app == $app->id ? "class='selected' " : "").
-                                       "href='$local_path_to_root/index.php?application=".$app->id.
-                                               SID ."'$acc[1]>" .$acc[0] . "</a>";
+                                       echo "<a ".($sel_app == $app->id ? 
+                                               ("class='selected'") : "")
+                                               ." href='$local_path_to_root/index.php?application=".$app->id
+                                               ."'$acc[1]>" .$acc[0] . "</a>";
                                }
                                echo "</div>";
                                echo "</td></tr></table>";
                                        echo "$himg<a target = '_blank' onclick=" .'"'."javascript:openWindow(this.href,this.target); return false;".'" '. "href='". help_url($title, $sel_app)."'>" . _("Help") . "</a>&nbsp;&nbsp;&nbsp;";
                                }
                                echo "$img<a href='$local_path_to_root/access/logout.php?'>" . _("Logout") . "</a>&nbsp;&nbsp;&nbsp;";
+                               echo "</td></tr><tr><td colspan=3>";
                                echo "</td></tr></table>";
                        }
                        echo "</td></tr></table>";
 
-                       if ($title && !$no_menu && !$is_index)
+                       if ($no_menu)
+                               echo "<br>";
+                       elseif ($title && !$is_index)
                        {
-                               echo "<center><table width='100%'><tr><td width='100%' class='titletext'>$title</td>"
+                               echo "<center><table id='title'><tr><td width='100%' class='titletext'>$title</td>"
                                ."<td align=right>"
                                .(user_hints() ? "<span id='hints'></span>" : '')
                                ."</td>"
                                ."</tr></table></center>";
                        }
-
-                       if (!$is_index)
-                               echo "<br>";
-
                }
 
                function menu_footer($no_menu, $is_index)
                                                if ($appfunction->label == "")
                                                        echo "&nbsp;<br>";
                                                else
-                                               {
-                                                       $lnk = access_string($appfunction->label);
-                                                       echo "$img<a href='$appfunction->link'$lnk[1]>$lnk[0]</a><br>";
-                                               }       
+                                                       echo $img.menu_link($appfunction->link, $appfunction->label)."<br>\n";
                                        }
                                }
                                echo "</td>";
                                                        if ($appfunction->label == "")
                                                                echo "&nbsp;<br>";
                                                        else
-                                                       {
-                                                               $lnk = access_string($appfunction->label);
-                                                               echo "$img<a href='$appfunction->link'$lnk[1]>$lnk[0]</a><br>";
-                                                       }       
+                                                               echo $img.menu_link($appfunction->link, $appfunction->label)."<br>\n";
                                                }
                                        }
                                        echo "</td>";