-
Notifications
You must be signed in to change notification settings - Fork 3
/
banned.php
63 lines (47 loc) · 1.5 KB
/
banned.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
<?php
define('BAN_PAGE', true);
require_once "global.php";
$ban = null;
if (uberUsers::IsIpBanned(USER_IP)) {
$ban = uberUsers::GetBan('ip', USER_IP, true);
}
if (LOGGED_IN && uberUsers::IsUserBanned(USER_NAME)) {
$ban = uberUsers::GetBan('user', USER_NAME, true);
}
if ($ban == null) {
header("Location: " . WWW . "/");
exit;
}
$tpl->Init();
$tpl->AddGeneric('head/head-init');
$tpl->AddGeneric('head/process-template');
$tpl->AddGeneric('head/head-bottom');
$tpl->Write('<script language="JavaScript" type="text/javascript">
document.logoutPage = true;
</script>');
$tpl->AddGeneric('process-template-top');
if ($ban['reason'] == "") {
$ban['reason'] = "Sem razão especifica";
}
$tpl->Write("<div class='action-error flash-message'>
<div class='rounded'>
<b>Você foi banido pela seguinte razão: {$ban['reason']}. O seu banimento acabará em " . date('d F, Y', $ban['expire']) . "</b>
</div>
</div>");
$tpl->Write('<div style="text-align: center">
<div style="width:100px; margin: 10px auto"><a href="#" id="logout-ok" class="new-button fill"><b>OK</b><i></i></a></div>
</div>');
$tpl->AddGeneric('process-template-bottom');
$tpl->Write('<script type="text/javascript">
Event.observe(\'logout-ok\', \'click\', function(e) {
Event.stop(e);
document.location.href=\'%www%\';
});
Cookie.erase("habboclient");
Cookie.erase("friendlist");
</script>');
$tpl->AddGeneric('footer');
$tpl->SetParam('page_title', 'Sair');
$tpl->SetParam('body_id', 'logout');
$tpl->Output();
?>