diff --git a/phpgwapi/templates/default/navbar.inc.php b/phpgwapi/templates/default/navbar.inc.php
index 9c0ce6ca73..00dcc7e36a 100644
--- a/phpgwapi/templates/default/navbar.inc.php
+++ b/phpgwapi/templates/default/navbar.inc.php
@@ -1,251 +1,15 @@
link($urlbasename."/index.php");
- } elseif ($appname == "logout") {
- $output_text = "link($urlbasename."/logout.php");
- } elseif ($appname == "about") {
- if ($phpgw_info["flags"]["currentapp"] != "home" && $phpgw_info["flags"]["currentapp"] != "preferences" && $phpgw_info["flags"]["currentapp"] != "about") {
- $about_app = "app=" . $phpgw_info["flags"]["currentapp"];
- }
- $output_text = "link($urlbasename."/about.php",$about_app);
- } elseif ($appname == "print") {
- $output_text = "link($urlbasename."/$appname/".$view);
-// end change
- } else {
- $output_text = "link($urlbasename."/$appname/index.php");
- }
- $output_text .= "\"$target>";
- if ($phpgw_info["user"]["preferences"]["common"]["navbar_format"] != "text") {
- if ($appname != "home" && $appname != "logout" && $appname != "print" && $appname != "about") {
- $output_text .= '';
- } else {
- $output_text .= '';
- }
- }
- if (ereg("text",$phpgw_info["user"]["preferences"]["common"]["navbar_format"])) {
- $output_text .= "
" . lang($description) . "";
- }
- $output_text .= "";
- $tpl->set_var("td_align","center");
- $tpl->set_var("td_width",$td_width);
- $tpl->set_var("colspan",1);
- $tpl->set_var("value",$output_text);
- $tpl->parse("navbar_columns","navbar_column",True);
- }
- }
-
-
-
-
-
-
- function navbar($force = False)
- {
- global $cd,$phpgw,$phpgw_info,$colspan,$PHP_SELF;
-
- if (($phpgw_info["user"]["preferences"]["common"]["useframes"] && $phpgw_info["server"]["useframes"] == "allowed")
- || ($phpgw_info["server"]["useframes"] == "always")) {
- if (! $force) {
- return False;
- }
- }
-
- $tpl = new Template($phpgw_info["server"]["template_dir"]);
- $tpl->set_file(array("navbar" => "navbar.tpl",
- "navbar_row" => "navbar_row.tpl",
- "navbar_column" => "navbar_column.tpl"
- ));
-
- $urlbasename = $phpgw_info["server"]["webserver_url"];
-
- if (ereg("text",$phpgw_info["user"]["preferences"]["common"]["navbar_format"])) {
- $td_width = "7%";
- } else {
- $td_width = "3%";
- }
-
- // This is hardcoded for right now
- if ($phpgw_info["user"]["preferences"]["common"]["navbar_format"] == "text") {
- $tpl->set_var("tr_color","FFFFFF");
- } else {
- $tpl->set_var("tr_color",$phpgw_info["theme"]["navbar_bg"]);
- }
-
- $tpl->set_var("td_align","left");
- $tpl->set_var("td_width","");
- $tpl->set_var("value"," " . $phpgw_info["user"]["fullname"] . " - "
- . lang($phpgw->common->show_date(time(),"l")) . " "
- . lang($phpgw->common->show_date(time(),"F")) . " "
- . $phpgw->common->show_date(time(),"d, Y"));
- $tpl->parse("navbar_columns","navbar_column",True);
-
- if ($phpgw_info["user"]["preferences"]["common"]["navbar_format"] == "text") {
- $tabs[1]["label"] = "home";
- $tabs[1]["link"] = $phpgw->link($phpgw_info["server"]["webserver_url"] . "/index.php");
-
- if ($PHP_SELF == $phpgw_info["server"]["webserver_url"] . "/index.php") {
- $selected = 1;
- }
-
- $i = 2;
-
- while ($permission = each($phpgw_info["user"]["apps"])) {
- if ($phpgw_info["apps"][$permission[0]]["status"] != 2) {
- $tabs[$i]["label"] = $permission[0];
- $tabs[$i]["link"] = $phpgw->link($phpgw_info["server"]["webserver_url"] . "/" . $permission[0] . "/index.php");
- if (ereg($permission[0],$PHP_SELF)) {
- $selected = $i;
- }
- $i++;
- }
- }
-
- $tabs[$i]["label"] = "preferences";
- $tabs[$i]["link"] = $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/index.php");
- if ($PHP_SELF == $phpgw_info["server"]["webserver_url"] . "/preferences/index.php") {
- $selected = $i;
- }
- $i++;
-
- $tabs[$i]["label"] = "logout";
- $tabs[$i]["link"] = $phpgw->link($phpgw_info["server"]["webserver_url"] . "/logout.php");
-
- $tpl->set_var("td_align","center");
- $tpl->set_var("td_width",$td_width);
- $tpl->set_var("colspan",1);
- $tpl->set_var("value",$this->create_tabs($tabs,$selected,-1));
- $tpl->parse("navbar_columns","navbar_column",True);
-
- } else {
-
- $this->show_icon(&$tpl,$td_width,"home","home");
- $this->show_icon(&$tpl,$td_width,"print","print");
-
- while ($permission = each($phpgw_info["user"]["apps"])) {
- if ($phpgw_info["apps"][$permission[0]]["status"] != 2) {
- $this->show_icon(&$tpl,$td_width,$permission[0]);
- }
- }
-
- $this->show_icon(&$tpl,$td_width,"preferences","Preferences");
- if ($phpgw_info["flags"]["currentapp"] == "home" || $phpgw_info["flags"]["currentapp"] == "preferences" || $phpgw_info["flags"]["currentapp"] == "about") {
- $app = "phpGroupWare";
- } else {
- $app = $phpgw_info["flags"]["currentapp"];
- }
- $this->show_icon(&$tpl,$td_width,"about","About $app");
- $this->show_icon(&$tpl,$td_width,"logout","Logout");
-
- } // end else
-
- $tpl->parse("navbar_rows","navbar_row",True);
-
- if (isset($phpgw_info["user"]["apps"]["admin"]) && isset($phpgw_info["user"]["preferences"]["common"]["show_currentusers"])) {
- if ($phpgw_info["server"]["showpoweredbyon"] != "top") {
- $phpgw->db->query("select count(*) from phpgw_sessions");
- $phpgw->db->next_record();
- $tpl->set_var("td_align","right");
- $tpl->set_var("td_width","");
- $tpl->set_var("tr_color",$phpgw_info["theme"]["bg_color"]);
- $tpl->set_var("value",' ' . lang("Current users") . ': ' . $phpgw->db->f(0) . '');
- $tpl->set_var("colspan",($colspan+1));
- $tpl->parse("navbar_columns","navbar_column");
- $tpl->parse("navbar_rows","navbar_row",True);
- }
- }
-
- if ($phpgw_info["server"]["showpoweredbyon"] == "top") {
- if ( ! $phpgw_info["user"]["preferences"]["common"]["show_currentusers"]) {
- $tpl->set_var("td_align","left");
- $tpl->set_var("td_width","");
- $tpl->set_var("tr_color",$phpgw_info["theme"]["bg_color"]);
- $tpl->set_var("value",lang("Powered by phpGroupWare version x",$phpgw_info["server"]["versions"]["phpgwapi"]));
- $tpl->set_var("colspan",$colspan);
- $tpl->parse("navbar_columns","navbar_column");
- $tpl->parse("navbar_rows","navbar_row",True);
- }
- }
-
- if ($phpgw_info["server"]["showpoweredbyon"] == "top"
- && isset($phpgw_info["user"]["apps"]["admin"])
- && isset($phpgw_info["user"]["preferences"]["common"]["show_currentusers"])) {
-
- $tpl->set_var("td_align","left");
- $tpl->set_var("td_width","");
- $tpl->set_var("tr_color",$phpgw_info["theme"]["bg_color"]);
- $tpl->set_var("value",lang("Powered by phpGroupWare version x",$phpgw_info["server"]["versions"]["phpgwapi"]));
- $tpl->set_var("colspan",1);
- $tpl->parse("navbar_columns","navbar_column");
-
- $phpgw->db->query("select count(*) from phpgw_sessions");
- $phpgw->db->next_record();
- $tpl->set_var("td_align","right");
- $tpl->set_var("td_width","");
- $tpl->set_var("value",' ' . lang("Current users") . ': ' . $phpgw->db->f(0) . '');
- $tpl->set_var("colspan",($colspan--));
- $tpl->parse("navbar_columns","navbar_column",True);
- $tpl->parse("navbar_rows","navbar_row",True);
- }
-
- $tpl->pparse("out","navbar");
-
- // Make the wording a little more user friendly
- if ($phpgw_info["user"]["lastpasswd_change"] == 0) {
- echo "