Server IP : 103.233.192.212 / Your IP : 3.128.78.43 Web Server : Apache/2 System : Linux sv1.inde.co.th 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 User : sumpatuan ( 1058) PHP Version : 5.5.38 Disable Function : symlink,shell_exec,exec,proc_close,proc_open,popen,system,dl,putenv,passthru,escapeshellarg,escapeshellcmd,pcntl_exec,proc_get_status,proc_nice,proc_terminate,pclose,ini_alter,virtual,openlog,ini_restore MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/sumpatuan/domains/sumpatuan.go.th/public_html/main/ |
Upload File : |
<?php require_once('db_main.php'); $menu='วีดีโอ'; $type='วีดีโอ'; $link='subVideo'; ?> <!doctype html> <html lang="en"> <head> <?php include_once ("head.html"); ?> </head> <body class="bg-all animated fadeIn faster "> <?php include_once ("chatfacebook.php"); ?> <div class="container-fluid p-0 " > <div class="container bg-main fix-page mb-0 pb-0" > <?php include_once ("menu.php"); ?> </div> <!------ data ------> <div class="container bg-white fix-page mt-0" id="data"> <div class="row"> <div class="col bg-cl-0 fcl-cl-1 bg-txt-head text-center"> <?php echo $menu; ?> </div> <div class="w-100"></div> <div class="col p-3 fw-500"> <?php $sql_cdata = "SELECT COUNT(*) FROM `data_subdatafile` WHERE `type_subdatafile`='$type' AND `stt_subdatafile`=0 "; $qr_cdata = mysqli_query($con_db_main, $sql_cdata) or trigger_error("SQL", E_USER_ERROR); $rs_cdata = mysqli_fetch_row($qr_cdata); $numrows = $rs_cdata[0]; $rowsperpage = 5; $totalpages = ceil($numrows / $rowsperpage); if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage'])) { $currentpage = (int) $_GET['currentpage']; } else { $currentpage = 1; } if ($currentpage > $totalpages) { $currentpage = $totalpages; } if ($currentpage < 1) { $currentpage = 1; } $offset = ($currentpage - 1) * $rowsperpage; $sql_data1 = " SELECT * , CONCAT( DAY(str_to_date(`lastupdate_subdatafile`,'%d/%m/%Y')) ,'/', MONTH(str_to_date(`lastupdate_subdatafile`,'%d/%m/%Y')) ,'/', YEAR(str_to_date(`lastupdate_subdatafile`,'%d/%m/%Y'))+543 ) AS 'cv_lastupdate_subdatafile' FROM `data_subdatafile` WHERE `type_subdatafile`='$type' AND `stt_subdatafile`=0 ORDER BY str_to_date(`lastupdate_subdatafile`,'%d/%m/%Y') DESC ,`id_subdatafile` DESC LIMIT $offset, $rowsperpage "; $qr_data1 = mysqli_query($con_db_main,$sql_data1) or die( mysqli_error($con_db_main)); $c_row = 0; while($rs_data1 = mysqli_fetch_array($qr_data1)){ $c_row++; if($c_row==1){ ?> <div class="row bg-body-secondary m-3 border box_new2 mx-auto"> <div class="col ps-4 pe-4 p-2 pb-3"> <div class="clearfix pb-1 mb-2"> <div class="float-start"> <span class="badge rounded-pill text-bg-light fw-300"><i class="far fa-clock"></i> <?php echo $rs_data1['cv_lastupdate_subdatafile']; ?></span> </div> <div class="float-end m-auto"> <a href="subView-data?menu=<?php echo $menu; ?>&view=<?php echo $rs_data1['id_subdatafile']; ?>&type=<?php echo $type; ?>&link=<?php echo $link; ?>#data" class="link-success fs-14">อ่านเพิ่มเติม <i class="fas fa-angle-double-right"></i></a> </div> </div> <a class="link-dark" href="subView-data?menu=<?php echo $menu; ?>&view=<?php echo $rs_data1['id_subdatafile']; ?>&type=<?php echo $type; ?>&link=<?php echo $link; ?>#data" ><h5 class="cut-text-line1"><?php echo $rs_data1['name_subdatafile']; ?></h5></a> <div class="w-100"> <div class="ratio ratio-16x9"> <iframe src="https://www.youtube.com/embed/<?php echo $rs_data1['subtype_subdatafile']; ?>" title="YouTube video" allowfullscreen></iframe> </div> </div> </div> </div> <?php }else{ ?> <div class="row bg-body-secondary m-3 border box_new2 mx-auto"> <div class="col ps-4 pe-4 p-2 "> <div class="clearfix pb-1 mb-2"> <div class="float-start"> <span class="badge rounded-pill text-bg-light fw-300"><i class="far fa-clock"></i> <?php echo $rs_data1['lastupdate_subdatafile']; ?></span> </div> <div class="float-end m-auto"> <a href="subView-data?menu=<?php echo $menu; ?>&view=<?php echo $rs_data1['id_subdatafile']; ?>&type=<?php echo $type; ?>&link=<?php echo $link; ?>#data" class="link-success fs-14">อ่านเพิ่มเติม <i class="fas fa-angle-double-right"></i></a> </div> </div> <a class="link-dark" href="subView-data?menu=<?php echo $menu; ?>&view=<?php echo $rs_data1['id_subdatafile']; ?>&type=<?php echo $type; ?>&link=<?php echo $link; ?>#data" ><h5 class="cut-text-line1"><?php echo $rs_data1['name_subdatafile']; ?></h5></a> </div> </div> <?php } } ?> <?php if($numrows == 0){ echo '<div class="w-100 text-center mt-5 mb-5 text-secondary opacity-25 fs-20 fw-500" ><i class="fas fa-eye-slash fs-70"></i><br>ไม่พบข้อมูล<br>'.$type.'</div>'; } ?> <!------------- NUMBER PAGE -------------> <div class="mt-3 pt-2 fs-12 np_box_new clearfix fw-300 mx-auto"> <div class="float-start lh-sm"> แสดงข้อมูลตั้งแต่ 1 ถึง 5 <br>จากข้อมูลทั้งหมด <?php echo $numrows; ?> ข้อมูล </div> <div class="float-end"> <div aria-label="Page navigation"> <ul class="pagination pagination-sm justify-content-end"> <?php $range = 5; if ($currentpage > 1) { echo " <li class='page-item'> <a class='page-link focus-ring focus-ring-secondary text-black-50' href='{$_SERVER['PHP_SELF']}?currentpage=1' aria-label='Previous'> <i class='fas fa-angle-double-left'></i> </a> </li>"; $prevpage = $currentpage - 1; echo "<li class='page-item'> <a class='page-link focus-ring focus-ring-secondary text-black-50' href='{$_SERVER['PHP_SELF']}?currentpage=$prevpage' aria-label='Previous'> <i class='fas fa-angle-left'></i> </a> </li>"; } for ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++) { if (($x > 0) && ($x <= $totalpages)) { if ($x == $currentpage) { echo "<li class='page-item active' aria-current='page'> <a class='page-link focus-ring focus-ring-secondary text-bg-secondary' href='#'>$x <span class='sr-only'>(current)</span></a> </li> "; } else { echo " <li class='page-item'><a class='page-link focus-ring focus-ring-secondary text-black-50' href='{$_SERVER['PHP_SELF']}?currentpage=$x'>$x</a></li>"; } } } if ($currentpage != $totalpages) { $nextpage = $currentpage + 1; echo "<li class='page-item'> <a class='page-link focus-ring focus-ring-secondary text-black-50' href='{$_SERVER['PHP_SELF']}?currentpage=$nextpage' aria-label='Next'> <i class='fas fa-angle-right'></i> </a> </li>"; echo "<li class='page-item'> <a class='page-link focus-ring focus-ring-secondary text-black-50' href='{$_SERVER['PHP_SELF']}?currentpage=$totalpages' aria-label='Next'> <i class='fas fa-angle-double-right'></i> </a> </li>"; } ?> </ul> </div> </div> </div> <!---------------------------------------> </div> <div class="w-100"></div> <div class="col bg-cl-2 text-center fcl-cl-1 fs-1" style="height:10px;"></div> </div> </div> <!------------------> <?php include_once ("footer.php"); ?> </div> <?php include_once ("cookie.php"); ?> </body> </html>