ListSort.asp
上传用户:dbstep
上传日期:2022-08-06
资源大小:2803k
文件大小:3k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

ASP/ASPX

  1.    
  2. <%
  3. Function ListSort(id)
  4.   Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType
  5.   Set rs=server.CreateObject("adodb.recordset")
  6.   sql="Select * From "&Datafrom&" where ParentID="&id&" order by id"
  7.   rs.open sql,conn,1,1
  8.   if id=0 and rs.recordcount=0 then
  9.     response.write ("暂无分类!")
  10.     response.end
  11.   end if  
  12.   i=1
  13.   response.write("            ")
  14.   while not rs.eof
  15.     ChildCount=conn.execute("select count(*) from "&Datafrom&" where ParentID="&rs("id"))(0)
  16.     if ChildCount=0 then
  17.   if i=rs.recordcount then
  18.     FolderType="SortFileEnd"
  19.   else
  20.     FolderType="SortFile"
  21.   end if
  22.   FolderName=rs("SortName")
  23.   onMouseUp=""
  24.     else
  25.   if i=rs.recordcount then
  26.   FolderType="SortEndFolderClose"
  27. ListType="SortEndListline"
  28. onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
  29.   else
  30. FolderType="SortFolderClose"
  31. ListType="SortListline"
  32. onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');"
  33.   end if
  34.   FolderName=rs("SortName")
  35.     end if
  36.     response.write("         ")
  37.     response.write(" <div class='l2'><a href='"&ListView&"List.asp?SortID="&rs("ID")&"&SortPath="&rs("SortPath")&"'>"&FolderName&"</a>")
  38.     response.write("</div>")
  39.     if ChildCount>0 then
  40. %>
  41.       <div id="a<%= rs("id")%>" style="display:yes"><div class="<%= ListType%>" nowrap></div><div ><% ListSort(rs("id")) %></div>
  42. <%
  43.     end if
  44.     rs.movenext
  45.     i=i+1
  46.   wend
  47.   response.write(" ")
  48.   rs.close
  49.   set rs=nothing
  50. end function
  51. '生成所属类别--------------------------
  52. Function SortText(ID)
  53.   Dim rs,sql
  54.   Set rs=server.CreateObject("adodb.recordset")
  55.   sql="Select * From "&Datafrom&" where ID="&ID
  56.   rs.open sql,conn,1,1
  57.   SortText=rs("SortName")
  58.   rs.close
  59.   set rs=nothing
  60. End Function
  61. dim rs,sql,enSiteTitle,SiteUrl,enComName,enAddress,ZipCode,Telephone,Fax,Email,enKeywords,enDescriptions,IcpNumber,enMesViewFlag,enmiewFlag,Sitenum
  62. set rs = server.createobject("adodb.recordset")
  63. sql="select top 1 * from sk_Site"
  64. rs.open sql,conn,1,1
  65. enmiewFlag=rs("enmiewFlag")
  66. enSiteTitle=rs("enSiteTitle")
  67. miewFlag=rs("miewFlag")
  68. SiteTitle=rs("SiteTitle")
  69. SiteUrl=rs("SiteUrl")
  70. enComName=rs("enComName")
  71. ComName=rs("ComName")
  72. Sitenum=rs("Sitenum")
  73. enAddress=rs("enAddress")
  74. Address=rs("Address")
  75. ZipCode=rs("ZipCode")
  76. Telephone=rs("Telephone")
  77. Fax=rs("Fax")
  78. Email=rs("Email")
  79. enKeywords=rs("enKeywords")
  80. enDescriptions=rs("enDescriptions")
  81. Keywords=rs("Keywords")
  82. Descriptions=rs("Descriptions")
  83. IcpNumber=rs("IcpNumber")
  84. enMesViewFlag=rs("enMesViewFlag")
  85. MesViewFlag=rs("MesViewFlag")
  86. rs.close
  87. set rs=nothing
  88. %>