-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHomeData.php
More file actions
54 lines (46 loc) · 1.61 KB
/
HomeData.php
File metadata and controls
54 lines (46 loc) · 1.61 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
<?php
include 'Connection.php';
$semester = isset($_POST['semester']) ? $_POST['semester'] : '';
$category = isset($_POST['category']) ? $_POST['category'] : '';
switch ($category) {
case 'Exam Time Table':
case 'Exam Syllabus':
case 'Exam Seat Number':
case 'Quetion Paper':
case 'Result':
$query = "SELECT * FROM circulardb WHERE CATAGORY='$category' AND SEMESTER='$semester' ORDER BY ID DESC;";
break;
case 'Activity':
case 'Event':
case 'Notice':
$query = "SELECT * FROM circulardb WHERE CATAGORY='$category' AND SEMESTER='$semester' ORDER BY ID DESC;";
break;
default:
$query = "SELECT * FROM circulardb ORDER BY ID DESC;";
}
$result = $conn->query($query) or die($conn->error);
echo "<div class='row'>";
echo "<table class='table text-white'>";
while ($row = $result->fetch_assoc()) {
echo '<tr>';
echo '<td style="width:260px">' . $row['DATE'] . '</td>';
echo '<td style="width:380px">' . $row['C_NAME'] .
'</td>';
echo '<td>';
echo "<button id='sidebarCollapse'
type='submit'
class='btn btn-light bg-white rounded-pill shadow-sm px-4 mb-4 text-dark' name='submit'
role='button'
style='border:none;padding:0px;background:transparent'
>
<a href='Download.php?ID={$row['ID']}'>
<download>
<i class='fa fa-download mr-2' style='color:white;font-size:22px'></i>
</download>
</a>
</button>";
echo '</td>';
echo '</tr>';
}
echo '</table>';
echo '</div>';