📄 adminfile.asp
字号:
<%
if session("admin")<>"on" then
Response.Redirect"login.asp"
end if
%>
<!--#include file="config.asp" -->
<html>
<head>
<%
dim key
if trim(Request.QueryString("key"))<>"" then
key=trim(Request.QueryString("key"))
end if
%>
<title>管理文件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="INDEX.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--#include file="top.asp" -->
<table width="778" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td>
<table width="766" border="0" cellspacing="0" cellpadding="7" align="center">
<tr>
<td>管理选项:<a href="admin.asp">管理首页</a> | <a href="addfile.asp">添加文件</a> | <a href="adminfile.asp">管理文件</a> | <a href="setup.asp">系统设置</a> | <a href="ly.asp">留言管理</a> |
<a href="modifypsw.ASP">修改密码</a> | <a href="loginout.asp">退出管理</a></td>
</tr>
</table>
<table width="766" border="0" align="center" cellpadding="8" cellspacing="0">
<tr>
<td > <%
Response.Write"<table width='100%' border='0' cellspacing='0' cellpadding='5'>"
Dim ipagecount
Dim ipagecurrent
Dim strorderBy
Dim irecordsshown
if request.querystring("page")="" then
ipagecurrent=1
else
ipagecurrent=cint(request.querystring("page"))
end if
if key<>"" then
sql = "SELECT minipic,ck,name,id FROM desktop where name like '%"&key&"%' ORDER BY id DESC"
else
sql = "SELECT minipic,ck,name,id FROM desktop ORDER BY id DESC"
end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.pagesize = 9
rs.cachesize = 9
rs.open sql,conn,1,1
ipagecount = rs.pagecount
If ipagecurrent > ipagecount Then ipagecurrent = ipagecount
If ipagecurrent < 1 Then ipagecurrent = 1
if ipagecount=0 then
response.write "<tr><td align='center'>没有任何文件</tr></td>"
else
rs.absolutepage = ipagecurrent
irecordsshown = 0
do while irecordsshown<9 and NOT rs.EOF
Response.Write"<tr align='center'>"
for i=1 to 4
Response.Write"<td width='25%'>"
if not rs.eof then
Response.Write"<table align=center bgcolor='#e9e9e9' border=0 cellpadding=5 cellspacing=0 class='bk1'><tbody><td><a href='display.asp?id="&rs("id")&"' target='_blank'><img src='"&rs("minipic")&"' border='0' width=150 height=113 class='bk'></a></td></tbody></table><br><a href='display.asp?id="&rs("id")&"' target='_blank'>"&rs("name")&"</a> [<a href='savefile.asp?id="&rs("id")&"&cz=del'>删除</a>|<a href='addfile.asp?id="&rs("id")&"&cz=editfile'>编辑</a>]</td>"
irecordsshown = irecordsshown +1
rs.movenext
end if
next
Response.Write"</tr>"
loop
end if
rs.Close
set rs=nothing
Response.Write"</table>"
Response.Write"<table width='100%' border='0' cellspacing='0' cellpadding='5' class='s'><form name='form1' method='get' action='adminfile.asp'><tr><td height='20' align='center'>每页显示 12 个文件 共有 "&ipagecount&" 页 当前为第 "&ipagecurrent&" 页 "
if ipagecurrent=1 then
Response.Write"首页 | "
else
Response.Write"<a href='adminfile.asp?key="&key&"&page=1'>首页</a> | "
end if
if ipagecurrent=1 then
Response.Write"上一页 | "
else
Response.Write"<a href='adminfile.asp?key="&key&"&page="&ipagecurrent-1&"'>上一页</a> | "
end if
if ipagecount>ipagecurrent then
Response.Write"<a href='adminfile.asp?key="&key&"&page="&ipagecurrent+1&"'>下一页</a> "
else
Response.Write"下一页"
end if
if ipagecount>ipagecurrent then
Response.Write"| <a href='adminfile.asp?key="&key&"&page="&ipagecount&"'>末页</a> "
else
Response.Write"| 末页 "
end if
Response.Write"| 搜索文件:<input type='text' name='key' size='15' class='an'> <input type='submit' name='Submit' value='确定' class='an'></td></tr></form></table>"
%></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="41" valign="top"><table width="766" height="29" border="0" align="center" cellpadding="3" cellspacing="0" >
<tr>
<td width="766" height="35" align="center" bgcolor=""><%=cy%> </td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -