⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_news_pl.asp

📁 Art2008 CMS是一款具有强大的功能的基于ASP语言的网站管理软件
💻 ASP
字号:
<!--#include file = admin_chk.asp -->
<%
If Not ChkAdmin("News_Comment") Then
	Call ArtErr("","")
End If
%>
<!--#include file = titleb.asp --><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../images/admin/style.css">
<script src="Include/Common.js" type="text/javascript"></script>
<STYLE type="text/css">
<!--
.style1 {color: #FF0000}
td {
	background:#ffffff;
	color:#1E5494;
	font-size: 12px;
	height: 23px;
}
-->
</STYLE>
<script language="JavaScript" type="text/JavaScript">
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')      
	 e.checked = form.chkall.checked; 
   }
  }
</script>
</head>
<%
sh=trim(request("sh"))
shid=trim(request("shid"))
shlist=trim(request("shlist"))


if sh<>"" and shid<>"" then
	conn.Execute "update [newspl] set [sh]="&sh&" where id="&clng(shid)
end if
%>
<TABLE width="100%" border="0" align=center cellpadding="0" cellspacing="1" class="tableBorder"> 
    <tr> 
      <th height=25 colspan="3" >评论管理</th> 
    </tr></TABLE>
    <table width="100%" border="0" align=center cellpadding="3" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#C4D8ED">
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan -->
<script Language="JavaScript" Type="text/javascript">
<!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.word.value == "")
  {
    alert("请在 关键字 域中输入值。");
    theForm.word.focus();
    return (false);
  }

  if (theForm.word.value.length < 1)
  {
    alert("在 关键字 域中,请至少输入 1 个字符。");
    theForm.word.focus();
    return (false);
  }

  if (theForm.word.value.length > 20)
  {
    alert("在 关键字 域中,请最多输入 20 个字符。");
    theForm.word.focus();
    return (false);
  }
  return (true);
}
//--></script><form method="POST" action="<%=request.servervariables("URL")%>" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1"><tr>
			<tr>
			<td  class="forumRow"><b>评论搜索:</b></td>
			<td  class="Forumrow">				
				&nbsp;<!--webbot bot="Validation" s-display-name="关键字" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="20" --><input type="text" name="word" size="20" maxlength="20">
				<select size="1" name="zd">
				<option value="content">内容</option>
				<option value="username">作者</option>
				</select>  <input type="submit" value="搜索评论" name="B1">
                <input type='button' value='未审核' onClick="javascript:location.href='?shlist=0'">
				<input type='button' value='已审核' onClick="javascript:location.href='?shlist=1'">
                <input type='button' value='会员' onClick="javascript:location.href='?Anonymous=0'">
                <input type='button' value='游客' onClick="javascript:location.href='?Anonymous=1'">
				<%if shlist<>"" then%>
				<input type='button' value='查看全部' onClick="javascript:location.href='?'">
				<%end if%>

			</td>
		</tr></form>
  </table>
      <table width="100%" style="MARGIN-TOP: 3px" border="0" align="center" cellspacing="1" cellpadding="2" class="table">
		<tr>
			<td  align="center" colspan="5">
			<iframe  name="IP3" id="ip3" width="100%" height="10" src="#" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0"></iframe></td>
		</tr>
         <form name=pl action=admin_news_pl.asp method=post>
		<tr>
            <td class="bg_tr" align="center" width=5% height=25 >选</td>
		  <td width="45%" align="center"class="bg_tr" height="25">作者 内容</td>
		  <td width="20%" align="center" class="bg_tr" height="25">发布时间 IP</td>
            <td  width="10%" align="center" class="bg_tr" height="25">类型</td>
		  <td width="20%" align="center" class="bg_tr" height="25">相关操作</td>
		</tr>
		<%
		word=trim(request("word"))
		zd=trim(request("zd"))
		Anonymous=trim(request("Anonymous"))
		sql = "select * from newspl where 1=1"
		if shlist<>"" then sql=sql&" and sh="&shlist&" "
		if  Anonymous<>"" then sql=sql&" and Anonymous="&Anonymous&" "
		sql=sql&" order by id desc"
		if word<>"" and zd<>"" then sql = "select * from newspl where "&zd&" like '%"&word&"%' order by id desc"
		Set rs = Server.CreateObject("ADODB.RecordSet")
		rs.Open sql,conn,1,1
		
		if rs.recordcount<>0 then
		
		page=int(request("page"))
		rs.PageSize=15
		pagecount=rs.pagesize
		if page<=0 then page=1
		if request("page")="" then page=1
		rs.AbsolutePage=page
		for i=1 to pagecount
		%>
           <tr height="25"  onMouseOver=overColor(this) onMouseOut=outColor(this)> 
			<td align=center><input type='checkbox' value=<%=rs("id")%> name=id></td>
            <td ><% if rs("Anonymous")=0 then Response.Write"<font color=red>会员</font>" else Response.Write"游客"%>:<%=rs("username")%><br>&nbsp;&nbsp;&nbsp;
			<a href=admin_news_pl_view.asp?id=<%=rs("id")%> target=IP3><font color="#666666"><%=titleb(rs("content"),66)%></font></a></td>
		    <td align="center"><a href=# onclick='window.open("admin_ip.asp?iP=<%=rs("ip")%>","newsplview","width=200,height=160,top=190,left=150,scrollbars=no" )'><font color="#993300"><%=rs("IP")%></font><font color="#0066FF">(查看来源)</font></a><br><%=rs("addtime")%></td>
		    <td align="center"><% if rs("Anonymous")=0 then Response.Write"<font color=red>会员评论</font>" else Response.Write"游客评论"%></td>
            <td align="center">			
			<a href="<%=fun_html_url(rs("newsid"))%>" target="_blank" ><span class="greentext">相关新闻</span></a> <a href=# onclick='window.open("../NewsPL.asp?id=<%=rs("newsid")%>","newsview","width=850,height=400,top=70,left=100,scrollbars=yes" )'><font color="#336699">相关评论</font></a>
		  <%
			if rs("sh")="0" then 
				Response.Write "<a href=?sh=1&shid="&rs("id")&"&page="&page&"&shlist="&shlist&"><span class='style1'>未审核</span></a>"
			else
				Response.Write "<a href=?sh=0&shid="&rs("id")&"&page="&page&"&shlist="&shlist&">已审核</a>"
			end if 
			%></td>
		</tr>
		<%
		rs.movenext 
		if rs.eof then exit for
		next
		else 
		  Response.Write "<tr><td colspan=5>暂无评论!</td></tr>"
		end if
		%>
  


<tr><td align="center" colspan="5" class="Forumrow" ><div align="left" style="float:left; padding:0 0 0 12;">
<input type='checkbox' name=chkall onClick='CheckAll(this.form)'> 全选 
<input type="submit" name="action" value="删除" onClick="{if(confirm('该操作不可恢复!\n\n确实删除选定的留言?')){this.document.Prodlist.submit();return true;}return false;}">
</div>
<div align="center" >   
 
      <%if rs.recordcount<>0 then
  if page>1 then
    response.write "<a href="&request.servervariables("URL")&"?page=1&shlist="&shlist&"&Anonymous="&Anonymous&">首页</a> "
    response.write "<a href="&request.servervariables("URL")&"?page="&page-1&"&shlist="&shlist&"&Anonymous="&Anonymous&">上一页</a> "
  end if
  if page<rs.pagecount then
    response.write "<a href="&request.servervariables("URL")&"?page="&page+1&"&shlist="&shlist&"&Anonymous="&Anonymous&">下一页</a> "
    response.write "<a href="&request.servervariables("URL")&"?page="&rs.pagecount&"&shlist="&shlist&"&Anonymous="&Anonymous&">尾页</a> "
  end if
    response.write "共"&rs.recordcount&"条 每页显示"&pagecount&"条 共"&rs.pagecount&"页 "
  %>
      <script language="JavaScript">
  <!--
  function FP_jumpMenu(el,frm,sel) 
  {//v1.0
    var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
    if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
    }
    // -->
    </script>
      <select size="1" onchange="FP_jumpMenu(this,'window',false)" id="id1" name="D1" style="font-size: 9pt; border-style: solid; border-width: 1px">
       <%for i=1 to rs.pagecount%>
       <option value="<%=request.servervariables("URL")%>?page=<%=i%>&shlist="&shlist&"&Anonymous="&Anonymous&"" <%if page=i then response.write "selected"%> style="font-size: 9pt">第<%=i%>页</option>
        <%next%>
      </select>
      <%end if%></div>
</td></tr></table>
<%
if request("action")="删除" then
	delid=replace(request("id"),"'","")
	call delfeedback()
end if
sub delfeedback()
	if delid="" or isnull(delid) then

	response.write "<script language='javascript'>"
	response.write "alert('操作失败,没有选择合适参数,请单击“确定”返回!');"
	response.write "location.href='admin_news_pl.asp';"
	response.write "</script>"
	response.end

	else
		conn.execute("delete from [newspl] where ID in ("&delid&")")
		
	response.write "<script language='javascript'>"
	response.write "alert('评论删除成功,请单击“确定”返回!');"
	response.write "location.href='admin_news_pl.asp';"
	response.write "</script>"
	response.end

	end if
end sub


rs.close:set rs=nothing
call CloseConn() 
call AdminPageEnd()
%>  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -