NG1NDEX
Server IP : 103.233.192.212  /  Your IP : 3.147.140.129
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/sumpatuan/domains/sumpatuan.go.th/public_html/main/subEService-BabyworkAll.php
<?php  require_once('db_main.php'); ?>
<!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">
                    งานเด็กเเรกเกิด
                </div>
                <div class="w-100"></div>
                <div class="col text-secondary p-0" >
                    <div class="ps-4 p-2 box-link fw-300" >
                        <a href="subEService#data" class="link-danger fw-500">E-service</a> > งานเด็กเเรกเกิด
                    </div>
                </div>
                <div class="w-100"></div>
                <div class="col p-3 fw-500">
                    <?php
                        $type='งานเด็กเเรกเกิด';
                        $link='subEService-BabyworkAll';

                        $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 = 10;
                        $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));
                        while($rs_data1 = mysqli_fetch_array($qr_data1)){
                    ?>
                        <div class="row bg-body-secondary m-3 border box_new mx-auto">
                            <div class="col-auto p-0">
                                <a href="subEservice-viewdata?view=<?php echo $rs_data1['id_subdatafile']; ?>&type=<?php echo $type; ?>&link=<?php echo $link; ?>#data">
                                    <?php   
                                        $id_tbdata_filedoc = $rs_data1['id_subdatafile'];
                                        $sql_data2 = "SELECT `path_filedoc_subdatafile` FROM `data_filedoc_subdatafile` WHERE `id_tbdata_filedoc_subdatafile`='$id_tbdata_filedoc' AND `cm_filedoc_subdatafile`='img'  LIMIT 1 ";
                                        $qr_data2 = mysqli_query($con_db_main,$sql_data2) or die( mysqli_error($con_db_main));
                                        $rs_data2 = mysqli_fetch_array($qr_data2);

                                        if( isset($rs_data2['path_filedoc_subdatafile']) && $rs_data2['path_filedoc_subdatafile'] !='' ){
                                            echo '<img src="../'.$rs_data2['path_filedoc_subdatafile'].'" class="img_new">';
                                        }else{
                                            echo '<img src="img/cv-new.jpg" class="img_new">';
                                        }
                                    ?>
                                </a>
                            </div>
                            <div class="col p-4 pt-2 ps-4">
                                <div class="clearfix pb-1 mb-2">
                                    <div class="float-start">
                                        <span class="badge rounded-pill text-bg-light border border-0 fw-300"><i class="far fa-clock"></i> <?php echo $rs_data1['cv_lastupdate_subdatafile']; ?></span> 
                                        <span class="badge rounded-pill text-bg-light border border-0 fw-300"><?php echo $rs_data1['subtype_subdatafile']; ?></span>
                                    </div>
                                    <div class="float-end m-auto">
                                        <a href="subEservice-viewdata?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="subEservice-viewdata?view=<?php echo $rs_data1['id_subdatafile']; ?>&type=<?php echo $type; ?>&link=<?php echo $link; ?>#data" ><h5 class="cut-text-line3"><?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 ถึง 10 <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>

Anon7 - 2022
AnonSec Team