⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_fsofile.asp

📁 后台登陆admin.asp
💻 ASP
字号:
<%Admin="System"%>
<!--#include file="check.asp"-->
<!--#include file="inc/config.asp"-->
<%

'****************************************************
if session("adminlogin")<>sessionvar then
  Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.top.location.href='admin.asp';</script>")
  response.end
end if
if request.form("action")="del" then
function DeleteFile(Filename) '删除文件 
if Filename<>"" then 
Set fso = server.CreateObject("Scripting.FileSystemObject") 
if fso.FileExists(Filename) then 
fso.DeleteFile Filename 
end if 
set fso = nothing 
end if 
end function 
hx66=request.form("dir")
for each df in request.form("dfiles")
dfile=hx66&"\"&df
DeleteFile(dfile)
next
response.redirect Request.ServerVariables("http_referer")
end if	
%>
<HTML><HEAD><TITLE>管理中心</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="inc/admin.css" type=text/css rel=StyleSheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey)) >
<table width="98%" border="1" align="center" bordercolor="#FFFFFF" bgcolor="#799AE1">
<tr height="30"><td>&nbsp;&nbsp;<a href="admin_fsofile.asp?path=1">新闻·文章</a>&nbsp;&nbsp;<a href="admin_fsofile.asp?path=2">音乐附件</a>&nbsp;&nbsp;<a href="admin_fsofile.asp?path=3">音乐图片</a>&nbsp;&nbsp;<a href="admin_fsofile.asp?path=4">影视图片</a>&nbsp;&nbsp;<a href="admin_fsofile.asp?path=5">下载附件</a>&nbsp;&nbsp;<a href="admin_fsofile.asp?path=6">下载图片</a>&nbsp;&nbsp;<a href="admin_fsofile.asp?path=7">图片附件</a>&nbsp;&nbsp;<a href="admin_fsofile.asp?path=9">特效频道</a>&nbsp;&nbsp;<a href="admin_fsofile.asp?path=10">酷站·产品</a>&nbsp;&nbsp;<a href="admin_fsofile.asp?path=11">会员头像</a></table>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
<%
path=request.querystring("path")
select case path
case "1"
hx66="up/xwpic" 
name="新闻·文章"  
case "2"
hx66="up/updj"
name="音乐附件"  
case "3"
hx66="up/updj/pic" 
name="音乐图片"
case "4"
hx66="up/upvid" 
name="影视图片"
case "5"
hx66="up/updown"
name="下载附件" 
case "6"
hx66="up/updown/pic"
name="下载图片"
case "7"
hx66="up/pic" 
name="图片附件"  
case "9"
hx66="up/upjs" 
name="特效频道"
case "10"
hx66="up/uplogo" 
name="酷站·产品"
case "11"
hx66="upload/headpic" 
name="会员头像"
case else 
hx66="up/xwpic" 
end select 
hx661=hx66 
if right(hx66,1)<>"/" then
hx66=hx66&"/"
end if
hx66=server.mappath(""&hx66&"")
If not IsObjInstalled("Scripting.FileSystemObject") Then
Response.Write "<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能</font></b>"
Else
set fs=server.createobject("scripting.filesystemobject")
set f=fs.GetFolder(hx66)
set fc=f.files
end if
%>
<tr class=Hxcmsss><td colspan="5"><font color="#FFA07A"><%=name%></font> 上传文件列表</td></tr>
<form method="post" name="myform">
<tr>
<td width="5"></td>
<td align="center">文件名</td>
<td align="center">文件大小</td>
<td align="center">文件类型</td>
<td align="center">创建时间</td></tr>
<%
pagesetup=15 '设定每页的显示数量
If Count/pagesetup > (Count\pagesetup) then
TotalPage=(Count\pagesetup)+1
else TotalPage=(Count\pagesetup)
End If
if Request.QueryString("ToPage")<>"" then PageCount = cint(Request.QueryString("ToPage"))
if PageCount <=0 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
%>
<%
pagesize=15
page=request.querystring("page")
if page="" or not isnumeric(page) then
	page=1
else
	page=int(page)
end if
filenum=fc.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 f1 in fc
if instr(f1.name,genre) > 0 then
	i=i+1
	if i>(page-1)*pagesize and i<=page*pagesize then
%>
<tr>
<td align=center><input type="CheckBox" value="<%=f1.name%>" name="dfiles"></td>
<td height="20" width="25%" align="center"><a href="<%=hx661%>/<%=f1.name%>" target="_blank"><%=f1.name%></a></td>
<td height="20" width="25%" align="center"><%=f1.size%> byte</td>
<td height="20" width="25%" align="center"><%=f1.type%></td>
<td height="20" width="25%" align="center"><%=f1.datecreated%></td></tr>
<% elseif i>page*pagesize then
	exit for
   end if
end if
Next
%>
<input type="hidden" name="dir" value=<%=hx66%>>
<tr>
<td></td>
<td><INPUT type=submit onClick="checkclick('您确定要删除您所选的文件?');" value=" 删 除 " name=Submit></td>
<input type="hidden" name="action" value="del">
<td></td><td></td><td></td>
</tr>
</form>
</table>
<table width="98%" border="1" align="center" bordercolor="#FFFFFF" bgcolor="#799AE1">
<tr>
<td width="100">共有<%=filenum%>个文件</td>
<td width="60">页数:<font color="red"><%=page%></font>/<%=pagenum%></td>
<td align="center">
<%
if page>1 then
	response.write "<a href=admin_fsofile.asp?path="&path&"&page=1>首页</a>&nbsp;&nbsp;<a href=admin_fsofile.asp?path="&path&"&page="& page-1 &">上一页</a>&nbsp;&nbsp;"
else
	response.write "首页&nbsp;&nbsp;上一页&nbsp;&nbsp;"
end if
if page<i/pagesize then
	response.write "<a href=admin_fsofile.asp?path="&path&"&page="& page+1 &">下一页</a>&nbsp;&nbsp;<a href=admin_fsofile.asp?path="&path&"&page="& pagenum &">尾页</a>"
else
	response.write "下一页&nbsp;&nbsp;尾页"
end if
%>
</td></tr>
</table>
<%
Public Function IsObjInstalled(strClassString)
	On Error Resume Next
	IsObjInstalled = False
	Err = 0
	Dim xTestObj
	Set xTestObj = Server.CreateObject(strClassString)
	If 0 = Err Then IsObjInstalled = True
	Set xTestObj = Nothing
	Err = 0
End Function

'****************************************************
%>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -