generated from akshatvg/template-materialize
-
Notifications
You must be signed in to change notification settings - Fork 4
/
view2CC.php
87 lines (78 loc) · 2.73 KB
/
view2CC.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
<?php
require('db.php');
session_start();
if (!isset($_SESSION["regNo"])) {
header("Location: loginStud");
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<?php
include("templates/metas.php");
?>
<!-- URLs -->
<meta name="url" content="https://exc-vtop.akshatvg.com/view2CC">
<meta property="og:url" content="https://exc-vtop.akshatvg.com/view2CC">
<link rel="canonical" href="https://exc-vtop.akshatvg.com/view2CC">
<?php
include("templates/header.php");
?>
<?php
include("templates/nav.php");
?>
<!-- Main Content -->
<div class="container">
<!-- Heading -->
<div class="row mt-5">
<h4>View All 2CC Courses</h4>
</div>
<!-- Table -->
<div class="row">
<div class="col s12">
<div class="card material-table">
<div class="table-header">
<span class="table-title">Available Courses</span>
<div class="actions">
<a href="#" class="search-toggle waves-effect btn-flat nopadding"><i class="material-icons">search</i></a>
</div>
</div>
<table id="2ccCourseTable" class="responsive-table highlight centered">
<thead>
<tr>
<th>CODE </th>
<th>COURSE NAME </th>
<th>FACULTY NAME </th>
<th>CLUB NAME </th>
</tr>
</thead>
<tbody id="2ccCourses">
<?php
// Make Query & Get Result
$sql = "SELECT courseCode,courseName,facultyCoord,clubName FROM 2ccCourses ORDER BY courseCode";
$result = mysqli_query($con, $sql);
// Associative array
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
?>
<!-- Display courses -->
<td><?php echo htmlspecialchars($row['courseCode']); ?></td>
<td><?php echo htmlspecialchars($row['courseName']); ?></td>
<td><?php echo htmlspecialchars($row['facultyCoord']); ?></td>
<td><?php echo htmlspecialchars($row['clubName']); ?></td>
<?php
// Free result set
mysqli_free_result($result);
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php
include("templates/footer.php");
?>
<script src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
<script src="libs/js/view2CCTable.js"></script>
<body>
</html>