X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=themes%2Fdefault%2Frenderer.php;h=cde08ae3125cac429721e3099a2bae9a89262b5b;hb=2cb57633d2f3e27b0c2b2e7448564f467e21e1fd;hp=51cbc8e441bfe26bc1eb9c720ebd1006135358ae;hpb=f04f9423d630b18806748d0bc7bd931f70878cbc;p=fa-stable.git diff --git a/themes/default/renderer.php b/themes/default/renderer.php index 51cbc8e4..cde08ae3 100644 --- a/themes/default/renderer.php +++ b/themes/default/renderer.php @@ -1,9 +1,19 @@ . +***********************************************************************/ class renderer { function wa_header() { +// add_js_ufile("themes/default/renderer.js"); page(_("Main Menu"), false, true); } @@ -14,7 +24,7 @@ function menu_header($title, $no_menu, $is_index) { - global $path_to_root, $applications, $help_base_url, $db_connections; + global $path_to_root, $help_base_url, $db_connections; // you can owerride the table styles from config.php here, if you want. //global $table_style, $table_style2; //$table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'"; @@ -31,51 +41,57 @@ echo "\n"; if (!$no_menu) { + $applications = $_SESSION['App']->applications; $local_path_to_root = $path_to_root; + $img = ""._(  "; + $himg = ""._(  "; $sel_app = $_SESSION['sel_app']; echo "
"; echo "
"; - foreach($applications as $app => $name) + foreach($applications as $app) { - echo "" .$name . ""; + $acc = access_string($app->name); + echo "id ? + ("class='selected'") : "") + ." href='$local_path_to_root/index.php?application=".$app->id + ."'$acc[1]>" .$acc[0] . ""; } echo "
"; echo "
"; echo ""; echo ""; - + $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif"; + echo ""; echo "
" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "" . _("Preferences") . "   \n"; echo " " . _("Change password") . "   \n"; if ($help_base_url != null) { - echo "" . _("Help") . "   "; + echo "$himg" . _("Help") . "   "; } - echo "" . _("Logout") . "   "; + echo "$img" . _("Logout") . "   "; + echo "
"; echo "
"; } echo ""; - if ($title && !$no_menu && !$is_index) + if ($no_menu) + echo "
"; + elseif ($title && !$is_index) { - echo "
" + echo "
$title
" ."" ."
$title" .(user_hints() ? "" : '') ."
"; } - - if (!$is_index) - echo "
"; - } function menu_footer($no_menu, $is_index) { - global $version, $allow_demo_mode, $app_title, $power_url, $power_by, $path_to_root; + global $version, $allow_demo_mode, $app_title, $power_url, + $power_by, $path_to_root, $Pagehelp, $Ajax; include_once($path_to_root . "/includes/date_functions.inc"); if ($no_menu == false) @@ -85,8 +101,12 @@ else echo "\n"; echo ""; - if (isset($_SESSION['wa_current_user'])) + if (isset($_SESSION['wa_current_user'])) { + $phelp = implode('; ', $Pagehelp); echo "\n"; + $Ajax->addUpdate(true, 'hotkeyshelp', $phelp); + echo ""; + } echo "
" . Today() . " | " . Now() . "".$phelp."
\n"; } echo "\n"; @@ -112,9 +132,11 @@ function display_applications(&$waapp) { + global $path_to_root; $selected_app = $waapp->get_selected_application(); + $img = "  "; foreach ($selected_app->modules as $module) { // image @@ -129,8 +151,13 @@ foreach ($module->lappfunctions as $appfunction) { - if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) - echo " " . $appfunction->label . "
"; + if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) + { + if ($appfunction->label == "") + echo " 
"; + else + echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; + } } echo ""; if (sizeof($module->rappfunctions) > 0) @@ -138,8 +165,13 @@ echo ""; foreach ($module->rappfunctions as $appfunction) { - if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) - echo " " . $appfunction->label . "
"; + if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) + { + if ($appfunction->label == "") + echo " 
"; + else + echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; + } } echo ""; }