Server IP : 43.241.58.20 / Your IP : 216.73.216.25 Web Server : Apache/2 System : Linux ns1-1556229.dragonhispeed.com 3.16.0 #1 SMP Fri Mar 29 22:50:14 MSK 2024 x86_64 User : ratsitne ( 1130) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/ratsitne/public_html/rehelp/ |
Upload File : |
<?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (!isset($_POST['name'], $_POST['idcard'], $_POST['address'])) { header('Location: index.php'); exit; } $DATA = $_POST; foreach ($DATA as $key => $value) { $DATA[$key] = trim($value); } if ($DATA['name'] === '') { $FORM_ERRORS['name'] = "กรุณาระบุ 'หัวข้อ'"; } elseif (mb_strlen($DATA['idcard'], 'UTF-8') > 255) { $FORM_ERRORS['idcard'] = "'หัวข้อ' ต้องมีความยาวไม่เกิน 255 ตัวอักษร"; } if ($DATA['description'] === '') { $FORM_ERRORS['description'] = "กรุณาระบุ 'รายละเอียด'"; } elseif (mb_strlen($DATA['description'], 'UTF-8') > 65535) { $FORM_ERRORS['description'] = "'รายละเอียด' ต้องมีความยาวไม่เกิน 65535 ตัวอักษร"; } if ($DATA['name'] === '') { $FORM_ERRORS['name'] = "กรุณาระบุ 'ชื่อ'"; } elseif (mb_strlen($DATA['name'], 'UTF-8') > 64) { $FORM_ERRORS['name'] = "'ชื่อ' ต้องมีความยาวไม่เกิน 64 ตัวอักษร"; } if (!isset($FORM_ERRORS)) { require 'inc/mysqli.inc.php'; $mysqli->query( " INSERT INTO `help_topic` ( `last_commented`, `name`, `idcard`, `address`, `email`, `mobile`, `nameget`, `position`, `organiz`, `province`, `description`, `ip` ) VALUES ( NOW(), '{$mysqli->escape_string($DATA['name'])}', '{$mysqli->escape_string($DATA['idcard'])}', '{$mysqli->escape_string($DATA['address'])}', '{$mysqli->escape_string($DATA['email'])}', '{$mysqli->escape_string($DATA['mobile'])}', '{$mysqli->escape_string($DATA['nameget'])}', '{$mysqli->escape_string($DATA['position'])}', '{$mysqli->escape_string($DATA['organiz'])}', '{$mysqli->escape_string($DATA['province'])}', '{$mysqli->escape_string($DATA['description'])}', '{$_SERVER['REMOTE_ADDR']}' ) " ); header('Location: complete.php'); exit; } } else { $DATA = array( 'title' => '', 'description' => '', 'name' => '', ); } $TAGS = array('PHP', 'JavaScript', 'SQL', 'HTML', 'CSS'); $TITLE = 'กรอกข้อมูล เพื่อขอใช้บริการ'; $PAGE_TEMPLATE = 'inc/post.inc.php'; require 'inc/main.inc.php';