line friends|LINE9的目录浏览源程序

更新时间:2014-02-13    来源:安卓教程    手机版     字体:

【www.bbyears.com--安卓教程】

<%
" 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:
"&_
""&_
" size=2>"&strPath&""
For Each objItem In objFolder.SubFolders
If InStr(1, objItem, "_vti", 1) = 0 Then
Response.Write" "&ShowImageForType("dir")&" "&_
""&_
""&objItem.Name&"
"
End If
Next
For Each objItem In objFolder.Files
Response.Write""&_
" "&ShowImageForType(objItem.Name)&" "&_
""&objItem.Name&"
"&_
""&objItem.Size&""
Next
Set objItem = Nothing
Set objFolder = Nothing
Set objFSO = Nothing
Response.Write""
%>

本文来源:http://www.bbyears.com/shoujikaifa/4156.html

猜你感兴趣

热门标签

更多>>

本类排行