7 page(_("Main Menu"), false, true);
12 end_page(false, true);
15 function menu_header($title, $no_menu, $is_index)
17 global $path_to_root, $applications, $help_base_url, $db_connections;
18 // you can owerride the table styles from config.php here, if you want.
19 //global $table_style, $table_style2;
20 //$table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'";
21 //$table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'";
22 echo "<table class='callout_main' border='0' cellpadding='0' cellspacing='0'>\n";
24 echo "<td colspan='2' rowspan='2'>\n";
26 echo "<table class='main_page' border='0' cellpadding='0' cellspacing='0'>\n";
29 echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
31 echo "<td class='quick_menu'>\n";
34 $local_path_to_root = $path_to_root;
35 $sel_app = $_SESSION['sel_app'];
36 echo "<table cellpadding=0 cellspacing=0 width='100%'><tr><td>";
37 echo "<div class=tabs>";
38 foreach($applications as $app => $name)
40 echo "<a ".($sel_app == $app ? "class='selected' " : "").
41 "href='$local_path_to_root/index.php?application=".$app.
42 SID ."'>" .$name . "</a>";
46 echo "</td></tr></table>";
48 echo "<table class=logoutBar>";
49 echo "<tr><td class=headingtext3>" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "</td>";
50 if ($help_base_url != null)
52 echo "<td align=right ><a target = '_blank' onclick=" .'"'."javascript:openWindow(this.href,this.target); return false;".'" '. "href='". help_url($title, $sel_app)."'>" . _("Help") . "</a></td>";
54 echo "<td class=logoutBarRight><a href='$local_path_to_root/access/logout.php?'>" . _("Logout") . "</a>";
55 echo "</td></tr></table>";
57 echo "</td></tr></table>";
59 if ($title && !$no_menu && !$is_index)
61 echo "<center><table width='100%'><tr><td width='100%' class='titletext'>$title</td></tr></table></center>";
69 function menu_footer($no_menu, $is_index)
71 global $version, $allow_demo_mode, $app_title, $power_url, $power_by, $path_to_root;
72 include_once($path_to_root . "/includes/date_functions.inc");
74 if ($no_menu == false)
77 echo "<table class=bottomBar>\n";
79 echo "<table class=bottomBar2>\n";
81 if (isset($_SESSION['wa_current_user']))
82 echo "<td class=bottomBarCell>" . Today() . " | " . Now() . "</td>\n";
83 echo "</tr></table>\n";
85 echo "</td></tr></table></td>\n";
87 if ($no_menu == false)
89 echo "<table align='center' id='footer'>\n";
91 echo "<td align='center' class='footer'><a target='_blank' href='$power_url'><font color='#ffffff'>$app_title $version - " . _("Theme:") . " " . user_theme() . "</font></a></td>\n";
94 echo "<td align='center' class='footer'><a target='_blank' href='$power_url'><font color='#ffff00'>$power_by</font></a></td>\n";
96 if ($allow_demo_mode==true)
99 //echo "<td><br><div align='center'><a href='http://sourceforge.net'><img src='http://sourceforge.net/sflogo.php?group_id=89967&type=5' alt='SourceForge.net Logo' width='210' height='62' border='0' align='middle' /></a></div></td>\n";
102 echo "</table><br><br>\n";
106 function display_applications(&$waapp)
109 $selected_app = $waapp->get_selected_application();
111 foreach ($selected_app->modules as $module)
116 echo "<td valign='top' class='menu_group'>";
117 echo "<table border=0 width='100%'>";
118 echo "<tr><td class='menu_group'>";
120 echo "</td></tr><tr>";
121 echo "<td class='menu_group_items'>";
123 foreach ($module->lappfunctions as $appfunction)
125 if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access))
126 echo "<a href='$appfunction->link'> " . $appfunction->label . "</a><br>";
129 if (sizeof($module->rappfunctions) > 0)
131 echo "<td width='50%' class='menu_group_items'>";
132 foreach ($module->rappfunctions as $appfunction)
134 if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access))
135 echo "<a href='$appfunction->link'> " . $appfunction->label . "</a><br>";
140 echo "</tr></table></td></tr>";