在线建站培训
您的位置: 魔客吧 网络编程 ASP编程 查看内容

LINE9的目录浏览源程序

2018-2-28 10:01 | 发布者: moke | 栏目:ASP编程

复制代码 代码如下:

<%
' make sure you have the 6 dir_*.gif files!
' yes, you can copy ours if ya want too.. :)
' http://line9.com/img/dir_dir.gif .. etc.
Function ShowImageForType(strName)
strTemp = strName
If strTemp <> "dir" Then
strTemp = LCase(Right(strTemp, Len(strTemp) - InStrRev(strTemp, ".", -1, 1)))
End If
Select Case strTemp
Case "dir"
strTemp = "dir"
Case "asp"
strTemp = "asp"
Case "htm", "html"
strTemp = "htm"
Case "gif", "jpg", "jpeg", "png", "tif", "cpt", "bmp", "pcx", "tga", "psd", "eps"
strTemp = "img"
Case "txt", "text", "dat", "bat", "sys"
strTemp = "txt"
Case Else
strTemp = "misc"
End Select
strTemp = ""
ShowImageForType = strTemp
End Function
Tek9 = Request.QueryString("Tek9")
If Tek9 = "" Then strPath = "myDirectory/" Else strPath = Tek9
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(Server.MapPath(strPath))
Response.Write"View our files and folders here:
"&_
""
For Each objItem In objFolder.SubFolders
If InStr(1, objItem, "_vti", 1) = 0 Then
Response.Write""
End If
Next
For Each objItem In objFolder.Files
Response.Write""&_
""
Next
Set objItem = Nothing
Set objFolder = Nothing
Set objFSO = Nothing
Response.Write"
"&_
" size=2>"&strPath&"
"&ShowImageForType("dir")&" "&_
""&_
""&objItem.Name&"
"&_
" "&ShowImageForType(objItem.Name)&" "&_
""&objItem.Name&"
"&objItem.Size&"
"
%>

魔客吧温馨提示:在魔客吧有许多的精品 wordpress主题 ,如果你正需要wordpress主题,那么赶快去下载吧!

最新分享资源

最新评论

验证码 换一个