X7ROOT File Manager
PHP:
7.2.34
OS:
Linux
User:
cp648411
Root
/
home2
/
cp648411
/
public_html
/
kainumber.com
/
article
📤 Upload
📝 New File
📁 New Folder
Close
Editing: article_old.php
<!-- /.aboutus --> <div style="margin-bottom:15px;"> <div class="head_bg_right"> บทความ</div> <div class="row" style="padding-top:10px;margin-bottom:10px;"> <div class="col-md-12"> <div style="margin-top:15px;"></div> <?php $list_ath = array('table'=>'article','where'=>'status = 1 AND highlight = 1 ','order'=> "ORDER BY id DESC LIMIT 0 , 1"); $view_ath = $view_db->view($list_ath); $row_ath = $view_db->q($view_ath); ?> <a href="info.php?id=<?php echo $row_ath['id'];?>" target="_blank"> <img src="../redbag/article/<?php echo $row_ath['image2'];?>" class="img-responsive" style="padding:10px 0"> </a> <img src="../image/line2.png" class="img-responsive" style="padding:10px 0"> <div> <?php $max_rows = 20; // แสดงจำนวนแถวต่อหน้า $page_number = 0; if(isset($_GET['page_number'])) { $page_number = $_GET['page_number']; } $all_array = array('table'=>'article','where'=>'status = 1'); $start_row = $page_number * $max_rows; $all_sql = $view_db->view($all_array); $all_result = $view_db->q_re($all_sql); $total_rows = $view_db->q_nr($all_result); $total_rows_num = mysqli_num_rows($all_result); $total_pages = ceil($total_rows/$max_rows)-1; //////////////////////////////////////// $list = array('table'=>'article','where'=>'status = 1','limit'=> "$start_row,$max_rows",'order'=> "ORDER BY id DESC"); $view = $view_db->view($list); $result = $view_db->q_re($view); $num_tr = 1; $num = 1+($page_number*$max_rows); while($row_at = $view_db->q_ro($result)) { ?> <div class="tab_sub_left2"> <table width="100%" border="0"> <tr> <td> <img src="../redbag/article/<?php echo $row_at['image'];?>" width="43" height="43" class="img_round"> <a href="info.php?id=<?php echo $row_at['id'];?>" target="_blank" style="color:#FFF;"><?php echo $row_at['title']?></a></td> <td style="width:12%;" align="right"><a href="info.php?id=<?php echo $row_at['id'];?>" target="_blank"class="at_read_moo">อ่านบทความ...</a></td> </tr> </table> </div> <?php } ?> </div> <div align="center"> <ul class="pagination pagination-sm"> <?php if($page_number == 0) { } else { $a = $page_number - 1; ?><li><a href="index.php?page_number=<?php echo $a?>">«</a></li><?php } for($a=0;$a<=$total_pages;++$a) { $b = $a + 1 ; if($a==$page_number) { ?><li class="active"><a href="index.php?page_number=<?php echo $a?>" ><?php echo $b; ?></a></li><?php } else { ?><li><a href="index.php?page_number=<?php echo $a?>" ><?php echo $b; ?></a></li><?php } } if($page_number >= $total_pages) { } else { $a = $page_number + 1; ?> <li><a href="index.php?page_number=<?php echo $a?>">»</a></li><?php } ?> </ul> </div> <?php include('../theme/detailfooter.php')?> </div> </div> </div> <!-- /.aboutus -->
Save
Cancel