首页 新闻 会员 周边

二级目录,如果改成三级的话,应该如何增加呢.

0
悬赏园豆:50 [已关闭问题]

二级目录,如果改成三级的话,应该如何增加呢.

对这个loop不太清楚,高人能讲解下不?
<%
openlar=request("larcode")
Set Fso = CreateObject("Scripting.FileSystemObject")
set bclass=Fso.openTextFile(Server.MapPath("include/class.asp"))
do while not bclass.atendofstream
classtext=bclass.readline
if classtext="暂无商品分类" then
response.write "<tr><td width=171 height=100 align=center>暂无商品分类</td></tr>"
exit do
end if
if instr(classtext,"lar:")>0 then '第二次loop的时候,是逍遥网店系统,这个值为false,但为什么还会执行lar=lar+1
larcode=replace(classtext,"lar:","")
if tree_num=1 then
set cqrsprod =conn.execute("select count(*) as thislarnum from bproduc where online=true and larcode='"&larcode&"'")
thislarnum=cqrsprod("thislarnum")
thislarnum="["&thislarnum&"]"
set cqrsprod=nothing
end if
lar=lar+1
if lar>1 and lar<>old then response.write "</td></tr>"
midd=1
response.write "<TR><TD language=javascript onmouseup='showmenu(buyok"&lar&",&#13;&#10;  img"&lar&");' id=item$pval[buyokID]) style='CURSOR: hand' onMouseOver=""bgColor='#FFE3D2';"" onMouseOut=""bgColor='#FFFBF7';"" height=24 valign=middle><IMG id=img"&lar&" height=20 src=images/small/bclass1.gif width=20 align=absMiddle>&nbsp;<font color="&lar_color&"><B alt='"&larcode&"'>"&larcode&"</B> "&thislarnum&"</td></tr>"
else
midcode=classtext
if midd=1 then
if tree_display=1 then
response.write "<TR><TD id=buyok"&lar&"  bgColor=FEFDF5>"
elseif openlar=larcode then
response.write "<TR><TD id=buyok"&lar&"  bgColor=FEFDF5>"
else
response.write "<TR><TD id=buyok"&lar&" style='DISPLAY: none' bgColor=FEFDF5>"
end if
end if
response.write "<IMG height=20 src=images/small/bclass3.gif width=36 align=absMiddle border=0><a href='class.asp?LarCode="&server.URLEncode(LarCode)&"&MidCode="&server.URLEncode(MidCode)&"'><font color="&mid_color&" alt='"&MidCode&"'>"&lleft(MidCode,20)&"</font></a><br>"
midd=midd+1
old=lar
end if
loop
bclass.close
set fso=nothing
%>

文件:include/class.asp

lar:逍遥网店系统
逍遥网店系统
逍遥客服系统
试用版下载
lar:域名、空间
域名注册
虚拟主机空间
企业邮局
网站推广
lar:其它代理产品
其它代理产品
其它

问题补充: if instr(classtext,"lar:")>0 then '第二次loop的时候,是逍遥网店系统,这个值为false,但为什么还会执行lar=lar+1
水木的主页 水木 | 初学一级 | 园豆:12
提问于:2008-11-04 18:01
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册