<!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?5566"></script>
<script type="text/javascript" src="<?=base_url()?>csdj/admin/js/dialog.js"></script>
</head>
<body style="margin:2px">
<form method="post" Name="myForm" action="<?=site_url('admin/userzu/save/')?>">
<table align="center" border="1" cellspacing="0" cellpadding="5" bordercolor="#C4DFF4" width="950" style="border-collapse:collapse;"><tr><td align="center" colspan="2" class="title"><?=$title?>会员组</td></tr>

<tr><td width="120" align="right"><strong><font color=red>＊</font> 会员组名称：</strong></td>
<td width="830"><input type="text" style="width:230px" name="CS_Name" id="CS_Name" value="<?=$CS_Name?>"></td>
</tr>
<tr><td align="right"><strong><font color=red>＊</font> 包一月价格：</strong></td>
<td><input type="text" name="CS_Cion_30" value="<?=$CS_Cion_30?>" style="width:100px;" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">金币</td>
</tr>
<tr><td align="right"><strong><font color=red>＊</font> 包半年价格：</strong></td>
<td><input type="text" name="CS_Cion_180" value="<?=$CS_Cion_180?>" style="width:100px;" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">金币</td>
</tr>
<tr><td align="right"><strong><font color=red>＊</font> 包一年价格：</strong></td>
<td><input type="text" name="CS_Cion_365" value="<?=$CS_Cion_365?>" style="width:100px;" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">金币</td>
</tr>
<tr><td align="right"><strong><font color=red>＊</font> 歌曲下载权限：</strong></td><td>
<?php
                $sqlstr="select * from ".CS_SqlPrefix."class where CS_SID=1 order by CS_ID desc";
		$result=$this->CsdjDB->db->query($sqlstr);
		$recount=$result->num_rows();
                if($recount>0){
			foreach ($result->result() as $row) {
                            if(Getqx('dance_'.$row->CS_ID,$CS_Quanx)==2 || $title=='新增'){
                               echo '<label><input type="checkbox" name="CS_Quanx[]" value="dance_'.$row->CS_ID.'" checked>'.$row->CS_Name.'</label>&nbsp;&nbsp;';
                            }else{
                               echo '<label><input type="checkbox" name="CS_Quanx[]" value="dance_'.$row->CS_ID.'">'.$row->CS_Name.'</label>&nbsp;&nbsp;';
                            }
                        }
                }
?>
</td></tr>
<tr><td align="right"><strong><font color=red>＊</font> 文章阅读权限：</strong></td><td>
<?php
                $sqlstr="select * from ".CS_SqlPrefix."class where CS_SID=2 order by CS_ID desc";
		$result=$this->CsdjDB->db->query($sqlstr);
		$recount=$result->num_rows();
                if($recount>0){
			foreach ($result->result() as $row) {
                            if(Getqx('news_'.$row->CS_ID,$CS_Quanx)==2 || $title=='新增'){
                               echo '<label><input type="checkbox" name="CS_Quanx[]" value="news_'.$row->CS_ID.'" checked>'.$row->CS_Name.'</label>&nbsp;&nbsp;';
                            }else{
                               echo '<label><input type="checkbox" name="CS_Quanx[]" value="news_'.$row->CS_ID.'">'.$row->CS_Name.'</label>&nbsp;&nbsp;';
                            }
                        }
                }
?>
</td></tr>
<tr><td align="right"><strong><font color=red>＊</font> 视频观看权限：</strong></td><td>
<?php
                $sqlstr="select * from ".CS_SqlPrefix."vlist order by CS_ID desc";
		$result=$this->CsdjDB->db->query($sqlstr);
		$recount=$result->num_rows();
                if($recount>0){
			foreach ($result->result() as $row) {
                            if(Getqx('vod_'.$row->CS_ID,$CS_Quanx)==2 || $title=='新增'){
                               echo '<label><input type="checkbox" name="CS_Quanx[]" value="vod_'.$row->CS_ID.'" checked>'.$row->CS_Name.'</label>&nbsp;&nbsp;';
                            }else{
                               echo '<label><input type="checkbox" name="CS_Quanx[]" value="vod_'.$row->CS_ID.'">'.$row->CS_Name.'</label>&nbsp;&nbsp;';
                            }
                        }
                }
?>
</td></tr>
<tr align="center"><td height="36" colspan="2"><input name="CS_ID" type="hidden" value="<?=$CS_ID?>">
<input type="submit" name="Submit" class="italk-bt" value=" <?=$title?> "> <INPUT TYPE=BUTTON class="italk-bt" value=" 返 回 " onclick="history.back();"></td></tr>
</table>
<?php
function Getqx($value,$perm){
  if(empty($perm)){
        return "1";
  }else{

	$permarr=explode(',',$perm);
	for($i=0;$i<count($permarr);$i++){
		if($permarr[$i]==$value){
			return "2";
			break;
		}
	}
  }
}
?>
</body>
</html>

