admin_info.asp
来自「CityCN V2.1 是自主开发的基于ASP+Access的新型资讯信息系统。」· ASP 代码 · 共 204 行
ASP
204 行
<!--#include file="config.asp" -->
<!--#include file="conn.asp" -->
<!--#include file="admin_admininfo.asp"-->
<!--#include file="sub_change.asp" -->
<!--#include file="admin_turnpage.asp" -->
<%
if session("adminname")<>adminname or session("adminpwd")<>adminpwd then
response.Redirect("admin_login.asp")
end if
Dim RowCount,order,del,msg,delmsg
RowCount = 10 '每页显示的记录条数
order=trim(request.QueryString("order"))
del=trim(request.QueryString("del"))
set rs=server.CreateObject("adodb.recordset")
if del="ok" then
rs.open "delete from 资讯 where 编号=" &trim(request.QueryString("id")) ,conn,3,3
rs.close
delmsg="咨询名称:"&trim(request.QueryString("name"))&"的信息已从数据库中删除!编号:"&trim(request.QueryString("id"))&"。"
end if
select case order
case "notype"
msg="未审核资讯"
rs.open "select * from 资讯 where 审核=0 order by 编号 desc",conn,1,1
case "yestype"
msg="已审核资讯"
rs.open "select * from 资讯 where 审核=1 order by 编号 desc",conn,1,1
case "yestui"
msg="已推荐资讯"
rs.open "select * from 资讯 where 推荐=1 order by 城市,编号 desc",conn,1,1
case "notui"
msg="未推荐资讯"
rs.open "select * from 资讯 where 推荐=0 order by 城市,编号 desc",conn,1,1
case "yeslock"
msg="已锁定资讯"
rs.open "select * from 资讯 where 锁定=1 order by 城市,编号 desc",conn,1,1
case "nolock"
msg="未锁定资讯"
rs.open "select * from 资讯 where 锁定=0 order by 城市,编号 desc",conn,1,1
case "time"
msg="按更新日期"
rs.open "select * from 资讯 order by 日期 desc",conn,1,1
case "cityall"
msg="<u>"&strchange(trim(request.QueryString("ct")))&"市</u> 的所有资讯"
rs.open "select * from 资讯 where 城市='"&strchange(trim(request.QueryString("ct")))&"' order by 排名 desc",conn,1,1
case "itype"
if strchange(trim(request.QueryString("ct")))<>"" then
msg="<u>"&strchange(trim(request.QueryString("ct"))) &"市 "&strchange(trim(request.QueryString("name")))&"</u> 的所有资讯"
rs.open "select * from 资讯 where 城市='"& strchange(trim(request.QueryString("ct"))) &"' and 类别="&strchange(trim(request.QueryString("ctype")))&" order by 排名 desc",conn,1,1
else
msg="<u>"&strchange(trim(request.QueryString("name")))&"</u> 的所有资讯"
rs.open "select * from 资讯 where 类别="&strchange(trim(request.QueryString("itype")))&" order by 排名 desc",conn,1,1
end if
case "povall"
msg="<u>"&strchange(trim(request.QueryString("pov")))&"</u> 地区的所有资讯"
rs.open "select * from 资讯 where 省份='"&strchange(trim(request.QueryString("pov")))&"' order by 排名 desc",conn,1,1
case "yescitytui"
msg="<u>"&strchange(trim(request.QueryString("ct")))&"("&strchange(trim(request.QueryString("ctmax")))&")</u> 地区的推荐数"
rs.open "select * from 资讯 where 推荐=1 and 城市='"&strchange(trim(request.QueryString("ct")))&"' order by 排名 desc",conn,1,1
case "sch_name"
if strchange(trim(request.QueryString("name")))<>"" and strchange(trim(request.QueryString("ctype")))<>"" then
msg="在 <u>"&strchange(trim(request.QueryString("ctype")))&"</u> 搜索关键字:<u><font color='red'>" &strchange(trim(request.QueryString("name")))&"</font></u>"
rs.open "select * from 资讯 where "&strchange(trim(request.QueryString("ctype")))&" like '%"&strchange(trim(request.QueryString("name")))&"%' order by 编号 desc",conn,1,1
else
msg="<font color='red'>关键字为空,显示所有资讯</font>"
rs.open "select * from 资讯 order by 编号 desc",conn,1,1
end if
case else
msg="<b>所有资讯</b>"
rs.open "select * from 资讯 order by 编号 desc",conn,1,1
end select
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>【后台管理】资讯信息管理 - <%=sitename%></title>
<link href="admin.css" rel="stylesheet" type="text/css">
<SCRIPT language='javascript' src='inc/pop.js'></SCRIPT>
</head>
<body leftmargin="0" topmargin="0">
<div align="center">
<!--#include file="admin_top_info.asp" -->
<br>
<table width="90%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr>
<td height="40" align="center" style="line-height: 16pt"><b>资讯信息管理</b></td>
</tr>
</table>
<table width="90%" border="0" cellpadding="5" cellspacing="1" bgcolor="#DFEAF2">
<tr bgcolor="#333333">
<td height="20" bgcolor="#FFFFFF" colspan="2">选择:
<a href="?">所有资讯</a> ※
<a href="?order=yestype">已审核资讯</a>|<a href="?order=notype">未审核资讯</a> ※
<a href="?order=yestui">已推荐资讯</a>|<a href="?order=notui">未推荐资讯</a> ※
<a href="?order=yeslock">已锁定资讯</a>|<a href="?order=nolock">未锁定资讯</a> ※
<a href="?order=time">按更新日期</a></td>
</tr>
<tr bgcolor="#333333">
<form method="GET" action="admin_info.asp" name="info">
<td bgcolor="#FFFFFF">
搜索:<input type="hidden" name="order" value="sch_name"><input type="text" name="name" size="20" value="<%=strchange(trim(request.QueryString("name")))%>" onclick="javascript:this.focus();this.select();" >
<select size="1" name="ctype">
<option value="名称" <%if strchange(trim(request.QueryString("ctype")))="名称" then response.write "selected"%>>资讯名称</option>
<option value="城市" <%if strchange(trim(request.QueryString("ctype")))="城市" then response.write "selected"%>>所在城市</option>
<option value="区号" <%if strchange(trim(request.QueryString("ctype")))="区号" then response.write "selected"%>>城市区号</option>
<option value="省份" <%if strchange(trim(request.QueryString("ctype")))="省份" then response.write "selected"%>>所在省份</option>
<option value="介绍" <%if strchange(trim(request.QueryString("ctype")))="介绍" then response.write "selected"%>>资讯介绍</option>
<option value="电话" <%if strchange(trim(request.QueryString("ctype")))="电话" then response.write "selected"%>>联系电话</option>
<option value="网站" <%if strchange(trim(request.QueryString("ctype")))="网站" then response.write "selected"%>>站点网站</option>
<option value="即时通讯" <%if strchange(trim(request.QueryString("ctype")))="即时通讯" then response.write "selected"%>>即时通讯</option>
<option value="老板信息" <%if strchange(trim(request.QueryString("ctype")))="老板信息" then response.write "selected"%>>老板信息</option>
<option value="管理密码" <%if strchange(trim(request.QueryString("ctype")))="管理密码" then response.write "selected"%>>管理密码</option>
</select>
<input type="submit" value="提交" name="submit">
</td>
</form>
<td bgcolor="#FFFFFF"><%Call TurnPage(Rs,RowCount)%></td>
</tr>
<tr bgcolor="#333333">
<td bgcolor="#FFFFFF" colspan="2" height="25"><%response.write msg&" 共有<font color='red'>"&rs.recordcount& "</font>条记录"%><%if delmsg<>"" then response.write "<br><b>"&delmsg&"</b>"%></td>
</tr>
</table>
<hr color="#FF0000" width="90%">
<%Do while Not rs.eof and not rs.bof and RowCount>0 %>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="90%" onMouseOver='this.style.backgroundColor="#DFEAF2"' onMouseOut='this.style.backgroundColor=""'>
<tr>
<td width="20%" bgcolor="#DFEAF2">【<font color="red"><%=rs("编号")%></font>】<a href="admin_info_mod.asp?id=<%=rs("编号")%>" title="修改该资讯"><%=rs("名称")%></a><%if rs("审核")=0 then response.write "【<a style='color: #FF0000' title='注意:将该信息彻底从数据库中删除而没有任何提示!' href='?del=ok&order="&order&"&id="&rs("编号")&"&name="&rs("名称")&"&ct="&strchange(trim(request.QueryString("ct")))&"&pov="&strchange(trim(request.QueryString("pov")))&"&ctmax="&strchange(trim(request.QueryString("ctmax")))&"&ctype="&strchange(trim(request.QueryString("ctype")))&"'>删除</a>】"%></a></td>
<td width="15%">城市:<a href='?order=povall&pov=<%=rs("省份")%>' title="查看该省份所有资讯"><%=rs("省份")%></a>-<a href='?order=cityall&ct=<%=rs("城市")%>' title="查看该城市所有资讯"><%=rs("城市")%></a></td>
<td width="15%" bgcolor="#DFEAF2">类别:
<%
set rslb=server.CreateObject("adodb.recordset")
rslb.open "select * from 资讯类别 where 类别编号=" & rs("类别"),conn,1,1
If rslb.recordcount=1 then response.write "<a href='?order=itype&ct="&rs("城市")&"&ctype="&rslb("类别编号")&"&name="&rslb("类别名")&"' title='查看 "&rs("城市")&" 城市 "&rslb("类别名")&" 的所有资讯'>"&rslb("类别名")&"</a>" end if
rslb.close
set rslb=nothing
%>
</td>
<td width="15%">推荐指数:<img border="0" src="images/info_tui_<%=rs("推荐指数")%>.gif"></td>
<td width="15%" bgcolor="#DFEAF2" align="center">
排名:<font color="green"><%=rs("排名")%></font> | <a href="admin_info_pl.asp?order=isinfo&id=<%=rs("编号")%>&name=<%=rs("名称")%>" title="资讯评论管理">评论:<%
set rspl=server.CreateObject("adodb.recordset")
rspl.open "select 资讯编号 from 资讯评论 where 审核=1 and 资讯编号=" & rs("编号"),conn,1,1
response.write "<font color=red>"&rspl.recordcount&"</font>"
rspl.close
set rspl=nothing
%></a>
</td>
<td width="20%" align="center"><% if rs("即时通讯")<>"" then response.write "<font color=blue>QQ:"&rs("即时通讯")&" <a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin="&rs("即时通讯")&"&Site="&sitesname&"&Menu=yes><img border='0' SRC=http://wpa.qq.com/pa?p=1:"&rs("即时通讯")&":7 alt='QQ:"&rs("即时通讯")&"'></a>"%> </td>
</tr>
<tr>
<td colspan="6" width="100%">介绍:<%=rs("介绍")%></td>
</tr>
<tr>
<td colspan="3" bgcolor="#DFEAF2" width="50%">地址:<%=rs("地址")%></td>
<td colspan="3" width="50%">消费:<%=rs("消费")%></td>
</tr>
<tr>
<td colspan="3" width="50%">公交:<%=rs("公交")%></td>
<td colspan="3" bgcolor="#DFEAF2" width="50%">老板信息:<%=rs("老板信息")%></td>
</tr>
<tr>
<td colspan="3" bgcolor="#DFEAF2" width="50%">其他:<%=rs("其他")%></td>
<td colspan="3" width="50%">管理密码:<font color="red"><%=rs("管理密码")%></font>
<%if rs("图片1")<>"" and rs("图片1")<>"http://" then response.write ("图片:<a target='_blank' href='"&rs("图片1")&"' title='"&rs("图片1")&"'>①</a> ") end if
if rs("图片2")<>"" and rs("图片2")<>"http://" then response.write ("<a target='_blank' href='"&rs("图片2")&"' title='"&rs("图片2")&"'>②</a> ") end if
if rs("图片3")<>"" and rs("图片3")<>"http://" then response.write ("<a target='_blank' href='"&rs("图片3")&"' title='"&rs("图片3")&"'>③</a> ") end if
if rs("图片4")<>"" and rs("图片4")<>"http://" then response.write ("<a target='_blank' href='"&rs("图片4")&"' title='"&rs("图片4")&"'>④</a>") end if%>
</td>
</tr>
<tr>
<td colspan="3" width="50%"><%if rs("网站")<>"" and rs("网站")<>"http://" then response.write "网站:<a href='"&rs("网站")&"' target='_blank'>"&left(rs("网站"),30)&"</a> "%><%if rs("电话")<>"" then response.write "电话:<font color='red'>"&rs("电话")&"</font>"%></td>
<td colspan="3" bgcolor="#DFEAF2" align="right" width="50%">
【<a target="_blank" href="infomore.asp?id=<%=rs("编号")%>" title="前台查看该资讯">前台查看</a>】【<font color='blue'><%=rs("日期")%></font>】
<%
if rs("推荐")=1 then response.write"【<font color=red>推荐</font>】" end if
if rs("锁定")=1 then response.write"【<font color=red>锁定</font>】" end if
if rs("审核")=1 then
response.write"【已审】"
else
response.write"【<font color=red>未审</font>】"
end if
%> <input type="button" value="修改" onclick="location.href='admin_info_mod.asp?id=<%=rs("编号")%>'"> </td>
</tr>
</table>
<hr color="#000000" width="90%">
<%
RowCount = RowCount - 1
rs.MoveNext
Loop
rs.close
set rs=nothing
%>
<table width="90%" border="0" cellpadding="10" cellspacing="0">
<tr>
<td align="right" style="line-height: 16pt"><a href="#">>><span lang="zh-cn">返回</span>TOP<<</a></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?