<%
'дÈëCOOKIE
'Response.Write Request.Cookies("warebuycount")
sub setcookie(Aname,warenum,warename,price,warecount,pricelow)
Response.Cookies(Aname).domain=application("wareurl") 'wareurl´ú±íÓòÃû
Response.Cookies(Aname).expires=date()+30 'COOKIE¹ýÆÚÈÕÆÚ
Response.Cookies(Aname).path="/"
Response.Cookies(Aname).Secure = FALSE
Response.Cookies(Aname)("warenum")=warenum 'ÉÌÆ·±àºÅ
Response.Cookies(Aname)("warename")=warename 'ÉÌÆ·Ãû³Æ
Response.Cookies(Aname)("price")=price '¼Û¸ñ
Response.Cookies(Aname)("warecount")=warecount '¹ºÂòµÄÊýÁ¿
Response.Cookies(Aname)("pricelow")=pricelow '»áÔ±¼Û¸ñ
end sub
sub setcount(warebuycount) 'ÓÃÓÚ¼ÆËã¿Í»§¹ºÂòµÄÉÌÆ·ÖÖÀà
Response.Cookies("warebuycount").domain=application("wareurl")
Response.Cookies("warebuycount").expires=date()+30
Response.Cookies("warebuycount").path="/"
Response.Cookies("warebuycount").secure=false
Response.Cookies("warebuycount")=warebuycount
end sub
'дÈëCOOKIES
sub setcookies(warenum,warename,price,warecount,pricelow,warebuycount)
setcookie "warenum"+Cstr(warebuycount),warenum,warename,price,warecount,pricelow
end sub
sub delcookies(delwarenum)
warebuycount=Request("warebuycount")-1
while Cint(delwarenum)<=Cint(warebuycount)
setcookies Request.Cookies("warenum"+Cstr(delwarenum+1))("warenum"),Request.Cookies("warenum"+Cstr(delwarenum+1))("warename"),Request.Cookies("warenum"+Cstr(delwarenum+1))("price"),Request.Cookies("warenum"+Cstr(delwarenum+1))("warecount"),Request.Cookies("warenum"+Cstr(delwarenum+1))("pricelow"),delwarenum
delwarenum=delwarenum+1
wend
setcount warebuycount
end sub
warenum=Request.QueryString("warenum") '´ÓGET·µ»ØµÄÉÌÆ·±àºÅ,µ±È»,Õâ¸öÉÌÆ·Ò²Ò»¶¨Òª´æÔÚÓÚÄãµÄÉÌÆ·±íÖÐ
warename=Request.QueryString("warename") '´ÓGET·µ»ØµÄÉÌÆ·Ãû³Æ
price=Request.querystring("price") '¼Û¸ñ
warecount=Request.QueryString("warecount") '¹ºÂòÊýÁ¿
pricelow=Request.QueryString("pricelow") '»áÔ±¼Û¸ñ
'setcount 4
warebuycount=Request.Cookies("warebuycount")
'Response.Write warebuycount
if Request.ServerVariables("REQUEST_METHOD")="POST" then
dum=request("del")
dim delnum
delnum=split(dum,",")
T1=1
warebuycount=Request.Cookies("warebuycount")
while T1<=Cint(warebuycount)
tm=request("warenum"+Cstr(T1))
rm="warenum"+Cstr(T1)
nomodi=false
if tm="" then
tm=0
end if
if instr(1,Cstr(tm),".") or tm=0 then
nomodi=true
else
setcookies Request.Cookies("warenum"+Cstr(T1))("warenum"),Request.Cookies("warenum"+Cstr(T1))("warename"),Request.Cookies("warenum"+Cstr(T1))("price"),tm,Request.Cookies("warenum"+Cstr(T1))("pricelow"),T1
end if
T1=T1+1
wend
if dum"" then
Cwarenum=0
while Cwarenum<=ubound(delnum)
delcookies delnum(Cwarenum)-Cwarenum
Cwarenum=Cwarenum+1
wend
'setcount Request.Cookies("warebuycount")-(ubound(delnum)+1)
end if
else
if warenum"" then
warebuycount=Request.Cookies("warebuycount")
if warebuycount="" then
warebuycount=0
else
if warebuycount<0 then
warebuycount=0
end if
end if
i=1
allready=false
'Response.Write warebuycount
'Response.End
while i<=Cint(warebuycount)
tsf="warenum"+trim(Cstr(i))
if Request.Cookies(tsf)("warenum")=warenum then
allready=true
mut=Request.Cookies(tsf)("warecount")
mtp=i
end if
i=i+1
wend
if allready=false then
warebuycount=warebuycount+1
end if
if pricelow="" then
pricelow=0
end if
if allready=false then
setcookies warenum,warename,price,warecount,pricelow,warebuycount
else
setcookies warenum,warename,price,warecount+Cint(mut),pricelow,mtp
end if
setcount warebuycount
end if
end if
'T=1
' while T
¹ºÎï³µ
height="82">
ÉÌÆ·Ãû³Æ
ÁãÊÛ¼Û
»áÔ±¼Û
ÊýÁ¿
ÁãÊÛ¼ÛС¼Æ
»áÔ±¼ÛС¼Æ
È¡Ïû¹ºÂò
<%
Tcou=1
pricetot=0
pricelowtot=0
'Response.Write warebuycount
while Tcou
color="red">£¤
align="left">£¤
name="" style="HEIGHT: 22px; WIDTH: 33px" value="">
color="red">£¤
color="red">£¤
name="del" type="checkbox" value="">¡¡
×ܼƣº
£¤
£¤
border="0" width="100%" cellspacing="0" cellpadding="0">
ÉÌÆ·ÊýÁ¿ÐÞ¸Äʧ°Ü£¡ÇëÊäÈëÕýÈ·µÄÊý×Ö¡£Êý¾ÝÐ޸ijɹ¦£¡

