-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpdffiles2.php
51 lines (46 loc) · 1.53 KB
/
pdffiles2.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
<?php
require 'include/headerupload.php';
?>
<style type="text/css">
td{
text-align: center;
font-size: 15px;
}
</style>
<center><h3><b>Sample Model Question Papers For Session 2015-16</b></h3></center>
<?php
$i = 0;
$x = $obj->get_branches($conn);
echo '<center><div class="table-responsive" style="width:50%;">
<table align="center" class="table table-striped table-bordered table-hover">
<thead><tr style="background-color: #929292;">
<th><center><h5><b>Semester</b></h5></center></th>
<th><center><h5><b>Subject</b></h5></center></th>
<th><center><h5><b>Download</b></h5></center></th>
</tr></thead>';
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 "<tr style='background-color: #E0E0E0;'><td colspan='3'><h4><b>$branchName ( $branchId )</b></h4></td></tr>";
while ($row = $query->fetch()) {
$title = $row['title'];
$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';
?>