www.gusucode.com > WapEditFile手机WAP文件管理器源码 > wap_copyfolderpurposepath.asp
<!--#include file="wap_common.asp"--> <!--#include file="wap_check.asp"--> <!--#include file="wap_verify.asp"--> <%Response.ContentType="text/vnd.wap.wml; charset=utf-8"%> <?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 id='wuyumin' title='目的相对路径'> <p> <!--#include file="wap_top.asp"--> <!--#include file="wap_top_end.asp"--> </p> <p> <% page=trim(request.querystring("page")) purposepath=trim(request("purposepath")) SourceFolder=trim(request("SourceFolder")) pagesize=10 if page="" or not isnumeric(page) then page=1 else page=int(page) end if Set fso=Server.CreateObject("Scripting.FileSystemObject") response.Write "相对路径:"&purposepath&"<br/>" response.Write "<a href='wap_copyfolder.asp?SourceFolder="&SourceFolder&"&PurposeFolder="&purposepath&"'>选择当前目录</a><br/>" response.write "【子文件夹列表】<br/>" YesFolder=server.MapPath(purposepath)'相对路径 'on error resume next Set MyFolder=fso.GetFolder(YesFolder) '读取某目录中的子文件列表 Set allFolders=MyFolder.Subfolders filenum=allFolders.count pagenum=int(filenum/pagesize) if filenum mod pagesize>0 then pagenum=pagenum+1 end if if page>pagenum then page=1 end if i=0 For Each Folderitem In allFolders sFolderName=Folderitem.Name i=i+1 if i>(page-1)*pagesize and i<=page*pagesize then dim Subpurposepath if right(purposepath,1)="/" then Subpurposepath=purposepath else Subpurposepath=purposepath&"/" end if response.write " "&sFolderName&" <br/><a href='wap_copyfolderpurposepath.asp?SourceFolder="&SourceFolder&"&purposepath="&Subpurposepath&sFolderName&"'>子文件夹</a>|<a href='wap_copyfolder.asp?SourceFolder="&SourceFolder&"&PurposeFolder="&Subpurposepath&sFolderName&"'>选择此目录</a><br/>" elseif i>page*pagesize then exit for end if next if filenum<>0 then if page>1 then response.write "<a href='wap_copyfolderpurposepath.asp?page=1&purposepath="&request("purposepath")&"'>首页</a> <a href='wap_copyfolderpurposepath.asp?page="&page-1&"&purposepath="&request("purposepath")&"'>上页</a> " else response.write "首页 上页 " end if if page<i/pagesize then response.write "<a href='wap_copyfolderpurposepath.asp?page="&page+1&"&purposepath="&request("purposepath")&"'>下页</a> <a href='wap_copyfolderpurposepath.asp?page="&pagenum&"&purposepath="&request("purposepath")&"'>尾页</a>" else response.write "下页 尾页" end if response.write "<br/>(当前第"&page&"页,共"&pagenum&"页)" response.write "<br/>(共"&filenum&"个子文件夹)" if i/pagesize>1 then response.write "<input name='a' emptyok='false' value='2' format='*N'/><anchor>转到指定页GO<go href='wap_copyfolderpurposepath.asp?page=$(a:N)&purposepath="&request("purposepath")&"'></go></anchor><br/>"&chr(13) end if else response.write "没有子文件夹<br/>" end if set MyFolder=nothing set allFolders=nothing %> </p> <p> <!--#include file="wap_footer_head.asp"--> <!--#include file="wap_footer.asp"--> </p> </card> </wml>