dataroot.'/'.SITEID.'/maintenance.html'; if ($form = data_submitted()) { if (confirm_sesskey()) { if ($form->action == "disable") { unlink($filename); redirect('index.php', get_string('sitemaintenanceoff','admin')); } else { $file = fopen($filename, 'w'); fwrite($file, stripslashes($form->text)); fclose($file); redirect('index.php', get_string('sitemaintenanceon', 'admin')); } } } /// Print the header stuff $strmaintenance = get_string('sitemaintenancemode', 'admin'); $stradmin = get_string('administration'); $strconfiguration = get_string('configuration'); print_header("$SITE->shortname: $strmaintenance", $SITE->fullname, "$stradmin -> ". "$strconfiguration -> $strmaintenance"); print_heading($strmaintenance); /// Print the appropriate form if (file_exists($filename)) { // We are in maintenance mode echo '