Added print document options in inquiries.
[fa-stable.git] / includes / page / header.inc
index 12b99eba88621902e141fb4f04fc4a4d03641b55..96f2660d605fd3c4e928d02cbec5e4a04b374173 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, $js_userlib, $comp_path;
+
+       if (isset($_GET['ajax'])) return;
+
        $theme = user_theme();
        $local_path_to_root = $path_to_root;
 
@@ -44,6 +48,21 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js=""
                $js = get_js_open_window(900, 500);
        }
 
+       add_js_user_num(); // add user native numeric input functions
+       // 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_userlib as $jsfile) {
+         $js .= '<script language="javascript" type="text/javascript" src="'.
+           $jsfile . '"></script>';
+       }
+       foreach($js_lib as $text) {
+         $js .= $text;
+       }
        if (!isset($no_menu))
        {
                $no_menu = false;
@@ -74,6 +93,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";