![]() |
#2
yms1232013-01-17 15:29
|

Private Sub Ok3w_HearNav(ChannelID)
sql="select ID,SortName,gotoURL,ParentID,SortPath from Ok3w_Class where ChannelID=1 and ParentID=0 and IsNav=1 order by OrderID"
Rs.Open Sql,Conn,0,1
ID = Rs("ID")
ParentID = Rs("ParentID")
'一级菜单
Do While Not Rs.Eof
If Rs("gotoURL") = "" Then
gotoURL = Page_URL(ChannelID,Rs("ID"),"")
Else
gotoURL = Rs("gotoURL")
End If
Nav_SortName = Rs("SortName")
ParentID = ParentID+ID
Response.Write("<li class='mainlevel'><a href=""" & gotoURL & """>" & Nav_SortName & "</a>")
'二级菜单
Set rs2=server.CreateObject("adodb.recordset")
sql="select ID,SortName,gotoURL,ParentID,SortPath from Ok3w_Class where ChannelID=1 and ParentID=" & ParentID & " and IsNav=1 order by OrderID"
Rs2.Open Sql,Conn,0,1
Response.Write("<ul>")
Do While Not Rs2.Eof
If Rs("gotoURL") = "" Then
gotoURL = Page_URL(ChannelID,Rs2("ID"),"")
Else
gotoURL = Rs2("gotoURL")
End If
Nav_SortName = Rs2("SortName")
Response.Write("<span class='Triangle_con'></span>")
Response.Write("<li><a href=""" & gotoURL & """>" & Nav_SortName & "</a></li>")
Rs2.MoveNext
Loop
Response.Write("</ul>")
Rs2.Close
Rs.MoveNext
Loop
Response.Write("</li>")
Rs.Close
End Sub
sql="select ID,SortName,gotoURL,ParentID,SortPath from Ok3w_Class where ChannelID=1 and ParentID=0 and IsNav=1 order by OrderID"
Rs.Open Sql,Conn,0,1
ID = Rs("ID")
ParentID = Rs("ParentID")
'一级菜单
Do While Not Rs.Eof
If Rs("gotoURL") = "" Then
gotoURL = Page_URL(ChannelID,Rs("ID"),"")
Else
gotoURL = Rs("gotoURL")
End If
Nav_SortName = Rs("SortName")
ParentID = ParentID+ID
Response.Write("<li class='mainlevel'><a href=""" & gotoURL & """>" & Nav_SortName & "</a>")
'二级菜单
Set rs2=server.CreateObject("adodb.recordset")
sql="select ID,SortName,gotoURL,ParentID,SortPath from Ok3w_Class where ChannelID=1 and ParentID=" & ParentID & " and IsNav=1 order by OrderID"
Rs2.Open Sql,Conn,0,1
Response.Write("<ul>")
Do While Not Rs2.Eof
If Rs("gotoURL") = "" Then
gotoURL = Page_URL(ChannelID,Rs2("ID"),"")
Else
gotoURL = Rs2("gotoURL")
End If
Nav_SortName = Rs2("SortName")
Response.Write("<span class='Triangle_con'></span>")
Response.Write("<li><a href=""" & gotoURL & """>" & Nav_SortName & "</a></li>")
Rs2.MoveNext
Loop
Response.Write("</ul>")
Rs2.Close
Rs.MoveNext
Loop
Response.Write("</li>")
Rs.Close
End Sub
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录