X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=themes%2Fcool%2Frenderer.php;h=1e597b26acb343e4b2ac4f0202f20fdd321c7c7a;hb=01dd975d5588641f9b56ae26bd112d4d9ba31783;hp=b560ac91ceb89747a154747ead65561e24d84a4e;hpb=95375dcd6bc3dae571d94b23e85889369d0be4a7;p=fa-stable.git diff --git a/themes/cool/renderer.php b/themes/cool/renderer.php index b560ac91..1e597b26 100644 --- a/themes/cool/renderer.php +++ b/themes/cool/renderer.php @@ -13,11 +13,12 @@ { function get_icon($category) { - global $path_to_root; - - // uncomment this line if you want to use the pre-defined categories. - //$img = $category == '' ? 'right.gif' : $category.'.png'; - $img = 'right.gif'; + global $path_to_root, $show_menu_category_icons; + + if ($show_menu_category_icons) + $img = $category == '' ? 'right.gif' : $category.'.png'; + else + $img = 'right.gif'; return "  "; } @@ -35,7 +36,7 @@ { global $path_to_root, $help_base_url, $db_connections; echo "\n"; - echo "\n"; + echo ""; echo "\n"; - echo "
\n"; echo "\n"; @@ -43,26 +44,31 @@ echo "
\n"; echo "\n"; echo "\n"; - echo "
\n"; + echo "\n"; // tabs 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) { - $acc = access_string($app->name); - echo "" .$acc[0] . ""; + if ($_SESSION["wa_current_user"]->check_application_access($app)) + { + $acc = access_string($app->name); + echo "" .$acc[0] . ""; + } } echo "
"; echo "
"; + // top status bar + $img = ""._(  "; + $himg = ""._(  "; echo ""; echo ""; @@ -99,7 +105,8 @@ $power_by, $path_to_root, $Pagehelp, $Ajax; include_once($path_to_root . "/includes/date_functions.inc"); - if ($no_menu == false) + echo "
" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "
\n"; // 'main_page' + if ($no_menu == false) // bottom status line { if ($is_index) echo "\n"; @@ -112,10 +119,9 @@ $Ajax->addUpdate(true, 'hotkeyshelp', $phelp); echo ""; } - echo "
".$phelp."
\n"; + echo "
\n"; } - echo "
\n"; + echo " \n"; // 'callout_main' if ($no_menu == false) { echo "\n"; @@ -138,10 +144,22 @@ function display_applications(&$waapp) { global $path_to_root; + $selected_app = $waapp->get_selected_application(); + if (!$_SESSION["wa_current_user"]->check_application_access($selected_app)) + return; + if (method_exists($selected_app, 'render_index')) + { + $selected_app->render_index(); + return; + } + + echo ""; foreach ($selected_app->modules as $module) { + if (!$_SESSION["wa_current_user"]->check_module_access($module)) + continue; // image echo ""; // values @@ -161,7 +179,7 @@ { echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; } - else + elseif (!$_SESSION["wa_current_user"]->hide_inaccessible_menu_items()) { echo $img.'' .access_string($appfunction->label, true) @@ -181,7 +199,7 @@ { echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; } - else + elseif (!$_SESSION["wa_current_user"]->hide_inaccessible_menu_items()) { echo $img.'' .access_string($appfunction->label, true) @@ -193,9 +211,8 @@ echo "
"; } - echo ""; - } + } } ?> \ No newline at end of file