X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=themes%2Fdefault%2Frenderer.php;h=ae0cb59e544856495578bc93f9844235975e435a;hb=01dd975d5588641f9b56ae26bd112d4d9ba31783;hp=d03993a60b1d6f17a84960ef8496fb108d81d3d7;hpb=da8311619dd73feae101d246a1957b972e00cbd2;p=fa-stable.git diff --git a/themes/default/renderer.php b/themes/default/renderer.php index d03993a6..ae0cb59e 100644 --- a/themes/default/renderer.php +++ b/themes/default/renderer.php @@ -1,66 +1,217 @@ -get_selected_application(); - foreach ($selected_app->modules as $module) - { - // image - echo ""; - // values - echo ""; - echo ""; - echo ""; - echo ""; - //echo "\nOA_current_user name = " . $_SESSION["wa_current_user"]->username; - if (sizeof($module->rappfunctions) > 0) - { - echo ""; - } - - echo "
"; - } - - echo ""; - } - } - +. +***********************************************************************/ + + 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(_($help_context = "Main Menu"), false, true); + } + + function wa_footer() + { + end_page(false, true); + } + + function menu_header($title, $no_menu, $is_index) + { + global $path_to_root, $help_base_url, $db_connections; + echo "\n"; + echo "\n"; + echo "
\n"; + + echo "\n"; + 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; + $sel_app = $_SESSION['sel_app']; + echo "
"; + echo "
"; + foreach($applications as $app) + { + 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 ""; + $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif"; + echo ""; + echo "
" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "" . _("Preferences") . "   \n"; + echo " " . _("Change password") . "   \n"; + + if ($help_base_url != null) + { + echo "$himg" . _("Help") . "   "; + } + echo "$img" . _("Logout") . "   "; + echo "
"; + echo "
"; + } + echo "
"; + + if ($no_menu) + echo "
"; + elseif ($title && !$is_index) + { + echo "
" + ."" + ."
$title" + .(user_hints() ? "" : '') + ."
"; + } + } + + function menu_footer($no_menu, $is_index) + { + 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"); + + echo "
\n"; // 'main_page' + if ($no_menu == false) // bottom status line + { + if ($is_index) + echo "\n"; + else + echo "
\n"; + echo ""; + if (isset($_SESSION['wa_current_user'])) { + $phelp = implode('; ', $Pagehelp); + echo "\n"; + $Ajax->addUpdate(true, 'hotkeyshelp', $phelp); + echo ""; + } + echo "
" . Today() . " | " . Now() . "".$phelp."
\n"; + } + echo "
\n"; // 'callout_main' + echo "\n"; + if ($no_menu == false) + { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if ($allow_demo_mode==true) + { + echo "\n"; + //echo "\n"; + echo "\n"; + } + echo "

\n"; + } + } + + 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 + echo ""; + } + echo "
"; + } +} ?> \ No newline at end of file