-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtech_view_exam.php
More file actions
136 lines (111 loc) · 2.94 KB
/
tech_view_exam.php
File metadata and controls
136 lines (111 loc) · 2.94 KB
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
<?php
include"database.php";
session_start();
if(!isset($_SESSION["TID"]))
{
echo"<script>window.open('index.php?mes=Access not granted','_self');</script>";
}
?>
<!DOCTYPE html>
<html>
<head>
<title>ASP - Admin </title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<?php include"navbar.php";?><br>
<div id="section">
<?php include"sidebar.php";?><br>
<h3 class="text">Welcome <?php echo $_SESSION["TNAME"]; ?></h3><br><hr><br>
<div class="content">
<h3>View Exam</h3><br>
<form method="post" action="<?php echo $_SERVER["PHP_SELF"];?>">
<div class="lbox1">
<label>Exam Date</label><br>
<select name="edate" required class="input3">
<?php
$sl="SELECT * FROM exam";
$r=$db->query($sl);
if($r->num_rows>0)
{
echo"<option value=''>Select</option>";
while($ro=$r->fetch_assoc())
{
echo "<option value='{$ro["EDATE"]}'>{$ro["EDATE"]}</option>";
}
}
?>
</select>
</div>
<div class="rbox">
<label>Batch</label><br>
<select name="cla" required class="input3">
<?php
$sl="SELECT DISTINCT(CNAME) FROM class";
$r=$db->query($sl);
if($r->num_rows>0)
{
echo"<option value=''>Select</option>";
while($ro=$r->fetch_assoc())
{
echo "<option value='{$ro["CNAME"]}'>{$ro["CNAME"]}</option>";
}
}
?>
</select>
<br><br>
</div>
<button type="submit" class="btn" name="view"> View Details</button>
</form>
<br>
<div class="Output">
<?php
if(isset($_POST["view"]))
{
echo "<h3>Exam Time Table</h3><br>";
$sql="select * from exam where EDATE='{$_POST["edate"]}' and CLASS='{$_POST["cla"]}'";
$re=$db->query($sql);
if($re->num_rows>0)
{
echo '
<table border="1px">
<tr>
<th>S.NO</th>
<th>Date</th>
<th>Class</th>
<th>Subject</th>
<th>Exam Name</th>
<th>Exam Type</th>
<th>Session</th>
</tr>
';
$i=0;
while($r=$re->fetch_assoc())
{
$i++;
echo"
<tr>
<td>{$i}</td>
<td>{$r["EDATE"]}</td>
<td>{$r["CLASS"]}</td>
<td>{$r["SUB"]}</td>
<td>{$r["ENAME"]}</td>
<td>{$r["ETYPE"]}</td>
<td>{$r["SESSION"]}</td>
</tr>
";
}
}
else
{
echo "No Record Found";
}
echo "</table>";
}
?>
</div>
</div>
</div>
<?php include"footer.php";?>
</body>
</html>