-
Notifications
You must be signed in to change notification settings - Fork 2
/
departments.php
137 lines (130 loc) · 6.48 KB
/
departments.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
<?php
session_start();
require_once("assets/connection.php");
require_once("assets/session-handler.php");
require_once("functions/fdepartment.php");
?>
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<!-- Favicon icon -->
<link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon.png">
<title>Equipment Loan System</title>
<!-- Custom CSS -->
<link href="assets/libs/flot/css/float-chart.css" rel="stylesheet">
<link href="assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="assets/libs/select2/dist/css/select2.min.css">
<!-- Custom CSS -->
<link href="dist/css/style.min.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="preloader">
<div class="lds-ripple">
<div class="lds-pos"></div>
<div class="lds-pos"></div>
</div>
</div>
<div id="main-wrapper">
<?php require_once("templates/topbar.php") ?>
<?php require_once("templates/sidebar.php") ?>
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Administrator</h4>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-9">
<div class="card">
<div class="card-body">
<h5 class="card-title">Department List</h5>
<div class="table-responsive">
<table id="zero_config" class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Abbreviate</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$getDepartmentList = mysqli_query($conn,"SELECT * FROM departments");
while($fetchDepartmentList = mysqli_fetch_assoc($getDepartmentList)){
?>
<tr>
<td align="center"><?= $fetchDepartmentList["dprtName"] ?></td>
<td><?= $fetchDepartmentList["dprtAbbr"] ?></td>
<td><a href="?delete=<?=$fetchDepartmentList["dprtID"]?>" class="btn btn-block btn-danger">DELETE</a></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<th>Name</th>
<th>Abbreviate</th>
<th>Action</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card">
<div class="card-body">
<h4 class="card-title">Add Department </h4>
<form method="post">
<div class="form-group">
<label>Name :</label>
<input type="text" name="dprtName" class="form-control" placeholder="Department Name" required/>
</div>
<div class="form-group">
<label>Abbreviate :</label>
<input type="text" name="dprtAbbr" class="form-control" placeholder="Department/Faculty Shortform" required/>
</div>
<button type="submit" class="btn btn-primary" name="btnAddDepartment">Add</button>
</form>
</div>
</div>
</div>
</div>
<?php require_once("templates/footer.php") ?>
</div>
</div>
<script src="assets/libs/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap tether Core JavaScript -->
<script src="assets/libs/popper.js/dist/umd/popper.min.js"></script>
<script src="assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="assets/libs/perfect-scrollbar/dist/perfect-scrollbar.jquery.min.js"></script>
<script src="assets/extra-libs/sparkline/sparkline.js"></script>
<!--Wave Effects -->
<script src="dist/js/waves.js"></script>
<!--Menu sidebar -->
<script src="dist/js/sidebarmenu.js"></script>
<!--Custom JavaScript -->
<script src="dist/js/custom.min.js"></script>
<script src="assets/extra-libs/DataTables/datatables.min.js"></script>
<script>
$('#zero_config').DataTable();
</script>
</body>
</html>