⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buy.asp

📁 基于IIS+ASP的
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
  if trim(request("id"))<>"" then
		   if request("do")="yes" then	
					  sql="insert into PayProduct(usr,tel,post,addr,product,num,price,paycls) values('"&request("usr")&"','"&request("tel")&"','"&request("post")&"','"&request("addr")&"','"&request("product")&"','"&request("num")&"','"&request("price")&"','"&request("paycls")&"')"
							
							conn.execute sql

							if err=0 then
							  response.write("<script>alert('成功购买!');self.close();</script>")		
				     response.end
							else
							 	response.write("<script>alert('操作失败!');self.close();</script>")		
				    	response.end
							end if
	   	end if
		else
		  response.write("<script>alert('参数错误!请关闭。');self.close();</script>")		
				response.end
		end if
%>
<head>
<link href="css/default.css" rel="stylesheet" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<link rel="stylesheet" href="admin/css.css">
<style type="text/css">
<!--
body {
background-color:#FFF4F8;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
}
-->
</style></head>

<body>
<form name="form1" method="post" action="">
  <table width="480" cellpadding="0" cellspacing="0" align="center">
				<tr><td height="20" colspan="2"></td></tr>
    <tr>		
								<td background="images/c_channel2.gif" width="228" height="27"><div align="right">购 买 商 品</div></td>
								<td width="252"></td>
				</tr>
				<tr><td height="10"></td></tr>
		</table>
<table width="480" cellpadding="1" cellspacing="1" bgcolor="#D4D0C8" align="center">
				<tr bgcolor="#FFF4F8">
      <td width="60" align="right">姓 名:</td>
        <td width="170"><input name="usr" type="text" size="20" maxlength="20"></td>
    <td width="70" align="right">电 话:</td>
      <td width="180"><input name="tel" type="text" size="20" maxlength="20"></td>
    </tr>
    <tr bgcolor="#FFF4F8">
      <td align="right">邮 编:</td>
      <td><input name="post" type="text" size="20" maxlength="20"></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr bgcolor="#FFF4F8">
      <td align="right">地 址:</td>
      <td colspan="3"><input name="addr" type="text" size="55" maxlength="100"></td>
    </tr>
    <tr bgcolor="#FFF4F8">
      <td align="right">商品名:</td>
      <td><input name="product" type="text" readonly size="20" maxlength="20" value="<%=request("sn")%>">
      <input type="hidden" name="id" value="<%=request("id")%>"></td>
      <td align="right">数 量:</td>
      <td><input name="num" type="text" size="10" maxlength="10"></td>
    </tr>
    <tr bgcolor="#FFF4F8">
      <td align="right">价 格:</td>
      <td><input name="price" type="text" size="10" maxlength="10" readonly value="<%=request("pr")%>">
      <input type="hidden" name="do" value="yes"></td>
      <td align="right">购买方式:</td>
      <td align="left"><input name="paycls" type="radio" value="邮寄" checked>
        邮寄
          <input name="paycls" type="radio" value="汇款">
        汇款</td>
    </tr>
    <tr bgcolor="#FFF4F8">
      <td colspan="4" align="center"><input type="submit" name="Submit" value="提 交">        
      <input type="reset" name="Submit2" value="重 填"></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -