📄 admin_pinglun.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>
<%info=request.querystring("info")
Const MaxPerPage=20
If Request("page")<>"" then
CurrentPage=Cint(Request("Page"))
Else
CurrentPage=1
End if
set rs=server.createobject("adodb.recordset")
if info="book" then
sql="select * from Comment where Commenttype=1 order by CommentID desc"
elseif info="article" then
sql="select * from Comment where Commenttype=4 order by CommentID desc"
elseif info="author" then
sql="select * from Comment where Commenttype=2 order by CommentID desc"
elseif info="user" then
sql="select * from Comment where Commenttype=3 order by CommentID desc"
end if
end if
'MySQL需要如下语句
conn.CursorLocation=3
rs.open sql,conn,1,1
%><div id="topmomo">
<a href="admin_pinglun.asp?info=book">查看长篇评论</a> |
<a href="admin_pinglun.asp?info=article">查看短篇评论</a> |
<a href="admin_pinglun.asp?info=author">查看作家评论 |
<a href="admin_pinglun.asp?info=user">查看会员评论</a></div><br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder" style="line-height:150%;">
<tr>
<td class="thead" align="center" colspan="7">
<%if info="book" then
response.write "长篇作品"
elseif info="article" then
response.write "短篇作品"
elseif info="author" then
response.write "作家"
elseif info="user" then
response.write "会员"
end if
%>评论管理<br>
<span style="font-weight: 400">设置</span><u><font color="#FFE1FF">精华</font></u><span style="font-weight: 400">按照系统设置</span><u><font color="#FFE1FF">加</font></u><span style="font-weight: 400">相应的积分;</span><u><font color="#FFE1FF">删除</font></u><span style="font-weight: 400">则按照系统设置</span><u><font color="#FFE1FF">减</font></u><span style="font-weight: 400">相应的积分;</span><u><font color="#FFE1FF">清除</font></u><span style="font-weight: 400">则</span><u><font color="#FFE1FF">不减</font></u><span style="font-weight: 400">积分</span></td>
</tr>
<form name="form" onsubmit="javascript:return cnendb();" target="cnendb" action="admin_pinglunsave.asp?info=listDel&cndb=<%=info%>">
<tr align="center" height="25" >
<td width="5%"class="tcat"></td>
<td width="10%"class="tcat">名 称</td>
<td width="50%"class="tcat">评论内容</td>
<td width="10%"class="tcat">发表人</td>
<td width="10%"class="tcat">置顶</td>
<td width="10%"class="tcat">精华</td>
<td width="10%"class="tcat">操作</td>
</tr>
<%if rs.eof and rs.bof then
response.write "<tr align=center><td colspan=7 class=alt2><span class=style1>暂无任何评论</span></td></tr>"
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
type_id=rs("type_id")
set rsp=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
if info="book" then
sqlp="select list_name from list_book where ID="&type_id&""
rsp.open sqlp,conn,1,1
type_name=rsp("list_name")
elseif info="article" then
sqlp="select Ar_name from article where ID="&Ar_id&""
rsp.open sqlp,conn,1,1
type_name=rsp("Ar_name")
elseif info="author" then
sqlp="select author_name from author where author_ID="&type_id&""
rsp.open sqlp,conn,1,1
type_name=rsp("author_name")
elseif info="user" then
sqlp="select NAME from userinfo where ID="&type_id&""
rsp.open sqlp,conn,1,1
type_name=rsp("NAME")
end if
else
if info="book" then
sqlp="select list_name from [list_book] where ID="&type_id&""
rsp.open sqlp,conn,1,1
type_name=rsp("list_name")
elseif info="article" then
sqlp="select Ar_name from [article] where ID="&Ar_id&""
rsp.open sqlp,conn,1,1
type_name=rsp("Ar_name")
elseif info="author" then
sqlp="select author_name from [author] where author_ID="&type_id&""
rsp.open sqlp,conn,1,1
type_name=rsp("author_name")
elseif info="user" then
sqlp="select NAME from [userinfo] where ID="&type_id&""
rsp.open sqlp,conn,1,1
type_name=rsp("NAME")
end if
end if%>
<tr align="center">
<td align="center"class=alt2>
<input type="checkbox" name="checked" value="<%=rs("CommentID")%>"></td>
<td height="34" align="center"class=alt1><%if rsp.eof and rsp.bof then%>被删除<%else%><%=type_name%><%end if%></td>
<td height="34" align="left"class=alt2><%=left(rs("Content"),300)%></td>
<td height="34" align="center"class=alt1><%=rs("UserName")%></td>
<td height="34" align="center"class=alt2>
<input class="button" type="button" name="IsTop" value="<%if rs("IsTop")=0 then%>置顶<%else%>取消<%end if%>" onclick="javascript:window.open('admin_pinglunSave.asp?info=topgood&cndb=<%=info%>&id=<%=rs("CommentID")%>&page=<%=Page1%>&act=goTop','_blank','')" style="width: 35; height: 20"></td>
<td height="34" align="center"class=alt1>
<input class="button" type="button" name="IsGood" value="<%if rs("IsGood")=0 then%>精华<%else%>取消<%end if%>" onclick="javascript:window.open('admin_pinglunSave.asp?info=topgood&cndb=<%=info%>&id=<%=rs("CommentID")%>&page=<%=Page1%>&act=goGood','_blank','')" style="width: 35; height: 20"></td>
<td align="center"class=alt2>
<a href="admin_pinglunsave.ASP?info=cll&cndb=<%=info%>&id=<%=rs("CommentID")%>&page=<%=Page1%>">清除</a>
<a href="admin_pinglunsave.ASP?info=del&cndb=<%=info%>&id=<%=rs("CommentID")%>&page=<%=Page1%>">删除</a></td>
</tr>
<%i=i+1
If i>=MaxPerPage Then Exit Do
Rs.MoveNext
Loop
%><tr>
<td height="22" align="center" colspan="7"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 align="center">
<td height="25" colspan="7" valign="middle" class="alt2"><%Response.Write ShowPage("admin_pinglun.asp?info="&info&"",CurrentPage,Num,MaxPerPage,True,True," 个项目")%></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -