-
Notifications
You must be signed in to change notification settings - Fork 1
/
take_attendance1.php
86 lines (72 loc) · 2.66 KB
/
take_attendance1.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
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Attendance | Academic Administration Application</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport" >
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">Academic Administration Application</a>
</div>
<div class="collapse navbar-collapse" id="navbar1">
<ul class="nav navbar-nav navbar-right">
<?php if (isset($_SESSION['usr_id'])) { ?>
<li><p class="navbar-text">Signed in as <?php echo $_SESSION['usr_name']; ?></p></li>
<li><a href="logout.php">Log Out</a></li>
<li><a href="login.php"></a></li>
<li><a href="register.php"></a></li>
<?php } ?>
</ul>
</div>
</div>
</nav>
<script src="js/jquery-1.10.2.js"></script>
<script src="js/bootstrap.min.js"></script>
<?php
include_once 'dbconnect.php';
$sql = "select courses.cid,courses.cname,faculty.name from courses,faculty where faculty.fid = courses.fid;";
$result = $con->query($sql);
if ($result->num_rows > 0) {
// output data of each row
echo "<div class='container'><table class='table table-striped '>
<thead>
<tr>
<th><center>Course Name</center></th>
<th><center>Faculty Name</center></th>
</tr>
</thead>
<tbody>";
$t = 0;
while($row = $result->fetch_assoc()) {
//$temp = urlencode($row[title]);
echo "<tr><td><center><a href=take_attendance3.php?cid=$row[cid]>"."$row[cname]"."</center></td><td><center>"."$row[name]"."</center></td> </tr>";
echo "<br>";
}
} else {
$t = 1;
echo "Sorry 0 results <br> ";
}
$con->close();
?>
</div>
</tbody>
</table>
<div class="form-group">
<a href="facpage.php"><input type="back" value="Back to home" class="btn btn-primary" /></a>
</div>
</body>
</html>