<style type="text/css">
.layui-form-item{margin-bottom: 0;}
</style>

<div class="layui-form">
<div style="float: left;"><a class="layui-btn" href="/gluser/basic/index"><i class="layui-icon layui-icon-add-circle"></i> 添加用户</a><a class="layui-btn" onclick="showUserImportBox();"><i class="fa fa-upload"></i> 批量导入</a></div>
<div style="float: right;">
<form class="layui-form" id="search_form" method="post" action="/gluser/default/index">
  <div class="layui-form-item">
	<div class="layui-inline">
      <label class="layui-form-label">角色</label>
      <div class="layui-input-inline">
        <select name="se_roleid" lay-filter="changecondition">
        <option value=""></option>
        <?php foreach($roles as $onerole){ ?>
			<option value="<?php echo $onerole->id; ?>"<?php if($search["se_roleid"]==$onerole->id){echo ' selected';} ?>><?php echo $onerole->name; ?></option>
		<?php } ?>
        </select>
      </div>
    </div>
	  <div class="layui-inline">
      <label class="layui-form-label">院系专业</label>
      <div class="layui-input-inline">
        <select name="se_specialid" lay-filter="changecondition">
          <option value=""></option>
			<?php foreach($colleges as $onechapter){ ?>
			<option value="<?php echo $onechapter->id; ?>"<?php if($search["se_specialid"]==$onechapter->id){echo ' selected';} ?>><?php echo $onechapter->name; ?></option>
			  <?php if(!empty($onechapter->children)){ foreach($onechapter->children as $onesection){ ?>
			  <option value="<?php echo $onesection->id; ?>"<?php if($search["se_specialid"]==$onesection->id){echo ' selected';} ?>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $onesection->name; ?></option>
			  <?php if(!empty($onesection->children)){ foreach($onesection->children as $oneknowled){ ?>
			  <option value="<?php echo $oneknowled->id; ?>"<?php if($search["se_specialid"]==$oneknowled->id){echo ' selected';} ?>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $oneknowled->name; ?></option>
			  <?php } } ?>
			<?php } } ?>
            <?php } ?>
        </select>
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">班级</label>
      <div class="layui-input-inline">
      <select name="se_xzclassid" lay-filter="changecondition">
      <option value=""></option>
      <?php 
        $html = '';
        foreach ($xzclasses as $oneclass) {
          $html .= '<option value="'. $oneclass->id .'"';
          if($search["se_xzclassid"]==$oneclass->id){
            $html .= ' selected';
          }
          $html .= '>'. $oneclass->name .'</option>';
        }
        echo $html;
      ?>
      </select>
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label" style="width:130px;">用户名/学号/姓名</label>
      <div class="layui-input-inline">
        <input type="text" class="layui-input" name="se_title" value="<?php echo $search["se_title"]; ?>">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">是否审核</label>
      <div class="layui-input-inline">
        <select name="se_isactive" lay-filter="changecondition">
        <option value=""></option>
        <option value="1"<?php if($search["se_isactive"]==1){echo ' selected';} ?>>已审核</option>
        <option value="2"<?php if($search["se_isactive"]==2){echo ' selected';} ?>>未审核</option>
        </select>
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">是否锁定</label>
      <div class="layui-input-inline">
        <select name="se_islocked" lay-filter="changecondition">
        <option value=""></option>
        <option value="2"<?php if($search["se_islocked"]==2){echo ' selected';} ?>>正常</option>
        <option value="1"<?php if($search["se_islocked"]==1){echo ' selected';} ?>>已锁定</option>
        </select>
      </div>
    </div>
    <div class="layui-inline">
    	<button class="layui-btn" lay-submit>搜索</button>
    </div>
  </div>
</form>
</div>
<div style="clear: both;"></div>
</div>

<div class="layui-form">
<form id="list_form" method="post">
<table class="layui-table" lay-skin="line">
  <thead>
    <tr>
      <th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose"></th>
      <th>用户名</th>
      <th>学号</th>
      <th>姓名</th>
      <th>角色</th>
      <th>院系专业</th>
      <th>注册时间</th>
      <th>是否审核</th>
      <th>是否锁定</th>
      <th>最近登录</th>
      <th>操作</th>
    </tr> 
  </thead>
  <tbody id="pagelistbox">
    
  </tbody>
  <tfoot>
  	<tr id="waitingtipsbox" style="display: none;"><td colspan="11" align="center"><i class="layui-icon layui-anim layui-anim-rotate layui-anim-loop">&#xe63d;</i> 努力加载中......</td></tr>
    <tr>
      <td><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose"></td>
      <td colspan="10"><button class="layui-btn" title="删除" id="delete_button">删除</button>
      <div class="layui-inline">
        <label class="layui-form-label">审核</label>
        <div class="layui-input-inline" style="width: 100px;">
          <select name="doisactive">
          <option value="1">通过</option>
          <option value="0">拒绝</option>
          </select>
        </div>
      </div>
      <div class="layui-inline">
        <button class="layui-btn layui-btn-sm" id="active_button">确定</button>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">锁定</label>
        <div class="layui-input-inline" style="width: 100px;">
          <select name="doislocked">
          <option value="1">锁定</option>
          <option value="0">解锁</option>
          </select>
        </div>
      </div>
      <div class="layui-inline">
        <button class="layui-btn layui-btn-sm" id="locked_button">确定</button>
      </div>
      </td>
    </tr> 
  </tfoot>
</table>
</form>
</div>

<div class="layui-form">
	<div id="pagelinkbox" style="text-align: right;"></div>
  <div style="clear: both;"></div>
</div>

<form id="gotopage_form" style="display: none;">
	<input type="hidden" name="curpage">
	<input type="hidden" name="rnum">
	<input type="hidden" name="listmore" value="yes">
	<input type="hidden" name="se_roleid" value="<?php echo $search["se_roleid"]; ?>">
	<input type="hidden" name="se_specialid" value="<?php echo $search["se_specialid"]; ?>">
  <input type="hidden" name="se_xzclassid" value="<?php echo $search["se_xzclassid"]; ?>">
	<input type="hidden" name="se_title" value="<?php echo $search["se_title"]; ?>">
	<input type="hidden" name="se_islocked" value="<?php echo $search["se_islocked"]; ?>">
  <input type="hidden" name="se_isactive" value="<?php echo $search["se_isactive"]; ?>">
</form>

<script type="text/javascript">
var allsize = <?php echo $pager->allsize; ?>;
var pagesize = <?php echo $pager->pagesize; ?>;
</script>

<script src="/public/modules/gluser/default/index.js"></script>