?? edit_citybook.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)'>>>返回<<</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 + -