forked from ColdTrick/maintenance
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
85 lines (70 loc) · 2.13 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
global $CONFIG;
$text = get_plugin_setting("maintenance_text","maintenance");
$form_body = "<table><tr><td>";
$form_body .= elgg_echo('username') . "</td><td>" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')) . "</td><td>";
$form_body .= "</td></tr><tr><td>";
$form_body .= elgg_echo('password') . "</td><td>" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')) . "</td><td>";
$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login')));
$form_body .= "</td></tr></table>";
$login_url = $vars['url'];
if ((isset($CONFIG->https_login)) && ($CONFIG->https_login))
$login_url = str_replace("http", "https", $vars['url']);
?>
<html>
<head>
<script type="text/javascript" src="<?php echo $CONFIG->wwwroot;?>vendors/jquery/jquery-1.2.6.pack.js"></script>
<script type="text/javascript">
function showAdmin(){
$("#admin_login").toggle("slow");
}
</script>
<style type="text/css">
body {
text-align:center;
font: 80%/1.4 "Lucida Grande", Verdana, sans-serif;
}
#maintenance_box {
margin: 15% auto;
position:relative;
width: 972px;
border: 1px solid #DEDEDE;
}
#image_container {
vertical-align:top;
}
#admin_login{
display: none;
}
img {
margin-right:40px;
}
</style>
</head>
<body>
<div id="maintenance_box">
<table>
<tr>
<td id="image_container">
<img src="<?php echo $CONFIG->wwwroot;?>mod/maintenance/_graphics/maintenance.png">
</td>
<td>
<h1>
<?php echo elgg_echo("maintenance:info");?>
</h1>
<p>
<?php echo $text;?>
</p>
<p>
<?php echo sprintf(elgg_echo("maintenance:adminlogin"), "<a href='javascript:showAdmin()'>" , "</a>");?>
</p>
<div id="admin_login">
<?php echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));?>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
<?php exit();?>