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

📄 edit_citybook.asp

📁 网上学生心里调查系统
💻 ASP
字号:
<!--#include file="config.asp" -->
<!--#include file="check.asp" -->
<%
city=trim(request("ct"))
if city="" then
  response.write "<a href='javascript:history.back(1)'>请选择城市!</a>"
  response.end
end if
%>
<%
errwrite="错误!请确定您的权限!请您<a href='javascript:history.back(1)'>&gt;&gt;返回&lt;&lt;</a><br>或尝试<a href='edit_login.asp?id="&id&"'>重新登陆</a>!"

if len(session("quhao"))=0 or len(session("guanli"))=0 then
  response.redirect ("edit_login.asp?id=" & id)
  'response.write errwrite
  response.end
end if

set rscity=server.CreateObject("adodb.recordset")
rscity.open"select * from city where 区号='"& city &"'",conn,1,1

if rscity.eof then response.end
if session("quhao")<>rscity("区号") then
  response.write errwrite
  response.end
end if
if session("guanli")<>rscity("管理") or len(session("guanli"))<>len(rscity("管理")) then
  response.write rscity("管理")
  response.end
end if

rscity.close
set rscity=nothing
%>
<%
set rs=server.CreateObject("adodb.recordset")
xdel=trim(request("xdel"))

'删除某留言
if xdel="del" then
  rs.open "delete from citybook where 编号=" &trim(request("id")) ,conn,3,3
  response.redirect "edit_citybook.asp?ct=" & city
end if

rs.open "select * from citybook where 城市区号='" & city &"'" ,conn,1,1

%>
<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  leftmargin="5" topmargin="5">
<div align="<%=sitealign%>">
<table width="500" border="0" cellpadding="3" cellspacing="1" bgcolor="#DFEAF2">
  <tr bgcolor="#0099FF"> 
    <td height="30" style="color: #FFFFFF"><b>城市留言 (目前共有留言:<%=rs.recordcount%>条)</b></td>
  </tr>
<% 
if rs.recordcount>0 then 
Do while not rs.eof%>
  <tr bgcolor="#FFFFFF" height="30"  onMouseOver='this.style.backgroundColor="#CAE5E8"' onMouseOut='this.style.backgroundColor=""'> 
    <td><%response.write ("<font color=#FF0000>·</font><a href='#'>" &rs("发言内容")& "<br><font color=#999999>" &rs("发言者姓名")&" | "&rs("发言者联系方式")&" | "&rs("发言时间")&"</font></a> <a style='color: #FF0000' href='?xdel=del&ct="& city &"&id="& rs("编号")&"'>【删除】</a><br>")%></td>
  </tr> 
<% 
rs.movenext
Loop
end if%>
</table>
<% rs.close
set rs=nothing
%>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"  width="500">
  <tr>
    <td align="right" width="490" height="40">管理选项:<a href="edit_city.asp?ct=<%=city%>">城市管理</a> |
    <a href="edit_citybook.asp?ct=<%=city%>">城市留言管理</a> | 
    <a href="edit_login.asp">管理登陆</a> | 
    <a href="edit_logout.asp">退出登录</a></td>
    <td width="10"> </td>
  </tr>
</table>
</div>
</body>
</html>

⌨️ 快捷键说明

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