-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseminar.php
120 lines (108 loc) · 5.46 KB
/
seminar.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
<?php
require_once('index.php');
require_once('includes/NewDB.php');
require_once('templates/header.php');
session_start();
if(isset($_SESSION['user_id']) && isset($_SESSION['username'])) {
if ($conn -> connect_errno) {
echo "Failed to connect to MySQL: " . $conn -> connect_error;
exit();
}
$result = $conn->query("SELECT * FROM seminar_vw") or die(mysqli_error($conn));
?>
<!DOCTYPE html>
<html>
<head>
<?php include("templates/header.php");?>
</head>
<body id="page-top">
<div id="wrapper">
<?php include("templates/sidebar.php");?>
<div class="d-flex flex-column" id="content-wrapper">
<div id="content">
<?php include("templates/navbar.php");?>
<div class="container-fluid">
<h3 class="text-dark mb-4">Employee List</h3>
<div class="card shadow">
<div class="card-header py-3" style="background: var(--purple);">
<p class="text-primary m-0 font-weight-bold" style="color: rgb(247,247,247)!important;">Employee Info</p>
</div>
<div class="card-body">
<div class="table-responsive table mt-2" id="dataTable" role="grid" aria-describedby="dataTable_info">
<table class="table my-0" id="employeeTable">
<thead>
<tr>
<th>Employee No.</th>
<th>Name</th>
<th>Seminar Name</th>
<th>Seminar Completed</th>
</tr>
</thead>
<tbody>
<?php
while ($rows = $result->fetch_assoc()):?>
<tr>
<td><?php echo $rows['Employee_No'];?></td>
<td><?php echo $rows['Last_Name'],' ',$rows['First_Name'],' ',$rows['Middle_Name'];?></td>
<td><?php echo $rows['Seminar_Name'];?></td>
<td><?php echo $rows['Seminar_Completed'];?></td>
</tr>
<?php endwhile ?>
</tbody>
<tfoot>
<tr>
<td>Employee No.</td>
<td>Name</td>
<td>Seminar Name</td>
<td>Seminar Completed</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
<footer class="bg-white sticky-footer">
<div class="container my-auto">
<div class="text-center my-auto copyright"><span>Copyright © UDManagement 2021</span></div>
</div>
</footer>
</div><a class="border rounded d-inline scroll-to-top" href="#page-top"><i class="fas fa-angle-up"></i></a>
</div>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/chart.min.js"></script>
<script src="assets/js/bs-init.js"></script>
<script src="assets/js/theme.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.js"></script>
<script src="assets/js/jquery.dataTables.min.js"> </script>
<script src="assets/js/dataTables.bootstrap4.min.js"> </script>
<script src="https://cdn.datatables.net/buttons/1.7.1/js/dataTables.buttons.min.js"></script>
<script src=" https://cdn.datatables.net/buttons/1.7.1/js/buttons.bootstrap4.min.js "></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.7.1/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.7.1/js/buttons.print.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.7.1/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
$('#employeeTable').DataTable({
dom: 'fBrtlip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print', 'colvis'
],
"order": [ 0, 'asc' ]
});
} );
</script>
<?php
}else
{
header("Location: login.php");
exit();
}
?>
</body>
</html>