|
|
|
อยากให้ Dropdown เวลาเปิดเข้ามาแล้ว วันเดือนปี ของวันที่ใช้ ทำได้หรือไม่ครับ !!! |
|
|
|
|
|
|
|
Code (PHP)
<!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>Purchase Order From</title>
<style type="text/css">
<!--
.style3 {color: #FF0000}
.style4 {color: #000099}
.style5 {
font-size: 15px
}
-->
</style>
<script>
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R'){
if(nm=='name') nm='Name';
// if(nm=='l_name') nm='Last Name';
if(nm=='email') nm='Email';
if(nm=='paypal') nm='You would like to pay by Paypal';
errors += '- '+nm+' is required.\n'; }}
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
} }
function CheckNum(){
if (event.keyCode < 48 || event.keyCode > 57){
event.returnValue = false;
}
}
</script>
</head>
<body style="font-family:Arial">
<br />
<div style="width:900; margin-left:auto; margin-right:auto;">
<h2 align="center" class="style4">Purchase Order From</h2>
<form action="order_sent.php" method="post" onsubmit="MM_validateForm('name','','R','','','R','email','','RisEmail','','','');return document.MM_returnValue">
<table width="900" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="155px" align="right"><strong>To:</strong></td>
<td width="345px"><input name="name" id="name" type="text" size="48"/>
<span class="style3">*</span></td>
<td align="right"><strong>Date:</strong>
<select name="day">
<option selected="selected"><?php echo date("j");?></option>
<option value="1">01</option>
<option value="2">02</option>
<option value="3">03</option>
<option value="4">04</option>
<option value="5">05</option>
<option value="6">06</option>
<option value="7" >07</option>
<option value="8" >08</option>
<option value ="9">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
/
<select name="mount">
<option selected="selected"><?php echo date("n");?></option>
<option value="1">01</option>
<option value="2">02</option>
<option value="3">03</option>
<option value="4">04</option>
<option value="5">05</option>
<option value="6">06</option>
<option value="7" >07</option>
<option value="8" >08</option>
<option value ="9">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
/
<select name="year">
<option selected="selected"><?php echo date("Y");?></option>
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
<option value="2004">2004</option>
<option value="2005">2005</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
<option value="2008">2008</option>
<option value="2009">2009</option>
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>
<option value="2017">2017</option>
<option value="2018">2018</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
<option value="2021">2021</option>
</select></td>
</tr>
<tr>
<td align="right"><strong>Purchase Name:</strong></td>
<td><label for="purchase"></label>
<input name="purchase" type="text" id="purchase" size="48" /></td>
<td> </td>
</tr>
<tr>
<td valign="top" align="right"><strong>Shipmnet Address:</strong></td>
<td><label for="address"></label>
<textarea name="address" id="address" cols="47" rows="5"></textarea></td>
<td> </td>
</tr>
<tr>
<td align="right"><strong>Telephone:</strong></td>
<td><label for="tel"></label>
<input name="tel" type="text" id="tel" size="48" onKeyPress="return CheckNum();" /></td>
<td> </td>
</tr>
<tr>
<td align="right"><strong>E-mail:</strong></td>
<td><label for="email"></label>
<input name="email" type="text" id="email" size="48" />
<span class="style3">*</span></td>
<td> </td>
</tr>
</table>
<p class="style5">
I Would Like to Purchase the Benjarong Product ( s ) from "Siam Ceramic Handmade" As following details on this form.</p>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="144" bgcolor="#CCCCCC"><div align="center"><strong>Product</strong></div></td>
<td width="144" bgcolor="#CCCCCC"><div align="center"><strong>Type</strong></div></td>
<td width="144" bgcolor="#CCCCCC"><div align="center"><strong>Pattern</strong></div></td>
<td width="144" bgcolor="#CCCCCC"><div align="center"><strong>Code</strong></div></td>
<td width="144" bgcolor="#CCCCCC"><div align="center"><strong>Quantity</strong></div></td>
</tr>
<tr>
<td>
<div align="left">
<input name="pro1" type="text" id="pro1" size="40" />
</div></td>
<td>
<div align="left">
<input name="type1" type="text" id="type1" size="30" />
</div></td>
<td><label for="pat1"></label>
<div align="left">
<input name="pat1" type="text" id="pat1" size="25" />
</div></td>
<td><label for="code1"></label>
<div align="left">
<input name="code1" type="text" id="code1" size="25" />
</div></td>
<td><label for="q1"></label>
<div align="left">
<input type="text" name="quantity1" id="quantity1" />
</div></td>
</tr>
<tr>
<td>
<div align="left">
<input name="pro2" type="text" id="pro2" size="40" />
</div></td>
<td>
<div align="left">
<input name="type2" type="text" id="type2" size="30" />
</div></td>
<td><label for="pat2"></label>
<div align="left">
<input name="pat2" type="text" id="pat2" size="25" />
</div></td>
<td><label for="code2"></label>
<div align="left">
<input name="code2" type="text" id="code2" size="25" />
</div></td>
<td><label for="q2"></label>
<div align="left">
<input type="text" name="quantity2" id="quantity2" />
</div></td>
</tr>
<tr>
<td>
<div align="left">
<input name="pro3" type="text" id="pro3" size="40" />
</div></td>
<td>
<div align="left">
<input name="type3" type="text" id="type3" size="30" />
</div></td>
<td><label for="pat3"></label>
<div align="left">
<input name="pat3" type="text" id="pat3" size="25" />
</div></td>
<td><label for="code3"></label>
<div align="left">
<input name="code3" type="text" id="code3" size="25" />
</div></td>
<td><label for="q3"></label>
<div align="left">
<input type="text" name="quantity3" id="quantity3" />
</div></td>
</tr>
<tr>
<td>
<div align="left">
<input name="pro4" type="text" id="pro4" size="40" />
</div></td>
<td>
<div align="left">
<input name="type4" type="text" id="type4" size="30" />
</div></td>
<td><label for="pat4"></label>
<div align="left">
<input name="pat4" type="text" id="pat4" size="25" />
</div></td>
<td><label for="code4"></label>
<div align="left">
<input name="code4" type="text" id="code4" size="25" />
</div></td>
<td><label for="q4"></label>
<div align="left">
<input type="text" name="quantity4" id="quantity4" />
</div></td>
</tr>
<tr>
<td>
<div align="left">
<input name="pro5" type="text" id="pro5" size="40" />
</div></td>
<td>
<div align="left">
<input name="type5" type="text" id="type5" size="30" />
</div></td>
<td><label for="pat5"></label>
<div align="left">
<input name="pat5" type="text" id="pat5" size="25" />
</div></td>
<td><label for="code5"></label>
<div align="left">
<input name="code5" type="text" id="code5" size="25" />
</div></td>
<td><label for="q5"></label>
<div align="left">
<input type="text" name="quantity5" id="quantity5" />
</div></td>
</tr>
<tr>
<td>
<div align="left">
<input name="pro6" type="text" id="pro6" size="40" />
</div></td>
<td>
<div align="left">
<input name="type6" type="text" id="type6" size="30" />
</div></td>
<td><label for="pat6"></label>
<div align="left">
<input name="pat6" type="text" id="pat6" size="25" />
</div></td>
<td><label for="code6"></label>
<div align="left">
<input name="code6" type="text" id="code6" size="25" />
</div></td>
<td><label for="q6"></label>
<div align="left">
<input type="text" name="quantity6" id="quantity6" />
</div></td>
</tr>
<tr>
<td>
<div align="left">
<input name="pro7" type="text" id="pro7" size="40" />
</div></td>
<td>
<div align="left">
<input name="type7" type="text" id="type7" size="30" />
</div></td>
<td><label for="pat7"></label>
<div align="left">
<input name="pat7" type="text" id="pat7" size="25" />
</div></td>
<td><label for="code7"></label>
<div align="left">
<input name="code7" type="text" id="code7" size="25" />
</div></td>
<td><label for="q7"></label>
<div align="left">
<input type="text" name="quantity7" id="quantity7" />
</div></td>
</tr>
<tr>
<td>
<div align="left">
<input name="pro8" type="text" id="pro8" size="40" />
</div></td>
<td>
<div align="left">
<input name="type8" type="text" id="type8" size="30" />
</div></td>
<td><label for="pat8"></label>
<div align="left">
<input name="pat8" type="text" id="pat8" size="25" />
</div></td>
<td><label for="code8"></label>
<div align="left">
<input name="code8" type="text" id="code8" size="25" />
</div></td>
<td><label for="q8"></label>
<div align="left">
<input type="text" name="quantity8" id="quantity8" />
</div></td>
</tr>
<tr>
<td>
<div align="left">
<input name="pro9" type="text" id="pro9" size="40" />
</div></td>
<td>
<div align="left">
<input name="type9" type="text" id="type9" size="30" />
</div></td>
<td><label for="pat9"></label>
<div align="left">
<input name="pat9" type="text" id="pat9" size="25" />
</div></td>
<td><label for="code9"></label>
<div align="left">
<input name="code9" type="text" id="code9" size="25" />
</div></td>
<td><label for="q9"></label>
<div align="left">
<input type="text" name="quantity9" id="quantity9" />
</div></td>
</tr>
<tr>
<td height="121" width="40%" valign="top"><div align="right">
<p><strong>Comment: </strong> </p>
</div></td>
<td colspan="4" valign="top"><label for="comment"></label>
<p> <textarea name="comment" id="comment" cols="100" rows="5"></textarea></p></td>
</tr>
</table>
<p align="left"><strong>I would like to pay by:</strong></p>
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="style5"><div align="left">By Paypal</div></td>
<td>
<input name="pay" type="radio" id="pay" value="Paypal" checked="checked" />
</td>
</tr>
<tr>
<td class="style5"><div align="left">By Credit Card</div></td>
<td>
<input type="radio" name="pay" id="pay" value="Credit Card" />
</td>
</tr>
<tr>
<td class="style5"><div align="left">Western Union money transfer</div></td>
<td>
<input type="radio" name="pay" id="pay" value="Western Union money transfer" />
</td>
</tr>
<tr>
<td class="style5"><div align="left">Transferring Payment to Bank Account</div></td>
<td>
<input type="radio" name="pay" id="pay" value="Transferring Payment to Bank Account" />
</td>
</tr>
</table>
<p class="style5">Once we receive the ordering enquiry we will reply within 24 hrs of available products, prices and shipping and packing charges.</p>
<div align="center">
<p>
<input name="Submit" value="Send" type="submit" />
<input name="reset" value="Reset" type="reset" />
</p>
<p> </p>
</div>
</form>
</div>
</body>
</html>
|
|
|
|
|
Date :
2012-11-21 16:38:24 |
By :
attaporn |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|