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

<script>
function initbody(){
		
}
function save(o1){
	var da = js.getformdata();
	if(!da.name){js.setmsg('名字不能为空');return;}
	if(!da.user){js.setmsg('用户名不能为空');return;}
	js.setmsg('保存中...');
	o1.disabled=true;
	js.ajax({
		type:'post',
		url:'?m=users&a=savecheck',
		data:da,
		success:function(res){
			if(res=='ok'){
				js.back();
			}else{
				js.setmsg(res);
				o1.disabled=false;
			}
		}
	});
}
</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="?m=users" 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:20px" align="center">
			
			<form name="myform">
			<input type="hidden" name="id" value="<?=$da['id']?>">
			<table width="500px">
			<tr>
				<td height="50" align="right">头像&nbsp;&nbsp;</td>
				<td>
				<img src="<?=$da['rs']['faceimg']?>" style="border-radius:50%" id="imgpcid" width="80px" height="80px"><br>
				<input style="width:250px" name="face" onblur="if(this.value)get('imgpcid').src=this.value" placeholder="请输入头像地址" class="input" value="<?=$da['rs']['face']?>">
				</td>
			</tr>
			<tr>
				<td height="50" align="right"><font color=red>*</font>名字&nbsp;&nbsp;</td>
				<td><input style="width:250px" name="name" class="input" value="<?=$da['rs']['name']?>"></td>
			</tr>
			<tr>
				<td height="50" align="right"><font color=red>*</font>用户名&nbsp;&nbsp;</td>
				<td><input style="width:250px" name="user" class="input" value="<?=$da['rs']['user']?>"></td>
			</tr>
			<tr>
				<td height="50" align="right">邮箱&nbsp;&nbsp;</td>
				<td><input style="width:250px" name="email" class="input" value="<?=$da['rs']['email']?>"></td>
			</tr>
			<tr>
				<td height="50" align="right">手机号&nbsp;&nbsp;</td>
				<td><input style="width:250px" name="mobile" class="input" value="<?=$da['rs']['mobile']?>"></td>
			</tr>
			<tr>
				<td height="50" align="right">类型&nbsp;&nbsp;</td>
				<td><select style="width:250px" name="type" class="input">
				<option value="0">普通用户</option>
				<option value="1" <?php if($da['rs']['type']=='1')echo 'selected';?>>管理员</option>
				<option value="2" <?php if($da['rs']['type']=='2')echo 'selected';?>>客服人员</option></select></td>
			</tr>
			<tr>
				<td height="50" align="right">登录密码&nbsp;&nbsp;</td>
				<td><input style="width:250px" name="pass" placeholder="不设置不修改，新增默认123456" class="input" value=""></td>
			</tr>
			<tr>
				<td height="50" align="right"></td>
				<td><button type="button" onClick="save(this)" style="padding:8px 20px;border-radius:5px" class="webbtn" >保存</button>&nbsp;<span id="msgview"><a href="javascript:;" onclick="js.back()">返回</a></span></td>
			</tr>
			</table>
			</form>
			
			
		</div>
	</div>
</div>



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

</body>
</html>