This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/contrib/downtime/theme.php
2009-01-04 08:30:46 -08:00

30 lines
550 B
PHP

<?php
class DowntimeTheme Extends Themelet {
/*
* Show the admin that downtime mode is enabled
*/
public function display_notification(Page $page) {
$page->add_block(new Block("Downtime",
"<span style='font-size: 1.5em'><b>DOWNTIME MODE IS ON!</b></span>", "left", 0));
}
/*
* Display $message and exit
*/
public function display_message($message) {
header("HTTP/1.0 503 Service Temporarily Unavailable");
print <<<EOD
<html>
<head>
<title>Downtime</title>
</head>
<body>
$message
</body>
</html>
EOD;
exit;
}
}
?>