📄 user_selectclass.asp
字号:
<!--#Include File="../Conn.asp"-->
<!--#Include File="../Inc/Cl_ClsSysTem.asp"-->
<!--#include file="Inc/Function.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="generator" content="Aspoo" />
<link rev="made" href="mailto:info@aspoo.cn" />
<title>栏目树形导航</title>
<base target="_self" />
<link href="../Skins/Css/User.Css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" width="100%" cellspacing="1" cellpadding="0" class="border">
<%
Cl.Get_WebSetting
if Not Cl.ChkUserLogin then
Cl.ShowErr("<li>以下操作需要登录后方或进行,您未登录。</li><li>请点击<a href='LogIn.asp' target='_Top'>这里登录</a>。")
Response.end
end if
dim rsClass,sqlClass,strTemp,iDepth,i
dim arrShowLine(10)
dim arrChildID,ChannelID,ClassID,sType
arrChildID=Trim(Request("ID"))
ClassID=Cl.GetClng(Request("ClassID"))
ChannelID=Cl.GetClng(Request("ChannelID"))
arrChildID=Replace(arrChildID," ","")
if Not IsNumeric(Replace(arrChildID,",","")) then arrChildID=0
if Not IsNumeric(ChannelID) then ChannelID=1
for i=0 to ubound(arrShowLine)
arrShowLine(i)=False
next
Cl.Get_ChannelSetting(ChannelID)
if ClassID>0 then
set rsClass=Cl.Execute("select ParentPath From Cl_Class Where ClassID="&ClassID)
if Not rsClass.eof then
arrChildID=rsClass(0)
end if
set rsClass=Nothing
end if
sqlClass="Select ClassID,ClassName,ParentID,ParentPath,Child,Depth,NextID From Cl_Class where (ParentID In ("&arrChildID&") or Depth=0) and ChannelID="&ChannelID&" order by RootID,OrderID"
set rsClass=Cl.Execute(sqlClass)
'rsClass.open sqlClass,Conn,1,1
if rsClass.bof and rsClass.eof then
response.write "请先添加栏目"
else
do while not rsClass.eof
response.write "<tr class=tdbg><td>"
iDepth=rsClass("Depth")
if rsClass("NextID")>0 then
arrShowLine(iDepth)=True
else
arrShowLine(iDepth)=False
end if
if iDepth>0 then
for i=1 to iDepth
if i=iDepth then
if rsClass("NextID")>0 then
response.write "<img src='"&Cl.Webdir&"images/Tree/line1.gif' width='17' height='16' valign='abvmiddle'>"
else
response.write "<img src='"&Cl.Webdir&"images/Tree/line2.gif' width='17' height='16' valign='abvmiddle'>"
end if
else
if arrShowLine(i)=True then
response.write "<img src='"&Cl.Webdir&"Images/Tree/line3.gif' width='17' height='16' valign='abvmiddle'>"
else
response.write "<img src='"&Cl.Webdir&"images/Tree/line4.gif' width='17' height='16' valign='abvmiddle'>"
end if
end if
next
end if
if rsClass("Child")>0 then
if Instr(","&arrChildID&",",","&rsClass("ParentPath") & "," & rsClass("ClassID")&",")>0 then
response.write "<a href='?ChannelID="&ChannelID&"&ID=" & rsClass("ParentPath") & "' title='收起栏目'><img src='"&Cl.Webdir&"images/Tree/folder3.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName") & "</a> ("&rsClass("Child")&")"
else
response.write "<a href='?ChannelID="&ChannelID&"&ID=" & rsClass("ParentPath") & "," & rsClass("ClassID") & "' title='展开栏目'><img src='"&Cl.Webdir&"images/Tree/folder4.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName") & "</a> ("&rsClass("Child")&")"
end if
response.write " [<a href='#' onClick='window.returnValue="""&rsClass("ClassID")&"|"&rsClass("ClassName")&""";window.close();' title='选择栏目'>选择</a>]"
else
if ClassID=rsClass("ClassID") then
response.write "<a href='#' onClick='window.returnValue="""&rsClass("ClassID")&"|"&rsClass("ClassName")&""";window.close();' title='选择栏目'><img src='"&Cl.Webdir&"images/Tree/folder3.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName") & "</a>(<font color=red>当前</font>)"
else
response.write "<a href='#' onClick='window.returnValue="""&rsClass("ClassID")&"|"&rsClass("ClassName")&""";window.close();' title='选择栏目'><img src='"&Cl.Webdir&"images/Tree/folder3.gif' width='15' height='15' valign='abvmiddle' border=0>" & rsClass("ClassName") & "</a>"
end if
end if
'response.write "<br />"
response.write "</td></tr>"
rsClass.movenext
loop
end if
rsClass.close:set rsClass=nothing
%>
</table>
</Body>
</Html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -