<?php 
$this->display(tpl('head')); 
?>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  	<legend>添加用户</legend>
</fieldset>
<style>
	.layui-form-select{
		width: 30%;
	}
</style>
<form class="layui-form" method="post" action="/admin/user/add">
	
	<table class="layui-table my-tabel">
		<tr>
			<td>所属用户组</td>
			<td>
				<?php
				foreach(C('USER_GROUP') AS $key=>$row){
						$checked="";
						if($key===2){
							$checked="checked";
						}
				?>
				<input name="groupid" value="<?php echo $key ?>" title="<?php echo $row[name] ?>" type="radio" $checked>
				<?php } ?>
			</td>
		</tr>
		<tr>
			<td>用户名</td>
			<td><input name="username" class="layui-input my-input" placeholder="用户名" type="text" value="<?php echo $edit[username] ?>"></td>
		</tr>
		<tr>
			<td>密码</td>
			<td><input name="password" class="layui-input my-input" placeholder="密码" type="password" value="<?php echo $edit[password] ?>"></td>
		</tr>
		<tr>
			<td>邮箱</td>
			<td><input name="email" class="layui-input my-input"  placeholder="邮箱" type="text" value="<?php echo $edit[email] ?>"></td>
		</tr>
		<tr>
			<td>手机号码</td>
			<td><input name="mobile" class="layui-input my-input" placeholder="手机号码" type="text" value="<?php echo $edit[mobile] ?>"></td>
		</tr>
		<tr>
			<td colspan="2" class="my_button">
				<input type="hidden" name="step" id="step" value="post" />
				<button class="layui-btn" lay-submit="" lay-filter="post">立即提交</button>
			</td>
			
		</tr>
	</table>
</form>
<script>
		layui.use(['form'], function(){
				var form=layer.form;
		})
</script>

<?php 
$this->display(tpl('foot')); 
?>
