-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeactivate_prof.php
More file actions
39 lines (33 loc) · 1.18 KB
/
deactivate_prof.php
File metadata and controls
39 lines (33 loc) · 1.18 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
<html>
<head>
<link rel="stylesheet" type="text/css" href="style/css/style.css"/>
<link rel="shortcut icon" href="images/watermelon8.png"/>
</head>
<body>
<?php
require_once 'config.php';
require_once BUSINESS_DIR_USER. 'User.php';
require_once BUSINESS_DIR_USER . 'UserManager.php';
$userManager = new UserManager();
$userId = intval( $_GET["id"]);
if($_POST){
$decativate = $userManager -> deleteUser($userId);
if(!$decativate) {
echo "<script>alert('Error: Cannot Delete');</script>";
} else {
header("Location: user_test/logout.php");
}
}
?>
<div align="center" style="padding-top: 200px">
<h1><img src="images/sad.png" alt="unhappy" /> We are sorry. You are leaving.</h1>
<h2>Are sure you want to cancle your account?</h2>
<form action="deactivate_prof.php?id=<?php echo $userId ?>" method="POST">
<div>
<span><input class="search_button" type="submit" name="Submit" value="YES" /></span>
<span><a class="search_button" style="padding: 3px 45px 7px;" href="profile.php">NO</a></span>
</div>
</form>
</div>
</body>
</html>