⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 folderlist.asp

📁 SK信息采集2.0功能介绍: 1.可针对任何静态网页,动态网页进行采集。包括htm,html,shtml,ASP,ASPX,JSP,PHP等。 2.增加自定文件采集.用户可采集网页中的所有文件.
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="../../Conn.asp"-->
<!--#include file="../../SysCls/KS_CommonCls.asp"-->
<!--#include file="../Inc/Session.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2006-2008 Kesion.Com  All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407 
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail  :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com  
'演示站点:http://test.kesion.com 
'郑重声明:
'    ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
'    ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
'    ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New FolderList
KSCls.Execute()
Set KSCls = Nothing

Class FolderList
        Private KSCMS
		Private Sub Class_Initialize()
		  Set KSCMS=New CommonCls
		End Sub
        Private Sub Class_Terminate()
		 Call KSCMS.CloseConn()
		 Set KSCMS=Nothing
		End Sub
		Function Execute()
		Dim CurrPath, FsoObj, FolderObj, SubFolderObj, FileObj, I, FsoItem
		Dim ParentPath, FileExtName, AllowShowExtNameStr
		AllowShowExtNameStr = "htm,html,shtml"
		CurrPath = Request("CurrPath")
		If CurrPath = "" Then CurrPath = "/"
		Set FsoObj = Server.CreateObject(KSCMS.GetConfig("FsoObjName"))
		Set FolderObj = FsoObj.GetFolder(Server.MapPath(CurrPath))
		Set SubFolderObj = FolderObj.SubFolders
		Set FileObj = FolderObj.Files
		
		Response.Write "<html>"
		Response.Write "<head>"
		Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'></head>"
		Response.Write "<link href='../inc/Admin_Style.CSS' rel='stylesheet'>"
		Response.Write "<body topmargin='0' leftmargin='0' scroll=yes>"
		Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0'>"
		Response.Write "  <tr>"
		Response.Write "    <td height='20' class='sort'> <div align='center'><font color='#000000'>名称</font></div></td>"
		Response.Write "    <td height='20' class='sort'> <div align='center'><font color='#000000'>类型</font></div></td>"
		Response.Write "    <td height='20' class='sort'> <div align='center'><font color='#000000'>修改日期</font></div></td>"
		Response.Write "  </tr>"
		
		 For Each FsoItem In SubFolderObj
		 
		Response.Write "  <tr>"
		Response.Write "    <td height='20'>"
		Response.Write "        <table border='0' cellspacing='0' cellpadding='0'>"
		Response.Write "          <tr title='双击鼠标进入此目录'>"
		Response.Write "          <td><img src='../Images/Folder/folderclosed.gif' width='24' height='22'></td>"
		Response.Write "            <td> <span class='FolderItem' Path='" & FsoItem.name & "' onDblClick='OpenFolder(this);' onClick='SelectFolder(this);'>"
		Response.Write FsoItem.name
		Response.Write "              </span> </td>"
		Response.Write "          </tr>"
		Response.Write "        </table>"
		Response.Write "      </div></td>"
		Response.Write "    <td height='20'>"
		Response.Write "      <div align='center'>目录</div></td>"
		Response.Write "    <td height='20'>"
		Response.Write "      <div align='center'>" & FsoItem.size & "</div></td>"
		Response.Write "  </tr>"
		  Next
		For Each FsoItem In FileObj
			FileExtName = LCase(Mid(FsoItem.name, InStrRev(FsoItem.name, ".") + 1))
			If KSCMS.CheckFileShowOrNot(AllowShowExtNameStr, FileExtName) = True Then
		
		Response.Write "<tr title='单击选择文件'>"
		Response.Write "    <td height='20'>"
		Response.Write "      <table width='100%' border='0' cellspacing='0' cellpadding='0'>"
		Response.Write "        <tr>"
		Response.Write "          <td width='3%'>&nbsp;</td>"
		Response.Write "          <td width='97%'><span class='FolderItem' File='" & FsoItem.name & "' onDblClick='parent.SelectFile();' onClick='SelectFile(this);'>"
		Response.Write FsoItem.name
		Response.Write "            </span></td>"
		Response.Write "        </tr>"
		Response.Write "      </table>"
		Response.Write "    </td>"
		Response.Write "    <td height='20'> <div align='center'>"
		Response.Write FsoItem.Type
		Response.Write "      </div></td>"
		Response.Write "    <td height='20'> <div align='center'>"
		Response.Write FsoItem.DateLastModified
		Response.Write "      </div></td>"
		Response.Write "  </tr>"
		
			End If
		Next
		
		Response.Write "</table></body></html>"
		
		Set FsoObj = Nothing
		Set FolderObj = Nothing
		Set FileObj = Nothing
		
		Response.Write "<script language='JavaScript'>"
		Response.Write "var CurrPath='" & CurrPath & "';"
		Response.Write "var FileName='';"
		Response.Write "function SelectFile(Obj)"
		Response.Write "{"
		Response.Write "    for (var i=0;i<document.all.length;i++)"
		Response.Write "    {"
		Response.Write "        if (document.all(i).className=='FolderSelectItem') document.all(i).className='FolderItem';"
		Response.Write "    }"
		Response.Write "    Obj.className='FolderSelectItem';"
		Response.Write "    FileName=Obj.File;"
		Response.Write "}"
		Response.Write "function SelectFolder(Obj)"
		Response.Write "{"
		Response.Write "    for (var i=0;i<document.all.length;i++)"
		Response.Write "    {"
		Response.Write "        if (document.all(i).className=='FolderSelectItem') document.all(i).className='FolderItem';"
		Response.Write "    }"
		Response.Write "    Obj.className='FolderSelectItem';"
		Response.Write "}"
		Response.Write "function OpenFolder(Obj)"
		Response.Write "{"
		Response.Write "    var SubmitPath='';"
		Response.Write "    if (CurrPath=='/') SubmitPath=CurrPath+Obj.Path;"
		Response.Write "    else SubmitPath=CurrPath+'/'+Obj.Path;"
		Response.Write "    location.href='FolderList.asp?CurrPath='+SubmitPath;"
		Response.Write "    AddFolderList(parent.document.all.FolderSelectList,SubmitPath,SubmitPath);"
		Response.Write "}"
		Response.Write "function AddFolderList(SelectObj, Label, LabelContent)"
		Response.Write "{"
		Response.Write "    var i=0,AddOption;"
		Response.Write "    if (!SearchOptionExists(SelectObj,Label))"
		Response.Write "    {"
		Response.Write "        AddOption = document.createElement('OPTION');"
		Response.Write "        AddOption.text=Label;"
		Response.Write "        AddOption.value=LabelContent;"
		Response.Write "        SelectObj.add(AddOption);"
		Response.Write "        SelectObj.options(SelectObj.length-1).selected=true;"
		Response.Write "    }"
		Response.Write "}"
		Response.Write "function SearchOptionExists(Obj, SearchText)"
		Response.Write "{"
		Response.Write "    var i;"
		Response.Write "    for(i=0;i<Obj.length;i++)"
		Response.Write "    {"
		Response.Write "        if (Obj.options(i).text==SearchText)"
		Response.Write "        {"
		Response.Write "            Obj.options(i).selected=true;"
		Response.Write "            return true;"
		Response.Write "        }"
		Response.Write "    }"
		Response.Write "    return false;"
		Response.Write "}"
		Response.Write "</script>"
		End Function
End Class
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -