?
Path : /home/admin/domains/happytokorea.com/public_html_bk/gall/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/gall/contact.php |
<? include("template/header.php");?> <? if(isset($_POST[content])){ $from = $_POST[name]." ".$_POST[email]; $res = $db->query("select * from email"); while($line = mysql_fetch_array($res)){ $to = $line[e_name]; $headers = 'From: '.$from; $subject = "Contact"; $message = $_POST[content]; mail($to,$subject,$message,$headers ); } } ?> <? if($_GET[action]!="send"){?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading">ติดต่อเรา</td> <td class="pageHeading" align="right"> </td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="otherpages"> <center> </center> <form name="contact_us" action="contact.php?action=send" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main">ชื่อ:</td> </tr> <tr> <td class="main"><input type="text" name="name"></td> </tr> <tr> <td class="main">E-Mail Address:</td> </tr> <tr> <td class="main"><input type="text" name="email"></td> </tr> <tr> <td class="main">รายละเอียด:</td> </tr> <tr> <td><textarea name="content" wrap="soft" cols="50" rows="15"></textarea></td> </tr> </table> </td> </tr> </table></td> </tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td> <td align="right"><button class="azbutton" title="Continue" type="submit"><table border="0" cellpadding="0" cellspacing="0"><tr><td class="azbutton_left"></td><td class="azbutton_mid">Continue</td><td class="azbutton_right"></td></tr></table></button></td> <td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td> </tr> </table></td> </tr> </table></td> </tr> </table></form> </td> </tr> </table></td> </tr> </table> <? } ?> <? if($_GET[action]=="send"){?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading">ติดต่อเรา</td> <td class="pageHeading" align="right"> </td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="otherpages"> <form name="contact_us" action="" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td> </tr> <tr> <td class="main" align="center"> </td> </tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td> <td align="right"><a href="main.php"><span class="az-template-button"><span class="az-button-left"> </span><span class="az-button-middle"> Continue </span><span class="az-button-right"> </span></span></a></td> <td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td> </tr> </table></td> </tr> </table></td> </tr> </table></form> </td> </tr> </table></td> </tr> </table> <? } ?> <? include("template/footer.php");?>