?
Path : /home/admin/domains/happytokorea.com/private_html/happyezystyle/ |
Current File : /home/admin/domains/happytokorea.com/private_html/happyezystyle/Contact.php |
<? include("header.php");?> <div align="center"> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <!-- fwtable fwsrc="Untitled" fwbase="home.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" --> <tr> <td><img src="images/spacer.gif" width="423" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="16" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="225" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="315" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="21" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td> </tr> <tr> <td colspan="5" bgcolor="#FFFFFF"><div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr valign="top"> <td width="190"><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><div align="center"> <? echo "$showmember"; ?></div></td> </tr> <tr> <td><img src="images/web_07.jpg" width="242" height="42" alt=""></td> </tr> <tr> <td> <? $page = $_GET['page']; $select_type="select * from productstype order by id asc"; $query_select=mysql_query($select_type); $num_rows=mysql_num_rows($query_select); if($num_rows<1){ echo "<br><br><center><b>ยังไม่มีการเพิ่มข้อมูลค่ะ</b></center>"; }else{ $select="select * from productstype order by id asc"; $q_ry = mysql_query($select); $num_rows=mysql_num_rows($q_ry); $pagesize=20; $rt=$num_rows%$pagesize; if($rt!=0) { $totalpage=floor($num_rows/$pagesize)+1; } else { $totalpage=floor($num_rows/$pagesize); $toppic_id=1; } if(empty($page)) { $page=1; } mysql_free_result($q_ry); $goto=($page-1)*$pagesize; $sql_select_mem="Select * From productstype order by id asc limit $goto,$pagesize"; $fect=mysql_query($sql_select_mem); if(!$fect) { ("ติดต่อฐานข้อมูลไม่ได้".mysql_error()); exit; } $bgcount=0; while($rows=mysql_fetch_array($fect)) { $idx =$rows['id']; $productstypecode =$rows['productstypecode']; $productstypename = $rows['productstypename']; $bgcount=$bgcount+1; $bgmod=$bgcount%2; if($bgmod==0){ $bgcolor="#E9E9E8"; }else{ $bgcolor="#FFFFFF"; } $s_num="select * from products where productstypecode = '$productstypecode'"; $query_select_num=mysql_query($s_num); $snum=mysql_num_rows($query_select_num); ?> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td height="23"> <div align="left"></div> <div align="left"></div> <div align="center"> </div> <div align="left"><img src="images/opened.gif" width="17" height="17"> <? echo "<a href=ProductList.php?PRD=$productstypecode>$productstypename</a> ($snum)"; ?></div></td> </tr> <tr> <td height="5"><img src="images/inline.jpg" width="184" height="3"></td> </tr> </table> <? } } ?> </td> </tr> <tr> <td> </td> </tr> </table></td> <td><table width="98%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><img src="images/h_contact.jpg" width="121" height="29"></td> </tr> <tr> <td><script language="JavaScript"> function checkpost() { var v1 = document.webForm.message.value; var v2 = document.webForm.name.value; var v3 = document.webForm.textcode.value; if ( v1.length==0) { alert("กรุณาระบุข้อความด้วยค่ะ"); document.webForm.message.focus(); return false; } else if ( v2.length==0) { alert("กรุณาระบุ ชื่อผู้ตั้งด้วยค่ะ"); document.webForm.name.focus(); return false; } else if ( v3.length==0) { alert("กรุณาระบุ Text Code ด้วยค่ะ"); document.webForm.textcode.focus(); return false; } else return true; } function chkEmail(){ if(document.webForm.email.value!=""){ if (document.webForm.email.value.match(/.+@.+\..+/) == null) { alert("กรุณากรอก E-Mail ให้ถูกต้อง"); document.webForm.email.focus(); } } } function check_number(ch){ var len, digit; if(ch == " "){ return false; len=0; }else{ len = ch.length; } for(var i=0 ; i<len ; i++) { digit = ch.charAt(i) if(digit >="0" && digit <="9"){ ; }else{ return false; } } return true; } function checkvalue() { if(!check_number(document.webForm.phone.value) || document.webForm.phone.value == "" ) { alert('กรุณากรอกหมายเลขโทรศัพท์เป็นตัวเลขเท่านั้นค่ะ'); document.webForm.phone.focus(); return false; } else{return true;} } </script> <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" class="taladcr"> <form method="post" action="ContactSend.php" name="webForm" onSubmit="return checkpost()" enctype="multipart/form-data"> <tr> <td colspan="2"><div align="center">กรุณาใส่ให้ครบตามที่เครื่องหมาย <strong>*</strong> ระบุ</div></td> </tr> <tr> <td width="19%"><div align="right">รายละเอียด</div></td> <td width="81%"> <textarea name="message" cols="65" rows="15" class="inputxx" id="message"></textarea> <strong>*</strong> </td> </tr> <tr> <td><div align="right">ชื่อผู้ติดต่อ</div></td> <td> <input name="name" type=text class="inputxx" id="name" size="25"> <strong>*</strong> </td> </tr> <tr> <td><div align="right">โทรศัพท์</div></td> <td> <input name="phone" type="text" class="inputxx" id="phone" size=30 / onblur="checkvalue()"> </td> </tr> <tr> <td><div align="right">Email </div></td> <td> <input name="email" type="text" id="email2" value="" size="30" / onblur="chkEmail()" class="inputxx"> </td> </tr> <tr> <td> </td> <td> <? require_once "token.php"; $code = randomToken(5); echo "<b>$code</b>"; ?> <input name="code" type="hidden" class="td3" id="code" size="8" value=<? echo "$code"; ?>> <input name="textcode" type="text" class="inputxx" id="textcode" size="8" maxlength="5"> <em>** ใส่อักษร 5 ตัวที่ท่านเห็น ** </em><em><strong>*</strong></em></td> </tr> <tr> <td> </td> <td> <input name="submit" type="submit" class="submitxx" value="ส่งข้อมูลการติดต่อ"> </td> </tr> </form> </table> <br> </td> </tr> </table></td> </tr> </table> </div></td> <td><img src="images/spacer.gif" width="1" height="25" border="0" alt=""></td> </tr> </table></div> <? include("footer.php");?> </body> </html>