📄 admin_site.asp
字号:
<!--#include file="conn.asp" -->
<!--#include file="TurnPage.asp" -->
<!--#include file="admin_check.asp" -->
<%
call manager(session("grade"),session("adminname"),2)
Dim RowCount , order
RowCount = 30 '每页显示的记录条数
set rs=server.CreateObject("adodb.recordset")
order=trim(request("order"))
xdel=trim(request("xdel"))
select case xdel
'删除某网站
case "del"
rs.open "delete from site where 编号=" &trim(request("id")) ,conn,2,2
response.redirect "admin_site.asp?x=dell&order=" &order
'删除全部未审核网站
case "delall"
rs.open "delete from site where 审核=0",conn,2,2
response.write("<center>未审核网站删除成功!<a href='admin_site.asp'>>>点击这里返回<<</a></center>")
response.end
end select
select case order
'未审核网站
case "notype"
rs.open "select * from site where 审核=0 order by 编号 desc",conn,1,1
'已审核网站
case "yestype"
rs.open "select * from site where 审核=-1 order by 编号 desc",conn,1,1
'所有网站(默认)
case else
rs.open "select * from site order by 编号 desc",conn,1,1
end select
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理 - 网站管理</title>
<link href="admin.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="160" valign="top">
<!--#include file="admin_left.asp" -->
</td>
<td width="800" align="center" valign="top">
<table width="800" border="0" cellpadding="3" cellspacing="1" bgcolor="#DFEAF2">
<tr bgcolor="#333333">
<td height="20" colspan="7" bgcolor="#FFFFFF">选择:<a href="admin_site.asp?order=all"><font color="#FF0000">所有网站</font></a> | <a href="admin_site.asp?order=notype">未审核网站</a> | <a href="admin_site.asp?order=yestype">已审核网站</a> |
<a href="admin_site.asp?order=delall">删除所有未审核网站</a> | <a href="?order=<%=order%>&x=dell">显示删除按钮</a></td>
</tr>
<tr bgcolor="#333333">
<td height="25" colspan="7" bgcolor="#FFFFFF"><% Call TurnPage(Rs,RowCount)%></td>
</tr>
<tr bgcolor="#0099FF" height="30">
<td width="30" align="center"><font color="#FFFFFF">编号</font></td>
<td width="100" align="center"><font color="#FFFFFF">站名</font></td>
<td width="60" align="center"><font color="#FFFFFF">城市</font></td>
<td width="110" align="center"><font color="#FFFFFF">网址</font></td>
<td width="90" align="center"><font color="#FFFFFF">LOGO</font></td>
<td width="72" align="center"><font color="#FFFFFF">审核</font></td>
<td width="68" align="center"><font color="#FFFFFF">操作</font></td>
</tr>
<%
If Not rs.eof then
Do while Not rs.eof and RowCount>0 %>
<tr bgcolor="#FFFFFF" height="40" onMouseOver='this.style.backgroundColor="#CAE5E8"' onMouseOut='this.style.backgroundColor=""'>
<td align="center"><font title="<%=rs("简介")%>"><%=rs("编号")%></font></td>
<td align="center"><font title="<%=rs("站长")%>"><%=rs("站名")%></font></td>
<td align="center">
<%set rscity=server.CreateObject("adodb.recordset")
rscity.open "select * from city where 区号='" & rs("城市")&"'",conn,1,1
If Not rscity.eof then%>
<%=rscity("城市")%>
<%end if
rscity.close
set rscity=nothing
%>
</td>
<td align="center"><a target="_blank" href="<%=rs("网址")%>"><%=rs("网址")%></a></td>
<td align="center">
<%if rs("logo")<>"" and rs("logo")<>"http://" then%><img border="0" alt="<%=rs("LOGO")%>" src="<%=rs("LOGO")%>" width="88" height="31"><%end if%></td>
<td align="center">
<%if rs("审核")=-1 then
response.write"已审"
else
response.write"<font color=red>未审</font>"
end if
%>
</td>
<td width="68" align="center">
<a href="admin_siteedit.asp?id=<%=rs("编号")%>">修</a><% if trim(request("x"))="dell" then%>|<a href="?order=<%=order%>&xdel=del&id=<%=rs("编号")%>"><font color=red>删</font></a><%end if%></td>
</tr>
<%
RowCount = RowCount - 1
rs.MoveNext
Loop
end if%>
</table>
</td>
</tr>
</table>
<% rs.close:conn.close
set rs=nothing:set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -