?? selectsort.asp
字號:
?<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
'┊ ┊
'┊ 互連在線企業網站管理系統(W2006) ┊
'┊ ┊
' 版權所有 csys.com.cn
'
' 程序制作 互連在線工作室
'
' 相關網址 [產品介紹]http://www.csys.com.cn
'
' 演示網址 http://www.webchina.com.cn
'┊ ┊
'└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
%>
<% Option Explicit %>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>選擇分類</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2004-2008 - csys.com.cn-STUDIO" />
<META NAME="Author" CONTENT="互連在線網絡技術工作室,www.csys.com.cn" />
<META NAME="Keywords" CONTENT="" />
<META NAME="Description" CONTENT="" />
<link rel="stylesheet" href="Images/CssAdmin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="CheckAdmin.asp"-->
<BODY>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
<tr>
<td height="24" nowrap><A href="#Help"><IMG height="18" alt="使用幫助(Help)" src="Images/Explain.gif" width="18" align="absMiddle" border="0"></A>?<font color="#FFFFFF"><strong>選擇所屬類別:點擊'選擇'添加</strong></font></td>
</tr>
<tr>
<td height="24" nowrap bgcolor="#EBF2F9">
<table width="100%" height="6" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<%
Dim Result,Datafrom
Result=request.QueryString("Result")
Select Case Result
Case "Products"
Datafrom="Csys_ProductSort"
Case "News"
Datafrom="Csys_NewsSort"
Case "Download"
Datafrom="Csys_DownSort"
Case "Need"
Datafrom="Csys_NeedSort"
Case "Others"
Datafrom="Csys_OthersSort"
Case Else
End Select
ListSort(0)
%>
</td>
</tr>
</table>
</BODY>
</HTML>
<%
Function ListSort(id)
Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType
Set rs=server.CreateObject("adodb.recordset")
sql="Select * From "&Datafrom&" where ParentID="&id&" order by id"
rs.open sql,conn,1,1
if id=0 and rs.recordcount=0 then
response.write ("暫無分類!")
response.end
end if
i=1
response.write("<table border='0' cellspacing='0' cellpadding='0'>")
while not rs.eof
ChildCount=conn.execute("select count(*) from "&Datafrom&" where ParentID="&rs("id"))(0)
if ChildCount=0 then
if i=rs.recordcount then
FolderType="SortFileEnd"
else
FolderType="SortFile"
end if
FolderName=rs("SortName")
onMouseUp=""
else
if i=rs.recordcount then
FolderType="SortEndFolderClose"
ListType="SortEndListline"
onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
else
FolderType="SortFolderClose"
ListType="SortListline"
onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');"
end if
FolderName=rs("SortName")
end if
response.write("<tr>")
response.write("<td nowrap id='b"&rs("id")&"' class='"&FolderType&"' onMouseUp="&onMouseUp&"></td><td nowrap>"&FolderName&" ")
response.write("<a href=javaScript:AddSort('"&SortText(rs("ID"))&"','"&rs("ID")&"','"&rs("SortPath")&"')><font color='#ff6600'>選擇</font></a>")
response.write("</td></tr>")
if ChildCount>0 then
%>
<tr id="a<%= rs("id")%>" style="display:yes"><td class="<%= ListType%>" nowrap></td><td ><% ListSort(rs("id")) %></td></tr>
<%
end if
rs.movenext
i=i+1
wend
response.write("</table>")
rs.close
set rs=nothing
end function
%>
<%
'生成所屬類別--------------------------
Function SortText(ID)
Dim rs,sql
Set rs=server.CreateObject("adodb.recordset")
sql="Select * From "&Datafrom&" where ID="&ID
rs.open sql,conn,1,1
SortText=rs("SortName")
rs.close
set rs=nothing
End Function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -