better looking downtime message, and login box
This commit is contained in:
parent
ceb4019588
commit
9a79f77deb
@ -13,14 +13,41 @@ class DowntimeTheme extends Themelet {
|
|||||||
* Display $message and exit
|
* Display $message and exit
|
||||||
*/
|
*/
|
||||||
public function display_message($message) {
|
public function display_message($message) {
|
||||||
|
global $config;
|
||||||
|
$theme_name = $config->get_string('theme');
|
||||||
|
$data_href = get_base_href();
|
||||||
|
$login_link = make_link("user_admin/login");
|
||||||
header("HTTP/1.0 503 Service Temporarily Unavailable");
|
header("HTTP/1.0 503 Service Temporarily Unavailable");
|
||||||
|
|
||||||
print <<<EOD
|
print <<<EOD
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Downtime</title>
|
<title>Downtime</title>
|
||||||
|
<link rel="stylesheet" href="$data_href/themes/$theme_name/style.css" type="text/css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
$message
|
<div id="downtime">
|
||||||
|
<h1>Down for Maintenance</h1>
|
||||||
|
<div id="message">
|
||||||
|
$message
|
||||||
|
</div>
|
||||||
|
<h3>Admin Login</h3>
|
||||||
|
<div id="login">
|
||||||
|
<form action="$login_link" method="POST">
|
||||||
|
<table id="login_table" summary="Login Form">
|
||||||
|
<tr>
|
||||||
|
<td width="70"><label for="user">Name</label></td>
|
||||||
|
<td width="70"><input id="user" type="text" name="user"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label for="pass">Password</label></td>
|
||||||
|
<td><input id="pass" type="password" name="pass"></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2"><input type="submit" value="Log In"></td></tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
EOD;
|
EOD;
|
||||||
|
@ -78,11 +78,17 @@ class UserPageTheme extends Themelet {
|
|||||||
global $config;
|
global $config;
|
||||||
$html = "
|
$html = "
|
||||||
<form action='".make_link("user_admin/login")."' method='POST'>
|
<form action='".make_link("user_admin/login")."' method='POST'>
|
||||||
<table summary='Login Form' align='center'>
|
<table summary='Login Form'>
|
||||||
<tr><td width='70'>Name</td><td width='70'><input type='text' name='user'></td></tr>
|
<tr>
|
||||||
<tr><td>Password</td><td><input type='password' name='pass'></td></tr>
|
<td width='70'><label for='user'>Name</label></td>
|
||||||
<tr><td colspan='2'><input type='submit' name='gobu' value='Log In'></td></tr>
|
<td width='70'><input id='user' type='text' name='user'></td>
|
||||||
</table>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label for='pass'>Password</label></td>
|
||||||
|
<td><input id='pass' type='password' name='pass'></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan='2'><input type='submit' value='Log In'></td></tr>
|
||||||
|
</table>
|
||||||
</form>
|
</form>
|
||||||
";
|
";
|
||||||
if($config->get_bool("login_signup_enabled")) {
|
if($config->get_bool("login_signup_enabled")) {
|
||||||
|
@ -225,3 +225,13 @@ UL {
|
|||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#downtime #message, #downtime #login {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#downtime H3 {
|
||||||
|
margin-top: 32px;
|
||||||
|
}
|
||||||
|
#downtime #login_table {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user