{include file='public/meta'}
<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 btn-refresh" 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">
	<!--search -->
	<form  method='get'  action="<?php echo $search_url;?>"  > 
		<div class="text-c">
			<input type="text" class="input-text" style="width:250px" placeholder="关键字" name="keywords" value="<?php echo $keywords;?>">
			<button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
		</div>
	</form>

	<!-- end search -->
	<div class="cl pd-5 bg-1 bk-gray mt-20">
		<span class="l">
			<a class="btn btn-primary size-S radius" href="javascript:;" onclick="publish('增加用户','<?php echo url('admin/user/add');?>','700','480')">添加</a>
			<a class="btn btn-primary size-S radius" href="javascript:;" onclick="lock()">锁定</a>
			<a class="btn btn-primary size-S radius" href="javascript:;" onclick="unlock()">解锁</a>
			<a class="btn btn-primary size-S radius" href="javascript:;" >信息</a>
		</span>
		
	</div>
	<div class="mt-20">
		<table class="table table-border table-bordered table-hover table-bg">
			<thead>
				<tr class="text-c">
					<th width="25"><input type="checkbox" class='checkbox' ></th>
					<th>ID</th>
			        <th>用户名</th>
			        <th>手机号</th>
			        <th>用户组</th>
			        <th>时间</th>
			        <th>操作</th>
				</tr>
			</thead>
			<tbody>
				 {volist name="rows" id="vo"}
				<tr class="text-c">
					<td><input type="checkbox" value="<?php echo $vo['id'];?>" name="ids"></td>
			        <td><?php echo $vo['uid'];?></td>
			        <td><?php echo $vo['uname'];?></td>
			        <td><?php echo $vo['phone'];?></td>
			        <td><?php echo $vo['group_name'];?></td>
			        <td><?php echo $vo['ctime']>0 ? date('Y-m-d',$vo['ctime']):'';?></td>
					<td class="f-14" >
			        	<a title="编辑" onclick="publish('增加用户','<?php echo url('admin/user/edit',['uid'=>$vo['uid']]);?>','700','480')" href="javascript:;" class='btn size-MINI' >编辑</a>
			        	<?php if($vo['uid']>1){?>
			        	<a title="删除" href="javascript:;" onclick="del(this,'<?php echo $vo['uid'];?>')" class='btn size-MINI' >删除</a>
			        	<?php }?>
			        </td>
				</tr>
				{/volist}
			</tbody>
		</table>
		<div><?php echo $rows->render();?></div>
	</div>
</div>
{include file='public/footer'}

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__LIB__/laydate/laydate.js"></script>
<script type="text/javascript" src="__LIB__/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript">
/*系统-栏目-删除*/
function del(obj,uid){
	layer.confirm('确认要删除吗？',function(index){
		$.post(
			"<?php echo url('admin/user/delete');?>",
			{"uid":uid},
			function(data){
				layer.msg(data.msg,{icon:1,time:1000});
				if(0==data.error){
					$(obj).parents("tr").remove();
				}
			},'json'
		)
	});
}

$('.preview').on('click',function(){
    var url = $(this).attr('url');
    console.log(url);
    var index = layer.open({
		type: 2,
		title: '课件预览',
		area:['750px','600px'],
		content: url
	});
	//layer.full(index);   //全屏
})


</script>
</body>
</html>

  <?php if(1==$need_syn){?>
  <script type="text/javascript">
      setTimeout(function(){
        //location.reload();
      },10000)
  </script>
  <?php }?>