📄 filemanage.asp
字号:
<!--#include file = include.asp-->
<!--#include file = CheckPurview.asp-->
<%
'==========================================
'
'
'
'
'
'==========================================
'程序名称:渐飞商务信息更新程序
'程序作用:
'程序创建时间:18:58 2002-9-7
'程序完成时间:21:50 2002-8-7
'最后修改时间:21:50 2002-8-7
'==========================================
Domain=Request.ServerVariables("SERVER_NAME")
gFilePath=Request.ServerVariables("PATH_INFO")
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
CountN=len(gFilePath)
gFilePath=lcase(left(gFilePath,CountN-1))
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
AllPath=Domain&gfilepath
Set MyFile=Server.CreateObject("Scripting.FileSystemObject")
if request.form("result")="del" then
Num=request.form("FileName").count
for x=1 to Num
if MyFile.FileExists(Server.Mappath("..")&"\UpFile\"&request.form("FileName")(x)&"") then
MyFile.DeleteFile(Server.Mappath("..")&"\UpFile\"&request.form("FileName")(x)&"")
end if
next
end if
Page=request.querystring("page")
if Page<=1 or Page="" then Page=1
PageSize=25
Domain=Request.ServerVariables("SERVER_NAME")
gFilePath=Request.ServerVariables("PATH_INFO")
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
CountN=len(gFilePath)
gFilePath=lcase(left(gFilePath,CountN-1))
gFilePath=lcase(left(gFilePath,instrRev(gFilePath,"/")))
AllPath="http://"&Domain&gfilepath
FileCount=0
Set FileFolder=MyFile.GetFolder(Server.MapPath("..")&"\UpFile")
for each TheFile in FileFolder.Files
FileCount=FileCount+1
AFileSize=TheFile.size+AFileSize
next
%>
<body background="images/BLogo.gif">
<form method=post action="">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#4397c5">
<tr bgcolor="#FFFFFF">
<td colspan="3" width="100%" height="25">
<!--#include file = topMenu.htm--></td>
</tr>
<tr bgcolor="#FFFFFF" valign="middle" align="center">
<td height="2" colspan="3" background="images/BLogo.gif">
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#F5F5F5">
<tr bgcolor="#FFFFFF">
<td height=20 width="63%" align=center onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>文件名/路径</td>
<td height=20 width="20%" align=center onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>上传时间</td>
<td height=20 width="10%" align=center onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>文件大小</td>
<td height=20 width="7%" align=center onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>删除</td>
</tr>
<%
i=0
for each thing in FileFolder.Files
i=i+1
if CCount>=PageSize then
exit for
elseif i>PageSize*(Page-1) then
CCount=CCount+1
%>
<tr bgcolor="#FFFFFF">
<td height=20 width="63%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><a href=../UpFile/<%=thing.name%> target=_blank><%=AllPath&"upfile/"&thing.name%></td>
<td height=20 width="20%" align=center onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><%=thing.DateLastModified%></td>
<td height=20 width="10%" align=center onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><%=thing.Size&"(字节)"%></td>
<td height=20 width="7%" align=center onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><input type="checkbox" name=FileName value=<%=thing.Name%>></td>
</tr>
<%
end if
next
%>
<tr bgcolor="#FFFFFF">
<td height=20 width="100%" colspan=5 align=right onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>
共有<font color=red><b><%=FileCount%></b></font>个文件; 占用<font color=red><b><%=AFileSize/1024%></b></font><font color=#0000ff><b>K</b></font>空间
<input type=hidden value=del Name=result>
<input type="checkbox" name="chkall" onclick="CheckAll(this.form)">选中所有
<input type=submit value=删除 onclick="return Del()">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height=20 width="100%" colspan=5 onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>
<%
PageCount=int(FileCount/PageSize)+1
for i=1 to PageCount
response.write "<a href=FileManage.asp?Page="&i&"><b> "&i&" </b></a>"
next
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -