selecttest.jsp

来自「培训考试系统代码」· JSP 代码 · 共 571 行 · 第 1/2 页

JSP
571
字号
<%@ page language = "java" contentType="text/html;charset=gb2312"%>
<%@ page import = "com.huawei.icd30.common.db.*"%>
<%@ page import = "com.huawei.icd30.agt.util.*" %>
<%@ page import = "java.util.*" %>
<%    Object sessionRs         =  session.getAttribute("TEST-QUERYSELECT-RESULTSET");
      SysResultSet turnOrderRs =  sessionRs == null ?null:(SysResultSet)sessionRs;
%>
<%@ include file="/agt/public/jsp/Order.jsp"   %>
<!-- title>业务代表管理系统添加试题</title -->
<html>
<head>
<link href="/agt/public/css/gb.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<STYLE type=text/css>BODY {
	SCROLLBAR-FACE-COLOR: #d6efff; SCROLLBAR-HIGHLIGHT-COLOR: #9E9E9E; SCROLLBAR-SHADOW-COLOR: #9E9E9E; SCROLLBAR-3DLIGHT-COLOR: #ffffff; SCROLLBAR-ARROW-COLOR: #666666; SCROLLBAR-TRACK-COLOR: #d6efff; SCROLLBAR-DARKSHADOW-COLOR: #ffffff}
</STYLE>
<script>
function MM_preloadImages()
{ //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}


function MM_reloadPage(init)
{  //reloads the window if Nav4 resized

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}



MM_reloadPage(true);

function MM_showHideLayers()
{ //v3.0

  var i,p,v,obj,args=MM_showHideLayers.arguments;

  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];

    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }

    obj.visibility=v; }

}



function MM_findObj(n, d)
{ //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function MM_swapImgRestore()
{ //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_swapImage()
{ //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

</script>


<body bgcolor="B7D5F9" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="querytestform" method="POST" action="/QueryTest.do">

  <table width="450" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
    <tr>
                        <td height="25" align="center" class="td-cs1" >试题题型</td>
      <td height="25" colspan="3" class="td-cs2"> <select  name="testType" size="1" class="input3">
                            <option value="10" selected >不限制</option>
       <% SysResultSet typeRs  =  TestGetInfo.getTestTypeRs();

        if(typeRs != null)
        {  for(int i=0;typeRs.setRecord(i)&&i<typeRs.getMetaData().getRecordCount();i++)
           {
      %>
       <option value="<%=typeRs.getString(0)%>"><%=typeRs.getString(1)%></option>
     <%     }
         }
     %>
        </select> </td>
    </tr>
    <input type="hidden" name="opeType" value="<%=OperatorFlagCode.TEST_QUERY_FOREPAPER%>">
    <tr>
                        <td height="25" align="center" class="td-cs1">试题内容</td>
      <td height="25" class="td-cs2"> <input name="content" type=text class="input1" size="15"></td>
                        <td align="center" class="td-cs1">简要说明</td>
      <td class="td-cs2"> <input name="explain" type=text class="input1" size="15"></td>
    </tr>
    <tr>
                        <td width="15%" height="25" align="center" class="td-cs1">试题难度</td>
      <td width="30%" height="25" class="td-cs2"> <select name="degree" class="input3">
                            <option value="<%=OperatorFlagCode.UNLIMIT_VALUE%>" selected >不限制</option>

          <% SysResultSet degreeRs  =   TestGetInfo.getDegreeRs();

     
        if(degreeRs != null)

        {  for(int i=0;degreeRs.setRecord(i)&&i<degreeRs.getMetaData().getRecordCount();i++)

           {

      %>

          <option value="<%=degreeRs.getString(0)%>"><%=degreeRs.getString(1)%></option>

          <%     }

         }

     %>
        </select> </td>
                        <td width="15%" align="center" class="td-cs1">所属类别</td>
                        <td width="40%" class="td-cs2">
                          <table width="89%" border="0" cellspacing="0" cellpadding="0">
                            <tr><input name="classId" type="hidden">
                              <td width="67%"><input name="className" type="text" class="input1" size="15"></td>
                              <td width="33%"><a href="javascript:;" onClick="javascript:openClassWindow('/ClsMngOperatorAction.do?operatorFlag=<%=OperatorFlagCode.CLSMNG_CHOOSE%>&select=01','选择类别');" onMouseOver="MM_swapImage('view','','/agt/public/images/choise_2.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="/agt/public/images/choise.gif" name="view" width="48" height="25" border="0"></a>
                              </td>
                            </tr>
                          </table></td>
    </tr>
    <tr>
                        <td height="25" align="center" class="td-cs1">测试手段</td>
      <td height="25" class="td-cs2"> <select  name="testMeans" class="input3">
                            <option value="<%=OperatorFlagCode.UNLIMIT_VALUE%>" selected >不限制</option>

          <% SysResultSet meansRs  =  TestGetInfo.getMeansRs();

     
        if(meansRs != null)

        {  for(int i=0;meansRs.setRecord(i)&&i<meansRs.getMetaData().getRecordCount();i++)

           {

      %>

          <option value="<%=meansRs.getString(0)%>"><%=meansRs.getString(1)%></option>

          <%     }

         }

     %>

        </select></td>
                        <td align="center" class="td-cs1">使用级别</td>
      <td class="td-cs2"> <select  name="useLevel" class="input3">
                            <option value="<%=OperatorFlagCode.UNLIMIT_VALUE%>" selected >不限制</option>
          <option value="0">常用</option>
          <option value="1">专用</option>
          <option value="2">暂不使用</option>
        </select></td>
    </tr>
  </table>
  <table width="450" height="30" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="35" align="center"> <table width="68%" height="30" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td width="28%"><input name="search" type="image" onclick="querytestform.submit();return false;" src="/agt/public/images/search.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="7%">&nbsp;</td>
                              <td width="65%"><input name="reset" type="image" onclick="querytestform.reset();return false;" src="/agt/public/images/reset.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 name="mdTestForm" method="POST">

   <%
     //获取查询条件,并传送到下一页面
      String testType = request.getParameter("testType");
      if(testType == null) { testType = "";}

      String content = (String)request.getAttribute("content");
      if(content == null) { content = "";}

      String explain = request.getParameter("explain");
      if(explain == null) { explain = "";}

      String classId = request.getParameter("classId");
      if(classId == null) { classId = "";}

      String queryTerm = "&content=" + content + "&explain=" + explain + "&degree=" + request.getParameter("degree");
      queryTerm +=  "&classId=" + classId + "&testMeans=" + request.getParameter("testMeans") +"&useLevel=" + request.getParameter("useLevel");

   %>

   <input type="hidden" name="opeType">
   <input type="hidden" name="content" value="<%=content%>">
   <input type="hidden" name="explain" value="<%=explain%>">
   <input type="hidden" name="degree" value="<%=request.getParameter("degree")%>">
   <input type="hidden" name="classId" value="<%=classId%>">
   <input type="hidden" name="testMeans" value="<%=request.getParameter("testMeans")%>">
   <input type="hidden" name="useLevel" value="<%=request.getParameter("useLevel")%>">

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

      <td width="5%" align="center"  nowrap class="lnk">序号</td>

      <td width="75%" align="center" nowrap> <a href="/agt/epaper/SelectTest.jsp?orderColum=1&orderFlag=<%=isOrderFlag%><%=queryTerm%>" class="lnk">试题内容
        </a> </td>

      <td width="10%" align="center"  nowrap> <a href="/agt/epaper/SelectTest.jsp?orderColum=2&orderFlag=<%=isOrderFlag%><%=queryTerm%>" class="lnk">试题类型
        </a> </td>

      <td width="10%" align="center"  nowrap> <a href="/agt/epaper/SelectTest.jsp?orderColum=3&orderFlag=<%=isOrderFlag%><%=queryTerm%>" class="lnk">试题难度
        </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 height="25">
        <input type="checkbox" name="testIds" value="<%=turnOrderRs.getString(0) %>"></td>

      <td><%=i+1 %></td><input type="hidden" name="UseFrequency" value="<%=turnOrderRs.getString(4) %>">

      <td style="word-break:break-all"><a href="/QueryTest.do?opeType=<%=OperatorFlagCode.TEST_QDETAIL_SHOW %>&testId=<%=turnOrderRs.getString(0) %>&byClass=1"><%=turnOrderRs.getString(1) %></a></td>


      <td><%=turnOrderRs.getString(2) %></td>

      <td><%=turnOrderRs.getString(3) %></td>



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


 <%if( turnOrderRs != null && turnOrderRs.getMetaData().getRecordCount() != 0 )
 {%>
  <table width="450" height="25" border="0" cellpadding="0" cellspacing="0" class="table-cs1">

⌨️ 快捷键说明

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