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

📄 lessonalllist.jsp

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


<%    Object sessionRs         =  session.getAttribute("LESSON_SEARCHALL_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 + "&byClass=" + byClass + "&operatorFlag=" + (String)request.getParameter("operatorFlag")
                 + "&studyType=" + request.getParameter("studyType");

      boolean studyFlag = false;
      if( (OperatorFlagCode.LESSON_LISTTYPE_STUDY).equalsIgnoreCase(request.getParameter("operatorFlag"))
          || ("1").equalsIgnoreCase(request.getParameter("studyType")))
      {
          studyFlag = true;
      }
      
      int tableWidth = 539;
      if("1".equalsIgnoreCase(byClass))
      {
         tableWidth = 500;
      }

  %>
    <input type="hidden" name="searchSQL" value="<%=searchSQL%>">
    <input type="hidden" name="operatorFlag" >
    <input type="hidden" name="state" value="5" >
     <input type="hidden" name="byClass" value="<%=byClass %>" >


  <input type="hidden" name="classIdTerm" value="<%=request.getParameter("classIdTerm")%>" >
                    <table width="<%=tableWidth%>" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
                      <tr class="td-cs1">
      <%if(studyFlag == false)
      {
      %>
      <td width="5%" align="center">&nbsp;</td>
     <%}%>
      <td width="45%" align="center">
        <a class="lnk-cs1" href="/agt/lessonmng/LessonAllList.jsp?classIdTerm=<%=request.getParameter("classIdTerm")%>&orderColum=1&orderFlag=<%=isOrderFlag%><%=query%>">课程名称</a>
      </td>
      <td width="15%" align="center" nowrap> <a class="lnk-cs1" href="/agt/lessonmng/LessonAllList.jsp?classIdTerm=<%=request.getParameter("classIdTerm")%>&orderColum=2&orderFlag=<%=isOrderFlag%><%=query%>">紧急程度</a>
      </td>
      <td width="15%" align="center" nowrap> <a class="lnk-cs1" href="/agt/lessonmng/LessonAllList.jsp?classIdTerm=<%=request.getParameter("classIdTerm")%>&orderColum=4&orderFlag=<%=isOrderFlag%><%=query%>">结束日期</a>
      </td>
      <td width="20%" align="center" nowrap> <a class="lnk-cs1" href="/agt/lessonmng/LessonAllList.jsp?classIdTerm=<%=request.getParameter("classIdTerm")%>&orderColum=5&orderFlag=<%=isOrderFlag%><%=query%>">所属类别
        </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(studyFlag == false)
     {%>
      <td> <input type="checkbox" name="lessonid" value="<%=turnOrderRs.getString("LESSONID") %>"></td>
     <%}%>
                        <td align="center" style="word-break:break-all"><a class="lnk-cs2" href="/LessonOperatorAction.do?operatorFlag=<%=OperatorFlagCode.LESSON_VIEW %>&lessonid=<%=turnOrderRs.getString("LESSONID") %>&byClass=<%= byClass %>"><%=turnOrderRs.getString("TITLE") %></a></td>
                        <td align="center"><%=degreename[turnOrderRs.getInt("DEGREE")]%></td>
                        <td align="center"><%=turnOrderRs.getString("ENDTIME") %></td>
                        <td align="center"><%=ClassInfo.get(turnOrderRs.getString("CLASSID")) %></td>
    </tr>
    <%
                 }
            }
        %>
  </table>
<%if(studyFlag == false)
{
 if( turnOrderRs != null && turnOrderRs.getMetaData().getRecordCount() != 0 && !("1".equalsIgnoreCase(request.getParameter("studyType"))))
 {%>
                    <table width="<%=tableWidth%>" border="0" cellpadding="3" cellspacing="1">
                      <tr>
                        <td width="105">
                          <input type="checkbox" name="selectAll" onclick="selectDo();"> 全选 </td>

                        <td width="84">
                          <input name="cancel" type="image" onclick="cancleSubmit();return false;" src="/agt/public/images/cancel.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="328">
                          <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>
      
   </table>
 <%}
 }%>
   </form>

       <form method="post" name="changePageForm">
                    <table width="<%=tableWidth%>" 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/LessonAllList.jsp?pageNum=1&orderFlag=<%=isOrderFlag%><%=query%>">首页
        </a>
        <%} else {%>
        首页
        <%}%></td>
      <td><%if(pageNum != 1) {%>
        <a href="/agt/lessonmng/LessonAllList.jsp?pageNum=<%=frontPageNum%>&orderFlag=<%=isOrderFlag%><%=query%>">上一页
        </a>
        <%} else {%>
        上一页
        <%}%></td>
      <td ><%if(pageNum < maxPage) {%>
        <a href="/agt/lessonmng/LessonAllList.jsp?pageNum=<%=backPageNum%>&orderFlag=<%=isOrderFlag%><%=query%>">下一页
        </a>
        <%} else {%>
        下一页
        <%}%></td>
      <td><%if(pageNum < maxPage) {%>
        <a href="/agt/lessonmng/LessonAllList.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/LessonAllList.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 cancleSubmit()
 {
    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_CANCEL%>";
    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 + -