X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=themes%2Fdefault%2Frenderer.php;h=ee5b26fda8e5bd0784a6a5299f6a61302000f3d6;hb=a3616fe8abf36ba9a2ba9ba63689475b1c8978b8;hp=e32cbb46876460cd79495dce09593d8a09bfbaa1;hpb=0c760ea65c8c6f0a45ea8328abab53be649f2105;p=fa-stable.git diff --git a/themes/default/renderer.php b/themes/default/renderer.php index e32cbb46..ee5b26fd 100644 --- a/themes/default/renderer.php +++ b/themes/default/renderer.php @@ -9,18 +9,17 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ - class renderer { function get_icon($category) { - global $path_to_root, $show_menu_category_icons; + global $path_to_root, $SysPrefs; - if ($show_menu_category_icons) + if ($SysPrefs->show_menu_category_icons) $img = $category == '' ? 'right.gif' : $category.'.png'; else $img = 'right.gif'; - return "  "; + return "  "; } function wa_header() @@ -35,7 +34,7 @@ function menu_header($title, $no_menu, $is_index) { - global $path_to_root, $help_base_url, $db_connections; + global $path_to_root, $SysPrefs, $db_connections; echo "\n"; echo "\n"; echo "
\n"; @@ -45,16 +44,16 @@ echo "\n"; echo "\n"; echo "\n"; - echo "\n"; - echo "
\n"; + echo "\n"; // tabs + + $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif"; if (!$no_menu) { $applications = $_SESSION['App']->applications; $local_path_to_root = $path_to_root; - $img = ""._(  "; - $himg = ""._(  "; $sel_app = $_SESSION['sel_app']; - echo "
"; - echo "
"; + echo "
"; + echo "
"; foreach($applications as $app) { if ($_SESSION["wa_current_user"]->check_application_access($app)) @@ -67,27 +66,36 @@ } echo "
"; echo "
"; - - 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) + // top status bar + $rimg = ""._(  "; + $pimg = ""._(  "; + $limg = ""._(  "; + $img = ""._(  "; + $himg = ""._(  "; + echo ""; + echo ""; + echo ""; + echo "
" . $db_connections[user_company()]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "$rimg" . _("Dashboard") . "   \n"; + + echo "$pimg" . _("Preferences") . "   \n"; + echo " $limg" . _("Change password") . "   \n"; + + if ($SysPrefs->help_base_url != null) { - echo "$himg" . _("Help") . "   "; + echo "$himg" . _("Help") . "   "; } - echo "$img" . _("Logout") . "   "; + echo "$img" . _("Logout") . "   "; echo "
"; echo "
"; } echo "
"; if ($no_menu) - echo "
"; - elseif ($title && !$is_index) + { // ajax indicator for installer and popups + echo "
" + ."" + ."
"; + } elseif ($title && !$is_index) { echo "
" ."
$title" @@ -99,40 +107,42 @@ function menu_footer($no_menu, $is_index) { - global $version, $allow_demo_mode, $app_title, $power_url, - $power_by, $path_to_root, $Pagehelp, $Ajax; + global $version, $path_to_root, $Pagehelp, $Ajax, $SysPrefs; + include_once($path_to_root . "/includes/date_functions.inc"); - if ($no_menu == false) + echo "
\n"; // 'main_page' + if ($no_menu == false) // bottom status line { if ($is_index) - echo "\n"; + echo "
\n"; else - echo "
\n"; + echo "
\n"; echo ""; if (isset($_SESSION['wa_current_user'])) { $phelp = implode('; ', $Pagehelp); - echo "\n"; + echo "\n"; $Ajax->addUpdate(true, 'hotkeyshelp', $phelp); echo ""; } echo "
" . Today() . " | " . Now() . "" . Today() . " | " . Now() . "".$phelp."
\n"; } - echo "
\n"; + echo "
\n"; // 'callout_main' if ($no_menu == false) { echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; - if ($allow_demo_mode==true) + if ($SysPrefs->allow_demo_mode) { echo "\n"; - //echo "\n"; + //echo "\n"; echo "\n"; } echo "

\n"; @@ -146,6 +156,14 @@ $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)) @@ -200,11 +218,7 @@ } echo "
"; - } + } echo ""; - } - } - - - -?> \ No newline at end of file + } + }