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

<div class="layui-form" style="margin-bottom: 15px;"><span style="font-size: 20px;"><?php echo $specialty->name; ?> - </span><span style="font-size: 16px;"><?php echo $course->name; ?></span></div>

<div style="float: right;">
<form class="layui-form" id="search_form" method="post" action="/lequesti/list/<?php echo $course->id; ?>">
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">题目名称</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_treeid" lay-filter="changecondition">
        <option value=""></option>
        <?php foreach($chapters as $onechapter){ ?>
        <option value="<?php echo $onechapter->id; ?>"<?php if($search["se_treeid"]==$onechapter->id){echo ' selected';} ?>><?php echo $onechapter->name; ?></option>
          <?php if(!empty($onechapter->sections)){ foreach($onechapter->sections as $onesection){ ?>
          <option value="<?php echo $onesection->id; ?>"<?php if($search["se_treeid"]==$onesection->id){echo ' selected';} ?>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $onesection->name; ?></option>
            <?php if(!empty($onesection->knowledges)){ foreach($onesection->knowledges as $oneknowled){ ?>
            <option value="<?php echo $oneknowled->id; ?>"<?php if($search["se_treeid"]==$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_typeid" lay-filter="changecondition">
        <option value=""></option>
        <?php foreach($questitypes as $oneqtype){ ?>
        <option value="<?php echo $oneqtype->id; ?>"<?php if($search["se_typeid"]==$oneqtype->id){echo ' selected';} ?>><?php echo $oneqtype->name; ?></option>
        <?php } ?>
        </select>
      </div>
    </div>
	<div class="layui-inline">
      <label class="layui-form-label">难度</label>
      <div class="layui-input-inline">
        <select name="se_levels" lay-filter="changecondition">
        <option value=""></option>
        <option value="1"<?php if($search["se_levels"]==1){echo ' selected';} ?>>简单</option>
		<option value="2"<?php if($search["se_levels"]==2){echo ' selected';} ?>>一般</option>
		<option value="3"<?php if($search["se_levels"]==3){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 class="layui-form">
<form id="list_form" method="post">
<table class="layui-table" lay-skin="line">
  <thead>
    <tr>
      <th>题目</th>
      <th>类型</th>
      <th>难度</th>
      <th>操作</th>
    </tr> 
  </thead>
  <tbody id="pagelistbox">
    
  </tbody>
</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_title" value="<?php echo $search["se_title"]; ?>">
  <input type="hidden" name="se_treeid" value="<?php echo $search["se_treeid"]; ?>">
  <input type="hidden" name="se_typeid" value="<?php echo $search["se_typeid"]; ?>">
  <input type="hidden" name="se_levels" value="<?php echo $search["se_levels"]; ?>">
</form>

<input type="hidden" id="specialid" value="<?php echo $specialty->id; ?>">
<input type="hidden" id="courseid" value="<?php echo $course->id; ?>">
<input type="hidden" id="listview" value="list">

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

<script src="/public/modules/lequesti/list/index.js"></script>