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

📄 fsofile.asp

📁 这次自已做的美工,可能很难看,但主要是为提高效率,这次全部生成了静态,只有一个链接查看最新文章的列表没有生成,因为我觉得没必要生成,浪费空间大小,那是一个很少用到的功能!这次去掉了很多功能,这个版本主
💻 ASP
字号:
<% '管理文件 %>
<!--#include file="seeadmin.asp"-->
<%

call gadmin
%>
 <link href="../css/new.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #CCCCFF;
}
.style1 {
	font-size: 12pt;
	font-weight: bold;
	color: #FF0000;
}
-->
</style>
<table width="600" border="1" align="center" bordercolor="#FFCCCC" bgcolor="#CCCC99">
<tr><td height="20" align="center" bgcolor="#A6CAF0"><span class="style1">上传文件列表</span></td>
</tr></table>
<table width="600" border="1" align="center" bordercolor="#FFCCCC" bgcolor="#D4BFFF">
<form method="post" name="myform" action="delfile.asp">

<tr><td width="5"></td><td align="center">文件名</td>
<td align="center">文件大小</td>
<td align="center">文件类型</td>
<td align="center">创建时间</td>
<%
ffd="../upload"   '要管理的文件夹
ffd1=ffd 
if right(ffd,1)<>"/" then
ffd=ffd&"/"
end if
ffd=server.mappath(""&ffd&"")
set fs=server.createobject("scripting.filesystemobject")
set f=fs.GetFolder(ffd)
set fc=f.files

%>
<%

pagesetup=10 '设定每页的显示数量
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="<%=ffd1%>/<%=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=<%=ffd%>>
<tr><td></td><td>
<INPUT type=submit onclick="checkclick('您确定要删除您所选的文件?');" value=" 删 除 " name=Submit>

</td><td></td><td></td><td></td>
</tr>
</form>
</table>
<table width="600" border="1" align="center" bordercolor="#FFCCCC" bgcolor="#D4BFFF">
<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=fsofile.asp?page=1>首页</a>&nbsp;&nbsp;<a href=fsofile.asp?page="& page-1 &">上一页</a>&nbsp;&nbsp;"
else
	response.write "首页&nbsp;&nbsp;上一页&nbsp;&nbsp;"
end if
if page<i/pagesize then
	response.write "<a href=fsofile.asp?page="& page+1 &">下一页</a>&nbsp;&nbsp;<a href=fsofile.asp?page="& pagenum &">尾页</a>"
else
	response.write "下一页&nbsp;&nbsp;尾页"
end if
%>
</td>

</tr></table>

⌨️ 快捷键说明

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