/
deleteAccounts.php
140 lines (128 loc) · 4.48 KB
/
deleteAccounts.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php session_start();?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Delete Accounts</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
crossorigin="anonymous">
<!-- Custom styles for this template -->
<link rel="stylesheet" href="/css/cssAddWords.css" />
</head>
<body>
<!-- Add Nav Bar part-->
<?php include "topbar-header.php";
include "sidebar-header.php"
?>
<!-- Start main html-->
<main class="col-sm-9 ml-sm-auto col-md-10 pt-3" role="main">
<!-- Alert boxes stuff-->
<?php
include("alertmessages-header.php");
// check get variable for import success
if(isset($_GET["imp"])) {
echo specialMessages($_GET["imp"],"success");
} else{
// check get for import fail
if(isset($_GET["fal"])) {
echo specialMessages($_GET["fal"],"error");
}else{
echo simpleMessages();
}
}
?>
<!-- Modal to ask are you sure if you want to delete-->
<div id ="sure" class="modal fade">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Are You Sure?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Modal body text goes here.</p>
</div>
<div class="modal-footer">
<button type="button" id="modalsave" class="btn btn-danger">Delete</button>
<button type="button" id ="modalclose "class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- END of Alert box stufff-->
<H1>Delete Accounts</H1>
<!-- Table Part-->
<div class="table-responsive">
<H2>Students</H2>
<table id="student_table" class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th> </th>
</tr>
</thead>
<tbody id = "t_body1"></tbody>
</table>
</div>
<div class="table-responsive">
<H2>Teachers</H2>
<table id="teacher_table" class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th> </th>
</tr>
</thead>
<tbody id = "t_body2"></tbody>
</table>
</div>
<div class="table-responsive">
<H2>Admins</H2>
<table id="admin_table" class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th> </th>
</tr>
</thead>
<tbody id = "t_body3"></tbody>
</table>
</div>
</main>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS Code from bootstrap site -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
crossorigin="anonymous"></script>
<script src="https://code.jquery.com/qunit/qunit-2.4.1.js"></script>
<script src="/tests/tests.js"></script>
<script>
if (typeof ($.fn.modal) === 'undefined') {
document.write('<script src="/js/bootstrap.min.js"><\/script>')
}
</script>
<script>
window.jQuery || document.write('<script src="/js/jquery-3.2.1.min.js"><\/script>');
</script>
<div id="bootstrapCssTest" class="hidden"></div>
<script>
$(function () {
if ($('#bootstrapCssTest').is(':visible')) {
$("head").prepend('<link rel="stylesheet" href="/css/bootstrap.min.css">');
}
});
</script>
<script src="/js/deleteAccounts.js"></script>
</body>
</html>