X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=themes%2Faqua%2Frenderer.php;h=a5036185273ef75e67cbf5b425208b82c331a89f;hb=a4cd4c45d997b6d683402978e68491b0b5e7f674;hp=c671e8e6ef93208161e3de1f072bf53aa60cdb14;hpb=d567a10b7925c8bb97c734e213d6651a979af29d;p=fa-stable.git diff --git a/themes/aqua/renderer.php b/themes/aqua/renderer.php index c671e8e6..a5036185 100644 --- a/themes/aqua/renderer.php +++ b/themes/aqua/renderer.php @@ -11,9 +11,20 @@ ***********************************************************************/ class renderer { + function get_icon($category) + { + global $path_to_root, $show_menu_category_icons; + + if ($show_menu_category_icons) + $img = $category == '' ? 'right.gif' : $category.'.png'; + else + $img = 'right.gif'; + return "  "; + } + function wa_header() { - page(_("Main Menu"), false, true); + page(_($help_context = "Main Menu"), false, true); } function wa_footer() @@ -24,10 +35,6 @@ function menu_header($title, $no_menu, $is_index) { 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'"; - //$table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'"; echo "\n"; echo "\n"; echo ""; $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif"; echo ""; - echo "
\n"; @@ -49,10 +56,13 @@ echo "
"; foreach($applications as $app) { - $acc = access_string($app->name); - echo "id ? "class='selected' " : ""). - "href='$local_path_to_root/index.php?application=".$app->id. - SID ."'$acc[1]>" .$acc[0] . ""; + if ($_SESSION["wa_current_user"]->check_application_access($app)) + { + $acc = access_string($app->name); + echo "" .$acc[0] . ""; + } } echo "
"; @@ -62,35 +72,35 @@ echo "
" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "" . _("Preferences") . "   \n"; - echo " " . _("Change password") . "   \n"; + echo " " . _("Preferences") . "   \n"; + echo " " . _("Change password") . "   \n"; if ($help_base_url != null) { - echo "$himg" . _("Help") . "   "; + echo "$himg" . _("Help") . "   "; } - echo "$img" . _("Logout") . "   "; + echo "$img" . _("Logout") . "   "; 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) @@ -100,8 +110,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"; @@ -110,7 +124,7 @@ { echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -130,10 +144,13 @@ global $path_to_root; $selected_app = $waapp->get_selected_application(); + if (!$_SESSION["wa_current_user"]->check_application_access($selected_app)) + return; - $img = "  "; foreach ($selected_app->modules as $module) { + if (!$_SESSION["wa_current_user"]->check_module_access($module)) + continue; // image echo ""; // values @@ -146,15 +163,18 @@ foreach ($module->lappfunctions as $appfunction) { - if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) + $img = $this->get_icon($appfunction->category); + if ($appfunction->label == "") + echo " 
"; + elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) { - if ($appfunction->label == "") - echo " 
"; - else - { - $lnk = access_string($appfunction->label); - echo "$img$lnk[0]
"; - } + echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; + } + elseif (!$_SESSION["wa_current_user"]->hide_inaccessible_menu_items()) + { + echo $img.'' + .access_string($appfunction->label, true) + ."
\n"; } } echo ""; @@ -163,16 +183,19 @@ echo ""; }