<% dim larcode(100) '最多支持100个大类 dim midcode(200) '最多支持20个中类 dim larroot(200) '最多支持20个中类 dim larid(200) '最多支持20个中类 dim larcolor(200) '最多支持20个中类 dim midcolor(200) '最多支持20个中类 dim midid(200) '以下是分类列表,首先读取全部大类,然后根据每个大类读取各自的中类 Dim a,b,c sqllar="select Distinct catname,parentid,strcolor,rootid,parentstr,catid from cat where parentstr='0' order by rootid" 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("catname") larcolor(i)=rsprodtree("strcolor") larid(i)=CStr(rsprodtree("catid")) rsprodtree.movenext if rsprodtree.eof then exit do Loop end if set rsprodtree=nothing set sqllar=nothing FOR t=1 to i response.write "" if larcolor(t)="" then response.write ""&LarCode(t)&"
" else response.write ""&LarCode(t)&"
" end if '以下是根据前面读取的大类名称,读取各个大类下的中类 sqllar="select catname,parentid,strcolor,rootid,parentstr,catid from cat where parentstr='"&larid(t)&"' and depth=1 order by orders" Set rsprodtree=Server.CreateObject("ADODB.RecordSet") rsprodtree.Open sqllar,conn,1,1 erjizong=rsprodtree.RecordCount m=0 Do While Not rsprodtree.eof m=m+1 midcode(m)=rsprodtree("catname") midcolor(m)=rsprodtree("strcolor") midid(m)=CStr(rsprodtree("catid")) rsprodtree.movenext if rsprodtree.eof then exit do Loop set rsprodtree=nothing set sqllar=nothing w=0 for n=1 to m w=w+len(MidCode(n)) if midcolor(n)="" then if w>18 then response.write "
" w=len(MidCode(n)) end if response.write ""&MidCode(n)&"" if n<>erjizong then w=w+3 if w+len(MidCode(n+1))<19 then response.write " | " end if end if else if w>18 then response.write "
" w=len(MidCode(n)) end if response.write ""&MidCode(n)&"" if n<>erjizong then w=w+3 if w+len(MidCode(n+1))<19 then response.write " | " end if end if end if next response.write "
" next %>
<% liulan = request.cookies("liu") liuid = Request("Prodid") If Len(liulan) = 0 Then liulan = "'" & buyid & "', '1'" ElseIf InStr( liulan, liuid ) <= 0 Then liulan = liulan & ", '" & liuid & "', '1'" End If response.cookies("liu") = liulan response.cookies("liu").expires=now()+365 %> <% set cqrsprod=conn.execute("select * from bproduc where ProdId in ("&liulan&") order by ProdId") k=0 Do While Not cqrsprod.eof prodname=lleft(cqrsprod("ProdName"),24) response.write "" response.write "" k=k+1 if k>9 then exit do if cqrsprod.eof then exit do cqrsprod.movenext loop set cqrsprod=nothing %>
  ·"&prodname&"
  目前位置:首页 > 新闻公告  
<% dim newstitle(5) Set rs = conn.Execute("select * from bconfig") newstitle(1)=rs("newstitle1") newstitle(2)=rs("newstitle2") newstitle(3)=rs("newstitle3") newstitle(4)=rs("newstitle4") newstitle(5)=rs("newstitle5") set rs=nothing %> <% set rs=conn.execute ("select * from News where online=true") if rs.eof and rs.bof then response.write "" else for i=1 to 5 set rs=conn.execute ("select top 10 * from News where online=true and NewsClass='"&i&"' order by uup desc,Pubdate desc") if newstitle(i)<>"" then if not (rs.eof and rs.bof) then %> <% end if end if next end if %>
暂时没有新闻文章
    <%=newstitle(i)%>
<% Do while Not rs.eof %> <% rs.movenext loop set rs=nothing %>
    " ><%=lleft(rs("NewsTitle"),40)%> <%=rs("PubDate")%> 人气值:<%=rs("cktimes")%>
更多内容…    
 
<% conn.close set conn=nothing %>