{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">
	<div class="text-l">
		用户等级,vip等级
	</div>
	<div class="cl pd-5 bg-1 bk-gray mt-20">
		<span class="l">
		<!-- <a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> -->
		<a class="btn btn-primary size-S radius" onclick="publish('添加','<?php echo url('admin/uservip/publish');?>','700','480')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加用户等级</a>
		</span>
		
	</div>
	<div class="mt-20">
		<table class="table table-border table-bordered table-hover table-bg">
			<thead>
				<tr class="text-c">
		          <th>ID</th>
		          <th>图标</th>
		          <th style='width:40%'>名称</th>
		          <th>级别</th>
		          <th>月费</th>
		          <th>年费</th>
		          <th>创建时间</th>
		          <th>操作</th>
		        </tr> 
			</thead>
			<tbody>
				{volist name="rows" id="vo"}
				<tr class="text-c">
					<td>{$vo.id}</td>
					<td><img src="{$vo.cover|get_url}" width="50px" height="50px" /></td>
					<td>{$vo.title}</td>
					<td>{$vo.sort}</td>
					<td>{$vo.month_fee}</td>
					<td>{$vo.year_fee}</td>
					<td><?php echo date('Y-m-d H:i',$vo['ctime']);?></td>
					<td class="f-14" >
						<?php if(-1!= $vo['id']){?>
			        	<a title="编辑" href="javascript:;" class='btn size-MINI' onclick="publish('编辑','<?php echo url('admin/uservip/publish',['id'=>$vo['id']]);?>','700','480')" style="text-decoration:none">编辑</a>
						<a title="删除" href="javascript:;" class='btn size-MINI' onclick="del(this,'<?php echo $vo['id'];?>')" >删除</a>
						<?php }?>
			        </td>
		        </tr>
				{/volist}

			</tbody>
		</table>
	</div>
</div>
{include file='public/footer'}

<!--请在下方写此页面业务相关的脚本-->

<script type="text/javascript" src="__LIB__/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript">
/*系统-栏目-删除*/
function del(obj,id){
	layer.confirm('确认要删除吗？',function(index){
		$.post(
			"<?php echo url('admin/uservip/delete');?>",
			{"id":id},
			function(data){
				layer.msg(data.msg,{icon:1,time:1000});
				if(0==data.error){
					$(obj).parents("tr").remove();
				}
			},'json'
		)
	});
}
</script>
</body>
</html>