ListSort.asp
上传用户:dbstep
上传日期:2022-08-06
资源大小:2803k
文件大小:3k
-
- <%
- 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(" ")
- 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(" ")
- response.write(" <div class='l2'><a href='"&ListView&"List.asp?SortID="&rs("ID")&"&SortPath="&rs("SortPath")&"'>"&FolderName&"</a>")
- response.write("</div>")
- if ChildCount>0 then
- %>
- <div id="a<%= rs("id")%>" style="display:yes"><div class="<%= ListType%>" nowrap></div><div ><% ListSort(rs("id")) %></div>
- <%
- end if
- rs.movenext
- i=i+1
- wend
- response.write(" ")
- 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
- dim rs,sql,enSiteTitle,SiteUrl,enComName,enAddress,ZipCode,Telephone,Fax,Email,enKeywords,enDescriptions,IcpNumber,enMesViewFlag,enmiewFlag,Sitenum
- set rs = server.createobject("adodb.recordset")
- sql="select top 1 * from sk_Site"
- rs.open sql,conn,1,1
- enmiewFlag=rs("enmiewFlag")
- enSiteTitle=rs("enSiteTitle")
- miewFlag=rs("miewFlag")
- SiteTitle=rs("SiteTitle")
- SiteUrl=rs("SiteUrl")
- enComName=rs("enComName")
- ComName=rs("ComName")
- Sitenum=rs("Sitenum")
- enAddress=rs("enAddress")
- Address=rs("Address")
- ZipCode=rs("ZipCode")
- Telephone=rs("Telephone")
- Fax=rs("Fax")
- Email=rs("Email")
- enKeywords=rs("enKeywords")
- enDescriptions=rs("enDescriptions")
- Keywords=rs("Keywords")
- Descriptions=rs("Descriptions")
- IcpNumber=rs("IcpNumber")
- enMesViewFlag=rs("enMesViewFlag")
- MesViewFlag=rs("MesViewFlag")
- rs.close
- set rs=nothing
- %>