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

📄 adminfile.asp

📁 这是我刚从网上下载的一个加密相册的程序,相当好,供大家参考学习
💻 ASP
字号:
<%
if session("admin")<>"on" then
Response.Redirect"login.asp"
end if
%>
<!--#include file="config.asp" -->
<!--#include file="mdb/conn.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">
<style type="text/css">
<!--
a {  font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>; text-decoration: none}
a:hover {  font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>; text-decoration: underline}
td {  font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>}
br {  font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>}
.bk { font-size: 9pt; border: 1px <%=xcolor%> solid}
body {  font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none}
.an {  font-family: "宋体"; font-size: 9pt; background-color: <%=bgcolor%>; border: 1px <%=xcolor%> solid; color: <%=fontcolor%>}
.xzy {  border: <%=xcolor%> solid; border-width: 0px 1px 1px}
.zx {  border: <%=xcolor%> solid; border-width: 0px 0px 1px 1px}
.sxz {  border: <%=xcolor%> solid; border-width: 1px 0px 1px 1px}
.s {  border: <%=xcolor%>; border-style: solid; border-top-width: 1px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px}
.y {  border: <%=xcolor%>; border-style: solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 0px}
.font {  font-family: "Arial Black"; font-size: 14pt; color: <%=fontcolor%>}
.x {  border: <%=xcolor%>; border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px}
.z {  border: <%=xcolor%>; border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 1px}
.sx {  border: <%=xcolor%>; border-style: solid; border-top-width: 1px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px}
.bk1 {
	BORDER-BOTTOM: #999999 1px dashed; BORDER-LEFT: #999999 1px dashed; BORDER-RIGHT: #999999 1px dashed; BORDER-TOP: #999999 1px dashed
-->
</style>
</head>

<body bgcolor="<%=bgcolor%>" text="#000000">
<!--#include file="top.asp" -->
<table width="764" border="0" cellspacing="0" cellpadding="5" class="xzy" align="center">
  <tr> 
    <td bgcolor="<%=titlecolor%>"> 管理选项: <a href="index.asp"><font color="#FF0000">像册首页</font></a> 
      | <a href="admin.asp">管理首页</a> | <a href="adminfile.asp">管理文件</a> | <a href="loginout.asp">退出管理</a></td>
 </tr>
</table>
<table width="764" border="0" cellspacing="0" cellpadding="5" align="center">
  <tr>
    <td background="images/xc_4_bj.jpg"> 
      <%
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 3

Response.Write"<td width='33%'>"
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=141 height=141 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'>每页显示 9 个文件 共有 "&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>
</body>
</html>

⌨️ 快捷键说明

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