<!--#include file="../../conn/conn_other.asp"-->
<!--#include file="../check.asp"-->
<!--#include file="../../film/Incs/syscode.asp"-->
<!--#include file="../../inc/sql.asp"-->
<%
	end if
	useflag=1
%>
<!--#include file="../flag.asp"-->
<link href="css/Admin_Style.Css" rel="stylesheet">
<link href='../Include/Admin_Style.CSS' rel='stylesheet' type='text/css'>
<script language="javascript" src="js/Admin_Js.js"></script>
<%
	Dim Action,CommentID
	Action=CheckStr(Request("Action"))
	CommentID=CheckNum(Request("CommentID"))
	Select Case Action
		Case "CommentDel"
			Call CommentDel()
		Case Else
			Call CommentList()
	End Select
	
	Function CommentList()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="sortbutton">
<tr>    
<td height="23" align="center" valign="middle">视频系统评论列表</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="table">
<form id="dform" name="dform" method="post" action="?Action=CommentDel">
  <tr>
    <td colspan="6" class="title">视频系统评论列表</td>
  </tr>
  <tr>
    <td width="5%" class="tabletd tc">ID</td>
    <td width="10%" class="tabletd tc">用户名</td>
    <td width="15%" class="tabletd tc">评论视频</td>
    <td class="tabletd tc">评论内容</td>
    <td width="10%" class="tabletd tc">评论IP</td>
    <td width="10%" class="tabletd tc">发布时间</td>
  </tr>
<%
	Dim Tag,Table,TagStr,Order,PageSize,PageUrl
	Tag="CommentID"										
	Table="[Dm_Comment]"								
	TagStr="*"	
	Order="CommentID"									
	PageSize=20									
	PageUrl="Admin_Comment.asp"								
	LinkNum=5										
	Dim TotalCount,PageCount,Page
	Dim Rs,Sql,WhereStr
	Dim Key,ClassID
	TotalCount=GetTotalCount(Tag,Table,WhereStr)
	PageCount=GetPageCount(TotalCount,PageSize)
	Page=GetPageNow(PageCount)
	Sql=GetPageSql(Tag,Table,TagStr,Order,PageSize,WhereStr,Page)
	Set Rs=Server.CreateObject("Adodb.RecordSet")
	Rs.Open Sql,Conn,1,1
	If Rs.Bof And Rs.Eof Then
		Rw("<tr>")
    	Rw("<td colspan='5' class=""tabletd tc"">暂无数据！</td>")
  		Rw("</tr>")
	Else
		Do While Not Rs.Eof
%>
  <tr onmouseover="this.className='tabletr';" onmouseout="this.className='tabletr2';">
    <td class="tabletd tc"><input name="CommentID" type="checkbox" value="<%=Rs("CommentID")%>"></td>
    <td class="tabletd tc"><%=LeftStr(Rs("PostName"),10)%></td>
    <td class="tabletd tc">
    <%=DBGetValue("Dm_Video","VideoName","VideoID="&Rs("VideoID")&"")%></td>
    <td class="tabletd tl"><%=LeftStr(Rs("Content"),70)%></td>
    <td class="tabletd tc"><%=Rs("PostIP")%></td>
    <td class="tabletd tc"><%=FormatTime(Rs("PostTime"),4)%></td>
  </tr>
<%
		Rs.MoveNext
		Loop
%>
  <tr>
    <td colspan="6" class="tabletd tr">
    <input type='checkbox' name='chkall' value='on' onclick='CheckSel(this.form)' />全选
    <input name="submit" type="submit" class="button" value="删除评论">    </td>
  </tr>
  <tr>
    <td colspan="6" class="tbove tr"><%Call PageShow(TotalCount,PageSize,Page,PageCount,PageUrl,LinkNum)%></td>
  </tr>
<%
	End If
	Rs.Close
	Set Rs=Nothing
%>
</form>
</table>
<%
	End Function
	
	Function CommentDel()
		Dim Sql,CommentIDStr
		CommentIDStr=Request("CommentID")
		If CommentIDStr="" Then Call ShowErr("请选择你要删除的信息！")
		Sql="Delete From Dm_Comment Where CommentID In ("&CommentIDStr&")"
		Conn.Execute(Sql)
		Call ShowSuccMsg("<li>评论数据删除成功！</li>","")
	End Function
	
	Call CloseDB()
%>


