X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fmain.inc;h=11746a288b386bc254d0ea2b6ab4fdd6b436480e;hb=5ac9ea61baac0cf298b07317051da51e781645b7;hp=2477a6c0f38bfba618f915960618a827783928b8;hpb=3faff3b471c0953bc1d11a6c00308779787a55f2;p=fa-stable.git diff --git a/includes/main.inc b/includes/main.inc index 2477a6c0..11746a28 100644 --- a/includes/main.inc +++ b/includes/main.inc @@ -11,18 +11,24 @@ ***********************************************************************/ include_once($path_to_root . "/includes/db/connect_db.inc"); +include_once($path_to_root . "/admin/db/transactions_db.inc"); include_once($path_to_root . "/includes/types.inc"); include_once($path_to_root . "/includes/references.inc"); include_once($path_to_root . "/includes/db/comments_db.inc"); include_once($path_to_root . "/includes/db/sql_functions.inc"); include_once($path_to_root . "/includes/db/audit_trail_db.inc"); -//include_once($path_to_root . "/includes/validation.inc"); include_once($path_to_root . "/admin/db/users_db.inc"); include_once($path_to_root . "/includes/ui/ui_view.inc"); include_once($path_to_root . "/includes/ui/ui_controls.inc"); $page_nested = -1; +// static js files path +$js_path = $path_to_root.'/js/'; +// standard external js scripts included in all files +$js_static = array('JsHttpRequest.js', 'behaviour.js', 'utils.js', 'inserts.js'); +// additional js source included in header +$js_lib = $js_userlib = array(); function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $script_only=false, $css='') { @@ -64,9 +70,9 @@ function end_page($no_menu=false, $is_index=false, $final_screen=false, $type_no function cache_js_file($fpath, $text) { - global $go_debug; + global $SysPrefs; - if(!$go_debug) $text = js_compress($text); + if (!$SysPrefs->go_debug) $text = js_compress($text); $file = force_open($fpath); if (!$file) return false; @@ -117,7 +123,7 @@ function add_js_ufile($filename) function add_js_source($text) { global $js_lib; - + $search = array_search($text, $js_lib); if ($search === false || $search === null) // php>4.2.0 returns null $js_lib[] = $text; @@ -377,4 +383,3 @@ function clean_file_name($filename) { return preg_replace('/[^a-zA-Z0-9.\-_]/', '_', $filename); } -?> \ No newline at end of file