NG1NDEX
Server IP : 103.233.192.212  /  Your IP : 18.118.173.146
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/newsView-data.php
<?php  
    require_once('db_main.php'); 

    $view = $con_db_main->real_escape_string($_GET['view']);
    $type = $con_db_main->real_escape_string($_GET['type']);
    $link = $con_db_main->real_escape_string($_GET['link']);

    if( empty($view) or empty($type) or empty($link)  ){
        echo "<SCRIPT type='text/javascript'>
                alert('เกิดข้อผิดพลาด ไม่พบหน้าข้อมูลที่ต้องการ');
                window.location.replace('index');
            </SCRIPT>";
        exit;
    }else{
        $sql_data1 = " SELECT *, CONCAT( DAY(str_to_date(`date_new`,'%d/%m/%Y')) ,'/',  MONTH(str_to_date(`date_new`,'%d/%m/%Y')) ,'/', YEAR(str_to_date(`date_new`,'%d/%m/%Y'))+543 ) AS 'cv_date_new' FROM `data_new` WHERE `id_new`='$view' AND `subtype_new`='$type' "; 
        $qr_data1 = mysqli_query($con_db_main, $sql_data1); 
        $rs_data1 = mysqli_fetch_assoc($qr_data1); 

        $id_data = $rs_data1['id_new'];
        $name_data = $rs_data1['name_new'];
        $maintype = $rs_data1['type_new'];
    }
?>
<!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 $type; ?>
                </div>
                <div class="w-100"></div>
                <div class="col p-4 pt-3 fw-500">
                    <div class="clearfix">
                        <div class="float-start">
                            <span class="badge rounded-pill text-bg-light border fw-300"><i class="far fa-clock"></i> <?php echo $rs_data1['cv_date_new']; ?></span> 
                            <span class="badge rounded-pill text-bg-light border fw-300"><?php echo $rs_data1['type_new']; ?></span>
                        </div>
                        <div class="float-end m-auto">
                            <a href="newsView?view=<?php echo $link;?>#data" class="link-success fs-16"><i class="fas fa-angle-double-left"></i> ย้อนกลับ</a>
                        </div>
                    </div>
                    <hr class="mt-2 mb-2">
                    <?php
                        $sql_cpwimg = "SELECT COUNT(*) FROM `data_filedoc_news` WHERE `id_tbdata_filedoc_news`='$id_data' AND `tbdata_filedoc_news`='$maintype' AND `cm_filedoc_news`='img' ";
                        $qr_cpwimg = mysqli_query($con_db_main, $sql_cpwimg) or trigger_error("SQL", E_USER_ERROR);
                        $rs_cpwimg = mysqli_fetch_row($qr_cpwimg);
                        $totalimg = $rs_cpwimg[0];
                        $sql_data_fileimg = "SELECT * FROM `data_filedoc_news` WHERE `id_tbdata_filedoc_news`='$id_data' AND `tbdata_filedoc_news`='$maintype' AND `cm_filedoc_news`='img' ";
                        $qr_data_fileimg = mysqli_query($con_db_main,$sql_data_fileimg) or die( mysqli_error($con_db_main));
                        if($rs_cpwimg[0]==1){
                            while($rs_data_fileimg = mysqli_fetch_array($qr_data_fileimg)){
                                echo '<div class="w-100 text-center mt-3 mb-4"><img src="../'.$rs_data_fileimg['path_filedoc_news'].'" class="img-fluid mh_1pic imgpopup" onclick="ac_imgpopup(this.src)"></div>';
                            }
                        }else if($rs_cpwimg[0]>1){
                            
                            echo '<div id="slideNews" class="carousel slide carousel-dark bg-white w-100 text-center mt-3 mb-4" data-bs-ride="carousel">';
                            echo    '<div class="carousel-indicators" style="margin-bottom:-18px;">';
                                        for($ximg=1;$ximg<=$totalimg;$ximg++){
                                            $yimg = $ximg-1;
                                            if($ximg==1){ 
                                                echo '<button type="button" data-bs-target="#slideNews" data-bs-slide-to="0" class="active" aria-current="true"></button>';
                                            } 
                                            if($ximg>1){
                                                echo '<button type="button" data-bs-target="#slideNews" data-bs-slide-to="'.$yimg.'" ></button>';
                                            }
                                        } 
                            echo    '</div>
                                    <div class="carousel-inner">';
                            $c_row=0;
                            while($rs_data_fileimg = mysqli_fetch_array($qr_data_fileimg)){ $c_row++;
                                    if($c_row==1){
                                        echo '<div class="carousel-item active text-center animated fadeIn " data-bs-interval="2000"> 
                                                    <img src="../'.$rs_data_fileimg['path_filedoc_news'].'" class="img-fluid mh_pic imgpopup" id="'.$c_row.'" onclick="ac_imgpopup_slide(this.id)">
                                            </div>';
                                    }else{
                                        echo '<div class="carousel-item text-center animated fadeIn " data-bs-interval="2000"> 
                                                    <img src="../'.$rs_data_fileimg['path_filedoc_news'].'" class="img-fluid mh_pic imgpopup" id="'.$c_row.'" onclick="ac_imgpopup_slide(this.id)">
                                            </div>';
                                    }
                            }
                            echo '  </div>
                                    <button class="carousel-control-prev" type="button" data-bs-target="#slideNews" data-bs-slide="prev">
                                        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                                        <span class="visually-hidden">Previous</span>
                                    </button>
                                    <button class="carousel-control-next" type="button" data-bs-target="#slideNews" data-bs-slide="next">
                                        <span class="carousel-control-next-icon" aria-hidden="true"></span>
                                        <span class="visually-hidden">Next</span>
                                    </button>
                                </div>';
                        };
                    ?>
                    <div class="fs-26 lh-sm mx-auto fw-500">
                        <i class="fas fa-angle-right me-2"></i><?php echo $name_data; ?>
                    </div>
                    <div class="pt-4 pb-3 fw-300">
                        <?php 
                            if( empty($rs_data1['data_new']) ){
                                echo '<div class="w-100 text-center mt-4 mb-4 text-secondary opacity-25 fs-20 fw-500" ><i class="fas fa-eye-slash fs-36"></i><br>ไม่มีเนื้อหา</div>';
                            }else{
                                echo $rs_data1['data_new'];
                            }
                        ?>
                    </div>
                    <hr class="mt-3 mb-1">
                    <div class="p-2">
                        <span class="fs-18 fw-500">ข้อมูลไฟล์ที่เกี่ยวข้อง</span><br>
                        <?php   
                            $id_tbdata_filedoc = $rs_data1['id_new'];
                            $sql_data2 = "SELECT * FROM `data_filedoc_news` WHERE `id_tbdata_filedoc_news`='$id_data' AND `tbdata_filedoc_news`='$maintype' AND `cm_filedoc_news`='doc' ";
                            $qr_data2 = mysqli_query($con_db_main,$sql_data2) or die( mysqli_error($con_db_main));
                            $c_row = 0;
                            while($rs_data2 = mysqli_fetch_array($qr_data2)){
                                $c_row++;
                                echo '<div class="ms-2 fw-300"><a target="_blank" href="../'.$rs_data2['path_filedoc_news'].'"class="ms-4 link-danger"><small class="text-secondary fs-14">ไฟล์เอกสาร</small> <i class="fas fa-download ms-2 me-1"></i> '.$rs_data2['name_filedoc_news'].'</a></div>';
                            }
                            if( $c_row <= 0 ){
                                echo '<small class="ms-4 fw-300 text-secondary"><i class="fas fa-eye-slash"></i> ไม่พบไฟล์เอกสาร</small>';
                            }
                        ?>
                    </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"); ?>
        
        <!------ img popup ------>
        <script>
            $( document ).ready(function() {
                $("#btn_close_imgpopup").click(function(){
                    $("#bd_imgpopup").css("display", "none");
                    $("#bd_imgpopup").fadeOut();
                });

                $("#btn_close_imgpopup_slide").click(function(){
                    $(".del_active").removeClass( "active" );
                    $("#bd_imgpopup_slide").css("display", "none");
                    $("#bd_imgpopup_slide").fadeOut();
                });

            });
            function ac_imgpopup(srcimg){
                $("#imgshowsrc").attr("src", srcimg);
                $("#bd_imgpopup").css("display", "block");
                $("#bd_imgpopup").fadeIn();
            }
            function ac_imgpopup_slide(imgno){
                imgno_active = "#imgno_"+imgno;
                $(imgno_active).addClass( "active" );
                $("#bd_imgpopup_slide").css("display", "block");
                $("#bd_imgpopup_slide").fadeIn();
            }
        </script>
            <div id="bd_imgpopup" class="bd_imgpopup fix-page text-center">
                <img id="imgshowsrc" src="" class="img-fluid imgpopupshow">
                <button type="button" id="btn_close_imgpopup" class="btn btn-danger mt-3 btn_close_imgpopupshow"><i class="fas fa-times-circle"></i> ปิดหน้าต่าง</button>
            </div>

            
            <div id="bd_imgpopup_slide" class="bd_imgpopup_slide fix-page h-100 text-center">
                <?php
                        $sql_data_fileimg_pu = "SELECT * FROM `data_filedoc_news` WHERE `id_tbdata_filedoc_news`='$id_data' AND `tbdata_filedoc_news`='$maintype' AND `cm_filedoc_news`='img' ";
                        $qr_data_fileimg_pu = mysqli_query($con_db_main,$sql_data_fileimg_pu) or die( mysqli_error($con_db_main));
                        if($rs_cpwimg[0]>1){
                            echo '<div id="slidePU" class="carousel slide text-center div_imgpopupshow_slide w-100"> ';
                            echo   '<div class="carousel-inner ">';
                            $c_row_pu=0;
                            while($rs_data_fileimg_pu = mysqli_fetch_array($qr_data_fileimg_pu)){ $c_row_pu++;
                                    echo '<div class="carousel-item text-center animated fadeIn del_active" id="imgno_'.$c_row_pu.'"> 
                                                <img src="../'.$rs_data_fileimg_pu['path_filedoc_news'].'" class="img-fluid mh_imgpopup" >
                                    </div>';
                            }
                            echo '  </div>
                                    <button class="carousel-control-prev" type="button" data-bs-target="#slidePU" data-bs-slide="prev">
                                        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                                        <span class="visually-hidden">Previous</span>
                                    </button>
                                    <button class="carousel-control-next" type="button" data-bs-target="#slidePU" data-bs-slide="next">
                                        <span class="carousel-control-next-icon" aria-hidden="true"></span>
                                        <span class="visually-hidden">Next</span>
                                    </button>
                                </div>';
                        };
                    ?>
            <button type="button" id="btn_close_imgpopup_slide" class="btn btn-danger btn_close_imgpopupshow"><i class="fas fa-times-circle"></i> ปิดหน้าต่าง</button>
        </div>
        <!----------------------->
        
    </div>
    <?php  include_once ("cookie.php"); ?>

    </body>

</html>

Anon7 - 2022
AnonSec Team