errorpad.jsp
上传用户:nbluoke
上传日期:2013-08-09
资源大小:4851k
文件大小:31k
源码类别:

教育系统应用

开发平台:

WORD

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %>
  2. <%@ page import="java.sql.*"%>
  3. <%@ page import="jinghua.Tools"%>
  4. <%@ page import="java.util.*"%>
  5. <jsp:useBean id="DBCon" class="jinghua.JinghuaConn" scope="session">
  6. </jsp:useBean>
  7. <%!Connection con;
  8. boolean debug=false;
  9. String studentID="";
  10. String gradenote="";
  11. String gradename="";
  12. Statement stmt=null;
  13. ResultSet rs=null;
  14. String sql="";
  15. int pageNumber=0;
  16. String sqlCon=null;
  17. int testNumber=0;
  18. //ArrayList arrQuestSel=null;
  19. String[] arrID=null;
  20. String[] arrSelect=null;
  21. //QuestSel qs=null;
  22. int EveryPage=10;//每页显示的记录数;
  23. int OnPage=1; //当前显示的页数;
  24. int Total=0;//记录的总数;
  25. int TotalPage=0;//记录的总页数;
  26. %>
  27. <%
  28. String strPage=request.getParameter("page");//查询页数
  29. String prePage=request.getParameter("OnPage");
  30. if(debug) {
  31. out.print("<br>page="+strPage);
  32. out.print("<br>OnPage="+prePage);
  33. }
  34. if(strPage==null)
  35. OnPage=1;
  36. else
  37. OnPage=Integer.parseInt(strPage);
  38. String studentID ="s11"; //tools.getString((String)session.getAttribute(Configure.sessUserNo));
  39. //BaseInfo objBase = new BaseInfo(studentID);
  40. //Privs objPrivs = objBase.getPrivs();
  41. //String vcGrade = objPrivs.getGrade();
  42. try{
  43.     con=DBCon.getConnection();
  44.     //获取学生的年级信息
  45.     gradenote="c1";
  46.     gradename="初一";
  47.     //查询学生所属年级的错题
  48. %>
  49. <%
  50. //构造查询条件
  51. //String errorpad_grade=(String)session.getAttribute("errorpad_grade");
  52. //String errorpad_sub=(String)session.getAttribute("errorpad_sub");
  53. //String errorpad_knowpoint=(String)session.getAttribute("errorpad_knowpoint");
  54. //String errorpad_testtype=(String)session.getAttribute("errorpad_testtype");
  55. //String errorpad_errorcount=(String)session.getAttribute("errorpad_errorcount");
  56. sqlCon="";
  57. //String errorpad_grade=request.getParameter("Grade");
  58. String errorpad_sub=request.getParameter("Subject");
  59. String errorpad_knowpoint=request.getParameter("KnowPoint");
  60. String errorpad_testtype=request.getParameter("testtype");
  61. String errorpad_errorcount=request.getParameter("errorcount");
  62. if(debug){
  63.     out.print("<br>grade="+//errorpad_grade+
  64.     "<br>sub="+errorpad_sub+
  65.     "<br>knowpoint="+errorpad_knowpoint+
  66.     "<br>testtype="+errorpad_testtype+
  67.     "<br>errorcunt="+errorpad_errorcount);
  68. }
  69. //if(errorpad_grade!=null)
  70. //{
  71. //    session.setAttribute("errorpad_grade",errorpad_grade);
  72. //}
  73. //else
  74. //{
  75. //    errorpad_grade=(String)session.getAttribute("errorpad_grade");
  76. //}
  77. if(errorpad_sub!=null)
  78. {
  79.     session.setAttribute("errorpad_sub",errorpad_sub);
  80. }else
  81. {
  82.     errorpad_sub=(String)session.getAttribute("errorpad_sub");
  83. }
  84. if(errorpad_knowpoint!=null)
  85. {
  86.     session.setAttribute("errorpad_knowpoint",errorpad_knowpoint);
  87. }
  88. else
  89. {
  90.     errorpad_knowpoint=(String)session.getAttribute("errorpad_knowpoint");
  91. }
  92. if(errorpad_testtype!=null)
  93. {
  94.     session.setAttribute("errorpad_testtype",errorpad_testtype);
  95. }
  96. else
  97. {
  98.     errorpad_testtype=(String)session.getAttribute("errorpad_testtype");
  99. }
  100. if(errorpad_errorcount!=null)
  101. {
  102.     session.setAttribute("errorpad_errorcount",errorpad_errorcount);
  103. }
  104. else
  105. {
  106.     errorpad_errorcount=(String)session.getAttribute("errorpad_errorcount");
  107. }
  108. //if(errorpad_grade==null)
  109. //    errorpad_grade="all";
  110. if(errorpad_sub==null)
  111.     errorpad_sub="all";
  112. if(errorpad_knowpoint==null)
  113.     errorpad_knowpoint="all";
  114. if(errorpad_testtype==null)
  115.     errorpad_testtype="all";
  116. if(errorpad_errorcount==null)
  117.     errorpad_errorcount="0";
  118. //if(errorpad_grade!=null){
  119. //    if(!errorpad_grade.equals("all")){
  120. //        if(errorpad_grade.equals("c")){
  121. //            sqlCon="(question.gradenote='c1' OR question.gradenote='c2' OR question.gradenote='c3')";
  122. //        }else if(errorpad_grade.equals("g")){
  123. //            sqlCon="(question.gradenote='g1' OR question.gradenote='g2' OR question.gradenote='g3l' OR question.gradenote='g3w')";
  124. //        }
  125. //      else
  126. //            sqlCon="(question.gradenote='"+errorpad_grade+"')";
  127.  //   }
  128. //}
  129. if(debug)
  130.     out.println("<br>grade sql="+sqlCon);
  131. if(errorpad_sub!=null){
  132.     if(!errorpad_sub.equals("all")){
  133.         if (!sqlCon.equals(""))
  134.             sqlCon=sqlCon +" AND (question.SubjectID="+errorpad_sub+")";
  135.         else
  136.             sqlCon=" (question.SubjectID="+errorpad_sub+")";
  137.     }
  138. }
  139. if(debug)
  140.     out.println("<br>subject sql="+sqlCon);
  141. if(errorpad_knowpoint!=null){
  142.     if(!errorpad_knowpoint.equals("all")){
  143.         if(!sqlCon.equals(""))
  144.             sqlCon=sqlCon+" AND(question.KnowPointID1="+errorpad_knowpoint +
  145.                 " OR question.KnowPointID2="+errorpad_knowpoint+
  146.                 " OR question.KnowPointID3="+errorpad_knowpoint+")";
  147.         else
  148.             sqlCon=" (question.KnowPointID1="+errorpad_knowpoint +
  149.                 " OR question.KnowPointID2="+errorpad_knowpoint+
  150.                 " OR question.KnowPointID3="+errorpad_knowpoint+")";
  151.     }
  152. }
  153. if(debug)
  154.     out.println("<br>knowpoint sql="+sqlCon);
  155. if(errorpad_testtype!=null){
  156.     if(!errorpad_testtype.equals("all")){
  157.         if(!sqlCon.equals(""))
  158.             sqlCon=sqlCon+ " AND(errorpad.sourcetype="+errorpad_testtype+")";
  159.         else
  160.             sqlCon= " (errorpad.sourcetype="+errorpad_testtype+")";
  161.     }
  162. }
  163. if(debug)
  164.     out.println("<br>testtype sql="+sqlCon);
  165. if(errorpad_errorcount!=null){
  166.     if(!sqlCon.equals(""))
  167.         sqlCon=sqlCon+ " AND(errorpad.errorcount>="+errorpad_errorcount+")";
  168.     else
  169.         sqlCon=" (errorpad.errorcount>="+errorpad_errorcount+")";
  170. }
  171. if(debug)
  172.     out.println("<br>errorcount sql="+sqlCon);
  173. sqlCon="(`errorpad`.`stu_id` = 's11')"+" AND"+sqlCon;
  174. //查询满足条件的错题
  175. sql="SELECT  `errorpad`.`id`, `errorpad`.`question_id`, `question`.`QuestText`, DATE_FORMAT( `errorpad`.`add_date`,"%Y-%m-%e %H:%i:%S") AS add_date, "+
  176.     " `errorpad`.`errorcount`,  ELT(`errorpad`.`sourcetype`,"自由测试","自由单元测试","模拟考试") as sourcename, "+
  177.     " `grade`.`Name` AS `gradename`,`subject`.`name` as `subname`"+
  178.     " FROM  `errorpad`"+
  179.     "  LEFT OUTER JOIN `question` ON (`errorpad`.`question_id` = `question`.`ID`)"+
  180.     "  LEFT OUTER JOIN `grade` ON (`question`.`gradenote` = `grade`.`note`)"+
  181. "  LEFT OUTER JOIN `subject` ON (`question`.`SubjectID` = `subject`.`ID`)"+
  182.     " WHERE  "+sqlCon+
  183.     " ORDER BY  `errorpad`.`add_date` ASC,`errorpad`.`ID`";
  184. session.setAttribute("errorpad_sqlcon",sqlCon);
  185. session.setAttribute("errorpad_sql",sql);
  186.  if(debug)
  187.     out.println("<br>at last sql="+sql);
  188. stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
  189. rs=stmt.executeQuery(sql);
  190. //是否是新的查询
  191. String newQuery=request.getParameter("newQuery");
  192. if(newQuery==null)
  193. newQuery="false";
  194. if(debug)
  195. out.print("<br>newQuery="+newQuery);
  196. if(newQuery.equals("true"))
  197. {//构造新的试题选择数组
  198. StringBuffer sb1=new StringBuffer();
  199. StringBuffer sb2=new StringBuffer();
  200. //arrQuestSel=new ArrayList();
  201. while(rs.next()){
  202. //QuestSel qs=new QuestSel();
  203. //qs.id=rs.getInt("ID");
  204. sb1.append(rs.getString("ID")+",");
  205. sb2.append("0,");
  206. //arrQuestSel.add(qs);
  207. }
  208. arrID=sb1.toString().split(",");
  209. arrSelect=sb2.toString().split(",");
  210. //session.setAttribute("arrQuestSel",arrQuestSel);
  211. session.setAttribute("arrID",arrID);
  212. session.setAttribute("arrSelect",arrSelect);
  213. }else{
  214. //arrQuestSel=(ArrayList)session.getAttribute("arrQuestSel");
  215. arrID=(String[])session.getAttribute("arrID");
  216. arrSelect=(String[])session.getAttribute("arrSelect");
  217. }
  218. //if(arrQuestSel==null)
  219. // out.print("<br>arrQuestSel=null");
  220. //处理旧页面
  221. String order_chk=request.getParameter("order_chk");
  222. if(debug){
  223. out.print("<br>order_chk="+order_chk);
  224. out.print("<br>arrID="+arrID.toString());
  225. out.print("<br>arrSelect="+arrSelect.toString());
  226. }
  227. if(order_chk!=null && !order_chk.equals("temp")){
  228. //145:0#146:1#
  229. String arrOrder_Sin[]=null;
  230. String arrOrder_chk[]=order_chk.split("#");
  231. for(int i=0;i<arrOrder_chk.length;i++){
  232. if(debug)
  233. out.print("<br> arrorder_chk["+i+"]="+arrOrder_chk[i]);
  234. arrOrder_Sin=arrOrder_chk[i].split(":");
  235. arrSelect[Integer.parseInt(arrOrder_Sin[0])-1]=arrOrder_Sin[1];
  236. }
  237. }
  238. rs.last();//移到最后一条记录;
  239. Total=rs.getRow();//记录的总数;
  240. //计算出总的页数TotalPage;
  241. if(Total%EveryPage==0)
  242. TotalPage=Total/EveryPage;
  243. else
  244. TotalPage=Total/EveryPage+1;
  245.  if(OnPage>TotalPage)
  246.  {
  247.   OnPage=TotalPage;
  248.  }
  249.  else if(OnPage<=0)
  250.  {
  251.   OnPage=1;
  252.  }
  253. //生成一个javascript数组
  254. //<script language ="JavaScript">
  255. //Quest_Order=new Array()
  256. //Quest_Order[0]=new Array(91,98);
  257. //Quest_Order[9]=new Array(91,107);
  258. //</script>
  259. out.println("<script language ="JavaScript">");
  260. out.println("Quest_Order=new Array();");
  261. rs.absolute((OnPage-1)*EveryPage+1);//指定指针的位置;
  262. pageNumber=0;
  263. testNumber=(OnPage-1)*EveryPage+1;
  264. while( pageNumber<EveryPage ) {
  265. out.println("Quest_Order["+pageNumber+"]=new Array("+testNumber+","+rs.getInt("ID")+");");
  266. pageNumber++;
  267. testNumber++;
  268. if(!rs.next())
  269. break;
  270. }
  271. out.println("var QOCount="+pageNumber+";");
  272. out.println("</script>");
  273. if(debug){
  274. out.print("<br>Total="+Total);
  275. out.print("<br>totalpage="+TotalPage);
  276. }
  277. %>
  278. <!--年级,科目,知识点三个下拉列表框联动-->
  279. <%
  280. out.print(Tools.sub_know(con));
  281. %>
  282. <script language="JavaScript">
  283. function changesk(locationid){
  284. document.myform.KnowPoint.length =1;
  285. var locationid=locationid;
  286. var i;
  287. for (i=0;i < gskcount; i++){
  288. if (grade_sub_know[i][1] == locationid){
  289. document.myform.KnowPoint.options[document.myform.KnowPoint.length] = new Option(grade_sub_know[i][3], grade_sub_know[i][2]);
  290. }
  291. }
  292. }
  293. function delit(myform)
  294. {
  295.   if (confirm("将删除所有选择的知识点数据?"))
  296.   {
  297.     myform.action="errorpaddel.jsp";
  298.     myform.target="_self";
  299.     myform.submit();
  300.   }
  301. }
  302. function del_check()
  303. {
  304. var count = errorpad.elements.length;
  305. var noSelect = true;
  306.   for(var i=0;i<count;i++)
  307.   {
  308.      if(errorpad.elements[i].checked)
  309.      {
  310.              noSelect = false;
  311.       break;
  312. }
  313.    }
  314. if(noSelect == true)
  315. {
  316.     alert("您还没有选择要删除的错题!");
  317.     return(false);
  318.  }
  319.    else
  320.    {
  321.          if(confirm("将删除所有选择的错题吗?"))
  322.          {
  323.                 document.errorpad.method = "POST";
  324.                 document.errorpad.action = "errorpad_del.jsp";
  325.                 document.errorpad.target="_self";
  326.                 document.errorpad.submit();
  327.          }
  328.          else
  329.          {
  330.                 document.form3.method = "GET";
  331.                 document.form3.action = "";
  332. }
  333.          }
  334.          return false;
  335. }
  336. function addrate_check()
  337. {
  338. var count = errorpad.elements.length;
  339. var noSelect = true;
  340.   for(var i=0;i<count;i++)
  341.   {
  342.      if(errorpad.elements[i].checked)
  343.      {
  344.              noSelect = false;
  345.       break;
  346. }
  347.    }
  348. if(noSelect == true)
  349. {
  350.     alert("您还没有选择要增加错误级别的错题!");
  351.     return(false);
  352.  }
  353.    else
  354.    {
  355.          if(confirm("增加所有选择的错题的错误级别吗?"))
  356.          {
  357.                 document.errorpad.method = "POST";
  358.                 document.errorpad.action = "errorpad_addrate.jsp";
  359.                 document.errorpad.target="_self";
  360.                 document.errorpad.submit();
  361.          }
  362.          else
  363.          {
  364.                 document.errorpad.method = "GET";
  365.                 document.errorpad.action = "";
  366. }
  367.          }
  368.          return false;
  369. }
  370. function decrate_check()
  371. {
  372. var count = errorpad.elements.length;
  373. var noSelect = true;
  374.   for(var i=0;i<count;i++)
  375.   {
  376.      if(errorpad.elements[i].checked)
  377.      {
  378.              noSelect = false;
  379.       break;
  380. }
  381.    }
  382. if(noSelect == true)
  383. {
  384.     alert("您还没有选择要降低错误级别的错题!");
  385.     return(false);
  386.  }
  387.    else
  388.    {
  389.          if(confirm("降低所有选择的错题的错误级别吗?"))
  390.          {
  391.                 document.errorpad.method = "POST";
  392.                 document.errorpad.action = "errorpad_decrate.jsp";
  393.                 document.errorpad.target="_self";
  394.                 document.errorpad.submit();
  395.          }
  396.          else
  397.          {
  398.                 document.errorpad.method = "GET";
  399.                 document.errorpad.action = "";
  400. }
  401.          }
  402.          return false;
  403. }
  404. function Query(myform)
  405. {
  406.     document.myform.action="errorpad.jsp?newQuery=true&page=1";
  407. document.myform.target="_self";
  408. document.myform.method = "POST";
  409.     document.myform.submit();
  410. }
  411. function set_Order_Sel(){
  412. var Order_Sel="";
  413. for (var i=0;i<document.errorpad.elements.length;i++)
  414.     {
  415. var e = document.errorpad.elements[i];
  416. if (e.name == 'id'){
  417.   for( var j=0;j<QOCount;j++){
  418. if(Quest_Order[j][1]==e.value){
  419. if(e.checked)
  420. Order_Sel=Order_Sel+Quest_Order[j][0]+":"+"1#";
  421. else
  422. Order_Sel=Order_Sel+Quest_Order[j][0]+":"+"0#";
  423.          break;
  424. }
  425. }
  426. }
  427. }
  428. document.errorpad.order_chk.value=Order_Sel;
  429. }
  430. function goToPage( topage)
  431. {
  432. set_Order_Sel();
  433. document.errorpad.action="errorpad.jsp";
  434. document.errorpad.target="_self";
  435. document.errorpad.method = "POST";
  436. document.errorpad.page.value = topage;
  437. document.errorpad.submit();
  438. return false;
  439. }
  440. function subform(stract)
  441. {
  442. switch (stract){
  443. case "Query":
  444.             Query();
  445. break;
  446. case "del":
  447.             del_check();
  448. break;
  449. case "addrate":
  450.             addrate_check();
  451. break;
  452. case "decrate":
  453. decrate_check();
  454. break;
  455.         case "test":
  456.             selectid();
  457.             break;
  458. case "print":
  459. printerror();
  460.             break;
  461. }
  462. }
  463. function selectid(){
  464. set_Order_Sel();
  465.     var winpoint=window.open('','err_test_type','height=240,width=470,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no,depended=yes,alwaysRaised =yes,z-look=yes');
  466.     var toppos=(window.screen.height-240)/2;
  467.     var leftpos=(window.screen.width-470)/2;
  468.     winpoint.moveTo(toppos,leftpos);
  469.     winpoint.focus();
  470.     document.errorpad.method="POST";
  471.     document.errorpad.action="err_test_type.jsp";
  472.     document.errorpad.target="err_test_type";
  473.     document.errorpad.submit();
  474. }
  475. function printerror(){
  476.     var winpoint=window.open('','err_print_type','height=240,width=520,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no,depended=yes,alwaysRaised =yes,z-look=yes');
  477.     var toppos=(window.screen.height-240)/2;
  478.     var leftpos=(window.screen.width-470)/2;
  479.     winpoint.moveTo(toppos,leftpos);
  480.     winpoint.focus();
  481.     document.errorpad.method="POST";
  482.     document.errorpad.action="err_print_type.jsp";
  483.     document.errorpad.target="err_print_type";
  484.     document.errorpad.submit();
  485. }
  486. function openDetail(var1){
  487.     var winpoint=window.open('err_query_detail.jsp?id='+var1,'newwindow','height=400,width=300,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no,depended=yes,alwaysRaised =yes,z-look=yes');
  488.     winpoint.focus();
  489. }
  490. </script>
  491. <HTML>
  492. <HEAD>
  493. <META http-equiv=Content-Type content="text/html; charset=gb2312">
  494. <TITLE>共创学堂-错题本</TITLE>
  495. <SCRIPT language=JavaScript>
  496. <!--
  497. function SymError()
  498. {
  499.   return true;
  500. }
  501. window.onerror = SymError;
  502. //-->
  503. </SCRIPT>
  504. <!-- saved from url=(0041)http://jsptestonline.cosoft.org.cn/senior/none_xt.jsp -->
  505. <META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
  506. href="style/style.css" type=text/css rel=stylesheet>
  507. <STYLE>
  508. <!--
  509. a,a:link  { font-family: 'Tahoma', 'Verdana', 'Arial'; color: gray; text-decoration: none; }
  510. a:visited { font-family: 'Tahoma', 'Verdana', 'Arial'; color: gray; text-decoration: none; }
  511. a:active  { font-family: 'Tahoma', 'Verdana', 'Arial'; color: black; text-decoration: none; }
  512. a:hover   { font-family: 'Tahoma', 'Verdana', 'Arial'; color: black; text-decoration: none; }
  513. -->
  514. A:link  {font-family: 'Tahoma', 'Verdana', 'Arial'; color:blue; text-decoration: none; cursor: hand; }
  515. A:visited  {font-family: 'Tahoma', 'Verdana', 'Arial'; color: Navy; text-decoration: none}
  516. A:active  {font-family: 'Tahoma', 'Verdana', 'Arial'; color: mediumvioletred; text-decoration: none}
  517. A:hover {font-family: 'Tahoma', 'Verdana', 'Arial'; color: red;  text-decoration: none}
  518. body,td,select,input,div,form,textarea,center,option,pre,br {
  519.             font-family: 'Tahoma', 'Verdana', 'Arial'; font-size: 9pt; color: black; }
  520. body      { margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px;
  521.             scrollbar-face-color: white;
  522.             scrollbar-shadow-color: gainsboro;
  523.             scrollbar-darkshadow-color: whitesmoke;
  524.             scrollbar-highlight-color: gainsboro;
  525.             scrollbar-3dlight-color: whitesmoke;
  526.             scrollbar-track-color: white;
  527.             scrollbar-arrow-color: gainsboro;
  528.             overflow: auto; }
  529. th {
  530. font-family: 'Tahoma', 'Verdana', 'Arial'; font-size: 10pt; color: black; }
  531. .button   { font-family: 'Tahoma', 'Verdana', 'Arial'; background-color: white; height: 20px;
  532.                 border-width: 1px; border-style: solid; border-color: black; }
  533. .input    { font-family: 'Tahoma', 'Verdana', 'Arial'; background-color: white; height: 20px;
  534.                 border-width: 1px; border-style: solid; border-color: black; }
  535. .td_sr {
  536.   background: #ffffff;
  537. }
  538. .tb_sr { background: #eeeeee; }
  539. .th_sr { background: #eeeeee; }
  540. </STYLE>
  541. <SCRIPT src=""></SCRIPT>
  542. <SCRIPT src=""></SCRIPT>
  543. <SCRIPT src=""></SCRIPT>
  544. <SCRIPT src=""></SCRIPT>
  545. <SCRIPT src=""></SCRIPT>
  546. <META content="MSHTML 6.00.2462.0" name=GENERATOR>
  547. <link rel="stylesheet" type="text/css" href="../css.css">
  548. </HEAD>
  549. <BODY bgColor=#ffffff text=#000000 onLoad="InitMyform()">
  550. <CENTER>
  551. <TABLE cellSpacing=0 cellPadding=0 width=650 border=0>
  552.   <TBODY>
  553.   <TR>
  554.           <TD><IMG height=27 src="images/test_pop_01.gif" width=102></TD>
  555.           <TD align=right><IMG height=27 src="images/test_pop_02.gif"
  556.       width=134></TD>
  557.         </TR></TBODY></TABLE>
  558.   <strong><font color="#3366FF" size="+2" face="黑体">共创学堂错题本</font></strong>
  559.   <!--begin test -->
  560.   <FORM action=errorpad.jsp method=post name=myform target="_self" id="myform">
  561.   <script language="JavaScript">
  562. document.onload = InitMyform();
  563. function InitMyform(){
  564.      document.myform.Subject.value='<%=errorpad_sub%>';
  565.      changesk(document.myform.Subject.options[document.myform.Subject.selectedIndex].value);
  566.      document.myform.KnowPoint.value='<%=errorpad_knowpoint%>';
  567.      document.myform.testtype.value='<%=errorpad_testtype%>';
  568.      document.myform.errorcount.value='<%=errorpad_errorcount%>';
  569. }
  570. </script>
  571.     <TABLE width=100% height="145" border=0 cellPadding=0 cellSpacing=0>
  572.       <TBODY>
  573.         <TR>
  574.           <TD height="75"  align=middle valign="bottom"> <table width="80%" height="56" border="1" align="center" cellspacing="1" bordercolor="#799AE1" id="AutoNumber3" style="border-collapse: collapse">
  575.               <tr>
  576.                 <td width="78" height="52" align="center" valign="baseline" nowrap background="images/admin_bg_1.gif" bgcolor="#FFFDE8">
  577.                   <table width="100%" border="0" cellspacing="0" cellpadding="0">
  578.                     <tr>
  579.                       <td nowrap>科&nbsp;目:</td>
  580.                     </tr>
  581.                     <tr>
  582.                       <td> <select name=Subject
  583. size="1" id=select8 onclick="changesk(document.myform.Subject.options[document.myform.Subject.selectedIndex].value)">
  584.                           <option value="all" selected>全 部</option>
  585.                           <%Tools.showGradeSubjectOption(con,gradenote,out);%>
  586.                         </select></td>
  587.                     </tr>
  588.                   </table>
  589.                   <strong> </strong> </td>
  590.                 <td width="144" align="center" valign="baseline" nowrap background="../images/admin_bg_1.gif" bgcolor="#FFFDE8">
  591.                   <table width="100%" border="0" cellspacing="0" cellpadding="0">
  592.                     <tr>
  593.                       <td nowrap>知识点:</td>
  594.                     </tr>
  595.                     <tr>
  596.                       <td> <select name=KnowPoint id="select31">
  597.                           <option value="all" selected>----全 部----</option>
  598.                         </select> </td>
  599.                     </tr>
  600.                   </table></td>
  601.                 <td width="127" align="center" valign="baseline" nowrap background="images/admin_bg_1.gif" bgcolor="#FFFDE8">
  602.                   <table width="100%" border="0" cellspacing="0" cellpadding="0">
  603.                     <tr>
  604.                       <td nowrap>考试类型:</td>
  605.                     </tr>
  606.                     <tr>
  607.                       <td><select name="testtype" id="select8">
  608.                           <option value="all" selected>全部</option>
  609.                           <option value="1">自由考试</option>
  610.                           <option value="2">单元测试</option>
  611.                           <option value="3">模拟测试 </option>
  612.                         </select></td>
  613.                     </tr>
  614.                   </table></td>
  615.                 <td width="85" align="center" valign="baseline" nowrap background="../images/admin_bg_1.gif" bgcolor="#FFFDE8">
  616.                   <table width="94%" border="0" cellspacing="0" cellpadding="0">
  617.                     <tr>
  618.                       <td nowrap>错误级别&gt;=</td>
  619.                     </tr>
  620.                     <tr>
  621.                       <td><select name="errorcount" size="1" id="select16">
  622.                           <option value="0" selected>0</option>
  623.                           <option value="1">1</option>
  624.                           <option value="2">2</option>
  625.                           <option value="3">3</option>
  626.                           <option value="4">4</option>
  627.                           <option value="5">5</option>
  628.                           <option value="6">6</option>
  629.                           <option value="7">7</option>
  630.                           <option value="8">8</option>
  631.                           <option value="9">9</option>
  632.                           <option value="10">10</option>
  633.                         </select></td>
  634.                     </tr>
  635.                   </table></td>
  636.                 <td width="85" nowrap background="../images/admin_bg_1.gif" bgcolor="#FFFDE8">
  637.                   <p align="left">
  638.                     <input name="errQuery" type="button"  class="s03" id="errQuery" onClick=subform("Query") value="查询">
  639.                 </td>
  640.               </tr>
  641.             </table></TD>
  642.         </TR>
  643.         <TR>
  644.           <TD  align=middle valign="top">
  645.             <table width="80%" height="44" border="1" align="center" cellspacing="1" bordercolor="#799AE1" id="AutoNumber3" style="border-collapse: collapse">
  646.               <tr>
  647.                 <td height="40" nowrap background="images/admin_bg_1.gif" bgcolor="#FFFDE8">
  648.                   <p align="center">
  649.                     <input name="errDel" type="button" class="s03" id="errDel" value="删 除" border="0"
  650. onClick=subform("del")>
  651.                     <b><font color="#FFFFFF"> </font></b></td>
  652.                 <td width="156" nowrap background="images/admin_bg_1.gif" bgcolor="#FFFDE8">
  653.                   <p align="center"><b>
  654. <input name="errAscRate" type="button" class="s03" id="errAscRate2" value="增加级别" border="0" onClick=subform("addrate")>
  655.                     </b> </td>
  656.                 <td width="175" nowrap background="../images/admin_bg_1.gif" bgcolor="#FFFDE8">
  657.                   <p align="center"><b>
  658.                     <input name="errDescRate" type="button" class="s03" id="errDescRate" value="降低级别" border="0" onClick=subform("decrate")>
  659.                     </b><b> </b></td>
  660.                 <td width="159" background="images/admin_bg_1.gif" bgcolor="#FFFDE8"><div align="center"><b>
  661.                     <input name="errTest" type="button" class="s03" id="errTest2" value="测 验" border="0" onClick=subform("test")>
  662.                     </b> </div></td>
  663.                 <td width="164" nowrap background="../images/admin_bg_1.gif" bgcolor="#FFFDE8">
  664.                   <p align="center"><b>
  665.                     <input name="errPrint" type="button"  class="s03" id="errPrint" value="打 印" onClick=subform("print")>
  666.                     </b></td>
  667.               </tr>
  668.             </table>
  669.             </TD>
  670.         </TR>
  671.       </TBODY>
  672.     </TABLE>
  673. </FORM>
  674.   <FORM method="post" name="errorpad" id="errorpad">
  675.     <TABLE cellSpacing=1 cellPadding=0 width=80% bgColor=#eeeeee border=0>
  676.       <TBODY>
  677.         <TR>
  678.           <TD class=td_sr align=middle width=28 height=20><INPUT title=选择全部记录或取消
  679.       onclick=CheckAllt(); type=checkbox value="Check All" name=allboxt></TD>
  680.           <TD class=td_sr align=right height=20>&nbsp; <A
  681.       href="errorpad.jsp"  onClick="return goToPage(1)">首页</A> <% if(OnPage!=1) {%>
  682.   <A      href="errorpad.jsp"    onClick="return goToPage(<%=OnPage-1%>)">前页</A>
  683.             <% }else {%>
  684.             前页
  685.             <%}%>
  686.             [第<%=OnPage%>页] &nbsp; <%if(OnPage!=TotalPage) {%>
  687. <A      href="errorpad.jsp" onClick="return goToPage(<%=OnPage+1%>)">后页</A>
  688.             <%} else {%>
  689.             后页
  690.             <%}%> <A      href="errorpad.jsp" onClick="return goToPage(<%=TotalPage%>)">尾页</A>
  691.              跳转到第
  692.             <SELECT      onChange='return goToPage(this.value)'
  693.       size=1 name=topage>
  694.               <%for(int pageI=1;pageI<OnPage;pageI++)
  695. out.println("<OPTION value="+pageI+">"+pageI+"</OPTION>");
  696. %>
  697.               <OPTION value=<%=OnPage%>
  698.         selected><%=OnPage%></OPTION>
  699.               <%for(int pageI=OnPage+1;pageI<=TotalPage;pageI++)
  700. out.println("<OPTION value="+pageI+">"+pageI+"</OPTION>");
  701. %>
  702.             </SELECT>
  703.             页,共 <%=TotalPage%> 页 </TD>
  704.         </TR>
  705.       </TBODY>
  706.     </TABLE>
  707.     <%
  708. rs.absolute((OnPage-1)*EveryPage+1);//指定指针的位置;
  709.     pageNumber=0;
  710.       testNumber=(OnPage-1)*EveryPage+1;
  711.       //while(rs.next()){
  712.   while( pageNumber<EveryPage ) {
  713.    pageNumber++;
  714.   %>
  715.     <TABLE width=80% border=1 align=center cellSpacing=1 bordercolor="#799AE1" style="border-collapse: collapse">
  716.       <TBODY>
  717.       <TR>
  718.           <td width="650" height=22 bgColor=#E3E3E3 class=l>
  719.             <table width="100%" border="0" cellspacing="0" cellpadding="0">
  720.               <tr>
  721.                 <td width="61" height="20" nowrap>
  722. <input name="id" type="checkbox" value="<%=rs.getInt("id")%>"
  723. <%
  724. if(arrSelect[testNumber-1].equals("1"))
  725. out.print(" checked");
  726. %>
  727. >
  728.                   <%=testNumber%>.
  729.                   </td>
  730.                 <td width="51" nowrap><div align="right">年级:</div></td>
  731.                 <td width="60" nowrap><%=rs.getString("gradename")%></td>
  732.                 <td width="114" nowrap> <div align="left">科目:<%=rs.getString("subname")%></div></td>
  733.                 <td width="123" nowrap> <div align="left">错误级别: <%=rs.getInt("errorcount")%></div></td>
  734.                 <td width="74" nowrap><div align="right">添加时间:</div></td>
  735.                 <td width="130" nowrap><%=rs.getString("add_date")%></td>
  736.                 <td width="128" nowrap>来源:<%=rs.getString("sourcename")%></td>
  737.                 <td width="9" nowrap>&nbsp; </td>
  738.                 <td width="33" nowrap> <div align="right">
  739. <img src="images/1026.gif" width="27" height="24" onClick="openDetail(<%=rs.getInt("question_id")%>)"></div></td>
  740.               </tr>
  741.             </table></td>
  742.       </TR>
  743.     </TBODY>
  744.   </TABLE>
  745.   <TABLE cellSpacing=1 width=591 align=center>
  746.     <TBODY>
  747.       <TR>
  748.           <TD width="585" align=left>
  749.             <%if(debug) out.print("ID="+rs.getString("ID"));%> <%=jinghua.TransformString.DeleteBR(rs.getString("QuestText"))%></TD>
  750.       </TR>
  751.     </TBODY>
  752.   </TABLE>
  753.     <%
  754. testNumber++;
  755. if(!rs.next())
  756. break;
  757. }
  758. %>
  759.     <TABLE cellSpacing=1 cellPadding=0 width=80% bgColor=#eeeeee border=0>
  760.       <TBODY>
  761.         <TR>
  762.           <TD class=td_sr align=middle width=28 height=20><INPUT title=选择全部记录或取消
  763.       onclick=CheckAlle(); type=checkbox value="Check All" name=allboxe></TD>
  764.           <TD class=td_sr align=right height=20>&nbsp; <A
  765.       href="errorpad.jsp"  onClick="return goToPage(1)">首页</A> <% if(OnPage!=1) {%> <A      href="errorpad.jsp"    onClick="return goToPage(<%=OnPage-1%>)">前页</A>
  766.             <% }else {%>
  767.             前页
  768.             <%}%>
  769.             [第<%=OnPage%>页] &nbsp;
  770.             <%if(OnPage!=TotalPage) {%> <A      href="errorpad.jsp" onClick="return goToPage(<%=OnPage+1%>)">后页</A>
  771.             <%} else {%>
  772.             后页
  773.             <%}%> <A      href="errorpad.jsp" onClick="return goToPage(<%=TotalPage%>)">尾页</A>
  774.              跳转到第
  775.             <SELECT      onChange='return goToPage(this.value)'
  776.       size=1 name=select2>
  777.               <%for(int pageI=1;pageI<OnPage;pageI++)
  778. out.println("<OPTION value="+pageI+">"+pageI+"</OPTION>");
  779. %>
  780.               <OPTION value=<%=OnPage%>
  781.         selected><%=OnPage%></OPTION>
  782.               <%for(int pageI=OnPage+1;pageI<=TotalPage;pageI++)
  783. out.println("<OPTION value="+pageI+">"+pageI+"</OPTION>");
  784. %>
  785.             </SELECT>
  786.             页,共 <%=TotalPage%> 页 </TD>
  787.         </TR>
  788.       </TBODY>
  789.     </TABLE>
  790.     <input name="stu_id" type="hidden" id="studentid2" value="<%=studentID %>">
  791.     <input name="selectcount" type="hidden" id="studentid2" value="">
  792.     <SCRIPT language=JavaScript>
  793. <!--
  794. function CheckAllt()
  795.   {
  796.    document.errorpad.allboxe.checked=document.errorpad.allboxt.checked;
  797.     for (var i=0;i<document.errorpad.elements.length;i++)
  798.     {
  799.       var e = document.errorpad.elements[i];
  800.       if (e.name == 'id')
  801.         e.checked = document.errorpad.allboxt.checked;
  802.     }
  803.   }
  804. function CheckAlle()
  805.   {
  806.    document.errorpad.allboxt.checked=document.errorpad.allboxe.checked;
  807.     for (var i=0;i<document.errorpad.elements.length;i++)
  808.     {
  809.       var e = document.errorpad.elements[i];
  810.       if (e.name == 'id')
  811.         e.checked = document.errorpad.allboxe.checked;
  812.     }
  813.   }
  814. //-->
  815. </SCRIPT>
  816.     <input name="OnPage" type="hidden" id="OnPage" value="<%=OnPage%>">
  817.     <input name="page" type="hidden" id="page">
  818.     <input name="order_chk" type="hidden" id="order_chk" value="temp">
  819.   </FORM>
  820. <p>&nbsp;</p>
  821.  <!--end test --><!--begin bottom -->
  822. <TABLE
  823. style="BORDER-TOP: #dbdbdb 1px solid; MARGIN-TOP: 10px; MARGIN-BOTTOM: 10px; BACKGROUND-COLOR: #f6f6f6"
  824. cellSpacing=0 cellPadding=0 width="100%" border=0>
  825.   <TBODY>
  826.   <TR>
  827.     <TD align=middle colSpan=2 height=30>
  828.       <TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
  829.         <TBODY>
  830.         <TR>
  831.           <TD><A href="http://jsptestonline.cosoft.org.cn/index.html"
  832.             target=_blank>关于我们</A> | <A
  833.             href="http://jsptestonline.cosoft.org.cn/contact/3_ywhz.html"
  834.             target=_blank>联系方式</A> | 网站地图 | <A
  835.             href="http://jsptestonline.cosoft.org.cn/about/service.html"
  836.             target=_blank>服务条款</A> | <A
  837.             href="http://jsptestonline.cosoft.org.cn/about/privacy.html"
  838.             target=_blank>隐私权保护</A> | <A
  839.             href="http://jsptestonline.cosoft.org.cn/about/copyright.html"
  840.             target=_blank>版权声明</A></TD>
  841.           <TD align=middle width=220>版权所有:<A href="http://jsptestonline.cosoft.org.cn/"
  842.             target=_blank>共创教育机构</A></TD></TR></TBODY>
  843. </TABLE></TD></TR></TBODY>
  844. </TABLE><!--end bottom --></CENTER>
  845. </BODY>
  846. </HTML>
  847. <%}
  848. catch(Exception e){
  849.     out.print(e.toString());
  850. }
  851. finally{
  852.     DBCon.dropConnection();
  853. }
  854. %>