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

📄 ad_man_no.asp

📁 信息管理系统!很简单的课程设计!类似于城市信息交换的网站!
💻 ASP
字号:
<%'注意:防止多次发送,以及防止非法登录
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if not mid(server_v1,8,len(server_v2))=server_v2 then
Response.Write "<script language=JavaScript>{window.alert('系统错误,拒绝从非本服务器登陆!');window.history.go(-1);}</script>"
response.end
end if

if session("admin_login")<>true then
	response.Write("<html><link href=../style.css rel=stylesheet type=text/css><body><table height=100% width=100% align=center valign=middle><tr><td align=center valign=center><p align=center>您没有登录或者已经超时!!请点击下面的链接,进入登录界面!!</p><p align=center>--&gt;&gt; <a href=../login/login.asp>登录</a> &lt;&lt;--</p></td></tr></table></body></html>")
	response.end
end if
%>

<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/fun.asp"-->
<!--#include file="../../conn/fso.asp"-->

<%
'操作
action = trim(request.QueryString("action"))
select case action
	case "shenhe"
		ad_id = TxtToLng("ad_id",2)
		SQL = "update ad_mes set ad_sh=1 where ad_id=" & ad_id
		conn.execute(SQL)
	case "del"
		ad_id = TxtToLng("ad_id",2)
		SQL = "delete from ad_mes where ad_id="&ad_id
		conn.execute(SQL)
end select
%>

<%
SQL = "select * from v_ad_mes where ad_sh=0 order by ad_id desc"
set rs = server.CreateObject("adodb.recordset")
rs.open SQL,conn,1,1

if rs.eof then 
   response.write ""
  end if
 rs.pagesize = 15
if request("page")=""  or isempty(request("page")) then
	page = 1
else
	page=int(request("page"))
end if
if page>rs.pagecount then
	page=rs.pagecount
end if
if not rs.BOF then
	Rs.Move Rs.PageSize*(page-1)
end if
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet" type="text/css">
<STYLE type="text/css">
  <!--
   BODY {
    scrollbar-face-color:#ffffff;
    scrollbar-arrow-color:#000000;
    scrollbar-highlight-color:#C0C0C0;
    scrollbar-3dlight-color:#ffffff;
    scrollbar-shadow-color:#ffffff;
    scrollbar-darkshadow-color:#ffffff;
    scrollbar-track-color:#ffffff;
   }
.style1 {
	color: #FF0000;
	font-weight: bold;
}
  -->
  </STYLE>
<title>未审广告</title>
</head>
<script language="javascript">
function queren()
{
	if(!window.confirm("您确定要删除该广告吗?"))
	{
  		return false
 	}
 	return true
}
</script>
<body>
<table width="99%"  border="0" cellpadding="4" cellspacing="1" bgcolor="#336633">
		<tr>
				<td height="25" colspan="8" background="../Images/topbg.gif">广告管理 &gt;&gt; <span class="style1">未</span>审核广告 </td>
		</tr>
		<tr align="center" bgcolor="#FFFFFF">
				<td height="25"><strong>城市</strong></td>
		        <td height="12"><strong>地区</strong></td>
		       
		        <td height="12"><strong>小类别</strong></td>
		        <td height="12"><strong>大类别</strong></td>
		        <td height="12"><strong>发布时间</strong></td>
		        <td height="12"><strong>审核</strong></td>
		        <td height="12"><strong>操作</strong></td>
		</tr>
<%i=1
do while not rs.eof and i<=rs.pagesize
if (i mod 2)=0 then
	bgcolor = "#ffffff"
else
	bgcolor = "#ECFFEC"
end if
%>
		<tr align="center" bgcolor="<%=bgcolor%>">
				<td height="25"><%=rs("city_name")%></td>
				<td height="25"><%=rs("area_name")%></td>
				
				<td height="25"><%=rs("fl_name")%></td>
				<td height="25"><%=rs("fl_lb")%></td>
				<td height="25"><%=rs("ad_time")%></td>
				<%
				if rs("ad_sh") then
					shenhe = "已审核"
				else
					shenhe = "<a href=?action=shenhe&ad_id="&rs("ad_id")&"&page="&page&">" & "未审核" & "</a>"
				end if
				%>
				<td height="25"><%=shenhe%></td>
				<td height="25"><a href="javascript:" onClick="window.open('ad_show.asp?ad_id=<%=rs("ad_id")%>','','width=500,height=400')">查看</a> | <a href="?action=del&ad_id=<%=rs("ad_id")%>&page=<%=page%>" onClick="return queren()">删除</a></td>
		</tr>
<%
	i=i+1
	rs.MoveNext                                              
loop
%>
</table>
<br>
<table width="99%"  border="0" cellspacing="0" cellpadding="0">
		<tr>
				<td align="center">
				
<form name=form method=post action=?>
<%
if rs.recordcount<>0 then
if page-1 mod 10=0 then
  p=(page-1) \ 10
 else
  p=(page-1) \ 10
 end if

 response.write "共"& rs.pagecount &"页,共"& rs.recordcount &"条"&_
     ",每页50条记录,分页:"
 if p*10>0 then response.write "<a href='?page="&p*10&"' title=上十页>[&lt;&lt;]</a>   "
    uming_i=1
 for ii=p*10+1 to P*10+10
     if ii=page then
           response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "
     else
        response.write "<a href='?page="&ii&"'>["+Cstr(ii)+"]</a>   "
     end if
  if ii=rs.pagecount then exit for
   uming_i=uming_i+1
 next
 if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?page="&ii&"' title=下十页>[&gt;&gt;]</a>   "
response.write("  跳页:<input type=text name=page size=2 maxlength=3 class=txttable> <input type=submit name=Submit value=Go class=button01>")
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</form>				</td>
		</tr>
</table>
<p>&nbsp;</p>
</body>
</html>
<%
rs.close
set rs = nothing
conn.close
set conn = nothing
%>

⌨️ 快捷键说明

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