📄 admin_comshow.asp
字号:
<%
Option Explicit
Response.buffer=true
const purviewlevel=4
%>
<!--#include file="admin_PurviewChe.asp" -->
<!--#include file="conn.asp" -->
<!--#include file="../inc/function.asp" -->
<%
dim articleid,comshow,comdel
articleid=trim(request("articleid"))
comshow=trim(request("comshow"))
comdel=trim(request("comdel"))
if articleid="" then
response.redirect("admin_CommentMan.asp")
call closeconn()
end if
if articleid<>"" then
if comdel="del" then
dim sql
sql="delete * from comment where articleid="&articleid&""
conn.execute sql
call closeconn()
response.redirect("admin_CommentMan.asp")
end if
if comshow="show" then
dim rs,page,i,filepath
set rs=server.createobject("ADODB.Recordset")
rs.open"select * from commentart where articleid="&articleid&"",conn,1,1
if rs.eof or rs.bof then
response.redirect("admin_CommentMan.asp")
call closeconn()
else
%>
<%filepath=request.servervariables("path_info")%>
<%
page=request.querystring("page")
rs.pagesize=15
if not isempty(page) then
if not isnumeric(page) then
page=1
else
page=cint(page)
end if
if page>rs.pagecount then
rs.absolutepage=rs.pagecount
elseif page<=0 then
rs.absolutepage=1
else
rs.absolutepage=page
end if
else
rs.absolutepage=1
end if
page=rs.absolutepage
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="Style.css" rel="stylesheet" type="text/css">
<script language=javascript>
function checkdel()
{
if(confirm("该操作将删除该文章下的所有评论,一旦删除,将不能恢复!"))
return true;
else
return false;
}
</script>
</head>
<body>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#f5f8f5">
<tr>
<td class="tbbgtitle">文章主题:<span class="txt04"><%=rs("title")%></span> 作者:<span class="txt04"><%=rs("author")%></span> <%if session("adminpurview")<=3 then%><span class="txt02">[<a href="admin_ComShow.asp?articleid=<%=rs("articleid")%>&comdel=del" onclick="return checkdel();" title="删除该文章下的所有评论">删除</a>]
<input name="comdel" type="hidden" id="comdel" value="del"><%end if%>
[<a href='javascript:onclick=history.go(-1)'>返回</a>]
</span></td>
</tr>
<tr>
<td><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<% for i=1 to rs.pagesize
if rs.eof then
exit for
end if %>
<tr>
<td class="txt03">网友 <span class="txt05"><%=rs("comname")%></span> 的评论:<br><img src="../<%=rs("comface")%>"><%=rs("comtext")%></td>
</tr>
<tr>
<td align="right" class="txt02">评论时间:<%=rs("comtime")%> IP号:<%=rs("comip")%></td>
</tr>
<% rs.movenext
next
%>
</table></td>
</tr>
<tr>
<td align="center" class="tbbgtitle"><span class="txt05"><%call pagination(rs.pagecount,rs.pagesize,page,rs.recordcount)%></span></td>
</tr>
<tr>
<td align="center"><span class="txt05"><span class="txt02">[<a href='javascript:onclick=history.go(-1)'>返回</a>]</span></td>
</tr>
</table>
</body>
</html>
<%
rs.close
set rs=nothing
call closeconn()
end if
end if
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -