-
Notifications
You must be signed in to change notification settings - Fork 0
/
News3_page.php
28 lines (28 loc) · 1.72 KB
/
News3_page.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
<?php
$reading=get_reading($_GET["s"],"sidebar")+1;
$sql="update ".$CFG->prefix."sidebar set reading=".$reading." where name='".$_GET["s"]."'";
$rs=mysqli_query($conn,$sql);
$sql="select * from ".$CFG->prefix."contents as a,".$CFG->prefix."content_pos as b where a.id = b.contentid and b.page='".$_GET["s"]."'";
$rs=mysqli_query($conn,$sql);
while($data=mysqli_fetch_assoc($rs))
{
?>
<div class="article">
<h2><span><?=$data["title"];?></span> </h2>
<p class="infopost">ประกาศวันที่ <span class="date"><?=$data["postdate"];?></span> โดย <a href="#"><?=$data["postby"];?></a> | สถานที่ <?=$data["place"];?><a href="#" class="com"><span><?=$data["reading"];?></span></a></p>
<div class="clr"></div>
<div class="img"><img src="images/<?=$data["picture"];?>" width="650" height="196" alt="" class="fl" /></div>
<div class="post_content">
<p><?=$data["header"];?></p>
<p class="spec">
<a href="like.php?id=<?=$data["id"];?>" class="rm"> ถูกใจ (<?=$data["likes"];?> ครั้ง) </a><a href="#" class="rm">|</a>
<a href="?is=<?=$_GET["is"];?>&s=<?=$_GET["s"];?>&id=<?=$data["id"];?>" class="rm"> อ่านรายละเอียด (<?=$data["reading"];?> ครั้ง) </a><a href="#" class="rm">|</a>
<a href="#" class="rm"> แชร์ (<?=$data["share"];?> ครั้ง) </a>
</p>
</div>
<div class="clr"></div>
</div>
<?php
}
?>
<p class="pages"><small>Page 1 of 2</small> <span>1</span> <a href="#">2</a> <a href="#">»</a></p>