<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>网站评论管理</title>
<LINK href="<?=base_url()?>csdj/admin/images/admin.css" type="text/css" rel="stylesheet">
<SCRIPT type="text/javascript" src="<?=base_url()?>csdj/admin/js/admin.js"></script>
</head>
<BODY style="margin:2px">
 
	<table align="center" border="1" cellspacing="0" cellpadding="5" bordercolor="#C4DFF4" width="950" style="border-collapse:collapse;">
	<form name=form method=post action="<?=site_url('admin/pl/del/')?>">
	<tr>
   		<td align="center" height="20" colspan="5" class="title">评论管理
   		 ｜ <a title="音乐评论" href="<?=site_url('admin/pl/index/')?>?sid=1">音乐评论</a>
   		 ｜ <a title="文章评论" href="<?=site_url('admin/pl/index/')?>?sid=2">文章评论</a>
   		 ｜ <a title="专集评论" href="<?=site_url('admin/pl/index/')?>?sid=4">专集评论</a>
   		 ｜ <a title="视频评论" href="<?=site_url('admin/pl/index/')?>?sid=3">视频评论</a>
   		 ｜ <a title="全部评论" href="<?=site_url('admin/pl/index/')?>">全部评论</a>
                </td>
	</tr>
	<tr align="center">
		<td width="5%">选中</td>  
		<td width="43%">评论内容</td>
		<td width="27%">所在模型/信息</td>
		<td width="10%">评论人/IP</td>
		<td width="10%">评论时间</td>
	</tr>
<?php
 if(empty($pl)) echo '<tr align="center"><td colspan="5" align="center">当前没有记录!</td></tr>';
 foreach ($pl as $row) { 
?>
	<tr>
		<td align="center"><input type=checkbox Name="CS_ID[]" Value="<?=$row->CS_ID?>"></td>
		<td><?=$this->CsdjSkins->facehtml($row->CS_Content)?></td>
		<td>
<?php
if($row->CS_SID==1){
      $results=$this->db->query("SELECT CS_Name,CS_CID FROM ".CS_SqlPrefix."dance where CS_ID='".$row->CS_DID."'");
      $total = $results->num_rows();
      if($total>0){
           $rows=$results->row_array(); 
           echo '[<a href="'.site_url("dance/").'" target="_blank">音乐</a>] <a href="'.$this->CsdjSkins->LinkUrl('play','dance','id',$rows['CS_CID'],$row->CS_DID).'" target="_blank">'.$rows['CS_Name'].'</a>';
      }else{
           echo '[<a href="'.site_url("dance/").'" target="_blank">音乐</a>] 数据被删除';
      }
}elseif($row->CS_SID==2){
      $results=$this->db->query("SELECT CS_Name,CS_CID FROM ".CS_SqlPrefix."news where CS_ID='".$row->CS_DID."'");
      $total = $results->num_rows();
      if($total>0){
           $rows=$results->row_array(); 
           echo '[<a href="'.site_url("news/").'" target="_blank">文章</a>] <a href="'.$this->CsdjSkins->LinkUrl('show','news','id',$rows['CS_CID'],$row->CS_DID).'" target="_blank">'.$rows['CS_Name'].'</a>';
      }else{
           echo '[<a href="'.site_url("news/").'" target="_blank">文章</a>] 数据被删除';
      }
}elseif($row->CS_SID==3){
      $results=$this->db->query("SELECT CS_Name,CS_CID FROM ".CS_SqlPrefix."vod where CS_ID='".$row->CS_DID."'");
      $total = $results->num_rows();
      if($total>0){
           $rows=$results->row_array(); 
           echo '[<a href="'.site_url("vod/").'" target="_blank">视频</a>] <a href="'.$this->CsdjSkins->LinkUrl('show','vod','id',$rows['CS_CID'],$row->CS_DID).'" target="_blank">'.$rows['CS_Name'].'</a>';
      }else{
           echo '[<a href="'.site_url("vod/").'" target="_blank">视频</a>] 数据被删除';
      }
}elseif($row->CS_SID==4){
      $results=$this->db->query("SELECT CS_Name,CS_CID FROM ".CS_SqlPrefix."topic where CS_ID='".$row->CS_DID."'");
      $total = $results->num_rows();
      if($total>0){
           $rows=$results->row_array(); 
           echo '[<a href="'.$this->CsdjSkins->LinkUrl('lists','zj','id',1).'" target="_blank">专集</a>] <a href="'.$this->CsdjSkins->LinkUrl('show','zj','id',$rows['CS_CID'],$row->CS_DID).'" target="_blank">'.$rows['CS_Name'].'</a>';
      }else{
           echo '[<a href="'.$this->CsdjSkins->LinkUrl('lists','zj','id',1).'" target="_blank">专集</a>] 数据被删除';
      }
}
?>
		</td> 
		<td align="center"><?=$row->CS_User?><br><?=$row->CS_IP?></td>
		<td align="center"><?=$this->CsdjSkins->GetDate($row->CS_AddTime)?></td>
	</tr>
<?php } ?>
	<tr>
		<td colspan="5">
		<span style="float:right;">评论数：<?=$nums?>&nbsp;&nbsp;<?=$pages?></span>
		<input type="checkbox" name="chkall" onclick="CheckAll(this.form)" value="ON">选中本页 
		<input type="submit" class="italk-st" name="put" value="批量删除" onClick="return confirm('确定删除选中的评论吗?');" class="button"> </td>
	</tr></form> 
</table>
</body>
</html>

