<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
  		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
                <title><!--{$config.system_title}--><!--{if $config.is_code !='1'}-->-<!--{$copyright_header}--><!--{/if}--></title>
                <meta name="description" content="<!--{$config.system_desc}-->" />
                <meta name="keywords" content="<!--{$config.system_keyword}-->" />
		<link rel="stylesheet" type="text/css" href="<!--{$salepath}-->/static/layui/css/layui.css"/>
		<link rel="stylesheet" type="text/css" href="<!--{$salepath}-->/static/css/admin.css"/>
	</head>
	<body>
		<form class="layui-form column-content-detail">
					<div class="layui-tab">
						<div class="layui-tab-content">
							<div class="layui-tab-item layui-show">
 								<div class="layui-form-item">
									<label class="layui-form-label">登录帐号：</label>
									<div class="layui-input-block">
										<input type="text" name="" readonly="readonly"  autocomplete="off" class="layui-input" value="<!--{$admin.adminname}-->">
									</div>
								</div>                                                           
								<div class="layui-form-item">
									<label class="layui-form-label">登录密码：</label>
									<div class="layui-input-block">
										<input type="text" name="password"    autocomplete="off" class="layui-input" value="">(不修改请留空)
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">确认密码：</label>
									<div class="layui-input-block">
										<input type="text" name="confirmpassword"   autocomplete="off" class="layui-input" value="">(不修改请留空)
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">帐号设置：</label>
									<div class="layui-input-block">
										<input type="radio" title="正常" name="flag" value="1"<!--{if $admin.flag==1}--> checked<!--{/if}--> />
										<input type="radio" title="锁定" name="flag" value="0"<!--{if $admin.flag==0}--> checked<!--{/if}--> />
										
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">分配角色：</label>
									<div class="layui-input-block">
										<select class="small form-control" id="group" name="groupid" style="width: 163px;">
                                              <option value="0">超级管理员</option>
                                             <!--{foreach $group as $vo}-->
                                               
													<option value="<!--{$vo.groupid}-->" <!--{if $admin.groupid==$vo.groupid}--> selected<!--{/if}-->><!--{$vo.groupname}--></option>
											 <!--{/foreach}-->
								                                        
											</select>
										<!-- <input type="text" name="" required lay-verify="required"  autocomplete="off" class="layui-input" value="<!--{$purchase.add_time|date_format:"%Y-%m-%d %H:%M"}-->"> -->
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">备注说明：</label>
									<div class="layui-input-block">
										<input type="text" name="memo" autocomplete="off" class="layui-input" value="<!--{$admin.memo}-->">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">登录次数：</label>
									<div class="layui-input-block">
										<input type="text" name="" readonly="readonly"  autocomplete="off" class="layui-input" value="<!--{$admin.logintimes}-->">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">登录时间：</label>
									<div class="layui-input-block">
										<input type="text" name="" readonly="readonly" autocomplete="off" class="layui-input" value="<!--{$admin.logintimeline|date_format:"%Y-%m-%d %H:%M:%S"}-->">
									</div>
								</div>
								<input type="hidden" name="id" value="<!--{$id}-->">
							</div>
						</div>
					</div>
					<div class="layui-form-item" style="padding-left: 10px;">
						<div class="layui-input-block">
							<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">更新保存</button>&nbsp;&nbsp;&nbsp;
							<a href="javascript:history.back(-1)"><button type="button" class="layui-btn layui-btn-primary">返回</button></a>
						</div>
					</div>
				</form>
	
		
		<script src="<!--{$salepath}-->static/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="<!--{$salepath}-->static/js/common.js" type="text/javascript" charset="utf-8"></script>
        <script src="<!--{$salepath}-->static/js/jquery-3.2.1.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
  			layui.use(['form', 'layedit', 'laydate'], function() {
				var form = layui.form(),
					layer = layui.layer;
				form.on('submit(formDemo)', function(data) {
			        $.ajax({
			            type: 'POST',
			            url:"sale.php?c=Admin&a=saveedit",
			            async:true,
			            data:data.field,
			            dataType : "json",
			            success:function(data){
	                        layer.msg(data.msg);
			                if(data.code=='1'){
		                        setTimeout(function(){
	                                parent.location.reload(true);
	                                layer.closeAll();
		                        }, 1500);
			                }
			                return false;
			            },
			            error:function(e){
		                    return false;
			            }
			        });
			                              
					return false;
				});

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