X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fmain.inc;h=1a2478e9f6a9580c54aa0d50d354f05be1d3981f;hb=2b2cbcfe6a448536113966cbb11b79eda73db5ab;hp=e45f5973856f65c3dd4b55ca3036bac4963f4fd8;hpb=ce2a1cae35df4f60c3b993d79cb9eb65cb2cb82e;p=fa-stable.git diff --git a/includes/main.inc b/includes/main.inc index e45f5973..1a2478e9 100644 --- a/includes/main.inc +++ b/includes/main.inc @@ -11,7 +11,6 @@ ***********************************************************************/ include_once($path_to_root . "/includes/db/connect_db.inc"); -include_once($path_to_root . "/includes/reserved.inc"); include_once($path_to_root . "/includes/errors.inc"); include_once($path_to_root . "/includes/types.inc"); include_once($path_to_root . "/includes/systypes.inc"); @@ -20,7 +19,7 @@ include_once($path_to_root . "/includes/prefs/sysprefs.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 . "/includes/validation.inc"); include_once($path_to_root . "/admin/db/users_db.inc"); include_once($path_to_root . "/includes/ui/ui_view.inc"); @@ -57,17 +56,17 @@ function end_page($no_menu=false, $is_index=false) page_footer($no_menu, $is_index); } -function flush_dir($path) +function flush_dir($path, $wipe = false) { $dir = opendir($path); while(false !== ($fname = readdir($dir))) { - if($fname=='.' || $fname=='..' || $fname=='index.php') continue; + if($fname=='.' || $fname=='..' || (!$wipe && $fname=='index.php')) continue; if(is_dir($path.'/'.$fname)) { - flush_dir($path.'/'.$fname); - @rmdir($path.'/'.$fname); + flush_dir($path.'/'.$fname, $wipe); + if ($wipe) @rmdir($path.'/'.$fname); } else @unlink($path.'/'.$fname); - } + } } function cache_js_file($fpath, $text) @@ -141,10 +140,11 @@ function js_compress($sJS) $inNormalComment = false; //loop through line's characters and take out any literal strings, replace them with ___i___ where i is the index of this string - for($j=0;$j