%
Option Explicit
Response.Buffer = True
Dim ObjRst,OBjCn,StrSql,StrAction
Set ObjCn = Server.CreateObject("ADODB.Connection")
Set ObjRst = Server.CreateObject("ADODB.Recordset")
ObjCn.open "wd102"
Dim Pro(),protitle(),App(),apptitle(),applist(),Parts(),Partstitle(),preClass,CurClass,i,j,k
ReDim PreServe Pro(0),ProTitle(0)
Pro(0)=0
ProTitle(0)=""
ReDim PreServe App(0),apptitle(0),applist(0)
App(0)=0
apptitle(0)=""
applist(0)=""
ReDim PreServe Parts(0),Partstitle(0)
Parts(0)=0
Partstitle(0)=""
i=1
ObjRst.Open "select title,id,class,agentlist from volvo_pro2008_lst where ispublished=1 and class in (1,3,4) order by class",ObjCn
If Not ObjRst.Eof Then
Do While Not ObjRst.Eof
If preClass<>ObjRst.Fields("class") Then i=1
preClass=ObjRst.Fields("class")
Select case preClass
case 1
ReDim PreServe Pro(i),ProTitle(i)
Pro(i)=ObjRst.Fields("id")
ProTitle(i)=ObjRst.Fields("title")
i=i+1
case 3
ReDim PreServe App(i),apptitle(i),applist(i)
App(i)=ObjRst.Fields("id")
apptitle(i)=ObjRst.Fields("title")
applist(i)=ObjRst.Fields("agentlist")
i=i+1
case 4
ReDim PreServe Parts(i),Partstitle(i)
Parts(i)=ObjRst.Fields("id")
Partstitle(i)=ObjRst.Fields("title")
i=i+1
End Select
ObjRst.MoveNext
Loop
End If
ObjRst.Close
%>
<%ObjRst.Open "select id from volvo_dealer_brand where class=4 and corpid="&cr_corpid,ObjCn
If Not ObjRst.Eof Then %>
ÆäËüÆ·ÅÆ <%End If
ObjRst.Close%>
ÁªÏµÎÒÃÇVOLVO¾ÏúÉ̵Ǽ
²úÆ·½éÉÜ
<%For i=0 To Ubound(pro)
If protitle(i)<>"" Then
%>
<%ObjRst.Open "select title,id from volvo_pro2008_lst where class=2 and ispublished=1 and parent_id="&pro(i),ObjCn
j=0
Do While Not ObjRst.Eof
j=j+1
ObjRst.MoveNext
Loop
If Not ObjRst.Bof Then ObjRst.MoveFirst
k=0
Do While Not ObjRst.Eof
k=k+1 %>
<%
ObjRst.Open "select title,id from volvo_pro2008_lst where class=1 and ispublished=1 and id in ("&applist(i)&")",ObjCn
j=0
Do While Not ObjRst.Eof
j=j+1
ObjRst.MoveNext
Loop
If Not ObjRst.Bof Then ObjRst.MoveFirst
k=0
Do While Not ObjRst.Eof
k=k+1 %>