📄 admin_gbook.asp
字号:
<!-- #include file="../conn.asp" -->
<!--#include file="../inc/config.asp"-->
<!-- #include file="session.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<script language="javaScript" SRC="../js/js.js"></SCRIPT>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body>
<div id=topmomo><a href="admin_gbook.asp?info=list&cndb=all">所有留言</a><%
set rs3=server.createobject("adodb.recordset")
sql="select * from guest_class"
rs3.open sql,conn,1,1
Do while not rs3.eof
%> | <a href="admin_gbook.asp?info=list&cndb=class&id=<%=rs3("id")%>"><%=rs3("guest_class")%></a><% rs3.MoveNext
Loop
rs3.close
set rs3=nothing%> | <a href="admin_gbook.asp?info=list&cndb=noreply">未回复留言</a></div><br>
<%Select Case request.querystring("info")
Case "reply"
Call reply()
Case "list"
Call list()
end select
Sub list()
if request.querystring("id")<>"" then
id=CheckSql(request.querystring("id"))
CheckSqlnum(id)
id=int(id)
end if
cndb=request.querystring("cndb")
if cndb="" then
cndb="all"
end if
Const MaxPerPage=20
If Request("page")<>"" then
CurrentPage=Cint(Request("Page"))
Else
CurrentPage=1
End if
set rs=server.createobject("adodb.recordset")
if cndb="all" then
sql="select * from [guest] order by id desc"
elseif cndb="noreply" then
sql="select * from [guest] where reply IS NULL order by id desc"
elseif cndb="class" then
sql="select * from [guest] where classid="&id&" order by id desc"
end if
rs.open sql,conn,1,1
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
<tr>
<td class="thead" align="center" height="25" colspan="9"><b><%
if cndb="all" then
Response.Write "查看所有留言"
elseif cndb="noreply" then
Response.Write "查看未回复留言"
elseif cndb="class" then
Response.Write "查看留言"
end if
%></b></td>
</tr>
<form name="form" onsubmit="javascript:return JsIceb();" target="JsIceb" action="admin_Daily.asp?info=gbook_listdel">
<tr align="center" height="22">
<td width="5%" class="tcat"></td>
<td width="5%" class="tcat">ID</td>
<td width="20%" class="tcat">留言者名称</td>
<td width="20%" class="tcat">留言时间</td>
<td width="20%" class="tcat">是否回复</td>
<td width="20%" class="tcat">网站操作</td>
</tr>
<%
if rs.eof and rs.bof then
else
Rs.PageSize=MaxPerPage
Allpage=Rs.PageCount
If Currentpage>Allpage Then Currentpage=1
Num=Rs.RecordCount
Rs.MoveFirst
Rs.AbsolutePage=CurrentPage
i=0
do while not rs.eof%>
<tr align="center">
<td class="alt2"><input type="checkbox" name="checked" value="<%=rs("id")%>"></td>
<td class="alt1"><%=rs("id")%></td>
<td class="alt2"><a href="admin_gbook.asp?info=reply&cndb=<%=cndb%>&id=<%=rs("id")%>"><%
dim userid
userid=rs("userid")
set rs_u=server.createobject("adodb.recordset")
sql_u="select NAME from [userinfo] where id="&userid&""
rs_u.open sql_u,conn,1,3
if rs_u.eof and rs_u.bof then
response.write "用户被删除"
else
response.write ""&rs_u("NAME")&""
end if
rs_u.close
set rs_u=nothing
%></a></td>
<td class="alt1"><%=rs("time")%></td>
<td class="alt2"><%if rs("reply")<>"" then
response.write "已回复"
else
response.write "未回复"
end if%>
</td>
<td class="alt1"><a href="admin_Daily.asp?info=gbook_del&cndb=<%=cndb%>&id=<%=rs("id")%>&page=<%=Page1%>"><img src="images/delete.gif" width="18" height="18" border="0"></a></td>
</tr>
<% i=i+1
If i>=MaxPerPage Then Exit Do
Rs.MoveNext
Loop
%><td height="20" align="center" colspan="8" class="alt3">
<input class="button" type="button" onclick="CheckAll(this.form)" value="全选" name="chkall" style="width: 45; height: 20">
<input class="button" type="button" onclick="CheckOthers(this.form)" value="反选" name="chkOthers" style="width: 45; height: 20">
<input class="button" type="submit" value="删除" name="listdel" style="width: 45; height: 20">
</td>
</tr>
</form>
<%End If
Rs.Close
Set Rs=Nothing%> <tr height="22" align="center">
<td colspan="9" valign="middle" class="alt2"><%Response.Write ShowPage("admin_gbook.asp?info=list&cndb="&cndb&"&id="&id&"",CurrentPage,Num,MaxPerPage,True,True," 个项目")%></td>
</tr>
</table>
<%end sub%>
<%sub reply()%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
<tr>
<td class="thead" align="center" height="25" colspan="9"><b>回 复 留 言</b></td>
</tr>
<tr align="center" height="22">
<td width="10%" class="tcat">ID</td>
<td width="60%" class="tcat">留言者名称</td>
<td width="30%" class="tcat">留言时间</td>
</tr>
<%
id=request.querystring("id")
cndb=request.querystring("cndb")
page=request.querystring("page")
set rs=server.createobject("adodb.recordset")
sql="select * from guest where id="&id
rs.open sql,conn,1,3
if rs.bof and rs.eof then
response.write "<script>alert('JsIceWeb(今世)提醒:\n\n留言不存在!');history.back();</script>"
Response.end
else
%>
<tr align="center" height="22">
<td class="alt2"><%=rs("id")%></td>
<td class="alt1"><%
dim userid
userid=rs("userid")
set rs_u=server.createobject("adodb.recordset")
sql_u="select NAME from [userinfo] where id="&userid&""
rs_u.open sql_u,conn,1,3
if rs_u.eof and rs_u.bof then
response.write "用户被删除"
else
response.write ""&rs_u("NAME")&""
end if
rs_u.close
set rs_u=nothing
%></td>
<td class="alt2"><%=rs("time")%></td>
</tr>
<tr height="22">
<td class="alt2"><p>留言内容</p></td>
<td class="alt1" colspan="2"><%=rs("content")%></td>
</tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
<tr height="25">
<td colspan="4" class="thead">管 理 员 回 复</td>
</tr>
<form name="gbform" method="post" action="admin_Daily.asp?info=gbook_reply&id=<%=id%>&cndb=<%=cndb%>&page=<%=page%>">
<tr>
<td colspan="4" class="alt3">
<div id=panx>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class=panel>
<tr align="center">
<td class="alt2">
<textarea name="reply" cols="65" rows="10" id="reply" class="form"><%=rs("reply")%> </textarea></td>
</tr>
</table> </div>
<div style="MARGIN-TOP: 6px;MARGIN-bottom: 6px" align="center">
<input type="submit" class="button" value="提 交">
<input type="reset" class="button" value="重 置"></div>
</td>
</tr>
</form>
</table>
<%end if%>
<%end sub%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -