+ global $path_to_root, $SysPrefs, $db_connections;
+ echo "<table class='callout_main' border='0' cellpadding='0' cellspacing='0'>\n";
+ echo "<tr>\n";
+ echo "<td colspan='2' rowspan='2'>\n";
+
+ echo "<table class='main_page' border='0' cellpadding='0' cellspacing='0'>\n";
+ echo "<tr>\n";
+ echo "<td>\n";
+ echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
+ echo "<tr>\n";
+ echo "<td class='quick_menu'>\n"; // tabs
+
+ $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif";
+ if (!$no_menu)
+ {
+ $applications = $_SESSION['App']->applications;
+ $local_path_to_root = $path_to_root;
+ $sel_app = $_SESSION['sel_app'];
+ echo "<table cellpadding='0' cellspacing='0' width='100%'><tr><td>";
+ echo "<div class='tabs'>";
+ foreach($applications as $app)
+ {
+ if ($_SESSION["wa_current_user"]->check_application_access($app))
+ {
+ $acc = access_string($app->name);
+ echo "<a class='".($sel_app == $app->id ? 'selected' : 'menu_tab')
+ ."' href='$local_path_to_root/index.php?application=".$app->id
+ ."'$acc[1]>" .$acc[0] . "</a>";
+ }
+ }
+ echo "</div>";
+ echo "</td></tr></table>";
+ // top status bar
+ $rimg = "<img src='$path_to_root/themes/".user_theme()."/images/report.png' style='width:14px;height:14px;border:0;vertical-align:middle;' alt='"._('Dashboard')."'> ";
+ $pimg = "<img src='$local_path_to_root/themes/".user_theme()."/images/preferences.gif' style='width:14px;height:14px; border:0;vertical-align:middle;' alt='"._('Preferences')."'> ";
+ $limg = "<img src='$local_path_to_root/themes/".user_theme()."/images/lock.gif' style='width:14px;height:14px;border:0;vertical-align:middle;' alt='"._('Change Password')."'> ";
+ $img = "<img src='$local_path_to_root/themes/".user_theme()."/images/login.gif' style='width:14px;height:14px;border:0;vertical-align:middle;' alt='"._('Logout')."'> ";
+ $himg = "<img src='$local_path_to_root/themes/".user_theme()."/images/help.gif' style='width:14px;height:14px;border:0;vertical-align:middle;'' alt='"._('Help')."'> ";
+ echo "<table class='logoutBar'>";
+ echo "<tr><td class='headingtext3'>" . $db_connections[user_company()]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "</td>";
+ echo "<td class='logoutBarRight'><img id='ajaxmark' src='$indicator' align='center' style='visibility:hidden;' alt='ajaxmark'></td>";
+ echo "<td class='logoutBarRight'><a href='$path_to_root/admin/dashboard.php?sel_app=$sel_app'>$rimg" . _("Dashboard") . "</a> \n";
+
+ echo "<a class='shortcut' href='$path_to_root/admin/display_prefs.php?'>$pimg" . _("Preferences") . "</a> \n";
+ echo " <a class='shortcut' href='$path_to_root/admin/change_current_user_password.php?selected_id=" . $_SESSION["wa_current_user"]->username . "'>$limg" . _("Change password") . "</a> \n";
+
+ if ($SysPrefs->help_base_url != null)
+ {
+ echo "<a target = '_blank' onclick=" .'"'."javascript:openWindow(this.href,this.target); return false;".'" '. "href='". help_url()."'>$himg" . _("Help") . "</a> ";
+ }
+ echo "<a class='shortcut' href='$local_path_to_root/access/logout.php?'>$img" . _("Logout") . "</a> ";
+ echo "</td></tr><tr><td colspan=3>";
+ echo "</td></tr></table>";
+ }
+ echo "</td></tr></table>";
+
+ if ($no_menu)
+ { // ajax indicator for installer and popups
+ echo "<center><table class='tablestyle_noborder'>"
+ ."<tr><td><img id='ajaxmark' src='$indicator' align='center' style='visibility:hidden;' alt='ajaxmark'></td></tr>"
+ ."</table></center>";
+ } elseif ($title && !$is_index)
+ {
+ 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>";
+ }