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

📄 lessonlist.jsp

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

<%    Object sessionRs         =  session.getAttribute("LESSON_SEARCH_RES");
      SysResultSet turnOrderRs =  sessionRs == null ?null:(SysResultSet)sessionRs;
      String[] modename ={"集中授课考核", "集中授课不考核",
                           "交流","自修考核","自修不考核","其它"};
      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 + "&studyType=" + request.getParameter("studyType") + "&byClass=" + byClass + "&operatorFlag=" +  request.getParameter("operatorFlag");
  %>
   <input type="hidden" name="searchSQL" value="<%=searchSQL%>">
  <input type="hidden" name="operatorFlag" >
   <input type="hidden" name="byClass" value="<%=byClass %>" >

  <table width="539" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
    <tr class="td-cs1">
  <%if(!("1".equalsIgnoreCase(request.getParameter("studyType")) || (OperatorFlagCode.LESSON_LISTTYPE_STUDY).equalsIgnoreCase(request.getParameter("operatorFlag"))) )
 { %>
      <td width="5%" align="center"  nowrap>&nbsp;</td>
 <%}%>
      <td width="15%" align="center" nowrap> <a href="/agt/lessonmng/LessonList.jsp?orderColum=1&orderFlag=<%=isOrderFlag%><%=query%>"  class="lnk-cs1">课程名称</a>
      </td>

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

      <td width="10%" align="center" nowrap> <a href="/agt/lessonmng/LessonList.jsp?orderColum=3&orderFlag=<%=isOrderFlag%><%=query%>" class="lnk-cs1">授课方式</a>
      </td>

      <td width="40%" align="center" nowrap> <a href="/agt/lessonmng/LessonList.jsp?orderColum=4&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">
     <%if(!("1".equalsIgnoreCase(request.getParameter("studyType")) || (OperatorFlagCode.LESSON_LISTTYPE_STUDY).equalsIgnoreCase(request.getParameter("operatorFlag"))))
     {   %>
      <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><%=modename[turnOrderRs.getInt("LESSONMODE")]%></td>

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

 <%if(!("1".equalsIgnoreCase(request.getParameter("studyType")) || (OperatorFlagCode.LESSON_LISTTYPE_STUDY).equalsIgnoreCase(request.getParameter("operatorFlag"))))
 {
 if( turnOrderRs != null && turnOrderRs.getMetaData().getRecordCount() != 0 )
 {%>
     <table width="539" border="0" cellpadding="3" cellspacing="0" class="table-cs1">
      <tr>
         <td width="116"><input type="checkbox" name="selectAll" onclick="selectDo();"> 全选 </td>
         <td width="96"><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="309">
                          <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>
 <%}
 }%>
   </form>

       <form method="post" name="changePageForm">
<table width="539" border="0" cellpadding="1" 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/LessonList.jsp?pageNum=1&orderFlag=<%=isOrderFlag%><%=query%>">首页 </a><%} else {%>首页 <%}%></td>
   <td><%if(pageNum != 1) {%><a href="/agt/lessonmng/LessonList.jsp?pageNum=<%=frontPageNum%>&orderFlag=<%=isOrderFlag%><%=query%>">上一页 </a><%} else {%>上一页  <%}%></td>
   <td ><%if(pageNum < maxPage) {%><a href="/agt/lessonmng/LessonList.jsp?pageNum=<%=backPageNum%>&orderFlag=<%=isOrderFlag%><%=query%>">下一页 </a><%} else {%> 下一页<%}%></td>
   <td><%if(pageNum < maxPage) {%><a href="/agt/lessonmng/LessonList.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/LessonList.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();
 }
</script>
<%@ include file="/agt/public/jsp/bot.jsp" %>

⌨️ 快捷键说明

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