-
Notifications
You must be signed in to change notification settings - Fork 2
/
pdffiles.php
48 lines (44 loc) · 1.31 KB
/
pdffiles.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
<?php
require 'include/headerindex.php';
?>
<style type="text/css">
td{
text-align: center;
}
</style>
<center><h3><b>Sample Model Question Papers 2015-16</b></h3></center>
<?php
$i = 0;
$x = $obj->get_branches($conn);
while($b = $x->fetch()) {
$branchId = $b['branchId'];
$branchName = $b['branchName'];
$flag = 0;$i++;
$query = $obj->view_pdf_branch($conn, $branchId);
$num_rows = $query->rowCount();
if($num_rows != 0) {
echo "<center><h3><b>Branch Name:</b> $branchName ( $branchId )</h3></center>";
echo '<center><div class="table-responsive" style="width:50%;">
<table align="center" class="table table-striped table-bordered table-hover">
<thead><tr>
<th>Semester</th>
<th>Subject</th>
<th>Download</th>
</tr></thead>';
while ($row = $query->fetch()) {
$fileid = $row['fileid'];
$fileformat = $row['fileformat'];
$semester = $row['semester'];
$subjectId = $row['subjectId'];
$subjectName = $row['subjectName'];
$completefile = $fileid.".".$fileformat;
echo "<tr><td>$semester</td><td>$subjectName ( $subjectId )</td>";
echo "<td><a href='downloadpdf.php?file=$completefile'><i class='fa fa-download btn btn-info'></i></a></td></tr>";
}
echo "</table></div></center>";
}
}
?>
<?php
include 'include/footerindex.php';
?>