-
Notifications
You must be signed in to change notification settings - Fork 1
/
view.php
86 lines (80 loc) · 2.37 KB
/
view.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
<?php
require 'session_validator.php';
require_once 'conn.php';
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<?php include "stylesheet.php";?>
<style type="text/css">
table.dataTable thead .sorting:after,
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_asc_disabled:before,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc_disabled:after,
table.dataTable thead .sorting_desc_disabled:before {
bottom: .5em;
}
</style>
<title>S-Hub | View Assignment</title>
</head>
<body>
<?php
include_once "nav_admin.php";
?>
<div class="container"> <!-- bootstrap container start -->
<div class="card p-4 mb-4">
<div class="row"> <!-- bootstrap container row -->
<div class="col">
<h5 class="card-title text-center">Assignments submitted by students</h5>
<table id="viewAssignment" class="table table-striped table-bordered table-sm" >
<thead class="thead-dark">
<tr align="center">
<th>Date</th>
<th>Student Id</th>
<th>Student name</th>
<th>Course Name</th>
<th>Filename</th>
<th>Download</th>
</tr>
</thead>
<tbody>
<?php
$select = "select * from storage";
$query = mysqli_query($con, $select);
while ($fetch = mysqli_fetch_array($query)) {
?>
<tr align="center">
<td><?= date_format(date_create($fetch['date']),"d-m-Y g:i A");?></td>
<td><?= $fetch['s_id']?></td>
<td><?= $fetch['s_name']?></td>
<td><?= $fetch['c_id']?></td>
<td><?= $fetch['filename']?></td>
<td> <a href="download.php?f_id=<?= $fetch['f_id']?>" class="btn btn-sm btn-grey"><i class="fas fa-download"></i></a> </td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div> <!-- bootstrap container row end -->
</div>
</div> <!-- bootstrap container end -->
<?php include "script.php";?>
<script type="text/javascript">
$(document).ready(function () {
$('#viewAssignment').DataTable();
$('.dataTables_length').addClass('bs-select');
});
</script>
</body>
</html>