📄 admin_city.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 = 50 '每页显示的记录条数
set rs=server.CreateObject("adodb.recordset")
order=trim(request("order"))
xdel=trim(request("xdel"))
select case xdel
'删除某城市
case "del"
rs.open "delete from city where 编号=" &trim(request("id")) ,conn,3,3
response.redirect "admin_city.asp?x=dell&order=" &order
'删除全部未审核城市
case "delall"
rs.open "delete from city where 审核=0",conn,3,3
response.write("<center>未审核城市删除成功!<a href='admin_city.asp'>>>点击这里返回<<</a></center>")
response.end
end select
select case order
'未审核城市
case "notype"
rs.open "select * from city where 审核=0 order by 编号 desc",conn,1,1
'已审核城市
case "yestype"
rs.open "select * from city where 审核=-1 order by 编号 desc",conn,1,1
'城市排名
case "top"
rs.open "select * from city where 审核=-1 order by 人气 desc",conn,1,1
'所有城市(默认)
Case Else
rs.open "select * from city 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>
<div align="center">
<table width="960" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
<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="0" bgcolor="#DFEAF2" style="border-collapse: collapse">
<tr bgcolor="#333333">
<td height="20" bgcolor="#FFFFFF">选择:<a href="admin_city.asp"><font color="#FF0000">所有城市</font></a> | <a href="?order=notype">未审核城市</a> | <a href="?order=yestype">已审核城市</a> | <a href="?order=top">城市排名</a> | <a href="?xdel=delall">删除所有未审核城市</a> | <a href="?order=<%=order%>&x=dell">显示删除按钮</a></td>
</tr>
<tr bgcolor="#333333">
<td height="25" bgcolor="#FFFFFF"><% Call TurnPage(Rs,RowCount)%></td>
</tr>
</table>
<table width="800" border="0" cellpadding="3" cellspacing="1" bgcolor="#DFEAF2">
<tr bgcolor="#0099FF" height="30">
<td width="40" align="center"><font color="#FFFFFF">编号</font></td>
<td width="60" align="center"><font color="#FFFFFF">城市</font></td>
<td width="50" align="center"><font color="#FFFFFF">区号</font></td>
<td width="50" align="center"><font color="#FFFFFF">省份</font></td>
<td width="430" align="center"><font color="#FFFFFF">简介</font></td>
<td width="40" align="center"><font color="#FFFFFF">人气</font></td>
<td width="40" align="center"><font color="#FFFFFF">留言</font></td>
<td width="40" align="center"><font color="#FFFFFF">审核</font></td>
<td width="50" 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="30" onMouseOver='this.style.backgroundColor="#CAE5E8"' onMouseOut='this.style.backgroundColor=""'>
<td align="center"><%=rs("编号")%></td>
<td align="center"><%=rs("城市")%></td>
<td align="center"><%=rs("区号")%></td>
<td align="center"><%=rs("省份")%></td>
<td align="center"><%=rs("简介")%></td>
<td align="center" style="color: #006600; font-weight: bold"><%=rs("人气")%></td>
<td align="center" style="color: red; font-weight: bold">
<%
set rspl=server.CreateObject("adodb.recordset")
rspl.open "select * from citybook where 城市区号='" & rs("区号") &"'",conn,1,1
response.write ( rspl.recordcount )
rspl.close
set rspl=nothing%>
</td>
<td align="center">
<%
if rs("审核")=-1 then
response.write"已审"
else
response.write"<font color=red>未审</font>"
end if
%>
</td>
<td width="40" align="center"><a href="admin_cityedit.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>
</div>
<% rs.close:conn.close
set rs=nothing:set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -