-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete.php
More file actions
74 lines (60 loc) · 2.65 KB
/
delete.php
File metadata and controls
74 lines (60 loc) · 2.65 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
<?php
// START SESSION
session_start();
// LOGOUT REQUEST
if (isset($_POST["logout"])) { unset($_SESSION["user"]); }
// REDIRECT TO LOGIN PAGE IF NOT LOGGED IN
if (!isset($_SESSION["user"])) {
header("Location: login.php");
exit();
}
// PULL VM ID
$vmid = $_GET['vmid'];
// INCLUDE HEADER FILE
include 'header.php';
// PAGE CONTENT
echo '
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<h1 class="h3 mb-4 text-gray-800"></h1>
<!-- Start Upload Card Section -->
<h1>Delete VM</h1>
<div class="row">
<div class="col-lg-6">
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Delete Confirmation</h6>
</div>
<div class="card-body">
<p>Are you sure you want to delete VM: <strong>' . $vmid . '</strong></p>
';
//UPLOAD PHP FORM
if (isset($_SESSION['message']) && $_SESSION['message'])
{
printf('<b>%s</b>', $_SESSION['message']);
unset($_SESSION['message']);
}
echo '
<form method="POST" action="vm-delete.php" enctype="multipart/form-data">
<div class="custom-control custom-checkbox small">
<input type="checkbox" class="custom-control-input" id="customCheck" name="confirm" required>
<label class="custom-control-label" for="customCheck">Check to Confirm</label>
</div>
<hr>
<input type="submit" class="btn btn-danger button" name="delete" value="Delete" />
<input type="hidden" name="vmid" value="' . $vmid . '" />
</form>
</div>
</div>
</div>
<!-- End Confirmation Card Section -->
</div>
<!-- /.container-fluid -->
</div>
</div>
<!-- End of Main Content -->
';
// INCLUDE HEADER FILE
include 'footer.php';