📄 adminartgb_body.asp
字号:
<%sub adminartgb_body()
dim totaldiary,adperpage,Currentpage,totalpages,i
adperpage=15
openarticle
sql="select * from remark order by remark_id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<title><%=webname%> 文章评论管理</title>
<table width="774" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="210" bgcolor="#FFFFFF" valign="top">
<%call adminmenu()%>
</td>
<td width="1" background="images/dotlinev.gif"></td>
<td width="563" bgcolor="#FFFFFF" valign="top" align="center">
<table width="100%" border="0" cellspacing="1" cellpadding="6" bgcolor="#C7C7C7">
<tr bgcolor="#E8E8E8" align="center">
<td class="chinese" width="100%" background="images/pic000/c007.jpg">
<a href="admin_artgb.asp">文 章 评 论 管 理</a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="6"></td>
</tr>
</table>
<table width="100%" border="1" cellspacing="0" cellpadding="4" bordercolor="#C0C0C0" style="border-collapse: collapse">
<tr>
<td colspan="4" align=center>
<font color="#333333">评 论 管 理</font></td>
</tr>
<tr align="center" bgcolor="#E8E8E8">
<td class="chinese" width="10%" bgcolor="#F5F5F5">编号</td>
<td class="chinese" bgcolor="#F5F5F5">评论内容</td>
<td class="chinese" bgcolor="#F5F5F5">评论软件</td>
<td class="chinese" width="10%" bgcolor="#F5F5F5">操作</td>
</tr>
<%if not rs.eof then
rs.Movefirst
rs.pagesize=adperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
totaldiary=rs.recordcount
if currentpage<>1 then
if(currentpage-1)*adperpage<totaldiary then
rs.move(currentpage-1)*adperpage
dim bookmark
bookmark=rs.bookmark
end if
end if
if (totaldiary mod adperpage)=0 then
totalpages=totaldiary\adperpage
else
totalpages=totaldiary\adperpage+1
end if
i=0
do while not rs.eof and i<adperpage
%>
<tr>
<td bgcolor="#FFFFFF" class="chinese" align="center"><%=rs("remark_id")%> </td>
<td bgcolor="#FFFFFF" style=line-height:150%><b>评论:<%=ubb2html(rs("remark"),true,true)%></b><br>[<%=rs("remark_date")%>]</td>
<%sql2="select art_title,cat_id from art where art_id="&rs("art_id")
set rs2=server.createobject("adodb.recordset")
rs2.open sql2,conn,1,1
%><td bgcolor="#FFFFFF" class="chinese"><a HREF="showart.asp?art_id=<%=rs("art_id")%>&cat_id=<%=rs2("cat_id")%>" target="_blank"><%=ubb2html(rs2("art_title"),true,true)%></a> </td>
<%rs2.close
set rs2=nothing
%>
<td bgcolor="#FFFFFF" class="chinese" align="center">
<a href="admin_artgb.asp?id=<%=rs("remark_id")%>&action=del#del">删除</a>
</td>
</tr>
<%i=i+1
rs.movenext
loop
else
If rs.EOF And rs.BOF Then%>
<tr>
<td bgcolor="#FFFFFF" class="chinese" colspan=3 align="center">当前还没有
评论!</td>
</tr>
<%end if
end if%>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<form name="form2" method="post" action="admin_artgb.asp">
<tr>
<td class="chinese" align="right"><%=currentpage%>/<%=totalpages%>页,<%=totaldiary%>条记录/<%=adperpage%>篇每页.
<%
i=1
dy10=false
showye=totalpages
if showye>10 then
dy10=true
showye=10
end if
for i=1 to showye
if i=currentpage then
%>
<%=i%>
<%else%>
<a href="admin_artgb.asp?page=<%=i%>"><%=i%></a>
<%end if
next
if totalpages>currentpage then
if request("page")="" then
page=1
else
page=request("page")+1
end if%>
<a href="admin_artgb.asp?page=<%=page%>" title="下一页">>></a>
<%end if%>
</td>
</tr>
</form>
</table>
<br>
<%
if request.querystring("action")="del" then
if request.querystring("id")="" then
errmsg=errmsg+"<br>"+"<li>请指定操作的对象!"
call diserror()
response.end
else
if not isinteger(request.querystring("id")) then
errmsg=errmsg+"<br>"+"<li>非法的日记ID参数!"
call diserror()
response.end
end if
end if
sql="select * from remark where remark_id="&cint(request.querystring("id"))
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<table width="98%" border="1" cellspacing="0" cellpadding="4" class="chinese" bordercolor="#C0C0C0" style="border-collapse: collapse">
<form name="form1" method="post" action="<%=MM_editAction%>">
<tr>
<td class="diaryhead" background="images/pic000/c005.jpg">
<font color="#333333"><a name="del">删除</a></font><a name="del"><font color="#333333">评论</font></a></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><%=ubb2html(formatStr(autourl(rs("remark"))), true, true)%>
<div align="right"><br>
<br>
<br>
第<span class="newshead"><%=rs("remark_id")%></span>篇,发表于-<span class="newshead"><%=rs("remark_date")%></span></div></td>
</tr>
<tr>
<td bgcolor="#F5F5F5" align="center" height="30">
<input type="submit" name="Submit" value="确定删除" class="button">
[<a href="admin_artgb.asp">返回</a>] </td>
</tr>
<input type="hidden" name="id" value="<%=rs("remark_id")%>">
<input type="hidden" name="action" value="del">
<input type="hidden" name="MM_insert" value="true">
</form>
</table>
<%end if%>
<br>
</td>
</tr>
<tr>
<td colspan="3" height="1" background="images/dotlineh.gif"></td>
</tr>
</table>
<%
rs.close
set rs=nothing
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -