📄 shopping.asp
字号:
<!--#include file="../inc/conn.asp"-->
<%session("productname")=request("productname")
session("productid")=request("productid")
session("money")=request("money")
if session("membername")="" or session("memberid")="" then
response.redirect"checkshopping.asp"
else
if request("submit")="生成订单" then
productid=request("productid")
productname=request("productname")
salesmoney=session("money")
sl=request("sl")
userid=session("memberid")
if sl="" or IsNumeric(sl)=false then
Response.Write("<script language=""javascript"">alert('请正确输入数量!');location='javascript:history.back()';</script>")
Response.End()
end if
if salesmoney<>"" then
allmoney=salesmoney*sl
else
allmoney=""
end if
'response.write ""&productid&"<br>"
'response.write ""&productname&"<br>"
'response.write ""&salesmoney&"<br>"
'response.write ""&sl&"<br>"
'response.write ""&userid&"<br>"
'response.write ""&allmoney&""
'response.End()
CommandText="insert into sales(userid,productname,productid,productsl,salesmoney,allmoney) Values('"&userid&"','"&productname&"','"&productid&"','"&sl&"','"&salesmoney&"','"&allmoney&"')"
Conn.execute CommandText
response.redirect"addsalesadder.asp"
set Conn=nothing
end if%>
<html>
<head>
<title>选购信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../Style.css" type="text/css">
<script language="JavaScript">
<!--
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" background="../image/smallbg.gif" text="#000000">
<form name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="5" bgcolor="#000000">
<tr>
<td bgcolor="#f1f1f1"> 您选购了如下的产品:</td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="1" cellpadding="5" bgcolor="#000000" align="center">
<tr bgcolor="#FFFFFF">
<td width="15%">产品信息:</td>
<td><%=session("productname")%>
<input type="hidden" name="productid" value="<%=session("productid")%>">
<input type="hidden" name="userid" value="<%=session("memberid")%>">
<input type="hidden" name="salesmoney" value="<%=session("money")%>">
</td>
<td width="15%">选购数量:</td>
<td width="20%">
<input name="sl" type="text" class="inputtd" value="1" size="5">
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td> </td>
<td align="right" width="50%">
<input name="Submit2" type="submit" class="inputtd" onClick="MM_callJS('window.close()')" value="取消购买">
<input name="Submit" type="submit" class="inputtd" value="生成订单">
</td>
</tr>
</table>
</form>
</body>
</html>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -