关于首页导航函数的请教
我这有以一段关于首页导航的函数,请帮忙修改一下,我想实现导航为横向的。Function GetMenu()
dim pop,rs_item,j,id
pop = "<DIV class=menuskin id=popmenu onmouseover=clearhidemenu();highlightmenu(event,'on') onmouseout=highlightmenu(event,'off');dynamichide(event) style='Z-index:100'></DIV>"&vbnewline
pop = pop &"<script Language=Javascript src='images/pop.js'></script>"&vbnewline
pop = pop &"<script language=javascript>"&vbnewline
'新闻菜单
pop = pop &"linkset[0]=new Array()"&vbnewline
Sql="Select * from Ft_news_cat order by cat_id"
set rs_item=server.createobject("adodb.recordset")
rs_item.open sql,conn,1,1
dim i
i = -1
do while not rs_item.eof
i=i+1
pop = pop &"linkset[0]["&i&"]='<div class=menuitems align=left><a href=news.asp?cat_id="&rs_item(0)&">"&rs_item(1)&"</a></div>'"&vbnewline
rs_item.movenext
loop
rs_item.close
'图片菜单
pop = pop &"linkset[1]=new Array()"&vbnewline
Sql="Select * from Ft_pic_cat order by cat_id"
set rs_item=server.createobject("adodb.recordset")
rs_item.open sql,conn,1,1
i = -1
do while not rs_item.eof
i=i+1
pop = pop &"linkset[1]["&i&"]='<div class=menuitems align=left><a href=pic.asp?cat_id="&rs_item(0)&">"&rs_item(1)&"</a></div>'"&vbnewline
rs_item.movenext
loop
rs_item.close
'文章菜单
pop = pop &"linkset[2]=new Array()"&vbnewline
Sql="Select * from Ft_art_cat order by cat_id"
set rs_item=server.createobject("adodb.recordset")
rs_item.open sql,conn,1,1
i = -1
do while not rs_item.eof
i=i+1
pop = pop &"linkset[2]["&i&"]='<div class=menuitems align=left><a href=article.asp?cat_id="&rs_item(0)&">"&rs_item(1)&"</a></div>'"&vbnewline
rs_item.movenext
loop
rs_item.close
'下载菜单
pop = pop &"linkset[3]=new Array()"&vbnewline
Sql="Select * from Ft_soft_cat order by cat_id"
set rs_item=server.createobject("adodb.recordset")
rs_item.open sql,conn,1,1
i = -1
do while not rs_item.eof
i=i+1
pop = pop &"linkset[3]["&i&"]='<div class=menuitems align=left><a href=download.asp?cat_id="&rs_item(0)&">"&rs_item(1)&"</a></div>'"&vbnewline
rs_item.movenext
loop
rs_item.close
'影音菜单
pop = pop &"linkset[4]=new Array()"&vbnewline
Sql="Select * from Ft_dj_cat order by cat_id"
set rs_item=server.createobject("adodb.recordset")
rs_item.open sql,conn,1,1
i = -1
do while not rs_item.eof
i=i+1
pop = pop &"linkset[4]["&i&"]='<div class=menuitems align=left><a href=dj.asp?cat_id="&rs_item(0)&">"&rs_item(1)&"</a></div>'"&vbnewline
rs_item.movenext
loop
rs_item.close
'教程菜单
pop = pop &"linkset[5]=new Array()"&vbnewline
Sql="Select * from Ft_course_cat order by cat_id"
set rs_item=server.createobject("adodb.recordset")
rs_item.open sql,conn,1,1
i = -1
do while not rs_item.eof
i=i+1
pop = pop &"linkset[5]["&i&"]='<div class=menuitems align=left><a href=course.asp?cat_id="&rs_item(0)&">"&rs_item(1)&"</a></div>'"&vbnewline
rs_item.movenext
loop
rs_item.close
'风格菜单
dim x,y
y = LCase(request.ServerVariables("QUERY_STRING"))
if y = "" then
x = ""
else
if InStr(y,"skin") > 0 then
x = replace(y,right(y,5+len(Skin)),"")
if x<>"" then
if right(x,1)<>"&" then x=x&"&"
end if
else
x = y & "&"
end if
end if
pop = pop &"linkset[6]=new Array()"&vbnewline
pop = pop &"linkset[6][0]='<div class=menuitems><a href=?"&x&"skin=0>恢复默认设置</a></div>'"&vbnewline
Sql="Select * from Ft_mb_style"
set rs_item=server.createobject("adodb.recordset")
rs_item.open sql,conn,1,1
i = 0
do while not rs_item.eof
i=i+1
if Cint(Skin) = rs_item(0) then
pop = pop &"linkset[6]["&i&"]='<div class=menuitems align=left><a href=?"&x&"skin="&rs_item(0)&">├ <font color=red>"&rs_item(1)&"</font></a></div>'"&vbnewline
else
pop = pop &"linkset[6]["&i&"]='<div class=menuitems align=left><a href=?"&x&"skin="&rs_item(0)&">├ "&rs_item(1)&"</a></div>'"&vbnewline
end if
rs_item.movenext
loop
rs_item.close
Sql="select * from Ft_menu where items=0 and shown=true and navwz=1 order by order_num"
Set Rs=Server.Createobject("adodb.recordset")
Rs.open Sql,conn,1,1
dim script,tmp,sql2,rs2,m
j=6
m=0
do while not Rs.Eof
sql2="select * from Ft_menu where items="&rs(0)
set rs2=server.createobject("adodb.recordset")
rs2.open sql2,conn,1,1
if rs2.bof and rs2.eof then
if rs(0) = 2 then
tmp = "<a href='"&rs(2)&"' target='"&rs(3)&"' onmouseover=showmenu(event,0,1,false) onmouseout=delayhidemenu()>"& rs(1) &"</a> | "
elseif rs(0) =3 then
tmp = "<a href='"&rs(2)&"' target='"&rs(3)&"' onmouseover=showmenu(event,1,1,false) onmouseout=delayhidemenu()>"& rs(1) &"</a> | "
elseif rs(0) =4 then
tmp = "<a href='"&rs(2)&"' target='"&rs(3)&"' onmouseover=showmenu(event,2,1,false) onmouseout=delayhidemenu()>"& rs(1) &"</a> | "
elseif rs(0) =5 then
tmp = "<a href='"&rs(2)&"' target='"&rs(3)&"' onmouseover=showmenu(event,3,1,false) onmouseout=delayhidemenu()>"& rs(1) &"</a> | "
elseif rs(0) =6 then
tmp = "<a href='"&rs(2)&"' target='"&rs(3)&"' onmouseover=showmenu(event,4,1,false) onmouseout=delayhidemenu()>"& rs(1) &"</a> | "
elseif rs(0) =7 then
tmp = "<a href='"&rs(2)&"' target='"&rs(3)&"' onmouseover=showmenu(event,5,1,false) onmouseout=delayhidemenu()>"& rs(1) &"</a> | "
elseif rs(0) =8 then
tmp = "<a href='"&rs(2)&"' target='"&rs(3)&"' onmouseover=showmenu(event,6,1,false) onmouseout=delayhidemenu()>"& rs(1) &"</a> | "
else
tmp = "<a href='"&rs(2)&"' target='"&rs(3)&"'>"& rs(1) &"</a> | "
end if
j=j
else
j=j+1
id=j
pop = pop &"linkset["&j&"]=new Array()"&vbnewline
Sql="Select * from Ft_menu where shown=True And items="&rs(0)
set rs_item=server.createobject("adodb.recordset")
rs_item.open sql,conn,1,1
i = -1
do while not rs_item.eof
i=i+1
pop = pop &"linkset["&j&"]["&i&"]='<div class=menuitems align=left><a href="&rs_item(2)&" target="&rs_item(3)&">"&rs_item(1)&"</a></div>'"&vbnewline
rs_item.movenext
loop
rs_item.close:set rs_item=nothing
tmp = "<a href='"&rs(2)&"' target='"&rs(3)&"' onmouseover=showmenu(event,"&id&",1,false) onmouseout=delayhidemenu()>"& rs(1) &"</a> | "
end if
rs2.close:set rs2=nothing
m=m+1
if menunum<>0 and m>=menunum then
script = script & tmp&"<br>"
m=0
else
script = script & tmp
end if
Rs.movenext
loop
Rs.Close:Set Rs=Nothing
if Right(script,4)="<br>" then script=Left(script,Len(script)-4)
Getmenu=Left(script,len(script)-3)&VbCrLf+pop &"</script>"&VbCrLf
End function