<link rel="stylesheet" type="text/css" href="/plugins/plupload/css/style.css">
<script type="text/javascript" src="/plugins/plupload/js/plupload.min.js"></script>

<div class="layui-form" style="margin-top: 15px; padding-right: 15px;">
<form id="detail_form" method="post">
  <div class="layui-form-item">
    <label class="layui-form-label">用户名</label>
    <div class="layui-input-inline" style="width: 40%;">
      <input type="text" name="username" placeholder="请输入" class="layui-input" value="<?php echo $user->username; ?>" readonly style="border: none;">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">姓名</label>
    <div class="layui-input-inline" style="width: 40%;">
      <input type="text" name="realname" placeholder="请输入" class="layui-input" value="<?php echo $user->realname; ?>">
    </div>
    <div class="layui-form-mid layui-word-aux">长度2-20个字符，允许中文、字母、数字、下划线</div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">学号/工号</label>
    <div class="layui-input-inline" style="width: 40%;">
      <input type="text" name="stdnumber" placeholder="请输入" class="layui-input" value="<?php echo $user->stdnumber; ?>" readonly style="border: none;">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">头像</label>
    <div class="layui-input-block">
      <div id="filelist">您的浏览器不支持 Flash, Silverlight 或者 HTML5，请升级浏览器</div>
      <div id="uploadcontainer">
          <a id="pickfiles" href="javascript:;" class='layui-btn layui-btn-primary'><i class="layui-icon layui-icon-add-circle"></i>  选择文件</a> 
          <a id="uploadfiles" href="javascript:;" class='layui-btn' style="display: none;">开始上传</a>
          <span id="logopreview"><?php if(!empty($user->logo)){ ?><img src="<?php echo $user->logo; ?>" style="width: 40px; height: 40px; border-radius: 50%;"><?php } ?></span>
      </div>
      <pre id="console" style="display: none;"></pre>
      <input type="hidden" name="logo" value="<?php echo $user->logo; ?>">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">性别</label>
    <div class="layui-input-block">
      <input type="radio" name="male" value="1" title="男"<?php if($user->male==1){echo ' checked';} ?>>
      <input type="radio" name="male" value="2" title="女"<?php if($user->male==2){echo ' checked';} ?>>
      <input type="radio" name="male" value="0" title="保密"<?php if(empty($user->male)){echo ' checked';} ?>>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">手机</label>
    <div class="layui-input-inline" style="width: 40%;">
      <input type="text" name="cellphone" placeholder="请输入" class="layui-input" value="<?php echo $user->cellphone; ?>">
    </div>
    <div class="layui-form-mid layui-word-aux"></div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">邮箱</label>
    <div class="layui-input-inline" style="width: 40%;">
      <input type="text" name="email" placeholder="请输入" class="layui-input" value="<?php echo $user->email; ?>">
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button type="button" class="layui-btn" id="finished_button">提交</button>
      <button type="button" class="layui-btn layui-btn-primary" onclick="javascript:window.history.back();">取消</button>
    </div>
  </div>

</form>
</div>

<script src="/public/modules/user/profile/index.js"></script>