<%
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 = "<img src=""img/dir_"&strtemp&".gif"" width=16 height=16 border=0>"
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"<b>view our files and folders here:</b><br>"&_
"<table border=0><tr><td colspan=2>"&_
"<img src=""img/dir_dir_open.gif"" width=16 height=13 border=0> <font face=arial
size=2><b>"&strpath&"</b></font></td></tr>"
for each objitem in objfolder.subfolders
if instr(1, objitem, "_vti", 1) = 0 then
response.write"<tr><td><font face=arial size=2> "&showimagefortype("dir")&" "&_
"<a href=""myfile.asp?tek9="&strpath&objitem.name&"/"">"&_
""&objitem.name&"</a></font></td><td> </td></tr>"
end if
next
for each objitem in objfolder.files
response.write"<tr><td><font face=arial size=2>"&_
" "&showimagefortype(objitem.name)&" "&_
"<a href="""&strpath&objitem.name&""">"&objitem.name&"</a></font></td>"&_
"<td align=right><font face=arial size=2>"&objitem.size&"</font></td></tr>"
next
set objitem = nothing
set objfolder = nothing
set objfso = nothing
response.write"</table>"
%>
LINE9的目录浏览源程序
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » LINE9的目录浏览源程序
相关推荐
-      ASP 简介
-      SQL注入天书 – ASP注入漏洞全接触
-      用.net 处理xmlHttp发送异步请求
-      asp.net创建文件夹的IO类的问题
-      如何实现ASP.NET网站个性化
-      关于ASP.NET调用JavaScript的实现
-      ASP利用Google实现在线翻译功能
-      Asp无组件生成缩略图
