www.gusucode.com > 公寓出租网站整站源码 1.0程序 > Payment.asp
<!--#include file="top.asp"--> <% public ProductList if request("order")="公寓更新" then Session("ProductList")="" end if ProductList = Session("ProductList") Sub PutToShopBag(Prodid, ProductList) If Len(ProductList) = 0 Then ProductList = "'" & Trim(Prodid) & "'" ElseIf InStr( ProductList, Prodid ) <= 0 Then ProductList = ProductList&", '"&Trim(Prodid)&"'" End If End Sub %> <% Product_Id = Trim(Request("Product_Id")) if instr(Product_Id,",")>0 then idArr=Split(Product_Id, ",") for i = 0 to ubound(idArr) PutToShopBag idArr(I), ProductList next else PutToShopBag Product_Id, ProductList end if %> <% Session("ProductList") = ProductList '判断购物车是否为空 if Productlist<>"''" then sql="select * from Product where Product_Id in ("&ProductList&") order by Product_Id" Set rs_price = conn.Execute(sql) else response.redirect "error.asp?error=007" response.end end if %> <script language="JavaScript"> function CheckUserForm() { if (document.payment.Subject.value.length == 0) { alert("标题不能为空."); document.payment.Subject.focus(); return false; } if (document.payment.Notes.value.length == 0) { alert("说明不能为空."); document.payment.Notes.focus(); return false; } if (document.payment.Receiver.value.length == 0) { alert("联系人不能为空."); document.payment.Receiver.focus(); return false; } if (document.payment.CompanyName.value.length == 0) { alert("公司名不能为空."); document.payment.CompanyName.focus(); return false; } if (document.payment.Email.value.length == 0) { alert("Email不能为空."); document.payment.Email.focus(); return false; } if (document.payment.Email.value.length > 0 && !document.payment.Email.value.match( /^.+@.+$/ ) ) { alert("EMAIL 输入有误."); document.payment.Email.focus(); return false; } if (document.payment.Phone.value.length == 0) { alert("电话不能为空."); document.payment.Phone.focus(); return false; } return true; } </script> <tr> <td><table width="977" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="237" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="37" valign="bottom" background="images/18.gif"><table width="50%" height="25" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center"><b>公寓分类</b></td> </tr> </table></td> </tr> <tr> <td background="images/22.gif"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td style="line-height:25px;"><% call ShowSmallClass_Tree() %></td> </tr> </table></td> </tr> <tr> <td><img src="images/28.gif" width="237" height="10" alt="" /></td> </tr> <tr> <td height="5"></td> </tr> <tr> <td height="37" valign="bottom" background="images/18.gif"><table width="50%" height="25" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center"><b>公寓查询</b></td> </tr> </table></td> </tr> <tr> <td background="images/22.gif"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td valign="top" style="line-height:25px;"><% call ShowSearch(1) %></td> </tr> </table></td> </tr> <tr> <td><img src="images/28.gif" width="237" height="10" alt="" /></td> </tr> <tr> <td height="5"></td> </tr> <tr> <td height="37" valign="bottom" background="images/18.gif"><table width="50%" height="25" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center"><b>新闻动态</b></td> </tr> </table></td> </tr> <% set rs_news1=server.createobject("adodb.recordset") sqltext4="select top 5 * from news where BigClassName='新闻动态'" rs_news1.open sqltext4,conn,1,1 %> <tr> <td background="images/22.gif"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> <%i=0 do while not rs_news1.eof%> <tr> <td valign="top" style="line-height:25px;"> <img border="0" src="Img/arrow_6.gif" width="11" height="11"><a href="shownews.asp?id=<%=rs_news1("id")%>" target="_blank"><%=rs_news1("title")%></a></td> </tr> <% rs_news1.movenext i=i+1 loop rs_news1.close %> </table></td> </tr> <tr> <td><img src="images/28.gif" width="237" height="10" alt="" /></td> </tr> </table></td> <td width="10" valign="top"> </td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="10" valign="bottom" background="images/26.gif"><img src="images/26.gif" width="730" height="10" alt="" /></td> </tr> <tr> <td background="images/23.gif"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><b>在线预订</b></td> </tr> </table></td> </tr> <tr> <td><img src="images/29.gif" width="730" height="10"></td> </tr> <tr> <td><div align="center"> <table border="0" width="95%" cellpadding="0" style="border-collapse: collapse" bgcolor="#FEDB99"> <tr> <td align="left"><br> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <form action="Payment.asp" method="POST" name="check"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000"> <tr bgcolor="#FFFFFF"> <td colspan="2" height="25" bgcolor="#FEDB99"> <font color=B0266D><%=session("UserName")%> </font>您选取的公寓明细如下:<br></td> </tr> <tr bgcolor="#FFFFFF"> <td width="18%" height="25" align="center" bgcolor="#FEDB99">选取</td> <td width="82%" height="25" align="center" bgcolor="#FEDB99">公寓名称</td> </tr> <% While Not rs_price.EOF %> <tr bgcolor="#FFFFFF"> <td width="18%" height="20" bgcolor="#FEDB99"><div align="center"> <input type="CheckBox" name="Product_Id" value="<%=rs_price("Product_Id")%>" Checked> </div></td> <td width="82%" bgcolor="#FEDB99"><div align="center"><font color="B0266D"><%=rs_price("Title")%></font></div></td> </tr> <% rs_price.MoveNext Wend rs_price.close set rs_price=nothing %> <tr bgcolor="#FFFFFF"> <td height="25" align="right" bgcolor="#FEDB99"><div align="center"> <input type="submit" name="order" value="公寓更新"> </div></td> <td height="25" align="right" bgcolor="#FEDB99"><div align="center"> </div></td> </tr> </table> </form> <% sql="select * from [User] where UserName='"&session("UserName")&"'" set rs_price=server.createobject("adodb.recordset") rs_price.open sql,conn,1,1 Sex=rs_price("Sex") Phone=rs_price("Phone") Email=rs_price("Email") CompanyName=rs_price("CompanyName") Receiver=rs_price("Receiver") Add=rs_price("Add") Fax=rs_price("Fax") rs_price.close set rs_price=nothing %> <form name="payment" action="Orderpreview.asp" method="POST" onSubmit="return CheckUserForm();"> <table border="0" cellspacing="1" cellpadding="3" align="center" width="100%" bgcolor="#000000"> <tr> <td width="96" height="23" bgcolor="#FEDB99"> <div align="right">TO<strong>:</strong></div></td> <td width="439" bgcolor="#FEDB99"><%=SiteTitle%> </td> </tr> <tr> <td height="21" bgcolor="#FEDB99"> <div align="right"><font color="#FF0000">*</font> 标题:</div></td> <td height="21" bgcolor="#FEDB99"> <input name="Subject" type="text" size="50" maxlength="100" value=""></td> </tr> <tr> <td height="21" bgcolor="#FEDB99"> <div align="right"><font color="#FF0000">*</font> 说明:<br> (20-4000字符)</div></td> <td height="21" bgcolor="#FEDB99"><textarea name="Notes" cols="60" rows="10">入住时间: 离开时间:</textarea></td> </tr> <tr bgcolor="#FFFFFF"> <td height="21" colspan="2" bgcolor="#FEDB99"> <div align="center">谢谢你对我们的公寓感兴趣,我们会尽快和你联系!</div></td> </tr> </table> <table border="0" cellspacing="1" cellpadding="3" align="center" width="100%" bgcolor="#000000"> <tr bgcolor="#FFFFFF"> <td width="18%" rowspan="2" bgcolor="#FEDB99"> <div align="right"><font color="#FF0000">*</font> 联系人<strong>:</strong></div></td> <td width="16%" bgcolor="#FEDB99"> <div align="right"> <input name="Sex" type="radio" value="1" <% if Sex="1" then response.Write("checked") end if%>> 先生</div></td> <td width="66%" colspan="2" rowspan="2" bgcolor="#FEDB99"> <input name="Receiver" type="text" class="form" id="name" size="30" value=<%=Receiver%>> </td> </tr> <tr bgcolor="#FFFFFF"> <td bgcolor="#FEDB99"> <div align="right"> <input type="radio" name="Sex" value="0" <% if Sex="0" then response.Write("checked") end if%>> 女士</div></td> </tr> <tr bgcolor="#FFFFFF"> <td height="30" bgcolor="#FEDB99"> <div align="right">地址:</div></td> <td height="30" colspan="3" bgcolor="#FEDB99"><input type="text" name="Add" size="50" value=<%=Add%>></td> </tr> <tr bgcolor="#FFFFFF"> <td height="30" bgcolor="#FEDB99"> <div align="right"><font color="#FF0000">*</font> E-mail<strong>:</strong></div></td> <td height="30" colspan="3" bgcolor="#FEDB99"><input type="text" name="Email" size="30" value=<%=Email%>> </td> </tr> <tr bgcolor="#FFFFFF"> <td height="30" bgcolor="#FEDB99"> <div align="right"><font color="#FF0000">*</font> 电话<strong>:</strong></div></td> <td colspan="3" bgcolor="#FEDB99"> <input type="text" name="Phone" class="form" size="20" value=<%=Phone%>> (Format:86-791-8059439)</td> </tr> <tr bgcolor="#FFFFFF"> <td height="30" bgcolor="#FEDB99"> <div align="right">传真<strong>:</strong></div></td> <td colspan="3" bgcolor="#FEDB99"><input type="text" name="Fax" size="20" value=<%=Fax%>> (Format:86-791-8059439)</td> </tr> <tr bgcolor="#FFFFFF"> <td height="32" colspan="4" align="center" bgcolor="#FEDB99"> <input type="submit" name="nextstep" value="提交请求"> <input type="button" value="继续购物" language=javascript onClick="javascript:window.close()" name="button"> <input name="reset" type="reset" id="reset" value="重新填写"> </td> </tr> </table> </form></td> </tr> </table> </td> </tr> </table></td> </tr> </table> </td> </tr> <%rs1.close set rs1=nothing %> </table> </div></td> </tr> </table></td> </tr> </table></td> </tr> </table> <!--#include file="end.asp"-->