blob: d1ce8b9da18470a92dd5cbf9863931484d42b3cc (
plain) (
blame)
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
|
<?php
$user = require_login();
$to_delete = null;
try {
$to_delete = Database\User::fromDB($username);
}
catch(Exception $e) {}
?>
<?php if ($to_delete !== null && $user->UID === $to_delete->UID): ?>
<h1>Are you sure you want to delete <?= $to_delete->Username ?>?</h1>
<form action="#" method="POST" class="font-115 flex-col-centered max-width-20 center-margin">
<input type="hidden" name="method" value="DELETE">
<?php if (isset($user_status)): ?>
<?php if ($user_status !== ""): ?>
<p class="item error"><span>
<strong>Error:</strong> <?= $user_status ?>
</span></p>
<?php endif; ?>
<?php endif; ?>
<input type="hidden" name="uid" value="<?= $to_delete->UID ?>">
<input type="submit" value="Delete forever!">
</form>
<?php elseif ($to_delete === null): ?>
<h2>The user "<?= $username ?>" doesn't exist!</h2>
<?php else: ?>
<h2>You have no permission to delete <?= $to_delete->Username ?>!</h2>
<?php endif; ?>
|