⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lessondraflist.jsp

📁 培训考试系统代码
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ include file="/agt/public/jsp/top.jsp" %>


<%    Object sessionRs         =  session.getAttribute("LESSON_LIST_RES");
      SysResultSet turnOrderRs =  sessionRs == null ?null:(SysResultSet)sessionRs;
//获得授课方式可以通过数组来处理
       String[] statename ={"录入", "审查",
                           "审查不通过","审批","审批不通过","发布","取消"};
      String[] degreename ={"不紧急","紧急"};

%>
<%@ include file="/agt/public/jsp/Order.jsp"   %>
<!-- title>草稿箱列表页面 </title -->
   <form method="post" name="mdPolicyForm" action="/LessonOperatorAction.do">
 <%
     //获取查询条件,并传送到下一页面
      String searchSQL  =  (String)request.getAttribute("searchSQL");
      if( searchSQL    == null )
      {
         searchSQL      = request.getParameter("searchSQL");
      }
      String query      = "&searchSQL=" + searchSQL;
  %>
   <input type="hidden" name="searchSQL" value="<%=searchSQL%>">
  <input type="hidden" name="operatorFlag" >

  <table width="539" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
    <tr class="td-cs1">
      <td width="5%" align="center"  nowrap>&nbsp;</td>

      <td width="50%" align="center" nowrap> <a href="/agt/lessonmng/LessonDrafList.jsp?orderColum=1&orderFlag=<%=isOrderFlag%><%=query%>"  class="lnk-cs1">课程名称</a>
      </td>


      <td width="10%" align="center" nowrap> <a href="/agt/lessonmng/LessonDrafList.jsp?orderColum=2&orderFlag=<%=isOrderFlag%><%=query%>" class="lnk-cs1">紧急程度</a>
      </td>

      <td width="10%" align="center" nowrap> <a href="/agt/lessonmng/LessonDrafList.jsp?orderColum=6&orderFlag=<%=isOrderFlag%><%=query%>" class="lnk-cs1">状态</a>
      </td>

      <td width="20%" align="center" nowrap> <a href="/agt/lessonmng/LessonDrafList.jsp?orderColum=5&orderFlag=<%=isOrderFlag%><%=query%>" class="lnk-cs1">所属类别
        </a> </td>

     </tr>

       <%

            if( turnOrderRs != null && turnOrderRs.getMetaData().getRecordCount() != 0 )
            {
                //此处是用来显示结果
                for(int i=(pageNum-1)*pageRecoder; turnOrderRs.setRecord(i)&&(i<pageNum*pageRecoder); i++)
                {
        %>

    <tr class="td-cs2">
      <td>
        <input type="checkbox" name="lessonid" value="<%=turnOrderRs.getString("LESSONID") %>"></td>

      <td style="word-break:break-all"><a class="lnk-cs2" href="/LessonOperatorAction.do?operatorFlag=<%=OperatorFlagCode.LESSON_VIEW %>&lessonid=<%=turnOrderRs.getString("LESSONID") %>"><%=turnOrderRs.getString("TITLE") %></a></td>

      <td><%=degreename[turnOrderRs.getInt("DEGREE")] %></td>
      
      <td><%=statename[turnOrderRs.getInt("STATE")] %></td>

      <td><%=ClassInfo.get(turnOrderRs.getString("CLASSID")) %></td>

      
           </tr>
        <%
                 }
            }
        %>
   </table>


 <%if( turnOrderRs != null && turnOrderRs.getMetaData().getRecordCount() != 0 )
 {%>

  <table width="539" border="0" cellpadding="3" cellspacing="0" class="table-cs1">
    <tr>
      <td width="127"> <input type="checkbox" name="selectAll" onclick="selectDo();">
        全选 </td>
      <td> <table width="304" height="16" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                             <td width="102"><input name="submit" type="image" onclick="checkSubmit();return false;" src="/agt/public/images/submit.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'"></td>

                              <td width="101"><input name="edit" type="image" onclick="modifySubmit();return false;" src="/agt/public/images/edit.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'"></td>
                              <td width="101"><input name="del" type="image" onclick="deleteSubmit();return false;" src="/agt/public/images/del.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'"></td>
                                                         </tr>
                          </table></td>
    </tr>
  </table>
 <%}%>
   </form>

 <form method="post" name="changePageForm">
  <table width="539" height="25" border="0" cellpadding="0" cellspacing="1">
    <tr>

   <td>总共有<font color="#FF0000"><%=recordCount%></font>条记录,<font color="#FF0000"><%=maxPage%></font>页</td>
   <td>当前第<font color="#FF0000"><%=pageNum%></font>页</td>
   <td><%if(pageNum != 1) {%><a href="/agt/lessonmng/LessonDrafList.jsp?pageNum=1&orderFlag=<%=isOrderFlag%><%=query%>">首页 </a><%} else {%>首页 <%}%></td>
   <td><%if(pageNum != 1) {%><a href="/agt/lessonmng/LessonDrafList.jsp?pageNum=<%=frontPageNum%>&orderFlag=<%=isOrderFlag%><%=query%>">上一页 </a><%} else {%>上一页  <%}%></td>
   <td ><%if(pageNum < maxPage) {%><a href="/agt/lessonmng/LessonDrafList.jsp?pageNum=<%=backPageNum%>&orderFlag=<%=isOrderFlag%><%=query%>">下一页 </a><%} else {%> 下一页<%}%></td>
   <td><%if(pageNum < maxPage) {%><a href="/agt/lessonmng/LessonDrafList.jsp?pageNum=<%=maxPage%>&orderFlag=<%=isOrderFlag%><%=query%>">末页 </a><%} else {%>末页  <%}%></td>
<td>
<table width="113" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="44"> 跳转到 </td>
                      <td width="37">
<input name="pageNum" type="text" class="input1-2" size="3" onKeyPress="GoPageKeyPress();" <%if(maxPage < 2) { %> readonly <%}%>>
                      </td>
                      <td width="32">
<input name="go" type="image" onClick="changePageSubmit();return false;" <%if(maxPage < 2) { %> disabled <%}%> src="/agt/public/images/go.jpg" width="21" height="21" border="0" onMouseOver="this.src='/agt/public/images/'+ this.name + '_2.jpg';" onMouseOut="this.src='/agt/public/images/'+ this.name + '.jpg'"></td>
                    </tr>
                  </table>
    </td>

  </tr>
  </table>
</form>


 <script src="/agt/public/js/func.js" type="text/javascript"></script>
 <script src="/agt/public/js/scriptfuns.js" type="text/javascript"></script>
 <script  language="JavaScript">

  function changePageSubmit()
  {

    var pageNum = document.changePageForm.pageNum;

     if(pageNum==null || trim(pageNum.value)=="" || !isNumber(pageNum.value) )
     {
        alert("跳转到的页数参数输入有误,请重新输入。");
        pageNum.value = "";
        pageNum.focus();
        return;
     }

     var maxPage = <%=maxPage%>;  //Order.jsp文件中已计算出maxPage
     var goPageNum = parseInt(pageNum.value) ;
     var maxNum = parseInt(maxPage) ;

     if(goPageNum < 1 || goPageNum > maxNum)
     {

         alert("跳转到的页数参数输入范围不正确,请重新输入。");
         pageNum.value = "";
         pageNum.focus();
         return;
     }

     document.changePageForm.action="/agt/lessonmng/LessonDrafList.jsp?orderFlag=<%=isOrderFlag%><%=query%>";
     document.changePageForm.submit();
  }

  function selectDo()
  {

      var selectAll = document.mdPolicyForm.selectAll;
      var policyIds = document.mdPolicyForm.lessonid;
      if(policyIds == null)
      {

         return false;
      }
      if(selectAll.checked)
      {
          if( !policyIds.checked)
          {
              policyIds.checked = true;
          }
          for(var i=0; i<policyIds.length;i++)
          {
              policyIds[i].checked = true;
          }
      }
      else
      {
          for(var i=0; i<policyIds.length;i++)
          {
              policyIds[i].checked = false;
          }
          if( policyIds.checked)
          {
              policyIds.checked = false;
          }
      }

 }
 function modifySubmit()
  {
     var selectedCount = 0;
     var policyIds = document.mdPolicyForm.lessonid;

     if(policyIds == null)
     {
        return false;
     }

     for(var i=0; i<policyIds.length;i++)
     {
         if(policyIds[i].checked == true)
         {
             selectedCount = selectedCount + 1;
         }
     }
      if(selectedCount == 0 && !policyIds.checked)
     {
         alert("必须先选中一条课程记录") ;
         return false ;
     }
     if(selectedCount > 1)
     {
         alert("只能对一条课程记录修改") ;
         return false ;
     }

     document.mdPolicyForm.operatorFlag.value = "<%=OperatorFlagCode.LESSON_MOD%>";
     document.mdPolicyForm.submit();
  }

  function deleteSubmit()
  {
     var selectedCount = 0;
     var policyIds = document.mdPolicyForm.lessonid;

     if(policyIds == null)
     {
        return false;
     }
    // var alertinfo  ="";
     for(var i=0; i<policyIds.length;i++)
     {
         if(policyIds[i].checked)
         {
              selectedCount = selectedCount + 1;
         }
     }


     if(selectedCount == 0 && !policyIds.checked)
     {
         alert("删除课程必须选中课程!") ;
         return false ;
     }

     if( !window.confirm("是否真的删除课程,请确认"))
     {
          return false ;
     }


     document.mdPolicyForm.operatorFlag.value = "<%=OperatorFlagCode.LESSON_DELETE%>";
     document.mdPolicyForm.submit();
 }

 function checkSubmit()
 {
    var selectedCount = 0;
    var policyIds = document.mdPolicyForm.lessonid;

    if(policyIds == null)
    {
       return false;
    }

   // var alertinfo  ="";
    for(var i=0; i<policyIds.length;i++)
    {
        if(policyIds[i].checked)
        {
             selectedCount = selectedCount + 1;
        }
    }


    if(selectedCount == 0 && !policyIds.checked)
     {
         alert("审查课程必须选中课程!") ;
         return false ;
     }

    if( !window.confirm("是否提交审查,请确认"))
    {
         return false ;
    }

    document.mdPolicyForm.operatorFlag.value = "<%=OperatorFlagCode.LESSON_DRAFT%>";
    document.mdPolicyForm.submit();
 }

</script>
<%@ include file="/agt/public/jsp/bot.jsp" %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -