time() + $duration * 60,
"reason" => $reason
);
$f = fopen($config['cachedir'] . '/maintenance.ser', "w");
fwrite($f, serialize($maintenance));
fclose($f);
include('../scripts/config.inc');
__logAdmin("put the server in maintenance mode for reason: $reason");
}
}
if (is_null($config['maintenance'])) {
?>
Maintenance mode is currently inactive. Please use the form below to activate it.
Maintenance mode is currently active.
Reason: =$config['maintenance']['reason']?>
Until: =gmstrftime("%H:%M:%S on %m/%d/%Y", $config['maintenance']['until'])?>
(current: =gmstrftime("%H:%M:%S on %m/%d/%Y", time())?>).
Disable maintenance mode
}
?>