-
Notifications
You must be signed in to change notification settings - Fork 1
/
delacc.php
28 lines (28 loc) · 1018 Bytes
/
delacc.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
<?php include("top.php"); ?>
<?php
if (isset($_POST["yes"])) {
if ($_SESSION["nick"] != "") {
$accname = $_SESSION["nick"];
session_unset("nick");
session_unset("pwd");
session_destroy();
if (file_exists("statefilesz/" . $accname . ".dat")) unlink("statefilesz/" . $accname . ".dat");
if (file_exists("usersz/" . $accname)) unlink("usersz/" . $accname);
if (is_dir("recs/" . $accname)) xrmdir("recs/" . $accname);
echo("<span style=\"color: #00CC00\">Account \"" . $accname . "\" deleted!</span>");
} else {
echo("<span style=\"color: #FF0000\">You are nat logged in!</span>");
}
} else {
?>
Are you sure you wanna delete your acc?<br/><br/>
<table><tr>
<td><form name="delacc" action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
<input type="submit" name="yes" value="Yes">
</form></td>
<td><form name="nat" action="acc.php">
<input type="submit" name="no" value="No">
</form></td>
</tr></table>
<?php } ?>
<?php include("tpo.php"); ?>