<?php 
include_once(''.P.'/public/header.html');
?>

<script type="text/javascript" src="res/bootstrapplugin/jquery-bootstable.js"></script>
<script type="text/javascript" src="res/menu/jquery-rockmenu.js"></script>
<link rel="stylesheet" type="text/css" href="res/menu/jquery-rockmenu.css">


<script>

function initbody(){
	
	table = $('#viewshow').bootstable({
		url:'index.php?m=users&a=data',method:'get',celleditor:true,tablename:'1',
		cellurl:'index.php',fanye:true,cellurl:'index.php?m=agent&a=savecell',
		columns:[{
			text:'头像',dataIndex:'face',renderer:function(v){
				if(!v)v='images/noface.png';
				v='<img src="'+v+'" width="30">';
				return v;
			}
		},{
			text:'名称',dataIndex:'name'
		},{
			text:'用户名',dataIndex:'user'
		},{
			text:'手机号',dataIndex:'mobile'
		},{
			text:'邮箱',dataIndex:'email'
		},{
			text:'类型',dataIndex:'type',sortable:true,renderer:function(v){
				if(v=='0')v='普通用户';
				if(v=='1')v='管理员';
				if(v=='2')v='客服人员';
				return v;
			}
		},{
			text:'职位',dataIndex:'ranking',editor:true
		},{
			text:'状态',dataIndex:'status',sortable:true,type:'checkbox',editor:true
		},{
			text:'排序号',dataIndex:'sort',sortable:true,type:'number',editor:true
		},{
			text:'ID',dataIndex:'id'
		},{
			text:'微信状态',dataIndex:'wxstatus',renderer:function(v){
				if(v=='0')v='<font color=gray>未激活</font>';
				if(v=='1')v='<font color=green>已激活</font>';
				return v;
			}
		},{
			text:'',dataIndex:'opts',renderer:function(s,d){
				var str = '<a class="zhu" href="?m=users&a=form&id='+d.id+'">编辑</a>&nbsp;';
				if(d.id!=adminid)str+='<a class="zhu" href="javascript:;" onclick="deleterecord('+d.id+',1,false)">删</a>';
				return str;
			}
		}]
		
		
	});
}
</script>
</head>

<body style="background:#f1f1f1">

<?php 
include_once(''.P.'/public/top.html');
?>

<div align="center">

<div style="width:<?=$maxwidth?>;margin:20px 0px" align="left">
	<div style="color:#cccccc">
		<a href="?m=index" class="zhu">平台首页</a> &gt;
		<a href="" class="zhu">人员管理</a>
	</div>
	<div style="background-color:white;margin:20px 0px;border:1px #eeeeee solid;min-height:500px;border-radius:5px">
		<div style="padding:10px">
			<div style="padding:5px 0px"><a class="webbtn" style="border-radius:5px" href="?m=users&a=form&id=0">新增</a></div>
			<div class="blank10"></div>
			<div id="viewshow"></div>
		</div>
	</div>
</div>



<?php 
include_once(''.P.'/public/footer.html');
?>
</div>

</body>
</html>