📄 mydan.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>mydan.asp</title>
<style type="text/css">
<!--
.style1 {color: #6600FF}
-->
</style>
</head>
<body>
<center class="style1">
<span class="style1">欢迎你</span>:<%=request.cookies("xingxing")("username")%> 你的定单</center>
<%
goods_id=request.Form("buy")
arrayGId=split(goods_id,",")
num=request.Form("num")
arrayNUM=split(num,",")
pay=request.form("pay")
arrayPAY=split(pay,",")
send=request.form("send")
arraySEND=split(send,",")
'gid0=arrayGID(0)
'num0=arrayNUM(0)
'gid1=arrayGID(1)
'num1=arrayNUM(1)
'gid2=arrayGID(2)
'num2=arrayNUM(2)
'response.Write arrayGID(0)
'for each gid in arrayGId
'db.Execute(strSql)
'next
'response.Write"<br>"
'for each num in arrayNUM
'db.Execute(strSql)
'next
%>
<% 'for i=0 to ubound(arrayGId)-1
Dim db
Set db=Server.CreateObject("ADODB.Connection")
db.Open "Dbq="&Server.Mappath("database/xingxing.mdb")&";Driver={Microsoft Access Driver (*.mdb)};"
strSql="Select user_id From user where username='" & request.cookies("xingxing")("username") &"'"
set rs=db.execute(strSql)
user_id=rs(0)
if ubound(arrayGID)-0=0 then
gid0=arrayGID(0)
num0=arrayNUM(0)
pay0=arrayPAY(0)
send0=arraySEND(0)
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from user_order "
rs.open sql,db,1,3
rs.addnew
rs("user_id")=user_id
rs("store_id")=gid0
rs("amount")=num0
rs("date")=now()
rs("pay_wise")=pay0
rs("send_wise")=send0
rs("isdiposal")=true
rs.update
rs.close
set rs=nothing
end if
if ubound(arrayGID)-1=0 then
gid1=arrayGID(1)
num1=arrayNUM(1)
pay1=arrayPAY(1)
send1=arraySEND(1)
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from user_order "
rs.open sql,db,1,3
rs.addnew
rs("user_id")=user_id
rs("store_id")=gid1
rs("amount")=num1
rs("date")=now()
rs("pay_wise")=pay1
rs("send_wise")=send1
rs("isdiposal")=true
rs.update
rs.close
set rs=nothing
end if
if ubound(arrayGID)-2=0 then
gid2=arrayGID(2)
num2=arrayNUM(2)
pay2=arrayPAY(2)
send2=arraySEND(2)
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from user_order "
rs.open sql,db,1,3
rs.addnew
rs("user_id")=user_id
rs("store_id")=gid2
rs("amount")=num2
rs("date")=now()
rs("pay_wise")=pay2
rs("send_wise")=pay2
rs("isdiposal")=true
rs.update
rs.close
set rs=nothing
end if
response.cookies("mycar1")=""
response.cookies("mycar2")=""
response.cookies("mycar3")=""
'for i=0 to ubound(arrayGId)-1
'strSql1="Insert Into user_order(user_id,store_id,amount,date,pay_wise,send_wise,isdiposal) Values('" & user_id & "','" & arrayGId(0) & "','"& arrayNUM(0) &"',#" & now() & "#,'" & "银行汇款" & "','" & "送货上门" & "','" & no & "')"
'db.Execute(strSql1)
'next
'Response.Write "<div align="center"><span class="style1">定单已经成功写入数据库,回钱拿货吧!</span></div>"
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -