/
notice.php
executable file
·64 lines (57 loc) · 1.95 KB
/
notice.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
<?php
include 'includes/core.php';
include('database/connect.php');
if(isset($_REQUEST['notice_id'])){
$get_notice_id=$_REQUEST['notice_id'];
}
else{
$get_notice_id=0;
}
$post_date=date('d-m-Y');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php $active_nav="notice"; $page_title = "Notice"; include 'includes/head.php' ?>
</head>
<body>
<?php include 'includes/header.php'; ?>
<!------------Content Section (Add Your Code From Here)------------>
<div class="showNotice">
<div class="container">
<div class="col-md-8">
<?php
$noticeQry=mysql_query("select * from noticeboard where id='$get_notice_id'");
$getFile = null;
$getNoticeTitle = null;
$getNotice = null;
$getDate = null;
while($getVal=mysql_fetch_array($noticeQry)){
$getFile=$getVal['file_name'];
$getNoticeTitle=$getVal['notice_title'];
$getNotice=$getVal['notice'];
$getDate=$getVal['post_date'];
}
?>
<div class="panel panel-default">
<div class="panel-heading"><?php echo $getNoticeTitle;?> </div>
<div class="panel-body" style="text-align:justify"><?php echo $getDate; echo '<p style=\"text-align:justify\">'.$getNotice.'<p>';?></div>
</div>
<?php
if(!empty($getFile)){
$file='post_files/'.$getFile;
$filename=$getFile;
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="'.$filename.'"');
header('Content-Transfer-Encoding: binary');
header('Accept-Range: bytes');
@readfile($file);
}
?>
</div>
<div class="col-md-4"></div>
</div>
</div>
<?php include 'includes/footer.php' ?>
</body>
</html>