Server IP : 103.233.192.212 / Your IP : 3.17.68.195 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/public_html/admin/sub/ |
Upload File : |
<?php require_once('session_backend_administrator.php'); header('Content-Type: text/html; charset=UTF-8'); if($STT_login=="admin_login_true"){ $type = "ร้องเรียน-ร้องทุกข์"; $link = "HelpingMain"; $sql_cdata = "SELECT COUNT(*) FROM data_complain WHERE `type_complain`='ร้องเรียน-ร้องทุกข์' "; $qr_cdata = mysqli_query($con_db_administrator, $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_data = " SELECT * , CONCAT( DAY(str_to_date(`datetime_complain`,'%d/%m/%Y')) ,'/', MONTH(str_to_date(`datetime_complain`,'%d/%m/%Y')) ,'/', YEAR(str_to_date(`datetime_complain`,'%d/%m/%Y'))+543 ) AS 'cv_datetime_complain' , CONCAT( DAY(str_to_date(`datetime_fix_complain`,'%d/%m/%Y')) ,'/', MONTH(str_to_date(`datetime_fix_complain`,'%d/%m/%Y')) ,'/', YEAR(str_to_date(`datetime_fix_complain`,'%d/%m/%Y'))+543 ) AS 'cv_datetime_fix_complain' FROM data_complain WHERE `type_complain`='ร้องเรียน-ร้องทุกข์' ORDER BY `id_complain` DESC LIMIT $offset, $rowsperpage "; $qr_data = mysqli_query($con_db_administrator,$sql_data) or die( mysqli_error($con_db_administrator)); }else{ echo "<SCRIPT type='text/javascript'> alert('กรุณาเข้าสู่ระบบ'); window.location.replace('../index'); </SCRIPT>"; exit; } ?> <!doctype html> <html lang="en"> <head> <?php include_once ("head.html"); ?> </head> <body class="" > <?php include_once ("menu.php"); ?> <div class="container pt-3 pb-4 " > <div class="row "> <div class="col text-secondary" > <div class="p-1 ps-2 box-link " ><a href="../backend-administrator" class="link-info">หน้าหลัก</a> / E-Service / <?php echo $type;?></div> </div> <div class="w-100 pb-4"></div> <div class="col m-auto" > <div class="bg-line-1 hideTab"></div> </div> <div class="col-auto text-center"> <span class="lh-sm h1 fw-700"><?php echo $type;?></span> </div> <div class="col m-auto" > <div class="bg-line-1 hideTab"></div> </div> </div> <div class="row mt-3 mb-4"> <div class="col clearfix pb-2" > <div class="float-start fs-18 fw-700">รายการร้องเรียน</div> </div> <div class="w-100"></div> <div class="col"> <div class="w-100 overflow-x-auto"> <table class="table table-bordered table-striped table-hover mb-2 tball-mw"> <thead > <tr class="text-center"> <th style="width:12%">วันเวลาร้องเรียน</th> <th style="width:40%">หัวข้อร้องเรียน</th> <th style="width:10%">สถานะ</th> <th style="width:32%">การรับเรื่อง</th> <th style="width:6%">จัดการ</th> </tr> </thead> <tbody class="table-group-divider fs-16"> <?php while($rs_data = mysqli_fetch_array($qr_data)){ ?> <tr> <td class="text-center" ><?php echo $rs_data["cv_datetime_complain"];?></td> <th><?php echo $rs_data["name_complain"];?> <small class="fs-12 fw-300">( โดย: <?php if($rs_data['ct_name_complain']==""){ echo '- ไม่ระบุ -';}else{echo $rs_data['ct_name_complain'];} ?> )</small></th> <td class="text-center"> <?php $stt_data = $rs_data["stt_complain"]; switch ( $stt_data) { case "0": echo '<span class="badge rounded-pill text-bg-danger"><i class="fas fa-times-circle me-1"></i> ยังไม่เปิดดู</span>'; break; case "1": echo '<span class="badge rounded-pill text-bg-primary"><i class="fas fa-check-circle me-1"></i> เปิดดูแล้ว</span>'; break; case "2": echo '<span class="badge rounded-pill text-bg-success"><i class="fas fa-check-circle me-1"></i> รับเรื่องแล้ว</span>'; break; } ?> </td> <td> <?php if( $rs_data["datetime_fix_complain"]=="" ){ ?> - <?php }else{ ?> <?php if($rs_data['datetime_fix_complain'] !="") {echo '<small class="fs-12 fw-300">ข้อมูลอัพเดทล่าสุด: '.$rs_data['cv_datetime_fix_complain'].'</small><hr class="hr-das mt-0 mb-2">';} ?> <?php echo '<div class="cut-text-multi3">'.$rs_data["details_fix_complain"].'</div>';?> <?php } ?> </td> <td class="text-center fs-18" > <a href="complain-edit?id=<?php echo $rs_data["id_complain"]; ?>&type=<?php echo $rs_data["type_complain"]; ?>&stt=<?php echo $stt_data;?>&link=<?php echo $link;?>" class="link-dark" data-bs-toggle="tooltip" data-bs-title="ปรับปรุงข้อมูล"><i class="fas fa-edit" ></i></a> <a href="action/del-complain?id=<?php echo $rs_data["id_complain"]; ?>&type=<?php echo $type;?>&link=<?php echo $link;?>" class="link-dark" data-bs-toggle="tooltip" data-bs-title="ลบข้อมูล" onclick="return confirm('ต้องการลบข้อมูล ใช่หรือไม่?');" ><i class="fas fa-trash-alt" ></i></a> </td> </tr> <?php } ?> <?php if($numrows=="0"){ echo '<tr><td colspan="7"><div class="w-100 text-center mt-5 mb-5 text-secondary opacity-50 fs-20" ><i class="fas fa-eye-slash"></i> ไม่พบข้อมูล</div></td></tr>';} ?> </tbody> </table> </div> <!------------- NUMBER PAGE -------------> <div class="mt-2 fs-12 w-100 text-secondary clearfix"> <div class="float-start lh-sm"> แสดงข้อมูลตั้งแต่ 1 ถึง 5 <br class="showTab">จากข้อมูลทั้งหมด <span class="text-primary"><?php echo $numrows; ?></span> ข้อมูล </div> <div class="float-end"> <div aria-label="Page navigation example"> <ul class="pagination pagination-sm justify-content-end"> <?php $range = 5; if ($currentpage > 1) { echo " <li class='page-item'> <a class='page-link 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 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 text-bg-secondary' href='#'>$x <span class='sr-only'>(current)</span></a> </li> "; } else { echo " <li class='page-item'><a class='page-link 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 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 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> <?php include_once ("../footer.php"); ?> <script> const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]') const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl)) </script> </div> </body> </html>