*** empty log message ***
[fa-stable.git] / includes / page / header.inc
1 <?php
2
3 function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="")
4 {
5         // titles and screen header
6         global $db_connections, $path_to_root;
7         $theme = user_theme();
8         $local_path_to_root = $path_to_root;
9
10         if (!isset($no_menu)) 
11         {
12                 $no_menu = false;
13         }
14
15     echo "<html dir='" . $_SESSION['language']->dir . "' >";
16     echo "<head><title>$title</title>";
17     $encoding = $_SESSION['language']->encoding;
18         echo "<meta http-equiv='Content-type' content='text/html'; charset='$encoding'>";
19         echo "<link href='$local_path_to_root/themes/$theme/default.css' rel='stylesheet' type='text/css' /> \n";
20         echo "<link href='$local_path_to_root/" . $_SESSION['language']->get_stylesheet() . "' rel='stylesheet' type='text/css' /> \n";
21         if ($js != "")
22                 echo $js;
23         echo "</head> \n";
24         if ($onload == "")
25                 echo "<body>";
26         else
27                 echo "<body onload=\"$onload\">";
28     echo "<table class='callout_main' border='0' cellpadding='0' cellspacing='0'>\n";
29         echo "<tr>\n";
30     echo "<td colspan='2' rowspan='2'>\n";
31
32         echo "<table class='main_page' border='0' cellpadding='0' cellspacing='0'>\n";
33         echo "<tr>\n";
34         echo "<td>\n";
35     echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
36         echo "<tr>\n";
37     echo "<td class='quick_menu'>\n";
38         if (!$no_menu) 
39         {
40                 echo "<table cellpadding=0 cellspacing=0 width='100%'><tr><td>";
41                 echo "<div class=tabs>";
42                 echo "<a href='$local_path_to_root/index.php?application=orders". SID ."'>" . _("Sales") . "</a>";
43                 echo "<a href='$local_path_to_root/index.php?application=AP". SID ."'>" . _("Purchases") . "</a>";
44                 echo "<a href='$local_path_to_root/index.php?application=stock". SID ."'>" . _("Items and Inventory") . "</a>";
45                 echo "<a href='$local_path_to_root/index.php?application=manuf". SID ."'>" . _("Manufacturing") . "</a>";
46                 echo "<a href='$local_path_to_root/index.php?application=proj". SID ."'>" . _("Dimensions") . "</a>";
47                 echo "<a href='$local_path_to_root/index.php?application=GL". SID ."'>" . _("Banking and General Ledger") . "</a>";
48                 echo "<a href='$local_path_to_root/index.php?application=system". SID ."'>" . _("Setup") . "</a>";
49                 echo "</div>";
50
51                 echo "</td></tr></table>";
52
53                 echo "<table class=logoutBar>";
54                 echo "<tr><td class=headingtext3>" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "</td>";
55                 echo "<td class=logoutBarRight><a href='$local_path_to_root/access/logout.php?'>" . _("Logout") . "</a>";
56                 echo "</td></tr></table>";
57         }
58
59         echo "</td></tr></table>";
60
61         if ($title && !$no_menu && !$is_index) 
62         {
63                 echo "<center><table width='100%'><tr><td width='100%' class='titletext'>$title</td></tr></table></center>";
64         }
65
66         if (!$is_index)
67                 echo "<br>";
68 }
69
70 ?>