Rerun, due to errors.
[fa-stable.git] / themes / default / renderer.php
index 03a56f2448ddc4127245b8872201a598d3fee088..5952e7f267fdc58425a7d3d57975776e0143a3c2 100644 (file)
 ***********************************************************************/
        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 "<img src='$path_to_root/themes/cool/images/$img' style='vertical-align:middle;' border='0'>&nbsp;&nbsp;";
+               }
+
                function wa_header()
                {
-//                     add_js_ufile("themes/default/renderer.js");
                        page(_($help_context = "Main Menu"), false, true);
                }
 
 
                        $selected_app = $waapp->get_selected_application();
 
-                       $img = "<img src='$path_to_root/themes/default/images/right.gif' style='vertical-align:middle;' width='17' height='17' border='0'>&nbsp;&nbsp;";
                        foreach ($selected_app->modules as $module)
                        {
                                // image
 
                                foreach ($module->lappfunctions as $appfunction)
                                {
+                                       $img = $this->get_icon($appfunction->category);
                                        if ($appfunction->label == "")
                                                echo "&nbsp;<br>";
                                        elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) 
                                        echo "<td width='50%' class='menu_group_items'>";
                                        foreach ($module->rappfunctions as $appfunction)
                                        {
+                                               $img = $this->get_icon($appfunction->category);
                                                if ($appfunction->label == "")
                                                        echo "&nbsp;<br>";
                                                elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access))