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");
- function page($title, $no_menu=false, $is_index=false, $onload="", $js="")
+ function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $script_only=false)
{
global $path_to_root;
page_header($title, $no_menu, $is_index, $onload, $js);
error_box();
+ if($script_only) {
+ echo '<noscript>';
+ echo display_heading(_('This page is usable only with javascript enabled browsers.'));
+ echo '</noscript>';
+ div_start('_page_body', null, true);
+ } else {
+ div_start('_page_body'); // whole page content for ajax reloading
+ }
}
function end_page($no_menu=false, $is_index=false)
$hide_menu = $no_menu;
+ div_end(); // _page_body section
include($path_to_root . "/includes/page/footer.inc");
- $Ajax->run();
page_footer($no_menu, $is_index);
}
function flush_dir($path) {
$dir = opendir($path);
while(false !== ($fname = readdir($dir))) {
- if($fname=='.' || $fname=='..') continue;
+ if($fname=='.' || $fname=='..' || $fname=='index.php') continue;
if(is_dir($path.'/'.$fname)) {
flush_dir($path.'/'.$fname);
@rmdir($path.'/'.$fname);