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

📄 filelist.asp

📁 简单整站程序
💻 ASP
字号:
<!--#include virtual="/include/check.asp"-->
<% CheckAdminIsLogin("上传文件") %>
<!--#include virtual="/include/conn.asp"-->
<!--#include virtual="/include/FunctionManage.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript" src="../../js/Manage.js" type="text/javascript"></script>
<link href="../css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
	<tr>
     	<th colspan="7">== 管理文件 ==</th>
</tr>
<% RecordSearch "FileID|文件编号|FileName|文件名称|FileClass|文件类型","" %>
<tr>
		<th width="4%" nowrap>选择</th><th width="5%">编号</th>
		<th width="15%">文件名称</th>
		<th width="10%">文件类型</th>
		<th width="5%">预览</th><th width="5%" nowrap>操 作</th>
      <th width="8%" nowrap>更新时间</th>
	</tr>
	<form name="form3" method="post" action="?action=<%=request("action")%>&page=<%=request("page")%>&keyword=<%=request("keyword")%>&class=<%=request("class")%>">
    <tr align="right">
    	<td height="22" colspan="7" class="forumRowHighlight"></td>
	</tr>
<% 
   if request.querystring("action")="search" then
      keyword=request("keyword")
      if instr(keyword,"图片")>0 then keyword=1
      if instr(keyword,"Word")>0 then keyword=2
      if instr(keyword,"Excel")>0 then keyword=3
      
      sql="Select * from UpFile where " &request("class")&" like '%"&keyword&"%' order by FileID desc"     
      url="action=search&keyword="&request("keyword")&"&class="&request("class")&"&" 
   else
      sql="Select * from UpFile order by FileID desc"
   end if

   set rs=Server.CreateObject("Adodb.RecordSet")
   rs.open sql,conn,1,1
   
   if not rs.bof and not rs.eof then
      page = request("page") 
      if page="" then page=1
      intPageSize=15
      rs.pagesize = intpagesize
      intcount = rs.recordcount
      intpagecount = rs.pagecount
	  if int(page)>rs.pagecount then
		page=rs.pagecount
	  end if
      if page="" or page=0 then
		page=1
      else
	    page=int(page)
   	   end if
	  if intcount > 0 then      
		rs.AbsolutePage=page 
	 end if
   for i=1 to intPageSize
%>
	<tr>
      	<td class=forumrow align="center"><input type="checkbox" name="selectid" id="selectid" value="<%=rs("FileID")%>"></td>
      	<td height="22" class="forumrow" align="center"><%=rs("FileID")%></td>
      	<td height="22" class="forumrow">/UploadFile/<%=rs("FileName")%></td>
      	<td height="22" class="forumrow" align="center">
      	<% 
      	   if rs("FileClass")=1 then 
      	      response.write "图片" 
      	   else
      	   if rs("FileClass")=2 then 
      	   response.write "Word" 
      	   else
      	   response.write "Excel"
      	   end if 
      	   end if
      	%>
      	</td>
      	<td height="22" class="forumrow" align="center">
      	<% if rs("FileClass")=1 then %>
      	<a href="/UploadFile/<%=rs("FileName")%>" target="_blank"><img src="../images/pic.gif" alt="" border="0"></a>
      	<% 
      	   else
      	      response.write "无预览" 
      	   end if 
      	%>
      	</td>
      	<td class=forumrow align="center"><a href="ModifyFile.asp?<%=url%>id=<%=rs("FileID")%>&page=<%=page%>">编  辑</a></td>
      	<td class=forumrow align="center" nowrap><font color="#FF3300"><%=rs("ChangeDate")%></font></td>
	</tr>
<%
   rs.movenext
   if rs.eof then exit for
   next
   else
      Response.Write "<tr><td class='forumRow' colspan='10' align='center'><font color=red>暂无记录!</font></td></tr>"
   end if
   RsClose()
%>
<%  DelUpFile "UpFile","FileID"  %>
</form>
<% ChangePage() %>
</table>
</body>
</html>
<% ConnClose() %>

⌨️ 快捷键说明

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