Server IP : 103.233.192.212 / Your IP : 3.145.125.13 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/action/ |
Upload File : |
<?php require_once('session_backend_administrator.php'); header('Content-Type: text/html; charset=UTF-8'); date_default_timezone_set("Asia/Bangkok"); $datetime = date('d/m/Y H.i'); if($STT_login=="admin_login_true"){ if(!isset($_POST['txt_question']) or !isset($_POST['txt_answer1']) or !isset($_POST['txt_answer2']) ){ echo "<SCRIPT type='text/javascript'> alert('กรุณากรอกข้อมูลให้ครบ'); window.location.replace(document.referrer); </SCRIPT>"; exit; }else{ $data_questionpoll = trim($con_db_administrator->real_escape_string($_POST['txt_question'])); $data_answer1poll = trim($con_db_administrator->real_escape_string($_POST['txt_answer1'])); $data_answer2poll = trim($con_db_administrator->real_escape_string($_POST['txt_answer2'])); $data_answer3poll = trim($con_db_administrator->real_escape_string($_POST['txt_answer3'])); $data_answer4poll = trim($con_db_administrator->real_escape_string($_POST['txt_answer4'])); $data_answer5poll = trim($con_db_administrator->real_escape_string($_POST['txt_answer5'])); $data_sttpoll = $con_db_administrator->real_escape_string($_POST['statusshow']); $data_linkpoll = $con_db_administrator->real_escape_string($_POST['linkpoll']); $date = $_POST['txt_date']; $lastupdate_poll = date("d/m/Y",strtotime($date)); $insert_poll = " INSERT INTO `data_poll`(`question_poll`, `answer1_poll`, `answer2_poll`, `answer3_poll`, `answer4_poll`, `answer5_poll`, `stt_poll`, `lastupdate_poll`) VALUES ( '$data_questionpoll', '$data_answer1poll', '$data_answer2poll', '$data_answer3poll', '$data_answer4poll', '$data_answer5poll', '$data_sttpoll', '$lastupdate_poll' ) "; $action_poll = $con_db_administrator->query($insert_poll); if(!$action_poll){ echo "<SCRIPT type='text/javascript'> alert('เพิ่มข้อมูลไม่สำเร็จ กรุณาลองใหม่อีกครั้ง'); window.location.replace('../$data_linkpoll'); </SCRIPT>"; exit; }else{ echo "<SCRIPT type='text/javascript'> alert('เพิ่มข้อมูลใหม่ สำเร็จ'); window.location.replace('../$data_linkpoll'); </SCRIPT>"; exit; } } }else{ echo "<SCRIPT type='text/javascript'> alert('กรุณาเข้าสู่ระบบ'); window.location.replace('../../index'); </SCRIPT>"; exit; } mysqli_close($con_db_administrator); ?>