Untitled Document

<% color1="77CC00" '分类列表中大类的颜色 color2="0066ff" '分类列表中中类的颜色 viewmidclass=1 '是否显示中类，1表示显示，0表示不显示 dim larcode(100) '最多支持100个大类 dim midcode(20) '最多支持20个中类 '以下是分类列表，首先读取全部大类，然后根据每个大类读取各自的中类 response.write "

" Dim a,b,c sqllar="select Distinct LarCode,LarSeq from bclass order by LarSeq" Set rsprodtree=Server.CreateObject("ADODB.RecordSet") rsprodtree.Open sqllar,conn,1,1 if rsprodtree.bof and rsprodtree.eof then response.write "
对不起，本商城暂未开业
" else i=0 Do While Not rsprodtree.eof i=i+1 larcode(i)=rsprodtree("LarCode") rsprodtree.movenext if rsprodtree.eof then exit do Loop end if set rsprodtree=nothing set sqllar=nothing FOR t=1 to i response.write "
"&LarCode(t)&"
" response.write "
" if viewmidclass<>0 then '是否显示中类 '以下是根据前面读取的大类名称，读取各个大类下的中类 sqllar="select MIDCode,MIDSeq from bclass where larcode='"&larcode(t)&"' order by MIDSeq" Set rsprodtree=Server.CreateObject("ADODB.RecordSet") rsprodtree.Open sqllar,conn,1,1 m=0 Do While Not rsprodtree.eof m=m+1 midcode(m)=rsprodtree("midCode") rsprodtree.movenext if rsprodtree.eof then exit do Loop set rsprodtree=nothing set sqllar=nothing for n=1 to m if n mod 2<>0 then response.write "
"&MidCode(n)&" " else response.write " | | | "&MidCode(n)&"
" end if next response.write "
" end if next %>

<% set cqrsprod=conn.execute("select * from bproduc where online=true order by ClickTimes desc,AddDate desc") Do While Not cqrsprod.eof prodname=lleft(cqrsprod("ProdName"),22) response.write "
·"&prodname&"
" k=k+1 if k>renmen_num-1 then exit do if cqrsprod.eof then exit do cqrsprod.movenext loop set cqrsprod=nothing %>