-
Notifications
You must be signed in to change notification settings - Fork 0
/
deactivate.php
71 lines (67 loc) · 1.71 KB
/
deactivate.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
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
<doctype! html>
<html>
<head>
<title> Deactivate Your Account </title>
<meta charset='UTF-8'>
<style>
body {
background: url(invert.png);
background-repeat: repeat-all;
text-align: center;
background-position: right;
background-attachment: fixed;
}
.tcenter { text-align: center; }
.tcolor { background: rgba(255,255,255,0.8); }
.tbcolor { background: rgba(0,255,255,0.8); }
.button:hover { background: cyan; cursor: pointer; }
</style>
</head>
<?php
include "user_mgmt.php";
session_start();
$_SESSION['deactivate']=$_POST['deactivate'];
$home_user=$_SESSION['user_obj'];
if(isset($_SESSION['deactivate'])){
$home_user->free_bit="d";
flush_user($home_user);
}
function hide($string){
if(!isset($_SESSION['deactivate'])){
echo $string;
}
}
function show($string){
if(isset($_SESSION['deactivate'])){
echo $string;
}
}
?>
<body>
<table style='margin-top:150px' align='center' class='tcenter tcolor' border='1'>
<tr>
<td>
<?php
hide("<font size='8'>
Are you sure you want to do that?
</font>
<p>
<form action='deactivate.php' method='post'>
<input type='submit' name='deactivate' value='Click here to deactivate'>
</form>
</p>");
show(" <font size='8'> :((( We're sad to see you go. <br> The next time you login your account will reactivate. </font>");
?>
</td>
<?php
show("</tr><tr><td><p><font size='4'> Your account will be regrettably removed from the system within 7 to 14 days. </font></p></td>");
echo "<tr><td>Please <a href=\"#\"' onclick=\"history.back();\"> click here</a> to go back.</td>";
if(isset($_SESSION['deactivate'])){
session_unset();
session_destroy();
}
?>
</tr>
</table>
</body>
</html>