3 include_once($path_to_root . "/includes/db/connect_db.inc");
5 include_once($path_to_root . "/includes/reserved.inc");
6 include_once($path_to_root . "/includes/errors.inc");
7 include_once($path_to_root . "/includes/types.inc");
8 include_once($path_to_root . "/includes/systypes.inc");
9 include_once($path_to_root . "/includes/references.inc");
10 include_once($path_to_root . "/includes/prefs/sysprefs.inc");
11 include_once($path_to_root . "/includes/db/comments_db.inc");
12 include_once($path_to_root . "/includes/db/sql_functions.inc");
14 include_once($path_to_root . "/admin/db/users_db.inc");
15 include_once($path_to_root . "/includes/ui/ui_view.inc");
17 function page($title, $no_menu=false, $is_index=false, $onload="", $js="")
20 global $path_to_root, $js_lib;
22 $hide_menu = $no_menu;
24 include($path_to_root . "/includes/page/header.inc");
26 page_header($title, $no_menu, $is_index, $onload, $js);
29 function end_page($no_menu=false, $is_index=false)
33 $hide_menu = $no_menu;
35 include($path_to_root . "/includes/page/footer.inc");
37 page_footer($no_menu, $is_index);
40 function flush_dir($path) {
41 $dir = opendir($path);
42 while(false !== ($fname = readdir($dir))) {
43 if($fname=='.' || $fname=='..') continue;
44 if(is_dir($path.'/'.$fname)) {
45 flush_dir($path.'/'.$fname);
46 rmdir($path.'/'.$fname);
48 unlink($path.'/'.$fname);
52 function cache_js_file($fpath, $text)
55 // FIX compress text ...
57 $file = fopen($fpath, 'w');
58 if (!$file) return false;
59 if (!fwrite($file, $text)) return false;
64 function add_js_file($filename)
68 $search = array_search($filename, $js_static);
69 if ($search === false || $search === null) // php>4.2.0 returns null
70 $js_static[] = $filename;
73 function add_js_ufile($filename)
77 $search = array_search($filename, $js_userlib);
78 if ($search === false || $search === null) // php>4.2.0 returns null
79 $js_userlib[] = $filename;
82 function add_js_source($text)
86 $search = array_search($text, $js_lib);
87 if ($search === false || $search === null) // php>4.2.0 returns null