forked from foxgalaxy23g/Meetlook-Open
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwarning-delete.php
More file actions
51 lines (49 loc) · 1.71 KB
/
warning-delete.php
File metadata and controls
51 lines (49 loc) · 1.71 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
<?php
include("elements/php/translator.php");
include("elements/php/cursor.php");
include("elements/php/db.php");
include("elements/php/closed.php");
?>
<?php
include("elements/php/verify.php");
// Удаление аккаунта
if (isset($_POST['delete_account'])) {
$delete_query = "DELETE FROM users WHERE id = ?";
$stmt = $conn->prepare($delete_query);
$stmt->bind_param('i', $user_id);
if ($stmt->execute()) {
echo "Аккаунт удален.<br>";
header("Location: exit.php");
exit();
} else {
echo "Ошибка удаления аккаунта.<br>";
}
$stmt->close();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Logout Confirmation</title>
<link rel="stylesheet" href="elements/css/warning.css">
<link rel="icon" href="elements/embeded/logo.png" type="image/x-icon"/>
<meta name="robots" content="noindex, nofollow">
</head>
<body>
<noscript>
<meta http-equiv="refresh" content="0; url=/javascript.html">
</noscript>
<div class="logout-container">
<h2>Are you sure you want delete your <?php echo($project_name); ?> account?</h2>
<form method="POST">
<div class="button-container">
<button class="logout-btn" type="submit" name="delete_account">Delete</button>
<button class="cancel-btn" onclick="window.location.href='feed.php'">Cancel</button>
</div>
</form>
</div>
<script src="elements/js/safe.js"></script>
</body>
</html>