%
sub addtocart()
set rs=server.CreateObject("adodb.recordset")
rs.open "select orders.actionid,orders.id,tproduct.tproduct,tproduct.tprice,tproduct.tpricenet,tproduct.discount from tproduct inner join orders on tproduct.id=orders.id where orders.username='"&request.cookies("timesshop")("username")&"' and orders.state=6",conn,1,1
%>
<%
if action="addtocart" then
response.write "
<%
end sub
sub receiveaddr()
dim rs2
if request.cookies("timesshop")("username")="" then
response.Write "
请先登录
"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select receipt,receipt,city,address,postcode,usertel,UserMobile,UserSex,userqq,deliverymethord,paymethord from [user] where username='"&request.cookies("timesshop")("username")&"' ",conn,1,1
%>
<%
rs.close
set rs=nothing
end sub
sub deposit()
dim strscore,strvipscore,strdeposit
if request.cookies("timesshop")("username")="" then
response.Write "
请先登录
"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select score,deposit from [user] where username='"&request.cookies("timesshop")("username")&"' ",conn,1,1
strscore = rs("score")
strdeposit = rs("deposit")
rs.close
rs.open "select webimg14 from config",conn,1,1
strvipscore = rs("webimg14")
rs.close
%>
★ 您目前的积分为:
<% = strscore %>
分。
<%
set rs = nothing
end sub
sub profile()
if request.cookies("timesshop")("username")="" then
response.Write "
请先登录
"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select book from [user] where username='"&request.cookies("timesshop")("username")&"' ",conn,1,1
%>
<% = rs("book") %>
<%
end sub
sub customerinfo()
if request.cookies("timesshop")("username")="" then
response.Write "
请先登录
"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select useremail,vip,identify,UserQuestion,realname from [user] where username='"&request.cookies("timesshop")("username")&"' ",conn,1,1
Dim Rank
Rank="普通会员"
If rs("vip")=true then
Rank = "VIP会员"
End if
%>
<%
rs.close
set rs=nothing
end sub
sub changepass()
if request.cookies("timesshop")("username")="" then
response.Write "
请先登录
"
response.End
end if %>
<%
end sub
sub repass()
dim shop
shop=SafeRequest("shop",1)
select case shop
'//输入用户名
case ""
response.Write "
"
response.Write "
"
'//输入问题答案
case "1"
set rs=server.CreateObject("adodb.recordset")
rs.open "select UserQuestion,UserAnswer from [user] where username='"&trim(request.form("username"))&"' ",conn,1,1
if rs.eof and rs.bof then
response.write "
查无此用户,请返回!
"
else
response.Write "
"
response.Write "
"
end if
rs.close
set rs=nothing
'//输入新密码
case "2"
set rs=server.CreateObject("adodb.recordset")
rs.open "select UserAnswer from [user] where username='"&trim(request.form("username1"))&"' ",conn,1,1
'//判断答案是否正确
if trim(rs("UserAnswer"))<>md5(trim(request.form("UserAnswer"))) then
response.write ""
response.end
else
response.Write "
"
response.Write "
"
end if
rs.close
set rs=nothing
end select
end sub
sub statinfo()
if request.cookies("timesshop")("username")="" then
response.Write "
请先登录
"
response.End
end if
dim joindtm,myorder,successed,successedsum,lastorder
set rs=server.CreateObject("adodb.recordset")
rs.open "select adddate from [user] where username='"&request.cookies("timesshop")("username")&"'",conn,1,1
joindtm=rs("adddate")
rs.close
rs.open "select distinct(goods),actiondate from orders where username='"&request.cookies("timesshop")("username")&"' and state<6 ",conn,1,1
if rs.eof and rs.bof then
response.write ""
else
rs.movelast
lastorder=rs("actiondate")
myorder=rs.recordcount
end if
rs.close
rs.open "select sum(paid) as paid from orders where username='"&request.cookies("timesshop")("username")&"' and state<6 and state>3",conn,1,1
if rs("paid")>0 then
successedsum=rs("paid")
else
successedsum=0
end if
rs.close
rs.open "select distinct(goods) from orders where username='"&request.cookies("timesshop")("username")&"' and state<6 and state>3",conn,1,1
successed=rs.recordcount
set rs=nothing %>
以下是您在本站的一些历史记录的统计信息
注册日期:
<% =joindtm %>
上次下单:
<% =lastorder %>
下单次数:
<% = myorder %>次
成交次数:
<% =successed %>次
成交金额:
<% =successedsum %>元
<%
end sub
sub goods()
if request.cookies("timesshop")("username")="" then
response.Write "
请先登录
"
response.End
end if
%>
我 的 订 单
>
订单号
合计金额
积分
订货人
付款方式
收货方式
订单日期
订单状态
<%set rs=server.CreateObject("adodb.recordset")
dim state
state=SafeRequest("state",1)
if state=0 or state="" then
select case state
case "0"
rs.open "select distinct(goods),realname,actiondate,deliverymethord,paymethord,state from orders where username='"&request.cookies("timesshop")("username")&"' and state<6 order by actiondate desc",conn,1,1
case ""
rs.open "select distinct(goods),realname,actiondate,deliverymethord,paymethord,state from orders where username='"&request.cookies("timesshop")("username")&"' and state<6 order by actiondate desc",conn,1,1
end select
else
rs.open "select distinct(goods),realname,actiondate,deliverymethord,paymethord,state from orders where username='"&request.cookies("timesshop")("username")&"' and state="&state&" order by actiondate",conn,1,1
end if
do while not rs.eof
%>
<% dim shop,rs2
set shop=server.CreateObject("adodb.recordset")
shop.open "select sum(paid) as paid,sum(score) as score from orders where goods='"&trim(rs("goods"))&"' ",conn,1,1
%>
<%
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from delivery where deliveryid="&rs("deliverymethord"),conn,1,1
response.write ""&shop("paid")+rs2("fee")&"元"
rs2.close
set rs2=nothing %>
<% = shop("score") %>
<%
shop.close
set shop=nothing
%>
<%=trim(rs("realname"))%>
<%set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from delivery where deliveryid="&rs("paymethord"),conn,1,1
response.Write trim(rs2("subject"))
rs2.close
set rs2=nothing%>
<%set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from delivery where deliveryid="&rs("deliverymethord"),conn,1,1
response.Write trim(rs2("subject"))
rs2.close
set rs2=nothing
%>
<%=trim(rs("actiondate"))%>
<%select case rs("state")
case "1"
response.write "未作任何处理"
case "2"
response.write "订单处理中"
case "3"
response.write "服务商收到款"
case "4"
response.write "服务商已发货"
case "5"
response.write "用户已收到货"
end select%>
<%
rs.movenext
loop
rs.close
set rs=nothing%>
<%end sub
sub UserLogins()
dim url
url=Request.ServerVariables("HTTP_REFERER") %>