-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbanned.php
More file actions
73 lines (63 loc) · 2.24 KB
/
Copy pathbanned.php
File metadata and controls
73 lines (63 loc) · 2.24 KB
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
<?php
ob_start();
$mysqli = new mysqli("localhost","loriasne_user","chez1","loriasne_main");
global $mysqli;
$shoutquery = $mysqli->query("SELECT * FROM `shout`");
$shout = $shoutquery->fetch_array();
$shoutmsg = $shout['shout'];
$shouterid = $shout['shouter'];
$shouterquery = $mysqli->query("SELECT * FROM `accounts` WHERE `id`='$shouterid'");
$shouter = $shouterquery->fetch_array();
function thetime()
{
$thetime = getdate();
print_r($thetime);
}
$logged = false;
if($_COOKIE['username'] && $_COOKIE['password']){
$username = strip_tags($_COOKIE['username']);
$password = strip_tags($_COOKIE['password']);
$usrquery = $mysqli->query("SELECT * FROM `accounts` WHERE `password`='$password'");
$usr = $usrquery->fetch_array();
if($usr != 0){
$logged = true;
}
}
$uID = $usr['id'];
$timey = time();
$mysqli->query("UPDATE `accounts` SET `status`='$timey' WHERE `id`='$uID'");
if(time() - $usr['status'] > 5) {
$mysqli->query("UPDATE `accounts` SET `isstatus`='true' WHERE `id`='$uID'");
}else{
$mysqli->query("UPDATE `accounts` SET `isstatus`='false' WHERE `id`='$uID'");
}
if(!$usr['banned'] == "1"){
header('Location: index.php');
}else{
?>
<html>
<head>
<title>Lorias</title>
<link href="/img/favicon.ico" rel="icon" type="image/x-icon" />
<!-- <script src="/snowstorm.js"></script> -->
<link rel="stylesheet" type="text/css" href="/major.css">
</head>
<body>
<br><br><br>
<div class="lander">
<h1> You are banned. </h1> <br />
<center><table style="border:0px solid black;" width="50%" bordercolor="000" width="100%" cellpadding="3" cellspacing="3">
<tr>
<td><b>For:</b></td>
<td><?php echo $usr['bannedReason']; ?> <br /></td>
</tr>
<tr>
<td><b>Reason:</b></td>
<td><?php echo $usr['bannedFor']; ?> <br /></td>
</tr>
</table></center>
<a href="/logout.php" style="color:red;">Logout</a>
</div>
<?php
}
?>