ban
This commit is contained in:
parent
d3f8c1ae17
commit
3a34471306
3 changed files with 20 additions and 5 deletions
|
@ -19,11 +19,25 @@
|
|||
|
||||
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
if (!$result) return null;
|
||||
|
||||
$stmt = $db->prepare("SELECT * FROM main.ban WHERE username = ?");
|
||||
$stmt->execute([$username]);
|
||||
|
||||
return $username;
|
||||
}
|
||||
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
if (!$result) return $username;
|
||||
|
||||
$reason = $result['reason']; ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Banned</h1>
|
||||
<p>You are banned for <?php echo $reason?>.</p>
|
||||
</body>
|
||||
</html>
|
||||
<?php die();
|
||||
}
|
||||
|
||||
if (array_key_exists('token',$_COOKIE)) {
|
||||
$username = auth($_COOKIE['token']);
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue