%if Request.Cookies("car")("background")="pic" then
BackGrountValue= " background=/uploadpic/background.gif"
elseif Request.Cookies("car")("background")="color" then
BackGrountValue= " bgcolor='"& Request.Cookies("car")("backcolors") & "'"
else
BackGrountValue=""
end if%>
<%=Request.Cookies("car")("backcolors")%>>
<%dim dada,dadaurl,xiao1,xiao2,xiao3,xiao1url,xiao2url,xiao3url,tx1,tx1url,tx2,tx2url,tx3,tx3url,sgif
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_gg",conn,1,1
dada=trim(rs("458"))
dadaurl=trim(rs("458url"))
xiao1=trim(rs("2541"))
xiao1url=trim(rs("2541url"))
xiao2=trim(rs("2542"))
xiao2url=trim(rs("2542url"))
xiao3=trim(rs("2543"))
xiao3url=trim(rs("2543url"))
tx1=trim(rs("1441"))
tx1url=trim(rs("1441url"))
tx2=trim(rs("1442"))
tx2url=trim(rs("1442url"))
tx3=trim(rs("1443"))
tx3url=trim(rs("1443url"))
rs.close
set rs=nothing
%>
<%'------------------ 判斷來源%>
<%
dim bookid,username,comms,i,newsid,dingdan
comms=request.QueryString("comms")
username=trim(request.cookies("aspsky")("username"))
bookid=request.QueryString("id")
ris=request.QueryString("ris")
if ris="" then
if bookid="" then
ris="a"
else
ris="view"
end if
end if
if ris="shops" then%>
<%
if request.cookies("aspsky")("username")="" then
response.write ""
response.End
end if
%>
<%elseif ris="orderpay" then
ris="orderpay"
if request.cookies("aspsky")("username")="" then
response.write ""
response.End
end if
%>
<%elseif ris="orderpa" then
ris="orderpa"
if request.cookies("aspsky")("username")="" then
response.write ""
response.End
end if
%>
<%elseif ris="forgetpw" then
ris="forgetpw"
%>
<%elseif ris="mailpw" then
ris="mailpw"
%>
<%elseif ris="usrifo" then
ris="usrifo"
if request.cookies("aspsky")("username")="" then
response.write ""
response.End
end if
%>
<%elseif ris="newspro" then
ris="newspro"
newsid=request.QueryString("id")
%>
<%elseif ris="news" then
ris="news"
%>
<%elseif ris="about" then
ris="about"
%>
<%elseif ris="" then
ris="a"
%>
<%elseif ris="talk" then
ris="talk"
%>
<%elseif ris="atmsend" then
ris="atmsend"
%>
<%elseif ris="atmcode" then
ris="atmcode"
%>
<%elseif ris="putcar" then
ris="putcar"
if request.cookies("aspsky")("username")="" then
response.write ""
response.End
end if
%>
<%else%>
<%if request.QueryString("id")="" then ris="a"
' ris="a"
' else
'end if%>
<%end if%>
<%'------------------ 判斷來源%>
<%dim gg1,gg2,gg3,gg4,gg1url,gg2url,gg3url,gg4url
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_gg",conn,1,1
gg1=trim(rs("1601"))
gg1url=trim(rs("1601url"))
gg2=trim(rs("1602"))
gg2url=trim(rs("1602url"))
gg3=trim(rs("1603"))
gg3url=trim(rs("1603url"))
gg4=trim(rs("1604"))
gg4url=trim(rs("1604url"))
rs.close
set rs=nothing
if request("dd")="logout" then
Response.Cookies("songxf")=""
response.Cookies("aspsky")=""
response.Cookies("aspsky")("username")=""
Response.Cookies("aspsky")("userid")=""
response.Cookies("aspsky")("shjianame")=""
response.Cookies("aspsky")("jifen")=0
response.Cookies("aspsky")("yucun")=0
response.Cookies("aspsky")("jiaoyijine")=0
Response.Cookies("aspsky")("userclass")=""
Response.Cookies("aspsky")("password")=""
Response.Cookies("songxf")("username")=""
Response.Cookies("songxf")=""
response.Cookies("aspsky")=""
end if
%>
<%if (request("cert")="shops") and (request("ris")="orderpay") then%>
<%else%>
<%end if%>
<%leixing=lcase(trim(request("cert")))
select case leixing
case "big"
anclassid=request("erps")
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_anclass where anclassid="&anclassid,conn,1,1
anclassname=rs("anclass")
rs.close
%>
<%
case "small"
anclassid=request("erps")
nclassid=request("cps")
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_anclass where anclassid="&anclassid,conn,1,1
anclassname=rs("anclass")
rs.close
rs.open "select * from shop_nclass where nclassid="&nclassid,conn,1,1
nclassname=rs("nclass")
rs.close
%>
<%set rs=server.createobject("adodb.recordset")
if leixing="big" then
rs.open "select * from shop_books where anclassid="&anclassid&" and shjiaid=1 order by dazhe",conn,1,1
elseif leixing="small" then
rs.open "select * from shop_books where anclassid="&anclassid&" and nclassid="&nclassid&" and shjiaid=1 order by dazhe",conn,1,1
elseif leixing="onsale" then
rs.open "select * from shop_books where tejiabook=1 and shjiaid=1 order by dazhe",conn,1,1
elseif leixing="putpro" then
rs.open "select * from shop_books where bestbook=1 and shjiaid=1 order by dazhe",conn,1,1
elseif leixing="news" then
rs.open "select * from shop_books where newsbook=1 and shjiaid=1 order by dazhe",conn,1,1
else
rs.open "select * from shop_books where newsbook=1 and shjiaid=1 order by dazhe",conn,1,1
end if
if rs.recordcount=0 then
%>
暫無商品
<%
else
rs.PageSize =gonggao'
iCount=rs.RecordCount '
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if%>
")
end if
rs.close
set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'
Dim query, a, x, temp
comms = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
Response.Write("
" & vbCrLf )
%>
<%
End Sub
%>
<%elseif ris="view" then%>
" width="600" valign="bottom">">● 商 品 詳 細 資 訊 ●
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_books where shjiaid=1 and bookid="&request("id") ,conn,1,3
if rs.recordcount=0 then
%>
商品資料庫錯誤
<%
else
rs("liulancount")=rs("liulancount")+1
rs.update
'call history
if request.cookies("aspsky")("username")<>"" then
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from [user] where username='"&request.cookies("aspsky")("username")&"'",conn,1,1
t_userid=rs_s("userid")
rs_s.close
'response.write request("id")
'response.end
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from shop_his where bookid="&request("id")&" and username='"&request.cookies("aspsky")("username")&"' and lx=1",conn,1,3
if rs_s.recordcount>0 then
rs_s("ltime")=now()
rs_s("userid")=t_userid
rs_s.update
rs_s.close
set rs_s=nothing
else
rs_s.close
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select top 5 * from shop_his where username='"&request.cookies("aspsky")("username")&"' and lx=1 order by ltime",conn,1,3
if rs_s.recordcount>=4 then
rs_s.delete
rs_s.update
end if
rs_s.addnew
rs_s("username")=request.cookies("aspsky")("username")
rs_s("bookid")=request("id")
rs_s("bookname")=rs("bookname")
rs_s("userid")=t_userid
rs_s("lx")=1
rs_s("ltime")=now()
rs_s.update
rs_s.close
set rs_s=nothing
end if
end if
%>
[所屬類別]
<%set rs2=server.createobject("adodb.recordset")
rs2.open "select * from shop_anclass where anclassid="&rs("anclassid"),conn,1,1
if rs2.recordcount>0 then
response.write ""&rs2("anclass")&" "
end if
rs2.close
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from shop_nclass where nclassid="&rs("nclassid"),conn,1,1
if rs2.recordcount>0 then
response.write ""&rs2("nclass")
end if
rs2.close
set rs2=nothing%>
[評分]
<%if rs("pingjizong")>0 and rs("pingji")>0 then
xx=rs("pingjizong")\rs("pingji")
else
xx=5
end if
set rs2a=server.createobject("adodb.recordset")
rs2a.open "select * from shop_pinglun where bookid="&request("id")&" order by pinglundate desc",conn,1,1
plcount=rs2a.recordcount
rs2a.close
set rs2a=nothing
response.write ""%>
<%=plcount%> 位網友打分數
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_pinglun where bookid="&request("id")&" order by pinglundate desc",conn,1,1
j=rs.recordcount
plcount=rs.recordcount
if j>3 then j=3
for i=1 to j
%>
<%
rs.close
set rs=nothing
end if%>
<%elseif ris="shops" then%>
<%'///////////////
'//刪除收藏
select case comms
case "del"
conn.execute "delete from shop_action where actionid="&request.QueryString("commsid")
if request.QueryString("pert")=22 then
response.redirect "product.php?comms=vwbag&ris=shops"
else
'bookid=rs("bookid")
response.redirect "product.php?comms=show&ris=shops"
end if
response.End
case "add"
'//商品,判斷是否存在
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from shop_books where shjiaid=1 and bookid="&bookid,conn,1,1
if request.Cookies("aspsky")("reglx")=1 then
danjia=rs_s("huiyuanjia")
else
danjia=rs_s("vipjia")
end if
kucun=rs_s("kucun")
bookname=rs_s("bookname")
shjiaid=rs_s("shjiaid")
rs_s.close
set rs_s=nothing
if kucun<=0 then
response.write ""
response.end
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select bookid,username,bookcount,zonger from shop_action where username='"&username&"' and bookid="&bookid&" and zhuangtai=7",conn,1,3
if rs.recordcount=1 then
if kucun<(rs("bookcount")+1) and kucun>0 then
response.write ""
response.end
end if
rs("zonger")=(rs("bookcount")+1)*danjia
rs("bookcount")=rs("bookcount")+1
rs.update
rs.close
set rs=nothing
response.Redirect "product.php?comms=show&ris=shops"
else
rs.close
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 5 bookid,username,shjiaid,zhuangtai,zonger,bookcount from shop_action",conn,1,3
rs.addnew
rs("bookid")=bookid
rs("username")=username
rs("zhuangtai")=7
rs("bookcount")=1
rs("shjiaid")=shjiaid
rs("zonger")=danjia
rs.update
rs.close
set rs=nothing
response.Redirect "product.php?comms=show&ris=shops"
end if
case "show"
'//////////
response.write "
我的購物車
"
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_action.actionid,shop_action.bookid,shop_action.bookcount,shop_action.zonger,shop_action.shjiaid,shop_action.shouhuoname,shop_books.bookname,shop_books.shichangjia,shop_books.huiyuanjia,shop_books.vipjia from shop_books inner join shop_action on shop_books.bookid=shop_action.bookid where shop_action.username='"&request.cookies("aspsky")("username")&"' and shop_action.zhuangtai=7",conn,1,1
%>
<%
end select%>
<%elseif ris="orderpay" then%>
<%
comms=request("comms")
set rs=server.CreateObject("adodb.recordset")
rs.open "select count(*) as rec_count from shop_action where username='"&request.cookies("aspsky")("username")&"' and zhuangtai=7",conn,1,1
if rs("rec_count")=0 then
response.write ""
response.End
end if
rs.close
set rs=nothing
select case comms
'//////////////////////////////////
case ""
for i=1 to request.form("commsid").count
if request.form("bookcount")(i)<=0 then
bookcount=1
else
bookcount=request.form("bookcount")(i)
end if
shouhuoname=request.form("bookmemo")(i)
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from shop_books where bookid="&request.form("bookid")(i),conn,1,1
if request.Cookies("aspsky")("reglx")=1 then
danjia=rs_s("huiyuanjia")
else
danjia=rs_s("vipjia")
end if
kucun=rs_s("kucun")
bookname=rs_s("bookname")
rs_s.close
set rs_s=nothing
'response.write kucun&" "&bookcount
'response.end
if kucunalert('你選購的商品“"&bookname&"”超過最大限購數量喔,不能修改數量,請選購更換其它商品!');window.location.href='product.php?comms=show&ris=shops';"
response.end
end if
conn.execute("update shop_action set bookcount="&bookcount&",shouhuoname='"&shouhuoname&"',zonger="&danjia*bookcount&" where actionid="&request.form("commsid")(i))
next
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_action.actionid,shop_action.bookid,shop_action.bookcount,shop_action.zonger,shop_action.shouhuoname,shop_books.bookname,shop_action.shjiaid,shop_books.shichangjia,shop_books.huiyuanjia,shop_books.vipjia from shop_books inner join shop_action on shop_books.bookid=shop_action.bookid where shop_action.username='"&request.cookies("aspsky")("username")&"' and shop_action.zhuangtai=7",conn,1,1
%>
在最後結帳前您還可以修改購物車內容
<%
'/////////////////////////////////////////
case "commisa"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [user] where username='"&request.cookies("aspsky")("username")&"'",conn,1,1
userid=rs("userid")
%>
為了確保您的權益,請正確填寫以下收件人資料
<%
rs.close
set rs=nothing%>
<%
'/////////////////////////////////////////
case "commisb"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [user] where username='"&request.cookies("aspsky")("username")&"'",conn,1,1
%>
請選擇送件方式
<%
rs.close
set rs=nothing
'/////////////////////////////////////////
case "commisc"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [user] where username='"&request.cookies("aspsky")("username")&"'",conn,1,1
%>
對不起,請選擇貨款支付方式
<%
rs.close
set rs=nothing
'/////////////////////////////////////////
case "commisd"
%>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_action.actionid,shop_action.bookid,shop_action.bookcount,shop_action.shouhuoname,shop_action.zonger,shop_books.bookname,shop_action.shjiaid,shop_books.anclassid,shop_books.banci,shop_books.shichangjia,shop_books.huiyuanjia,shop_books.vipjia from shop_books inner join shop_action on shop_books.bookid=shop_action.bookid where shop_action.username='"&request.cookies("aspsky")("username")&"' and shop_action.zhuangtai=7 order by shop_books.shjiaid",conn,1,1
%>
商品名稱
市價
單價
<%if request.cookies("aspsky")("reglx")=2 then %>
(VIP)
<%else%>
(會員)
<%end if%>
數量
共計
<%shuliang=rs.recordcount
jianshu=0
zongji=0
fudongjia=0
do while not rs.eof
%>
<%
if request.Cookies("aspsky")("reglx")=2 then
response.write rs("vipjia")
else
response.write rs("huiyuanjia")
end if%>
<%
songhuofangshi=cint(request("songhuofangshi"))
%>
元
<%=rs("bookcount")%>
<%=(CSng(rs("zonger")))%>元
<%
jianshu=jianshu+rs("bookcount")
zongji=zongji+(CSng(rs("zonger")))
'
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from shop_songhuo where songid="&songhuofangshi,conn,1,1
'fudongjia=fudongjia+rs("bookcount")*fudongjia_dj
'rs_s.close
'set rs_s=nothing
firstshjid=rs("shjiaid")
rs.movenext
if not rs.eof then
nextshjid=rs("shjiaid")
end if
loop
rs.close
set rs=nothing
if (left(Request.Cookies("car")("account") ,2)="T-fdvhbrednbj rbvfdhjb drfvd") or (left(request.Cookies("car")("account") ,2)="t-hvbdrfhjbrtbjfgjvbfgnujfbjf") then
dbead8="c:\ecommdt\ead8\ecommdp.mdb"
Set connead8 = Server.CreateObject("ADODB.Connection")
connstread8="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbead8
connead8.Open connstread8
set rs_s2=server.CreateObject("adodb.recordset")
rs_s2.open "select * from shop_songhuo where songid="&songhuofangshi,connead8,1,1
if request.Cookies("aspsky")("reglx")=2 then
wuman=rs_s2("moneyvip")
if (zongji >= CSng(rs_s2("moneyvip"))) then
ufo=0
else
ufo=CSng(rs_s2("moneysend"))
end if
else
wuman=rs_s2("moneyone")
if (zongji >= CSng(rs_s2("moneyone"))) then
ufo=0
else
ufo=CSng(rs_s2("moneysend"))
end if
end if
else
if request.Cookies("aspsky")("reglx")=2 then
wuman=rs_s("moneyvip")
if (zongji >= CSng(rs_s("moneyvip"))) then
ufo=0
else
ufo=CSng(rs_s("moneysend"))
end if
else
wuman=rs_s("moneyone")
if (zongji >= CSng(rs_s("moneyone"))) then
ufo=0
else
ufo=CSng(rs_s("moneysend"))
end if
end if
end if
zongjip=zongji+ufo
%>
<%if wuman<>0 then %>因購物滿<%=wuman%>元 ,<%end if%>免加收運費; 金額總計 : <%=zongjip%>
元
<%end if%>
<%set aspsky=server.CreateObject("adodb.recordset")
aspsky.open "select * from shop_action_jp where username='"&request.cookies("aspsky")("username")&"' and zhuangtai=7",conn,1,1
if aspsky.recordcount>0 then%>
您已選擇的獎品清單
獎品名稱
使用紅利
<%
while not aspsky.eof%>
<%
set aspsky1=server.CreateObject("adodb.recordset")
aspsky1.open "select * from shop_jiangpin where bookid="&aspsky("bookid"),conn,1,1
if aspsky1.recordcount=1 then
response.write ""&aspsky1("bookname")&""
end if
aspsky1.close
set aspsky1=nothing%>
<%=aspsky("jifen")%>
<%
aspsky.movenext
wend%>
<%end if
aspsky.close
set aspsky=nothing%>
您的訂單資料
姓名
<%=request("userzhenshiname")%>
郵遞區號
<%=request("youbian")%>
詳細地址
<%=request("taddress")%>
聯絡電話
<%=request("usertel")%>
E-Mail
<%=request("useremail")%>
送件方式
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_songhuo where songid="&request("songhuofangshi"),conn,1,1
response.write rs("subject")
subjectp=rs("subject")
rs.close
set rs=nothing%>
<%if "付款方式" ="okeyfntt" then%>
付款方式
<%
'set rs=server.CreateObject("adodb.recordset")
'rs.open "select * from shop_songhuo where songid="&request("zhifufangshi"),conn,1,1
'response.write rs("subject")
'rs.close
'set rs=nothing%>
<%end if%>
<%
case "commise"
'/////////////////////////////////////////////////
function HTMLEncode2(fString)
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "
")
fString = Replace(fString, CHR(10), " ")
HTMLEncode2 = fString
end function
'
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [user] where username='"&request.cookies("aspsky")("username")&"'",conn,1,3
rs("userzhenshiname")=trim(request("userzhenshiname"))
rs("sex")=trim(request("shousex"))
rs("useremail")=trim(request("useremail"))
rs("shouhuodizhi")=trim(request("taddress"))
rs("youbian")=trim(request("youbian"))
rs("usertel")=trim(request("usertel"))
rs("songhuofangshi")=request("songhuofangshi")
rs("zhifufangshi")=request("songhuofangshi")
rs.update
rs.close
set rs=nothing
if Request.Cookies("car")("xiadan")<>minute(now) then
dim shijian
shijian=now()
dingdan=year(shijian)&month(shijian)&day(shijian)&hour(shijian)&minute(shijian)&second(shijian)
response.write bookid
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_action where username='"&request.cookies("aspsky")("username")&"' and zhuangtai=7",conn,1,3
if Request.Cookies("car")("plbbankway")="ON" then
myscode=Request.Cookies("car")("plbbankc")
myscodea=mid(myscode,1,1)
myscodeb=mid(myscode,2,1)
myscodec=mid(myscode,3,1)
myscoded=mid(myscode,4,1)
myscodee=mid(myscode,5,1)
myscodeaall=(int(myscodea)+int(myscodeb)+int(myscodec)+int(myscoded)+int(myscodee))
Months=Month(Date())
if Months < 10 then Months="0" & Months
Monthsa=mid(Months,1,1)
Monthsb=mid(Months,2,1)
Monthsall=(int(Monthsa)+int(Monthsb))
Days=Day(Date())
if Days < 10 then Days="0" & Days
Daysa=mid(Days,1,1)
Daysb=mid(Days,2,1)
Daysall=(int(Daysa)+int(Daysb))
set objfso=server.createobject("Scripting.FileSystemObject")
set objTS=objFSO.opentextfile(Server.MapPath("/setup/countbank.cgi"),1,true)
countbank=CLng(objts.readline)
countbank=countbank + 1
objts.close
set objTS=objFSO.opentextfile(Server.MapPath("/setup/countbank.cgi"),2,true)
objts.writeline(countbank)
objts.close
set objts=nothing
set objfso=nothing
ccoderr=countbank
if int(ccoderr)<10 and int(ccoderr)>0 then ccoderr="000" & ccoderr
if int(ccoderr)<100 and int(ccoderr)>9 then ccoderr="00" & ccoderr
if int(ccoderr)<1000 and int(ccoderr)>99 then ccoderr="0" & ccoderr
ccoderra=mid(ccoderr,1,1)
ccoderrb=mid(ccoderr,2,1)
ccoderrc=mid(ccoderr,3,1)
ccoderrd=mid(ccoderr,4,1)
ccoderrall=(int(ccoderra)+int(ccoderrb)+int(ccoderrc)+int(ccoderrd)+int(ccoderre))
totals_all=(int(myscodeaall)+int(Yearsall)+int(Monthsall)+int(Daysall)+int(ccoderrall))
seartuicode=(totals_all mod 10)
dingdan=myscode & Months & Days & ccoderr & seartuicode
else
dingdan=year(shijian)&month(shijian)&day(shijian)&hour(shijian)&minute(shijian)&second(shijian)
end if
do while not rs.eof
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from shop_books where bookid="&rs("bookid") and shjiaid=1,conn,1,3
if request.Cookies("aspsky")("reglx")=2 then
danjia=rs2("vipjia")
else
danjia=rs2("huiyuanjia")
end if
rs2("chengjiaocount")=rs2("chengjiaocount")+rs("bookcount")
rs("shouhuodizhi")=trim(request("taddress"))
rs2("kucun")=rs2("kucun")-rs("bookcount")
rs("bookid")=rs2("bookid")
rs("dingdan")=dingdan
rs("shjiaid")=1
rs("danjia")=danjia
rs("actiondate")=shijian
'rs("bookcount")=CInt(Request("aspsky"&rs2("bookid")))
rs("username")=trim(request.cookies("aspsky")("username"))
rs("feiyong")=trim(request("ufo"))
fapiao=1
rs("fapiao")=fapiao
rs("liuyan")=trim(request("liuyan"))
rs("useremail")=trim(request("useremail"))
rs("usertel")=trim(request("usertel"))
rs("youbian")=int(request("youbian"))
rs("userid")=request("userid")
rs("userzhenshiname")=trim(request("userzhenshiname"))
rs("zhuangtai")=1
rs("songhuofangshi")=request("songhuofangshi")
rs.update
rs.movenext
loop
rs.close
set rs=nothing
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [user] where username='"&request.cookies("aspsky")("username")&"'",conn,1,3
rs("jifen")=rs("jifen")-z_jifen
rs.update
username=rs("username")
useremail=rs("useremail")
rs.close
set rs=nothing
Request.Cookies("car")("xiadan")=minute(now)
else
response.Write "
您不能重覆送出!
"
response.End
end if
topic=username &" 的訂單交易完成通知"
mailbody=" 訂單交易完成通知"
mailbody=mailbody & "
"
end if
file= "howtopay.cgi"
Set FSOM = Server.CreateObject("Scripting.FileSystemObject")
Set TxtM = FSOM.OpenTextFile("c:\ecommdt\" & Request.Cookies("car")("account") & "\" & file)
ContentMA = TxtM.ReadAll
ContentM=replace(ContentMA,chr(13)&chr(10)," ")
If Not TxtM.Atendofstream Then
ContentMA = TxtM.ReadAll
ContentM=replace(ContentMA,chr(13)&chr(10)," ")
End If
set FSOM=nothing
set TxtM=nothing
mailbody=mailbody & "
<%end select%>
<%elseif ris="putcar" then%>
<%select case comms
case "del"
conn.execute "delete from shop_action where actionid="&request.QueryString("commsid")
if request.QueryString("pert")=1 then
response.redirect "product.php?comms=show&ris=putcar"
else
response.redirect "product.php?comms=show&ris=putcar"
end if
response.End
case "add"
set rs=server.CreateObject("adodb.recordset")
rs.open "select bookid,username from shop_action where username='"&username&"' and bookid="&bookid&" and zhuangtai=6",conn,1,1
if not rs.eof and not rs.bof then
response.write ""
response.end
rs.close
set rs=nothing
else
'
if rs.recordcount=10 then
response.write ""
response.end
else
rs.close
set rs=nothing
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 5 bookid,username,zhuangtai,zonger from shop_action",conn,1,3
rs.addnew
rs("bookid")=bookid
rs("username")=username
rs("zhuangtai")=6
rs("zonger")=0
rs.update
end if
rs.close
response.Redirect "product.php?comms=show&ris=putcar"
set rs=nothing
end if
case "show"
'//////////////////
response.write "
"
response.write "
您的私人珍藏袋最多裝十種商品
"
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_action.actionid,shop_action.bookid,shop_books.bookname,shop_books.shichangjia,shop_books.huiyuanjia,shop_books.vipjia,shop_books.dazhe from shop_books inner join shop_action on shop_books.bookid=shop_action.bookid where shop_action.username='"&request.cookies("aspsky")("username")&"' and shop_action.zhuangtai=6",conn,1,1
%>
<%
end select%>
<%elseif ris="usrifo" then%>
<%xAction=lcase(request("comms"))
select case xAction
case "seeme"
%>
個人資料
<%
case "viewsmy"
%>
個人資料
<%
case "chgpass"
%>
修改密碼
<%
case "buybag"
%>
我的訂單
<%
case "vwbag"
%>
我的珍藏袋
<%
case "howtovip"
%>
成為VIP會員 / VIP優惠
<%
case else
%>
推薦精品
<%end select%>
<%xAction=lcase(request("comms"))
select case xAction
case "seeme"
call myinfo()
case "viewsmy"
call viewsmy()
case "chgpass"
call chgpass()
case "buybag"
call dindan()
case "vwbag"
call shoucang()
case "howtovip"
call viphd()
case else
%>
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_books where bestbook=1 and shjiaid=1 order by dazhe",conn,1,1
if rs.recordcount=0 then
%>
暫無商品
<%
else
rs.PageSize =6
iCount=rs.RecordCount
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if%>
")
end if
rs.close
set rs=nothing
%><%end select%>
<%elseif ris="newspro" then%>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_news where newsid="&newsid,conn,1,3
rs("viewcount")=rs("viewcount")+1
rs.update%>
<%rs.close
set rs=nothing%>
<%elseif (request("ris")="atmcode") then%>
● ATM 繳 費 回 傳 ●
<%elseif (request("ris")="atmsend") then%>
● ATM 繳 費 回 傳 已 送 出 ●
<%elseif ris="news" then%>
最新消息
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_News order by adddate desc",conn,1,1
if rs.recordcount=0 then
%>
暫無最新消息發佈
<%
else
rs.PageSize =20
iCount=rs.RecordCount
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
%>
")
end if
rs.close
set rs=nothing
%>
<%elseif ris="orderpa" then%>
<%
dingdan=request.QueryString("dan")
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_books.bookid,shop_books.bookname,shop_books.shichangjia,shop_books.huiyuanjia,shop_action.actiondate,shop_action.shousex,shop_action.danjia,shop_action.feiyong,shop_action.fapiao,shop_action.userzhenshiname,shop_action.shouhuoname,shop_action.dingdan,shop_action.youbian,shop_action.liuyan,shop_action.zhifufangshi,shop_action.songhuofangshi,shop_action.zhuangtai,shop_action.zonger,shop_action.useremail,shop_action.usertel,shop_action.shouhuodizhi,shop_action.bookcount from shop_books inner join shop_action on shop_books.bookid=shop_action.bookid where shop_action.username='"&request.Cookies("aspsky")("username")&"' and dingdan='"&dingdan&"' ",conn,1,1
if rs.eof and rs.bof then
response.write "
此訂單中有商品已被管理員刪除,無法進行正確計算。 訂單取消,請通知管理員或重新下訂單!
"
response.End
end if
%>
訂單編號 : <%=dingdan%>
,詳細資料如下 :
訂單狀態 :
<%
select case rs("zhuangtai")
case "1"
response.write "審核中"
msgers= "審核中"
case "2"
response.write "審核中"
msgers= "審核中"
case "3"
response.write "缺貨中"
msgers= "缺貨中"
case "4"
response.write "會員辦理退貨!處理中!"
msgers= "會員辦理退貨!處理中!"
case "5"
response.write "已出貨!交易完成"
msgers= "已出貨!交易完成"
case "6"
response.write "補貨中"
msgers= "補貨中"
case "8"
response.write "已出貨!未收到款項!"
msgers= "已出貨!未收到款項!"
case "9"
response.write "會員辦理換貨!處理中!"
msgers= "會員辦理換貨!處理中!"
end select
%>
<%if rs("zhuangtai")<>5 then %>
<%else
response.write "感謝您的訂購"
end if%>
<%set aspsky=server.CreateObject("adodb.recordset")
aspsky.open "select * from shop_action_jp where username='"&request.cookies("aspsky")("username")&"' and dingdan='"&dingdan&"'",conn,1,1
if aspsky.recordcount>0 then%>
獎品列表 :
獎品名稱
使用紅利
<%
while not aspsky.eof%>
<%
set aspsky1=server.CreateObject("adodb.recordset")
aspsky1.open "select * from shop_jiangpin where bookid="&aspsky("bookid"),conn,1,1
if aspsky1.recordcount=1 then
response.write aspsky1("bookname")
end if
aspsky1.close
set aspsky1=nothing%>
<%=aspsky("jifen")%>
<%
aspsky.movenext
wend%>
<%end if
aspsky.close
set aspsky=nothing%>
收件人姓名 :
<%=trim(rs("userzhenshiname"))%>
收件地址 :
<%=trim(rs("shouhuodizhi"))%>
郵遞區號 :
<%=trim(rs("youbian"))%>
聯絡電話 :
<%=trim(rs("usertel"))%>
e-mail :
<%=trim(rs("useremail"))%>
送件方式 :
<%set rs2=server.CreateObject("adodb.recordset")
rs2.Open "select * from shop_songhuo where songid="&rs("songhuofangshi"),conn,1,1
response.Write trim(rs2("subject"))
rs2.Close
set rs2=nothing%>
<%elseif ris="forgetpw" then%>
<%elseif ris="mailpw" then%>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [user] where username='"&trim(request("ue5879"))&"'",conn,1,3
if rs.eof and rs.bof then
response.Write ""
response.End
else
randomize
username=rs("username")
useremail=rs("useremail")
email5678=trim(request("email5678"))
pwnw25=(int(rnd*587984)+8888)
if email5678<>useremail then
response.Write ""
response.End
end if
%>
<%
rs("userpassword")=md5(pwnw25)
rs.update
topic=username &" 的密碼重新發送通知"
mailbody="密碼重送通知"
mailbody=mailbody & "
"
on error resume next
Set JMail=Server.CreateObject("JMail.Message")
JMail.Charset="big5"
JMail.ContentType = "text/html"
jmail.from = "[email protected]"
jmail.silent = true
jmail.Logging = true
jmail.FromName = webname
jmail.AddRecipient useremail
jmail.body=mailbody
JMail.Subject=topic
if not jmail.Send ( "pop.xxking.com" ) then
SendMail=""
else
SendMail="OK"
end if
if SendMail="OK" then%>
您的新密碼發送成功!<%
else%>
您的新密碼發送失敗,請聯絡管理員!<%
end if%>
<%
end if
rs.close
set rs=nothing
%>
<%elseif ris="talk" then%>
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_books where bookid="&request("id") and shjiaid=1,conn,1,3
if rs.recordcount>0 then
spmx=rs("bookname")
end if%>
商品評論 : <%=spmx%>
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_pinglun where bookid="&request("id")&" order by pinglunid desc",conn,1,1
if rs.recordcount=0 then
%>
暫無評論
<%
else
rs.PageSize =10
iCount=rs.RecordCount
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
%>