📄 admin.asp
字号:
<%
'****************************************************
' 程序制作:陈马勇 联系QQ:76087899
'****************************************************
if session("admin")="" then
response.redirect "index.asp"
else
if session("flag")>1 then
response.write"<SCRIPT language=JavaScript>alert('您没有操作的权限!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
end if
%>
<html>
<head>
<title>在线投稿管理</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type=text/css>
table { border:0px; }
td { font:normal 12px 宋体;}
img { vertical-align:bottom; border:0px; }
a { font:normal 12px 宋体; color:#000000; text-decoration:none; }
a:hover { color:#428EFF;text-decoration:underline; }
.sec_menu { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; }
.menu_title { }
.menu_title span { position:relative; top:0px; left:8px; color:#000000; font-weight:bold; }
.menu_title2 { }
.menu_title2 span { position:relative; top:0px; left:8px; color:#999999; font-weight:bold; }
</style>
</head>
<body text="#000000" LEFTMARGIN="0" TOPMARGIN="0" link="#D2E4FC" vlink="#0066FF" alink="#00CCFF">
<TABLE WIDTH="100%" BORDER="0" CELLPADDING="2" CELLSPACING="0" CLASS="HeaderTdStyle" >
<TR> <FORM NAME="form1" METHOD="post" ACTION=""></FORM></TR>
</TABLE>
<%
if request("path")<>"" then
path=request("path")
else
path="../pass"
end if
dim pagesize, page, filenum, pagenum
pagesize=20
page=request.querystring("page")
if page="" or not isnumeric(page) then
page=1
else
page=int(page)
end if
%><table cellpadding="2" cellspacing="1" border="0" width="54%" class="border" style="table-layout:fixed;word-break:break-all" BGCOLOR="#799AE1" align="center">
<tr BGCOLOR="#D2E4FC">
<td width="37" height=26 CLASS="title" align="center">
<p align="center">类型</td>
<td CLASS="title" BGCOLOR="#D2E4FC" WIDTH="163" height="26" align="center">
<p align="center">文件名 (右键下载)</td>
<td width="67" CLASS="title" height="26" align="center">
<p align="center">大小</td>
<td width="141" CLASS="title" height="26" align="center">
<p align="center">提交时间</td>
<td width="96" CLASS="title" height="26" align="center">
<p align="center">文件删除</td>
<%Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if request("filename")<>"" then
if objFSO.fileExists(Server.MapPath(""&path&"\"&request("filename"))) then
objFSO.DeleteFile(Server.MapPath(""&path&"\"&request("filename")))
else
response.write "未找到"&path&request("filename")
end if
end if
on error resume next
Set uploadFolder=objFSO.GetFolder(Server.MapPath(""&path&"\"))
Set uploadFiles=uploadFolder.Files
filenum=uploadfiles.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 Upname In uploadFiles
i=i+1
if i>(page-1)*pagesize and i<=page*pagesize then
upfilename=upname.name
response.write "<tr><td height=24 BGCOLOR=#D2E4FC>"&i&"</td>"
response.write "<td BGCOLOR=#eeeeee><a href="""&path&"/"&upfilename&""" target=_blank>"&upfilename&"</a></td>"
response.write "<td BGCOLOR=#eeeeee>"& upname.size &" B </td>"
response.write "<td BGCOLOR=#eeeeee>"& upname.datelastmodified &"</td>"
if session("flag")>1 then
response.write "<td BGCOLOR=#eeeeee>在线提交</td>"
else
response.write "<td BGCOLOR=#eeeeee><a href='?filename="&upname.name&"&path="&request("path")&"'>---【删除】---</a></td>"
end if
elseif i>page*pagesize then
exit for
end if
next
set uploadFolder=nothing
set uploadFiles=nothing
%> </tr> <tr> <td colspan=5 align=center height=25 BGCOLOR="#eeeeee" width="524">
<p align="right"><%
if page>1 then
response.write "<a href=?page=1&path="&request("path")&">首页</a> <a href=?page="& page-1 &"&path="&request("path")&">上一页</a> "
else
response.write "首页 上一页 "
end if
if page<i/pagesize then
response.write "<a href=?page="& page+1 &"&path="&request("path")&">下一页</a> <a href=?page="& pagenum &"&path="&request("path")&">尾页</a>"
else
response.write "下一页 尾页"
end if
response.write " 共 "&filenum&" 个文件 "
%> </td></tr>
<tr>
<td colspan=5 align=center height=25 BGCOLOR="#eeeeee" width="524">
<p align="right"><a href="Admin_Admin.asp?Action=Modify&id=53"><font color="#7CA9E5">密码修改</font></a><font color="#7CA9E5"> </font><a href="Admin_Admin.asp"><font color="#7CA9E5">管理员信息</font></a><font color="#8DB6EC"> </font> 用户统计(<script src='http://s54.cnzz.com/stat.php?id=208814&web_id=208814' language='JavaScript' charset='gb2312'></script>)</p>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -