+ global $path_to_root, $help_base_url, $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";
+ if (!$no_menu)
+ {
+ $applications = $_SESSION['App']->applications;
+ $local_path_to_root = $path_to_root;
+ $img = "<img src='$local_path_to_root/themes/default/images/login.gif' width='14' height='14' border='0' alt='"._('Logout')."'> ";
+ $himg = "<img src='$local_path_to_root/themes/default/images/help.gif' width='14' height='14' border='0' alt='"._('Help')."'> ";
+ $sel_app = $_SESSION['sel_app'];
+ echo "<table cellpadding=0 cellspacing=0 width='100%'><tr><td>";
+ echo "<div class=tabs>";
+ 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
+ ."'$acc[1]>" .$acc[0] . "</a>";
+ }
+ echo "</div>";
+ echo "</td></tr></table>";
+
+ echo "<table class=logoutBar>";
+ echo "<tr><td class=headingtext3>" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "</td>";
+ $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif";
+ echo "<td class='logoutBarRight'><img id='ajaxmark' src='$indicator' align='center' style='visibility:hidden;'></td>";
+ echo " <td class='logoutBarRight'><a href='$path_to_root/admin/display_prefs.php?'>" . _("Preferences") . "</a> \n";
+ echo " <a href='$path_to_root/admin/change_current_user_password.php?selected_id=" . $_SESSION["wa_current_user"]->username . "'>" . _("Change password") . "</a> \n";
+
+ if ($help_base_url != null)
+ {
+ echo "$himg<a target = '_blank' onclick=" .'"'."javascript:openWindow(this.href,this.target); return false;".'" '. "href='". help_url()."'>" . _("Help") . "</a> ";
+ }
+ echo "$img<a href='$local_path_to_root/access/logout.php?'>" . _("Logout") . "</a> ";
+ echo "</td></tr><tr><td colspan=3>";
+ echo "</td></tr></table>";
+ }
+ echo "</td></tr></table>";
+
+ if ($no_menu)
+ echo "<br>";
+ 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>";
+ }