<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->

<% 
 '===========================================================================================
	'软件名称：126 cms 视频影视管理系统
	'程序版权：126电影               '咨询QQ：479025
	'开发作者：magicblack(479025)    '官方网站：http://www.126oo.com/
	'Copyright (C) 2009 - ... 126oo.com  All Rights Reserved.
	'郑重声明:
	'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
	'    2、任何个人或组织不得以盈利为目的发布,修改,本软件及其他副本上一切关于版权的信息；
	'    3、126电影保留此软件的法律追究权利；
'==========================================================================================
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>评论管理 - 后台管理中心 - 126电影程序CMS</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="images/css_body.css" type=text/css rel=stylesheet>
<script language="javascript" src="images/admin.js"></script>
</HEAD>
<BODY>
<DIV class=bodytitle>
<DIV class=bodytitleleft></DIV>
<DIV class=bodytitletxt>评论管理</DIV>
<DIV class=bodytitletxt2></DIV>
</DIV>

<%
response.Charset="GBK"
dim action
action = SafeData("RQ","action",0)

Select case action
	case "del" : del
	case "delall" : delAll
	case else : main
End Select


sub del
	Dim C_ID : C_ID = SafeData("RQ","C_ID",0)
	Dim result : result = Database.DeleteRecord("Tbl_Comment", "C_ID:" & C_ID)   
	If result<>0 Then  
    	ShowMsg "删除评论成功!" ,"admin_comment.asp"  
	End If  
end sub

sub delall
	Dim C_ID : C_ID = SafeData("RF","C_ID",0)
		if isN(C_ID) then ShowMsg "没有选择任何数据!" ,"admin_comment.asp"  
	Dim result : result = Database.DeleteRecord("Tbl_Comment", "C_ID in (" & C_ID & ")")   
	If result<>0 Then  
    	ShowMsg "批量删除评论成功!" ,"admin_comment.asp"  
	End If 
end sub


sub main
Dim rs : Set rs = DataBase.GetPageRecord(0,Array("Tbl_Comment:C_ID,C_Name,C_Content,C_AddTime,C_Ip,C_VID","","C_ID Asc","C_ID")) 

Dim Page
 Page = DataBase.GetPager ("")

%>

<TABLE width="96%" border=0 align=center cellpadding="5" cellSpacing=1 class=tbtitle style="BACKGROUND: #cad9ea;">
<form action="" method="post" name="form1">
  <TBODY>
    <TR bgColor="#f5fafe">
	  <TD width="4%" align="center" >&nbsp;</TD>
      <TD width="15%" align="center">评论用户</TD>
	  <TD width="20%" align="center">评论内容</TD>
      <TD width="15%" align="center">发布时间</TD>
	  <TD width="10%" align="center">IP</TD>
      <TD width="10%" align="center">操作</TD>
    </TR>
	<%if not rs.eof then
		While Not rs.eof
	 %>
    <TR bgcolor="#FFFFFF">
	  <TD align="center"><input name="C_ID" type="checkbox" id="C_ID" value="<%=rs("C_ID")%>" /></TD>
      <TD><%=rs("C_Name")%></TD>
	  <TD><%=rs("C_Content")%></TD>
      <TD align="center"><%=rs("C_AddTime")%></TD>
	  <TD><%=rs("C_Ip")%></TD>
      <TD align="center"><A href="admin_comment.asp?action=del&C_ID=<%=rs("C_ID")%>" onClick="return confirm('确定要删除吗?');">删除</a></TD>
    </TR>
	<%rs.MoveNext
	Wend 
	end if%>
	<TR bgColor="#f5fafe">
	<td  colspan="6"><label>全选<input type="checkbox" name="chkall" id="chkall" class="checkbox" onClick="checkAll(this.checked,'input','C_ID')" /></label><label>反选<input type="checkbox" name="chkothers" id="chkothers" class="checkbox" onClick="checkOthers('input','C_ID')" /></label><input type="submit" value="批量删除" onClick="if(confirm('确定要删除吗')){form1.action='?action=delall';}else{return false}" class="btn"  /></td></tr>
	
    <TR align="center" bgcolor="#f8fbfb">
      <TD colspan="6"><%=Page%></TD>
    </TR>
  </TBODY>
</TABLE>

<%
Database.c(rs)
end sub
%>