www.gusucode.com > 中网景企业网站源码时尚版 2009.73码程序 > admin/Comment.asp

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="opendb.asp" -->
<%
'Call CheckUserLogin(username)
Call CheckAdmin()
Call CnkAdminRight(6)
Dim action,i,Submit,ModuleType,theitem
action=Trim(Request.Form("action"))
ModuleType=Clng(Request("ModuleType"))
Submit=request("Submit")
if keywords<>"" then call sqlchkchar(keywords)

thispage=request("page_code")
if thispage="" then
	thispage=1
else
	thispage=clng(thispage)
end if
if thispage<1 then thispage=1

PagePara="?tmp="

if  Submit="删除" then
 for each theitem in Request.Form("delid")
   conn.execute("delete from cnk_comment where id="&theitem&"")'删除信息
  next
end if
if  Submit="通过审核" then
 for each theitem in Request.Form("delid")
   conn.execute("update cnk_comment set ispass=1 where id="&theitem&"")'删除信息
  next
end if


Call Head()
%>
<body>
<div class="cnkbox">
  <div class="title">评论管理</div>
  <div class="content">
  <%sql="select * from cnk_comment where ChannelID="&ChannelID
	if keywords<>"" then sql=sql&" and content like '%"&keywords&"%'"
	sql=sql&" order by initime DESC"
	rs.open sql,conn,1,3 
	  if rs.recordcount=0 then
	  Response.Write "未有"
	  Response.end
	  else
	  	rs.pagesize=50
		if thispage>rs.pagecount then thispage=rs.pagecount
		rs.AbsolutePage = thispage%>
	  <form name="form1" method="post" action="">
	    <table width="100%"  border="0">
          <tr>
            <td width="31%"><input name="Submit" type="submit" class="button" value="删除" onClick="return cfdel();">
			<input name="Submit" type="submit" class="button" value="通过审核">
			全选<input type="checkbox" name="checkbox" value="Check All" onClick="mm()"></td>
            <td width="69%" align="right">
			<% = GetPageList(rs.pagecount,thispage,PagePara,0) %>&nbsp;&nbsp;&nbsp;
			共有 <strong><%=rs.recordcount%></strong>条
        <% = GetPage(rs.pagecount,thispage,PagePara,0) %>
			</td>
          </tr>
        </table>
		<% for i=1 to rs.pagesize%>
      <table width="100%"  border="0" bgcolor="#DBE4EE">
        <tr>
          <td><input name="delid" type="checkbox" id="delid" value="<%= rs("id") %>">
            <%= rs("person") %> &nbsp; 发表于:<%= rs("initime") %>  &nbsp; 来自:<%= rs("ip") %> 
			<% If rs("ispass")=0 Then Response.Write("<font color=""#FF0000"">未审核</font>")%></td>
        </tr>
      </table>
      <table width="100%"  border="0" cellpadding="5" cellspacing="1" bgcolor="#DBE4EE">
        <tr>
          <td bgcolor="#FFFFFF">
		  <% =cnkUBBContent(rs("content"))%>
		  </td>
        </tr>
      </table>
      <br>
	  <% rs.movenext
	  if rs.eof then exit for
	  next%>
	  <table width="100%"  border="0">
        <tr>
          <td width="31%"><input name="Submit" type="submit" class="button" value="删除" onClick="return cfdel();">
			<input name="Submit" type="submit" class="button" value="通过审核">
          全选<input type="checkbox" name="checkbox" value="Check All" onClick="mm();"></td>
          <td width="69%" align="right"><% = GetPageList(rs.pagecount,thispage,PagePara,0) %>&nbsp;&nbsp;&nbsp;
			共有 <strong><%=rs.recordcount%></strong>条
        <% = GetPage(rs.pagecount,thispage,PagePara,0) %>
          </td>
        </tr>
      </table>
	  </form>
	  <%end if
	  rs.close
	  set rs=nothing%>
	  <div align="center">
	<script>
<!--
function searchkw() {
validity=true;

 if (!check_empty(document.searchform.keywords.value) || (document.searchform.keywords.value=="请输入关键字"))
{ validity=false;
 alert('请输入搜索关键字!');
document.searchform.keywords.focus();
 return validity; } 

function check_empty(text) {
return (text.length > 0); // returns false if empty
}
}

//-->
    </script>
	<form name="searchform" method="post" action="Comment.asp?ChannelID=<%= ChannelID %>" onSubmit="return searchkw()">
	<input name="keywords" type="text" class="input" id="keywords" onFocus="if (this.value=='请输入关键字') this.value='';" value="请输入关键字" size="25">
	<input name="Submit" type="submit" class="button" value="搜索">
	 </form>
	</div>
</div>
</div>
<% Call foot()
Call Closedb() %>