Added including javascript source from collecting arrays; conditional display for...
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 16 Mar 2008 17:33:54 +0000 (17:33 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 16 Mar 2008 17:33:54 +0000 (17:33 +0000)
includes/page/footer.inc
includes/page/header.inc

index bb2759c6d7fc6ab93933a9a689735a9ee1f366c5..8f3db720db2aa8563fc4d4dd36ddade677c8ada3 100644 (file)
@@ -4,9 +4,11 @@ include_once($path_to_root . "/includes/date_functions.inc");
 
 function page_footer($no_menu=false, $is_index=false)
 {
-       global $local_path_to_root, $version, $allow_demo_mode;
+       global $version, $allow_demo_mode;
        global $app_title, $power_url, $power_by;
 
+       if (isset($_GET['ajax'])) return;
+
        if (function_exists('hyperlink_back'))
                hyperlink_back();
        if ($no_menu == false) 
index 12b99eba88621902e141fb4f04fc4a4d03641b55..d71f39fe29e55a12fa5d56e0c5c91264f2e6e5ea 100644 (file)
@@ -31,7 +31,11 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js=""
 {
        // titles and screen header
        global $db_connections, $path_to_root, $def_app, $applications,
-               $help_base_url, $help_page_url, $use_popup_windows;
+               $help_base_url, $help_page_url, $use_popup_windows,
+               $js_lib, $js_static, $js_path;
+
+       if (isset($_GET['ajax'])) return;
+
        $theme = user_theme();
        $local_path_to_root = $path_to_root;
 
@@ -44,6 +48,16 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js=""
                $js = get_js_open_window(900, 500);
        }
 
+       // javascript includes collect
+       add_js_source($js);
+       $js ='';
+       foreach($js_static as $jsfile) {
+         $js .= '<script language="javascript" type="text/javascript" src="'.
+               $js_path . $jsfile . '"></script>';
+       }
+       foreach($js_lib as $text) {
+         $js .= $text;
+       }
        if (!isset($no_menu))
        {
                $no_menu = false;
@@ -74,6 +88,8 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js=""
                echo "<body>";
        else
                echo "<body onload=\"$onload\">";
+       echo "<script language='javascript' src='".
+         $path_to_root. "/js/inserts.js' type='text/javascript'></script>\n";
        echo "<table class='callout_main' border='0' cellpadding='0' cellspacing='0'>\n";
        echo "<tr>\n";
        echo "<td colspan='2' rowspan='2'>\n";