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

📄 sj2.asp

📁 这个程序是FTP里有什么就显示什么
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'目录文件读取模块,QQChen开发,使用者必须同意以下条款
'1.必须保留这部分信息
'2.充许自由转发
'3.充许使用者修改动态代码之外的内容,修改后的不充许再转发
'4.不得用作商用,商用者联系QQ200505085商议
'5.未尽事宜按国家相关法律执行
%>
<% Response.ContentType="text/vnd.wap.wml" %><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta http-equiv='Cache-Control' content='no-cache'/>
</head>
<card title='<%ContentStrtitle(request("url"))%>'>
<p>
<%
starttime = timer()
dim constrfolder
constrfolder=split(request("url"),"/")
dim n,page,tiao,i
n=request("n")
if request("n")="" then n=0
page=request("page")
if request("page")="" then page=1
i=1
tiao=12
sub list
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(server.mappath(request("url")))
set fs=f.SubFolders
Set fc =f.Files

For Each fss in fs
dim folder_name
folder_name=fss.name
if i>(page-1)*12 and i<(page*12+1) then
%>
<a href="sj2.asp?n=<%=n+1%>&amp;url=<%ContentStrsj1(fss)%>"><%=folder_name%></a><br/><% 
end if
i=i+1
Next
For Each f1 in fc
dim filename
filename=f1.name

'=====================图片输出
if right(filename,3)="jpg" or  right(filename,3)="gif" or  right(filename,3)="png" or right(filename,3)="bmp" or right(filename,3)="tga" then
tiao=5
if i>(page-1)*5 and i<(page*5+1) then
%>
<img src="small/<%=server.urlencode(constrfolder(ubound(constrfolder)))%>/<%ContentStrfile(filename)%>" alt=""/><br/>名称:<%=filename%><br/>
大小:<%=FormatNumber(((f1.size)/1024),0)%>kb<br/>
像素:<%imgxiang(p2v_path(f1))%><br/>
<a href="<%contentstr(p2v_path(f1))%>">原图下载</a><br/>
<select name="widths"><option value="128">128</option><option value="64">64</option><option value="120">120</option><option value="132">132</option><option value="176">176</option><option value="208">208</option><option value="240">240</option><option value="320">320</option><option value="352">352</option></select>X<select name="heights"><option value="auto">比例</option><option value="132">132</option><option value="144">144</option><option value="160">160</option><option value="176">176</option><option value="208">208</option><option value="220">220</option><option value="234">234</option><option value="240">240</option><option value="288">288</option><option value="320">320</option></select><anchor>下载<go href="downjpeg.asp?n=<%=n%>&amp;url=<%contentstr(p2v_path(f1))%>" method='post' accept-charset="utf-8"><postfield name="widths" value="$(widths)"/><postfield name="heights" value="$(heights)"/></go></anchor>
<br/><br/><%
end if
end if

'=====================铃声输出
if right(filename,3)="mid" or  right(filename,3)="wav" or  right(filename,3)="mp3" or right(filename,3)="mmf" or right(filename,3)="amr" or right(filename,3)="wma" or  right(filename,3)="ogg" or  right(filename,2)="ra" or right(filename,3)="cmf" or right(filename,3)="cda" or right(filename,3)="aif" then
tiao=12
if i>(page-1)*12 and i<(page*12+1) then
if len(f1.size)<7 then response.write "("& FormatNumber(((f1.size)/1024),0) &"K)"
if len(f1.size)<10 and len(f1.size)>6 then response.write "("& FormatNumber(((f1.size)/1048576),2) &"M)"
if len(f1.size)>9 then response.write "("& FormatNumber(((f1.size)/1073741824),2) &"G)"
%>
<a href="<%contentstr(p2v_path(f1))%>"><%ContentStrfilename(filename)%></a><br/><%
end if
end if

'=====================软件输出
if right(filename,3)="sis" or right(filename,3)="jar" or right(filename,3)="blz" or right(filename,3)="cab" or right(filename,3)="exe" or right(filename,4)="sisx" then
tiao=12
if i>(page-1)*12 and i<(page*12+1) then
%>
<%ContentStrfilename(filename)%><br/>
大小:<% if len(f1.size)<7 then response.write FormatNumber(((f1.size)/1024),0) &"K"
if len(f1.size)<10 and len(f1.size)>6 then response.write FormatNumber(((f1.size)/1048576),2) &"M"
if len(f1.size)>9 then response.write FormatNumber(((f1.size)/1073741824),2) &"G"
%><br/>格式:<%=split(filename,".")(ubound(split(filename,"."))) %><br/>
<a href="aboutsoft.asp?url=<%contentstr(p2v_path(f1))%>&amp;folderna=<%=server.urlencode(constrfolder(ubound(constrfolder)))%>&amp;filena=<%ContentStrfilename(filename)%>.txt&amp;n=<%=n%>">查看介绍</a><br/><a href="<%contentstr(p2v_path(f1))%>">直接下载</a><br/><br/><%
end if
end if

'=====================文章输出
if right(filename,3)="txt" or right(filename,3)="umd" then
tiao=12
if page=1 and i=1 then 
%>
<a href="aboutart.asp?url=<%contentstr(p2v_path(f1))%>&amp;filena=<%=server.urlencode(constrfolder(ubound(constrfolder)))%>.txt&amp;n=<%=n%>">查看介绍</a><br/>
<%
end if
if i>(page-1)*12 and i<(page*12+1) then
if  right(filename,3)="umd" then
%>
<a href="<%contentstr(p2v_path(f1))%>"><%ContentStrfilename(filename)%></a><br/><%
else %>
<a href="read.asp?url=<%contentstr(p2v_path(f1))%>&amp;a=<%=i%>&amp;n=<%=n%>"><%ContentStrfilename(filename)%></a><br/><%
end if
end if
end if

'=====================视频输出
if right(filename,3)="avi" or  right(filename,3)="3gp" or  right(filename,3)="mp4" or right(filename,2)="rm" or right(filename,4)="rmvb" then
tiao=12
if i>(page-1)*12 and i<(page*12+1) then
%>
<%ContentStrfilename(filename)%><br/>
大小:<% if len(f1.size)<7 then response.write FormatNumber(((f1.size)/1024),0) &"K"
if len(f1.size)<10 and len(f1.size)>6 then response.write FormatNumber(((f1.size)/1048576),2) &"M"
if len(f1.size)>9 then response.write FormatNumber(((f1.size)/1073741824),2) &"G"
%><br/>格式:<%=split(filename,".")(ubound(split(filename,"."))) %><br/>
<a href="aboutfilm.asp?url=<%contentstr(p2v_path(f1))%>&amp;folderna=<%=server.urlencode(constrfolder(ubound(constrfolder)))%>&amp;filena=<%ContentStrfilename(filename)%>.txt&amp;n=<%=n%>">查看介绍</a><br/><a href="<%contentstr(p2v_path(f1))%>">直接下载</a><br/><br/><%
end if
end if

i=i+1
Next
response.write "<br/>"
dim spage,sfile,sfolder,sfpage
sfile=f.files.count
sfolder=fs.count
if sfile\tiao=sfile/tiao then
spage=sfile\tiao
else
spage=(sfile\tiao)+1
end if
if sfolder\tiao=sfolder/tiao then
sfpage=sfolder\tiao
else
sfpage=(sfolder\tiao)+1
end if
if page>1 then
%><a href="sj2.asp?url=<%ContentStrsjnext(request("url"))%>&amp;n=<%=n%>">首页</a> 
<a href="sj2.asp?page=<%=page-1%>&amp;url=<%ContentStrsjnext(request("url"))%>&amp;n=<%=n%>">上页</a> 
<% end if
if int(page)<int(spage) or int(page)<int(sfpage) then
%><a href="sj2.asp?page=<%=page+1%>&amp;url=<%ContentStrsjnext(request("url"))%>&amp;n=<%=n%>">下页</a> 
<a href="sj2.asp?page=<%if int(spage)>0 then response.write spage
if int(sfpage)>0 then response.write sfpage%>&amp;url=<%ContentStrsjnext(request("url"))%>&amp;n=<%=n%>">尾页</a> 
<% end if
if sfile>0 then response.write "<br/>一共"& sfile &"个文件"
set fso=nothing
if int(spage)>3 then
response.write "<br/>总"& spage &"页/现"& page &"页"
%>
<br/><anchor>跳到
    <go href="sj2.asp?url=<%ContentStrsjnext(request("url"))%>&amp;n=<%=n%>">
        <postfield name="page" value="$(ye)"/>
    </go>
</anchor>第<input name="ye" type="text" format="*N" emptyok="true" size="10" maxlength="10"/>页
<%
end if
if int(sfpage)>3 then
response.write "<br/>总"& sfpage &"页/现"& page &"页"
%>
<br/><anchor>跳到
    <go href="sj2.asp?url=<%ContentStrsjnext(request("url"))%>&amp;n=<%=n%>">
        <postfield name="page" value="$(ye)"/>
    </go>
</anchor>第<input name="ye" type="text" format="*N" emptyok="true" size="10" maxlength="10"/>页
<%
end if
end sub

function p2v_path(p_path)
'p_path为硬盘上的物理路径
dim host
host=lcase(server.MapPath("\"))
p_path=lcase(p_path)
p2v_path=replace(p_path,host,"")
end function

function ContentStr(q_path)
dim constr,constr1
constr=split(q_path,"\")
For j=(ubound(ConStr)-n-2) to (ubound(ConStr)-1)
response.write ""& Server.URLEncode(ConStr(j)) &"/"
next
constr1=split(ConStr(ubound(ConStr)),".")
For k=0 to (ubound(ConStr1)-1)
response.write ""& Server.URLEncode(ConStr1(k)) &"."
next
response.write ConStr1(ubound(ConStr1))
end function

function ContentStrsj1(q_path)
dim constr
constr=split(q_path,"\")
For j=(ubound(ConStr)-n-2) to (ubound(ConStr)-1)
response.write Server.URLEncode(ConStr(j)) &"/"
next
response.write Server.URLEncode(ConStr(ubound(ConStr)))

end function

function ContentStrfilename(q_path)
dim constr
constr=split(q_path,".")
for j=0 to (ubound(ConStr)-1)
response.write ConStr(j)
next
end function

function ContentStrfile(q_path)
dim constr
constr=split(q_path,".")
for j=0 to (ubound(ConStr)-1)
response.write server.urlencode(ConStr(j)) &"."
next
response.write ConStr(ubound(ConStr))
end function

function ContentStrsjback(q_path)
dim constr
constr=split(q_path,"/")
For j=0 to (ubound(ConStr)-2)
response.write Server.URLEncode(ConStr(j)) &"/"
next
response.write Server.URLEncode(ConStr((ubound(ConStr)-1)))

end function

function ContentStrsjnext(q_path)
dim constr
constr=split(q_path,"/")
For j=0 to (ubound(ConStr)-1)
response.write Server.URLEncode(ConStr(j)) &"/"
next
response.write Server.URLEncode(ConStr(ubound(ConStr)))

end function


function ContentStrtitle(q_path)
dim constr
constr=split(q_path,"/")
response.write ConStr(ubound(ConStr))

end function

function imgxiang(q_path)
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Path = Server.MapPath(q_path)
Jpeg.Open Path
response.write Jpeg.Originalwidth &"X"& Jpeg.OriginalHeight
set jpeg=nothing
end function
call list
if n>0 then
%>
<br/><a href="sj2.asp?n=<%=n-1%>&amp;url=<%ContentStrsjback(request("url"))%>">返回上级</a>
<% end if%>
<br/><a href="index.asp">返回首页</a>
<br/><br/><%
Response.write "执行花了:" & (timer - starttime)*1000 & "ms"
%>
</p>
</card>
</wml>

⌨️ 快捷键说明

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