<? session_start(); if($_SESSION["admin_user"]==""){ echo "<meta http-equiv='refresh'content='0;url=login.php'/>"; } ?> <html> <head> <title>ระบบจัดการเว็บไซต์ Freshair Premium</title> <link rel="shortcut icon" href="../../images/favicon.ico" /> <link href="../css/fresh-air.css" rel="stylesheet" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head> <body> <script language="JavaScript"> function onDelete() { if(confirm('คุณต้องการลบสมาชิกที่เลือกใช่หรือไม่')==true) { return true; } else { return false; } } </script> <? include "../home/bg.php";?> <? include "connect.php"; ?> <table width="978" height="921" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01"> <!--DWLayoutTable--> <tr> <td width="1" rowspan="2"></td> <td width="57" height="49"><img src="images/images_01.png" width="57" height="58"></td> <td width="869" background="images/images_02.png"><!--DWLayoutEmptyCell--> </td> <td width="51"><img src="images/images_03.png" width="51" height="58"></td> </tr> <tr> <td height="815" background="images/images_04.png"><!--DWLayoutEmptyCell--> </td> <td align="center" valign="top" bgcolor="#FFFFFF"><? include "menu.php";?> <br> <img src="images/admin_14.gif" width="88" height="84" align="absmiddle"><span class="hd-eyellB">ส่งอีเมลล์ลูกค้าที่สมัครรับข่าวสารกับเรา </span> <table width="77%" border="0" cellspacing="0" cellpadding="0"> <!--DWLayoutTable--> <tr> <td width="26" height="29" valign="bottom"><img src="images/border_01.png" width="23" height="26"></td> <td width="670" valign="bottom"><img src="images/border_02.png" width="692" height="26"></td> <td width="173" valign="bottom"><img src="images/border_03.png" width="21" height="26"></td> </tr> <tr> <td height="391" valign="top" background="images/border_04.png"><!--DWLayoutEmptyCell--> </td> <td valign="top"><table width="83%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <!--DWLayoutTable--> <tr> <td height="2"></td> </tr> <!--DWLayoutTable--> <tr> <td width="686" height="389"><form action="sendmail.php" method="post" name="frmMain" enctype='multipart/form-data'> <table width="692" height="389" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <td width="129" class="hd-eyellB">เรื่อง </td> <td width="560"><input name="subject" type="text" id="subject" size="40"></td> </tr> <tr> <td class="hd-eyellB">รายละเอียด</td> <td><textarea name="description" cols="70" rows="15" id="description"></textarea></td> </tr> <tr> <td class="hd-eyellB">ชื่อผู้ส่ง</td> <td><input name="name" type="text" id="name" size="40"></td> </tr> <tr> <td class="hd-eyellB">อีเมลล์</td> <td><input name="Email" type="text" id="Email" size="40"></td> </tr> <tr> <td class="hd-eyellB">ไฟล์แนบ</td> <td><input name="fileAttach" type="file"id="fileAttach" size="40"></td> </tr> <tr> <td class="hd-eyellB"> </td> <td><input type="submit" name="Submit3" value="ส่งอีเมลล์"> <input type="reset" name="Submit22" value="ล้างข้อความ"></td> </tr> </table> </form></td> </tr> </table> </td> <td valign="top" background="images/border_06.png"><!--DWLayoutEmptyCell--> </td> </tr> <tr> <td height="29" valign="top"><img src="images/border_07.png" width="23" height="25"></td> <td valign="top" background="images/border_08.png"><!--DWLayoutEmptyCell--> </td> <td valign="top"><img src="images/border_09.png" width="21" height="25"></td> </tr> </table> <p> </p></td> <td background="images/images_06.png"><!--DWLayoutEmptyCell--> </td> </tr> <tr> <td height="48"></td> <td valign="top"><img src="images/images_07.png" alt="" width="57" height="48"></td> <td valign="top" background="images/images_08.png"><? include "footer.php";?></td> <td valign="top"><img src="images/images_09.png" width="51" height="48"></td> </tr> </table> </body> </html>
<? include "connect.php"; $sql = "SELECT * FROM news_email WHERE status = 'yes'"; $objQuery = mysql_query($sql) or die ("Error Query [".$sql."]"); $objResult = mysql_fetch_array($objQuery) ; $subject = $_POST["subject"]; $message = $_POST["description"]; $strSid = md5(uniqid(time())); $headers = "MIME-Version: 1.0\r\n"; $headers .= "From:$_POST[name] $_POST[Email] \n"; $to= $objResult["email"]; /*"[email protected]" ;*/ $headers .= "Content-type: text/html; charset=utf-8"; $headers .="X-Mailer: PHP/" . phpversion(); //print_R($_FILES); //*** Attachment ***// if($_FILES["fileAttach"]["name"] != "") { $strFilesName = $_FILES["fileAttach"]["name"]; $strContent = chunk_split(base64_encode(file_get_contents($_FILES["fileAttach"]["tmp_name"]))); $strHeader .= "--".$strSid."\n"; $strHeader .= "Content-Type: application/octet-stream; name=\"".$strFilesName."\"\n"; $strHeader .= "Content-Transfer-Encoding: base64\n"; $strHeader .= "Content-Disposition: attachment; filename=\"".$strFilesName."\"\n\n"; $strHeader .= $strContent."\n\n"; } $flgSend =mail($to,$subject,$message,null,$headers); if($flgSend) { echo "ส่ง Email เรียบร้อยแล้วค่ะ"; } else { echo "ไม่สามารถส่ง Email ได้ค่ะ"; } mysql_close(); ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง