***********************************************************************/
class renderer
{
- /* Uncomment this member if you want to use the category icons defined in /applications/applications.php
function get_icon($category)
{
- global $path_to_root;
+ global $path_to_root, $show_menu_category_icons;
- $img = $category == '' ? 'right.gif' : $category.'.png';
- return "<img src='$path_to_root/themes/cool/images/$img' style='vertical-align:middle;' border='0'> ";
+ if ($show_menu_category_icons)
+ $img = $category == '' ? 'right.gif' : $category.'.png';
+ else
+ $img = 'right.gif';
+ return "<img src='$path_to_root/themes/aqua/images/$img' style='vertical-align:middle;' border='0'> ";
}
- */
function wa_header()
{
echo "<div class=tabs>";
foreach($applications as $app)
{
- $acc = access_string($app->name);
- echo "<a class='".($sel_app == $app->id ? 'selected' : 'menu_tab')
- ."' href='$local_path_to_root/index.php?application=".$app->id
- ."'$acc[1]>" .$acc[0] . "</a>";
+ if ($_SESSION["wa_current_user"]->check_application_access($app))
+ {
+ $acc = access_string($app->name);
+ echo "<a class='".($sel_app == $app->id ? 'selected' : 'menu_tab')
+ ."' href='$local_path_to_root/index.php?application=".$app->id
+ ."'$acc[1]>" .$acc[0] . "</a>";
+ }
}
echo "</div>";
global $path_to_root;
$selected_app = $waapp->get_selected_application();
+ if (!$_SESSION["wa_current_user"]->check_application_access($selected_app))
+ return;
- $img = "<img src='$path_to_root/themes/aqua/images/right.gif' style='vertical-align:middle;' width='17' height='17' border='0'> ";
foreach ($selected_app->modules as $module)
{
+ if (!$_SESSION["wa_current_user"]->check_module_access($module))
+ continue;
// image
echo "<tr>";
// values
foreach ($module->lappfunctions as $appfunction)
{
+ $img = $this->get_icon($appfunction->category);
if ($appfunction->label == "")
echo " <br>";
elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access))
{
echo $img.menu_link($appfunction->link, $appfunction->label)."<br>\n";
}
- else
+ elseif (!$_SESSION["wa_current_user"]->hide_inaccessible_menu_items())
{
echo $img.'<span class="inactive">'
.access_string($appfunction->label, true)
echo "<td width='50%' class='menu_group_items'>";
foreach ($module->rappfunctions as $appfunction)
{
+ $img = $this->get_icon($appfunction->category);
if ($appfunction->label == "")
echo " <br>";
elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access))
{
echo $img.menu_link($appfunction->link, $appfunction->label)."<br>\n";
}
- else
+ elseif (!$_SESSION["wa_current_user"]->hide_inaccessible_menu_items())
{
echo $img.'<span class="inactive">'
.access_string($appfunction->label, true)