-
Notifications
You must be signed in to change notification settings - Fork 0
/
details.php
69 lines (58 loc) · 2.12 KB
/
details.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
65
66
67
68
69
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>A news platform</title>
<link rel="stylesheet" href="styles/style.css" media="all" />
</head>
<body>
<div class="container1">
<!--header starts here-->
<div class="head">
<a href="index.php"><img id="logo" src="images/logo.png"/></a>
</div>
<!--header ends-->
<!--main container starts from here-->
<div class="container">
<!--navigation bar starts-->
<?php include("includes/navbar.php"); ?>
<!--Navigation bar ends-->
<br /><br />
<!--content area start-->
<div class="post_area">
<?php
if(isset($_GET['post'])){
$post_id = $_GET['post'];
$get_posts = "select * from posts where post_id=$post_id";
$run_posts = mysql_query($get_posts);
while ($row_posts = mysql_fetch_array($run_posts)){
$post_title = $row_posts['post_title'];
$post_date = $row_posts['post_date'];
$post_author = $row_posts['post_author'];
$post_image = $row_posts['post_image'];
$post_content = $row_posts['post_content'];
echo "
<h2>$post_title</h2>
<span><i>Posted by</i> <b>$post_author On $post_date</b></span><span style='color:brown;'></span><br /><br />
<a href='admin/news_images/$post_image'><img src='admin/news_images/$post_image' width='400' height='400' /></a>
<div>$post_content</div>
"; //rmlink is for read more
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<?php
include("includes/comment_form.php");
?>
</div>
<!--content area ends-->
<!-- sidebar starts -->
<?php include("includes/sidebar.php"); ?>
<!-- sidebar end -->
<!-- footer area starts -->
<div class="footer_area">
<h1 style="padding:20px; text-align:center">© All Rights Reserved 2016 - LXNCreations</h1>
</div>
<!-- footer area ends -->
</body>
</html>