@extends('admin.layout')

@section('content')

<?php
    if(!isset($data)) $data = array();
    if(!$data && session("data")){
        $data = session("data");
    }
    if(!$data && session('_old_input')){
        $data = session("_old_input");
    }
?>
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>用户管理</h5>
					<div class="ibox-tools">
						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
						</a>
					</div>
				</div>
				<div class="ibox-content">
                    @if(role('User/Info/index'))
				    <div class="row">
    					<div class="col-sm-3 pull-right">
    					   <a href="{{ U('User/Info/index')}}" class="btn btn-sm btn-primary pull-right">返回列表</a>
    					</div>
					</div>
                    @endif

		            <div class="row">
                        <div class="col-lg-10">
                            <form name="form_product" id="form-validation" action="" class="form-horizontal form-validation" accept-charset="UTF-8" method="post">

                                    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">微信昵称</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_nickname" name="data[nickname]" class="form-control" value="{{ $data['nickname'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">微信openid</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_openid" name="data[openid]" class="form-control" value="{{ $data['openid'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">手机号</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_mobile" name="data[mobile]" class="form-control" value="{{ $data['mobile'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">用户头像</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_avatar" name="data[avatar]" class="form-control" value="{{ $data['avatar'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">最后一次登录时间</label>
                                    
                   <div class="col-sm-9">
  <input name="data[last_login_time]" class="form-control laydate-icon help-block m-b-none" style="width:200px; height:34px;" value="{{ $data['last_login_time'] or ''}}" placeholder="最后一次登录时间" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" aria-invalid="false"> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3"></label>
                                    
                   <div class="col-sm-9">
                     <input id="data_remember_token" name="data[remember_token]" class="form-control" value="{{ $data['remember_token'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>
                                
                                <div class="form-group">
                                    <label class="control-label col-sm-3">&nbsp;</label>
                                    <div class="col-sm-9">
                                        <input type="hidden" name="_referer" value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
                                        <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
                                        <input type="submit" class="btn btn-success" style="margin-right:20px;">
                                        <input type="reset" class="btn btn-default" >
                                    </div>
                                </div>
        
                            </form>
                        </div>
                        <!-- /.col-lg-10 -->
                    </div>
                    <!-- /.row -->
				</div>
			</div>
		</div>
	</div>

@endsection