%If request.cookies("timesshop")("username")="" Then
dim url
url=url&request.ServerVariables("SCRIPT_NAME")
if(len(trim(request.ServerVariables("QUERY_STRING")))>0) then
url=url & "?" & request.ServerVariables("QUERY_STRING")
end if
response.write url
response.Redirect "/user/login.asp?url='"&url&"'"
response.end
end if
dim action
action=FormatSQL(SafeRequest("action",0))
select case action
case "add"
set rs9=server.CreateObject("adodb.recordset")
rs9.open "select * from [user] where username='"&request.cookies("timesshop")("username")&"' ",conn,1,3
'MyCars=split(rs9("carstype"),",")
'for K=0 to ubound(mycars)
'if mycars(k)
if rs9("carstype")="" or isnull(rs9("carstype")) then
rs9("carstype")=request.form("county")
else
rs9("carstype")=rs9("carstype")&","&request.form("county")
end if
rs9.update
rs9.close
set rs9=nothing
case "del"
set rs9=server.CreateObject("adodb.recordset")
rs9.open "select * from [user] where username='"&request.cookies("timesshop")("username")&"' ",conn,1,3
MyCars=split(rs9("carstype"),",")
j=0
'response.write ubound(mycars)
for K=0 to ubound(mycars)
'response.write K&" "& mycars(k)
if mycars(k)<>request("id") and mycars(k)<>"" then
if j=0 then
NewCars=MyCars(k)
j=j+1
else
NewCars=NewCars&","&mycars(k)
end if
end if
next
rs9("carstype")=NewCars
rs9.update
rs9.close
set rs9=nothing
end select
'----------------------------------------------------------------------------------
set catalogrs=server.createobject("ADODB.Recordset")
catalogsql="select * from tdcatalog"
catalogrs.open catalogsql,conn,1,3
'----------------------------------------------------------------------------------
set smallrs=server.CreateObject("ADODB.Recordset")
smallsql="select * from small"
smallrs.open smallsql,conn,1,3
'----------------------------------------------------------------------------------
%>
<%=webname%> ---- 会员中心 - 我的车库
我的车库
<%
set rs9=server.CreateObject("adodb.recordset")
rs9.open "select * from [user] where username='"&request.cookies("timesshop")("username")&"' ",conn,1,1
if rs9.eof or rs9("carstype")="" or isnull(rs9("carstype")) then
NoCar=1
else
MyCars=split(rs9("carstype"),",")
NoCar=0
end if
%>
<%
if NoCar=0 then
set rs2=server.createobject("adodb.recordset")
for k=0 to ubound(mycars)
if mycars(k)<>"" then
rs2.open "select * from small where sid="&mycars(k)&"" ,conn,1,1%>
<% if not rs2.eof then %>