X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=themes%2Fdefault%2Frenderer.php;h=e32cbb46876460cd79495dce09593d8a09bfbaa1;hb=0489317205141deaecefe3a7243d11a3e38a51d0;hp=5952e7f267fdc58425a7d3d57975776e0143a3c2;hpb=95375dcd6bc3dae571d94b23e85889369d0be4a7;p=fa-stable.git diff --git a/themes/default/renderer.php b/themes/default/renderer.php index 5952e7f2..e32cbb46 100644 --- a/themes/default/renderer.php +++ b/themes/default/renderer.php @@ -9,16 +9,18 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ + class renderer { 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'; - return "  "; + 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() @@ -55,10 +57,13 @@ 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 ""; @@ -139,9 +144,12 @@ global $path_to_root; $selected_app = $waapp->get_selected_application(); - + if (!$_SESSION["wa_current_user"]->check_application_access($selected_app)) + return; foreach ($selected_app->modules as $module) { + if (!$_SESSION["wa_current_user"]->check_module_access($module)) + continue; // image echo ""; // values @@ -161,7 +169,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 +189,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) @@ -192,10 +200,11 @@ } echo ""; - } - + } echo ""; } - } + } + + ?> \ No newline at end of file