<?php include $this->admin_tpl('meta', 'admin');?>
<title>审核列表 - YzmCMS内容管理系统</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 会员管理 <span class="c-gray en">&gt;</span> 审核列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
  <div class="cl pd-5 bg-1 bk-gray"> <span class="l">
  <a href="javascript:;" onclick="adopt()" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe6a7;</i> 通过审核</a>
  <a href="javascript:;" onclick="yzm_dels('ids')" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> 
  </span> <span class="r">共有数据：<strong><?php echo $total?></strong> 条</span> </div>
  <form method="post" action="<?php echo U('del');?>" id="myform">
  <table class="table table-border table-bordered table-bg table-hover yzm-table-sort">
    <thead>
      <tr class="text-c">
        <th width="30"><input type="checkbox"></th>
		<th>用户ID<?php echo field_order('userid');?></th>
		<th class="text-l">用户名<?php echo field_order('username');?></th>
		<th class="text-l">邮箱<?php echo field_order('email');?></th>
		<th>用户组<?php echo field_order('groupid');?></th>
		<th>注册IP<?php echo field_order('regip');?></th>
		<th>注册时间<?php echo field_order('regdate');?></th>
		<th>审核</th>
      </tr>
    </thead>
    <tbody>
		<?php 
		foreach($data as $val){
		?>
		  <tr class="text-c">
			<td><input type="checkbox" value="<?php echo $val['userid']?>" name="ids[]"></td>
			<td><?php echo $val['userid']?></td>
			<td class="text-l"><a href="<?php echo U('edit',array('userid'=>$val['userid']));?>"><?php if($val['status'] == 2) echo '<img src="'.STATIC_URL.'images/icon_padlock.gif" title="用户已锁定">';echo $val['username'];?></a></td>
			<td class="text-l"><?php echo $val['email_status'] ? $val['email'].' <span class="green" title="已验证">[验]</span>' : $val['email'];?></td>
			<td><?php echo get_groupname($val['groupid']);?></td>
			<td><?php echo $val['regip']?></td>
			<td><?php echo date("Y-m-d H:i:s",$val['regdate'])?></td>
			<td>
				<?php if($val['status']){ ?>
				<span class="yzm-status-enable" data-field="status" data-id="<?php echo $val['userid']?>" onclick="yzm_change_status(this,'<?php echo U('adopt');?>')"><i class="yzm-iconfont">&#xe81f;</i>是</span>
				<?php }else{ ?>
				<span class="yzm-status-disable" data-field="status" data-id="<?php echo $val['userid']?>" onclick="yzm_change_status(this,'<?php echo U('adopt');?>')"><i class="yzm-iconfont">&#xe601;</i>否</span>
				<?php } ?>
			</td>
		  </tr>		
		<?php 
		}
		?>
    </tbody>
  </table>
  <?php if(!$data){ ?><div class="yzm_no_data"><i class="Hui-iconfont">&#xe6e0;</i> 暂无数据</div><?php } ?>
  </form>
  <div id="page"><span class="page_left">共<?php echo $total?>条记录，共<?php echo $page->total()?>页，当前显示第<?php echo $page->getpage()?>页</span>
  <span class="page_right"><?php echo $page->getfull();?></span></div>
</div>
<?php include $this->admin_tpl('footer', 'admin');?>
<script type="text/javascript" src="<?php echo STATIC_URL;?>plugin/laydate/1.1/laydate.js"></script>
<script type="text/javascript">


//通过审核
function adopt(){
	if ($("input[name='ids[]']:checked").length<1){
	   layer.alert('请勾选信息！');
	   return false;
	}	
	document.getElementById('myform').action='<?php echo U('adopt');?>';
	document.getElementById('myform').submit();
}
</script>

</body>
</html>