3 function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="")
5 // titles and screen header
6 global $db_connections, $path_to_root, $def_app;
8 $local_path_to_root = $path_to_root;
14 if (!isset($_SESSION["sel_app"]))
15 session_register("sel_app");
16 if (isset($_SESSION["App"]) && is_object($_SESSION["App"]) && isset($_SESSION["App"]->selected_application) &&
17 $_SESSION["App"]->selected_application != "")
18 $sel_app = $_SESSION["App"]->selected_application;
19 elseif (isset($_SESSION["sel_app"]) && $_SESSION["sel_app"] != "")
20 $sel_app = $_SESSION["sel_app"];
23 $_SESSION["sel_app"] = $sel_app;
25 echo "<html dir='" . $_SESSION['language']->dir . "' >";
26 echo "<head><title>$title</title>";
27 $encoding = $_SESSION['language']->encoding;
28 echo "<meta http-equiv='Content-type' content='text/html'; charset='$encoding'>";
29 echo "<link href='$local_path_to_root/themes/$theme/default.css' rel='stylesheet' type='text/css' /> \n";
30 echo "<link href='$local_path_to_root/" . $_SESSION['language']->get_stylesheet() . "' rel='stylesheet' type='text/css' /> \n";
37 echo "<body onload=\"$onload\">";
38 echo "<table class='callout_main' border='0' cellpadding='0' cellspacing='0'>\n";
40 echo "<td colspan='2' rowspan='2'>\n";
42 echo "<table class='main_page' border='0' cellpadding='0' cellspacing='0'>\n";
45 echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
47 echo "<td class='quick_menu'>\n";
50 echo "<table cellpadding=0 cellspacing=0 width='100%'><tr><td>";
51 echo "<div class=tabs>";
52 echo "<a ".($sel_app == "orders" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=orders". SID ."'>" . _("Sales") . "</a>";
53 echo "<a ".($sel_app == "AP" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=AP". SID ."'>" . _("Purchases") . "</a>";
54 echo "<a ".($sel_app == "stock" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=stock". SID ."'>" . _("Items and Inventory") . "</a>";
55 echo "<a ".($sel_app == "manuf" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=manuf". SID ."'>" . _("Manufacturing") . "</a>";
56 echo "<a ".($sel_app == "proj" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=proj". SID ."'>" . _("Dimensions") . "</a>";
57 echo "<a ".($sel_app == "GL" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=GL". SID ."'>" . _("Banking and General Ledger") . "</a>";
58 echo "<a ".($sel_app == "system" ? "class='selected' " : "")."href='$local_path_to_root/index.php?application=system". SID ."'>" . _("Setup") . "</a>";
61 echo "</td></tr></table>";
63 echo "<table class=logoutBar>";
64 echo "<tr><td class=headingtext3>" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "</td>";
65 echo "<td class=logoutBarRight><a href='$local_path_to_root/access/logout.php?'>" . _("Logout") . "</a>";
66 echo "</td></tr></table>";
69 echo "</td></tr></table>";
71 if ($title && !$no_menu && !$is_index)
73 echo "<center><table width='100%'><tr><td width='100%' class='titletext'>$title</td></tr></table></center>";