-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeleteAcct.php
More file actions
77 lines (70 loc) · 1.98 KB
/
Copy pathdeleteAcct.php
File metadata and controls
77 lines (70 loc) · 1.98 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
74
75
76
77
<?php
define('INCLUDE_CHECK',true);
$TO_ROOT = "";
require 'includes/membersOnly.php';
require 'includes/functions.php';
$deleted = false;
if ($_POST['deleteAcc'])
{
$userid = $_SESSION['id'];
mysql_query("DELETE FROM admins WHERE userid='".$userid."'");
mysql_query("DELETE FROM settings WHERE userid='".$userid."'");
mysql_query("DELETE FROM panel WHERE userid='".$userid."'");
mysql_query("DELETE FROM users WHERE userid='".$userid."'");
$deleted = true;
header( "Refresh: 3; url=index.php" );
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CyCal</title>
<link href="css/reset.css" rel="stylesheet" type="text/css">
<link href="css/mainstyle.css" rel="stylesheet" type="text/css">
<link href="js/css/jquery-ui.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<?php
include 'includes/topbar_header.php';
?>
</head>
<body>
<?php
//Must be included at the top of the <body> tag
define("NOCANVAS", true);
include 'includes/topbar.php';
?>
<div id="Container_Normal">
<div id="MainContainer">
<div id="Header_Title">
<h1>Delete Account</h1>
</div>
<p>Are you sure you want to delete your account? <a href="canvas.php">No! Go back</a></p>
<br>
<p><strong>All data, including settings, RSS feeds, and account info, will be removed!</strong>
You must re-register if you would like to use this site again.</p>
<?php
if ($deleted)
{
echo "
<br>
<br>
<h1 style='text-align:center'>Your account has been deleted</h1>
<p style='text-align:center'>Redirecting to main page...please wait.</p>
<br>
<br>
";
}
else
{
echo "
<form method='POST'>
<input type='submit' name='deleteAcc' value='Delete My Account'>
</form>
";
}
?>
</div>
</div>
</body>
</html>