<!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Contact</title> </head> <body> <? require "config.php"; require "connect.php"; if($_POST['command']=="add"){ $sqladd = "insert into contact values('','".$_POST['inputcontact_to']."','".$_POST['inputcontact_topic']."','".$_POST['inputcontact_from']."','".$_POST['inputcontact_email']."','".$_POST['inputcontact_comment']."')"; mysql_query($sqladd); ?> <script language="JavaScript"> function chkString() { if(document.frmMain.inputcontact_topic.value.length < 5 || document.frmMain.inputcontact_topic.value.length > 20) { alert('Please input String [5-20 Character] .'); return false; } } </script> <script> alert('เพิ่มข้อมูลเรียบร้อย'); window.location="index.php"; </script> <? } $sql = "select * from eg_session "; $rs = mysql_query($sql)or die(mysql_error()); $row = mysql_fetch_array($rs); $sql1 = "select * from eg_users where id = ".$row["userid"]; $rs1 = mysql_query($sql1)or die(mysql_error()); $row1 = mysql_fetch_array($rs1); $sql3 = "select * from member where member_id = '".$_GET['id']."' limit 1 "; $rs3 = mysql_query($sql3); $row3 = mysql_fetch_array($rs3); ?> <center> <h2><img src="photo/t_116691094.gif" alt="" width="55" height="56" align="absmiddle" /> ติดต่อสมาชิก <img src="photo/t_116691094.gif" width="55" height="56" align="absmiddle" /></h2> </center> <form name="frmMain" action="contact.php" method="post" enctype="multipart/form-data" OnSubmit="return chkString();"> <table width=77% border="1" align="center" cellspacing="0" bordercolor="#000000"> <tr> <td width="39%" height="43" align="right"> ผู้ที่ต้องการติดต่อ : </td> <td> <input name="inputcontact_to" type="text" value=<?=$row3["member_name"]?> size="30" readonly="readonly" ></td> </tr> <tr> <td height="43" align="right"> ชื่อผู้ติดต่อ : </td><td> <input name="inputcontact_from" type="text" value=<?=$row1["name"]?> size="30" readonly="readonly" ></td> </tr> <tr> <td height="42" align="right"> e-mail ผู้ติดต่อ :</td><td> <input name="inputcontact_email" type="text" value= <?=$row1["email"]?> size="30" readonly="readonly" ></td> </tr> <tr> <td height="43" align="right"> เรื่องที่ต้องการติดต่อ : </td><td> <input type="text" name="inputcontact_topic"></td> </tr> <tr> <td height="67" align="right"> หมายเหตุ : </td><td> <textarea name="inputcontact_comment" size="100"></textarea></td> </tr> <tr align="right"> <td height="43" colspan="2" align="center"> <input type="hidden" name="command" value="add"> <input type="Submit" value="บันทึก" id="Submit"><font size=3> <input type="button" value="ปิดหน้าต่างนี้" onclick="window.close();"></td> </tr> </table> </form> <html> </body> </html>
<head> <script language="JavaScript"> function chkString() { if(document.frmMain.inputcontact_topic.value.length < 5 || document.frmMain.inputcontact_topic.value.length > 20) { alert('Please input String [5-20 Character] .'); return false; } } </script> </head>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง