<include file="Public:header"/>
<body class="fixed-left">
	<!-- Begin page -->
	<div id="wrapper">
		
        <!-- Top Bar Start -->
        <include file="Public:nav"/>
        <!-- Top Bar End -->
        		
        <!-- Left Sidebar Start -->
        <include file="Public:menu"/>
        <!-- Left Sidebar End -->

        <!-- Start right content -->
        <div class="content-page">
			<ol class="breadcrumb">
				<li><a style="curor:pointer;"  href='{:U('Index/index')}'>首页</a></li>
				<li><a href="#">{:parent_name($action_name)}</a></li>
				<li><a href="#">{:category_name($action_name)}</a></li>
			</ol>
            <div class="content">
				<!-- 列表start -->
				<div class="widget">
		            <div class="table-responsive">
		                <table data-sortable class="table table-hover table-striped">
		                    <thead>
		                    <tr>
		                        <th>ID</th>
		                        <th>用户名</th>
		                        <th>操作</th>
		                    </tr>
		                    </thead>
		                    <tbody>
		                    <volist name="list" id="vo">
		                        <tr>
		                            <td>{$vo.id}</td>
		                            <td>{$vo.username}</td>
		                            <td>
		                                <div class="btn-group btn-group-xs">
		                                    <?php if(session('role')==1){?>
		                                    <a data-toggle="tooltip" href='javascript:void(0)' id='<?php echo $vo['id'];?>' title="删除" class="btn btn-default btn_delete"><span class="glyphicon glyphicon-remove"></span></a>
		                                    <?php }?>
		                                </div>
		                            </td>
		                        </tr>
		                    </volist>
		                    </tbody>
		                </table>
		            </div>
		        </div>
		        <div class="data-table-toolbar">
		            <div class='list-page'>
		                <div>{$page}</div>
		            </div>
		        </div>
				<!-- 列表end -->
	            <include file="Public:copyright"/>
	        </div>
	    </div>
	</div>
<include file="Public:footer"/>
<script type="text/javascript">
<!--
var resizefunc = [];
	$(function(){
		$('.datepicker-input').datepicker({
	        format: 'yyyy-mm-dd',
		})

        $(".btn_delete").click(function(){
            var uid = $(this).attr('id');
            obj = $(this);
            if(confirm('确定删除记录？')) {
                $.post("/Admin/Auth/Userdelete/", 
                	{uid:uid},
                    function(data) {
                        if(data==-1){
                            notify('error','top center','没有权限');
                        }else{
                            notify('success','top center','删除成功');
                            obj.parent().parent().parent().remove();

                        }
                    });
            }
        })
	})
//-->
</script>
</body>
</html>