📄 picmanage.asp
字号:
<!--#include file="../checkpost.asp"-->
<!--#include file="articleconn.asp" -->
<!--#include file="security.asp"-->
<%
Domain=Request.ServerVariables("SERVER_NAME")
soFilePath=Request.ServerVariables("PATH_INFO")
soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
sowinpath=Domain&soFilePath
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("..")&"\tupian\"&request.form("FileName")(x)&"") then
MyFile.DeleteFile(Server.Mappath("..")&"\tupian\"&request.form("FileName")(x)&"")
end if
next
end if
Page=request.querystring("page")
if Page<=1 or Page="" then Page=1
PageSize=15
Domain=Request.ServerVariables("SERVER_NAME")
soFilePath=Request.ServerVariables("PATH_INFO")
soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
socount=len(soFilePath)
soFilePath=lcase(left(soFilePath,socount-1))
soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
sowinpath="http://"&Domain&soFilePath
FileCount=0
Set FileFolder=MyFile.GetFolder(Server.MapPath("..")&"\tupian")
for each TheFile in FileFolder.Files
FileCount=FileCount+1
AFileSize=TheFile.size+AFileSize
next
%>
<LINK href="inc/Admin_STYLE.CSS" rel="stylesheet" type="text/css">
<body bgcolor="#FFFFFF">
<script language="JavaScript">
function Del()
{
if(confirm("您确定要删除?\n\n DreamCtiy Theater System")
)
{return true;}
return false;}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
</script>
<form method=post action="">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr bgcolor="#FFFFFF" valign="middle" align="center">
<td width="300%" height="2" colspan="3" > <table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#429AEF">
<tr bgcolor="#E1F4EE">
<td width="34%" height=20 align=center>文件名</td>
<td width="35%" height=20 align=center>上传时间</td>
<td width="20%" height=20 align=center>文件大小</td>
<td width="11%" height=20 align=center>删除</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="#E1F4EE">
<td width="34%" height=24 class="small1">
<div align="left">
<table width="92%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="18%"><table width="30" height="30" border="0" cellpadding="0" cellspacing="1" bgcolor="#C9C9C9">
<tr>
<td bgcolor="#FFFFFF"><a href="../tupian/<%=thing.name%>" target="_blank"><img src="../tupian/<%=thing.name%>" width="30" height="30" border="0"></a></td>
</tr>
</table></td>
<td width="82%"><a href=../tupian/<%=thing.name%> target=_blank>
<%=thing.name%></a></td>
</tr>
</table>
</div></td>
<td width="35%" height=24 align=center><%=thing.DateLastModified%></td>
<td width="20%" height=24 align=center><%=thing.Size&"(bt)"%></td>
<td width="11%" height=24 align=center>
<input type="checkbox" name=FileName value=<%=thing.Name%>></td>
</tr>
<%
end if
next
%>
<tr bgcolor="#E1F4EE">
<td height=20 colspan=5 align=right>
<div align="center">共有<font color=red><b><%=FileCount%></b></font>个文件;
占用<font color=red><b><%=AFileSize/1024%></b></font><font color=#FF0000><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()" class=Anbut1>
</div></td>
</tr>
<tr bgcolor="#E1F4EE">
<td height=20 colspan=5>
<%
PageCount=int(FileCount/PageSize)+1
for i=1 to PageCount
response.write "<a href=?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 + -