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

教育系统应用

开发平台:

WORD

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %>
  2. <%@ page import="java.sql.*"%>
  3. <%@ page import="java.text.*"%>
  4. <%@ page import="jinghua.*"%>
  5. <%@ page import="java.util.*"%>
  6. <%@ page import = "jinghua.chart.servlet.WebHitChart" %>
  7. <%@ page import = "jinghua.chart.servlet.WebHitDataSet" %>
  8. <%@ page import = "java.io.PrintWriter" %>
  9. <jsp:useBean id="DBCon" class="jinghua.JinghuaConn" scope="session">
  10. </jsp:useBean>
  11. <%!Connection con;
  12. //查询参加某次模拟考试的所有学生的ID
  13. String colwidth="";
  14. boolean debug=false;
  15. String studentID="";
  16. String gradenote="";
  17. String gradename="";
  18. int maxHisSubNum =0;
  19. String mn_testID="";
  20. Statement stmt=null;
  21. ResultSet rs=null;
  22. String sql="";
  23. String test_subs="";
  24. int sub_num=0;
  25. int have_test=0;
  26. int i=0;
  27. int j=0;
  28. long i10=0;
  29. long i30=0;
  30. float f10=0;
  31. float f30=0;
  32. DecimalFormat df=new DecimalFormat("####.00");
  33. class mn_test{
  34.     String id;
  35.     String name;
  36.     String gradenote;
  37.     String subs;
  38.     String totalMark;
  39.     int sub_num;
  40.     int testPeople;//全部参加人数
  41.     //参加完所有测试的学生的ID,用","分隔
  42. int flag;//1:complete;2:uncomplete;3:do not any test;
  43.     public String toString(){
  44.         String temp="";
  45.         temp="<br> id="+id+"<br> name="+name;
  46.         return temp;
  47.    }
  48. };
  49. class student{
  50.     String id;
  51.     String name;
  52.     String jh_area;
  53.     String school;
  54.     String jh_area_sch;
  55.     String grade;
  56.     String test_date;
  57.     int total_mark;//总分
  58.     String avgTop10;//top 10%的总分
  59.     String avgTop30;
  60.     int posAll;//全部排名
  61.     int posPercent;//100人排名
  62.     public String toString(){
  63.         String temp="";
  64.         temp="<br> id="+id+"<br> name="+name+"<br> grade="+grade+"<br>jh_area="+jh_area+
  65.         "<br>school="+school+"<br>jh_area_sch="+jh_area_sch+"<br>test_date="+test_date;
  66.         return temp;
  67.    }
  68. };
  69. class History{
  70.     long id;
  71.     String stu_id;
  72.     String mn_test_id;
  73.     int sub_num;
  74.     int testPeople;
  75.     String tested_id;
  76.     int totalmark;
  77.     String position;
  78.     String top10avg;
  79.     String top30avg;
  80.     String testdate;
  81.     String [] sub_names;
  82.     String [] sub_marks;
  83.     String debug;
  84.     public String toString(){
  85.         String temp="";
  86.         temp="<br> id="+id+"<br> stu_id="+stu_id+"<br> mn_test_id="+mn_test_id+
  87.             "<br>totalmark="+totalmark+"<br>position="+position+
  88.             "<br>top10avg="+top10avg+"<br>top30avg="+top30avg;
  89.         return temp;
  90.    }
  91. };
  92. class Subject{
  93.     int sub_id;
  94.     String name;
  95.     String totalMark;
  96.     String realMark;
  97.     String avgArea;
  98.     String avgTotal;
  99.     String avgTop10;
  100.     String avgTop30;
  101.     String posAll;//全部排名
  102.     String posPercent;//100人排名
  103.     int testnum=0;//试题数目
  104.     String [] arrAnswer;
  105.     String [] arrMark;
  106.     String [] arrSubAnswer;
  107.     String [] arrTF;
  108.     String [] arrDif;
  109.     String [] arrSubMark;
  110.     String [] arrRate;//准确率
  111.     String [] arrID;//question id数组
  112.     public String toString(){
  113.         String temp="";
  114.         temp="<br> sub_id="+sub_id+"<br> name="+name+"<br> totalMark="+totalMark+
  115.         "<br>avgArea="+avgArea+"<br>avgTotal="+avgTotal+"<br>avgTop10="+avgTop10+
  116.         "<br>avgTop30="+avgTop30+ "<br>posAll="+posAll+ "<br>posPercent="+posPercent;
  117.         return temp;
  118.    }
  119. };
  120. mn_test mnTest;
  121. student Student;
  122. Vector subs;
  123. Vector hisRS;
  124. %>
  125. <%
  126. try{
  127.     studentID=request.getParameter("stuID");
  128. mn_testID=request.getParameter("mn_testID");
  129.     //Tools.showalert(studentID,out);
  130. }catch(Exception e){
  131.     Tools.showalert("您还没有登录,或连接超时,请重新登录!",out);
  132.     Tools.showJS("window.open('../login.jsp','_self')",out);
  133. }
  134. try{
  135.     con=DBCon.getConnection();
  136. String filenamemn = WebHitChart.generateMnBarChartSize(Long.parseLong(mn_testID), 350,250,session, new PrintWriter(out));
  137. //String graphURLmn = request.getContextPath() + "/servlet/DisplayChart?filename=" + filenamemn;
  138.     String graphURLmn = request.getContextPath()+"/chart/temp/"+filenamemn;
  139.     String filenamestu = WebHitChart.generateStuHisXYChartSize(studentID, Long.parseLong(mn_testID),350,250,session, new PrintWriter(out));
  140. //String graphURLstu = request.getContextPath() + "/servlet/DisplayChart?filename=" + filenamestu;
  141.     String graphURLstu = request.getContextPath()+"/chart/temp/"+filenamestu;
  142.     //out.print("<br>graphURLmn="+graphURLmn);
  143.     //out.print("<br>graphURLstu="+graphURLstu);
  144.     //获取学生的年级信息
  145.     sql=" SELECT   `grade`.`Name`,  `grade`.`note` FROM"+
  146.         "  `grade`  INNER JOIN `UserInfo` ON (`grade`.`note` = `UserInfo`.`gradenote`)"+
  147.         " WHERE  (`UserInfo`.`vcUserNo` = '"+studentID+"')";
  148.     try{
  149.         stmt=con.createStatement();
  150.         rs=stmt.executeQuery(sql);
  151.         if(rs.next()){
  152.             gradenote=rs.getString("note");
  153.             gradename=rs.getString("Name");
  154.             rs.close();
  155.             stmt.close();
  156.         }
  157.         if(debug){
  158.             out.print("<br>stuID="+studentID+"<br>gradenote="+gradenote);
  159.         }
  160.     }
  161.     catch(SQLException se){
  162.         out.print("<br> query student error sql="+sql);
  163.         out.print("<br>"+se.toString());
  164.     }
  165.     catch(Exception e){
  166.         out.print("<br> query student error sql="+sql);
  167.         out.print("<br>"+e.toString());
  168.     }
  169.     //获取模拟考试的科目信息
  170.     sql="select * from mn_test where id="+mn_testID;
  171.     try{
  172.         mnTest=new mn_test();
  173.         Student=new student();
  174.         subs=new Vector();
  175.         stmt=con.createStatement();
  176.         rs=stmt.executeQuery(sql);
  177.         if(rs.next()){
  178.             mnTest.subs=rs.getString("subs");
  179. if(mnTest.subs==null)
  180. mnTest.subs="-1";
  181. else if(mnTest.subs.equals(""))
  182. mnTest.subs="-1";
  183.             mnTest.id=mn_testID;
  184.             mnTest.name=rs.getString("name");
  185.             mnTest.sub_num=rs.getInt("sub_num");
  186.             mnTest.gradenote=gradenote;
  187.             mnTest.testPeople=rs.getInt("testpeople");
  188.         }
  189. rs.close();
  190.         stmt.close();
  191.         if(debug){
  192.             out.print("<br>mn_test_subs="+mnTest.subs+"<br>sub_num="+mnTest.sub_num);
  193.         }
  194.     }
  195.     catch(SQLException se){
  196.         out.print("<br> query mn_test error sql="+sql);
  197.         out.print("<br>"+se.toString());
  198.     }
  199.     catch(Exception e){
  200.         out.print("<br> query mn_test error sql="+sql);
  201.         out.print("<br>"+e.toString());
  202.     }
  203.     //
  204.     //如果完成了模拟考试,
  205.     have_test=0;
  206.     sql="select count(*) as have_test from mn_history where stu_id='"+studentID+"' and mn_test_id="+mn_testID;
  207.     try{
  208.         stmt=con.createStatement();
  209.         rs=stmt.executeQuery(sql);
  210.         if(rs.next()){
  211.             have_test=rs.getInt("have_test");
  212.         }
  213.         rs.close();
  214.         stmt.close();
  215.         if(debug){
  216.             out.print("<br>query mn_history sql="+sql);
  217.         }
  218.     }
  219.     catch(SQLException se){
  220.         out.print("<br>query mn_history sql="+sql);
  221.         out.print("<br>"+se.toString());
  222.     }
  223.     catch(Exception e){
  224.         out.print("<br>query mn_history sql="+sql);
  225.         out.print("<br>"+e.toString());
  226.     }
  227.     //查询该学生是否完成该模拟考试中的所有测试
  228. %>
  229. <%if(mnTest.sub_num==0){
  230.      Tools.showalert("模拟考试还没有进行!",out);
  231.                     Tools.showJS("window.close()",out);
  232. }else if (have_test<1){
  233.      Tools.showalert("您还没有全部参加完这次模拟考试的各科测试,不能统计分数!",out);
  234.                     Tools.showJS("window.close()",out);
  235. }else{
  236.     //查询模拟考试的总分
  237.     sql="select FORMAT(sum(mark),0) as totalmark from test,mn_scores "+
  238.         "where test.id=mn_scores.test_id and mn_test_id="+mn_testID+" and stu_id='"+
  239.         studentID+"'";
  240.     try{
  241.         stmt=con.createStatement();
  242.         rs=stmt.executeQuery(sql);
  243.         if(rs.next()){
  244.             mnTest.totalMark=rs.getString("totalmark");
  245.         }
  246. rs.close();
  247.         stmt.close();
  248.         if(debug){
  249.             out.print("<br>mn_test totalMark sql="+sql);
  250.             out.print("<br>mn_test totalMark="+mnTest.totalMark);
  251.         }
  252.     }
  253.     catch(SQLException se){
  254.         out.print("<br> query totalpeople error sql="+sql);
  255.         out.print("<br>"+se.toString());
  256.     }
  257.     catch(Exception e){
  258.         out.print("<br> query totalpeople error sql="+sql);
  259.         out.print("<br>"+e.toString());
  260.     }
  261.     //查询学生信息,生成成绩单,考试日期取为所有试卷最后做的时间
  262.     sql="SELECT   `UserInfo`.`vcName`,  `UserInfo`.`vcUserNo`, "+
  263.     "  DATE_FORMAT(`mn_scores`.`test_date`,"%Y-%m-%e") as test_date,  `UserInfo`.`vcSchool`,  `UserInfo`.`jh_area`,CONCAT(`UserInfo`.`jh_area`,'<br>(',`UserInfo`.`vcSchool`,')') AS jh_area_sch "+
  264.     "FROM  `UserInfo`  LEFT OUTER JOIN `grade` ON (`UserInfo`.`gradenote` = `grade`.`note`) "+
  265.     "LEFT OUTER JOIN `mn_scores` ON (`UserInfo`.`vcUserNo` = `mn_scores`.`stu_id`) "+
  266.     "WHERE UserInfo.vcUserNo='"+studentID+"' and mn_scores.mn_test_id="+mn_testID+
  267.     " and mn_scores.stu_id='"+studentID+"'"+
  268.     " ORDER BY test_date DESC"+
  269.     " LIMIT 1";
  270.     try{
  271.     stmt=con.createStatement();
  272.     rs=stmt.executeQuery(sql);
  273.     if(rs.next()){
  274.         Student.grade=gradename;
  275.         Student.id=rs.getString("vcUserNo");
  276.         Student.jh_area=rs.getString("jh_area");
  277.         Student.jh_area_sch=rs.getString("jh_area_sch");
  278.         Student.name=rs.getString("vcName");
  279.         Student.school=rs.getString("vcSchool");
  280.         Student.test_date=rs.getString("test_date");
  281.     }
  282.         rs.close();
  283.         stmt.close();
  284.         if(debug){
  285.             out.print("<br> query student info  sql="+sql);
  286.             //out.print("<br>student info="+Student.toString());
  287.         }
  288.     }
  289.     catch(SQLException se){
  290.         out.print("<br> query student info error sql="+sql);
  291.         out.print("<br>"+se.toString());
  292.     }
  293.     catch(Exception e){
  294.         out.print("<br> query student info error sql="+sql);
  295.         out.print("<br>"+e.toString());
  296.     }
  297.     //成绩和排名
  298.     //总分
  299.     try{
  300.     //个人总分
  301.     sql=" SELECT mn_history.stu_id,mn_history.mn_test_id,  FORMAT(SUM(mn_scores.score),0) AS totalmark"+
  302.         " FROM  `mn_history`  LEFT OUTER JOIN `mn_scores` ON  (`mn_history`.`mn_test_id` = `mn_scores`.`mn_test_id`) "+
  303.         "   AND (`mn_history`.`stu_id` = `mn_scores`.`stu_id`) "+
  304.         " WHERE mn_history.mn_test_id="+mnTest.id+" and mn_history.stu_id ='"+Student.id +"'"+
  305.         " GROUP BY mn_history.stu_id,mn_history.mn_test_id"+
  306.         " ORDER BY  totalmark desc";
  307.     stmt=con.createStatement();
  308.     rs=stmt.executeQuery(sql);
  309.     if(debug)
  310.         out.println("<br><br><br> person totalmark sql="+sql);
  311.     if(rs.next()){
  312.         Student.total_mark=rs.getInt("totalmark");
  313.     }
  314.     else{
  315.         Student.total_mark=0;
  316.     }
  317.     rs.close();
  318.     stmt.close();
  319.     //排名
  320.     i10=Math.round(mnTest.testPeople *0.1);//top10
  321.     i30=Math.round(mnTest.testPeople *0.3);
  322.     if(i10==0) i10=1;
  323.     if(i30==0) i30=1;
  324.     f10=0;
  325.     f30=0;
  326.     sql=" SELECT mn_history.stu_id,mn_history.mn_test_id,  FORMAT(SUM(mn_scores.score),0) AS totalmark"+
  327.         " FROM  mn_history LEFT OUTER JOIN mn_scores ON(mn_history.stu_id=mn_scores.stu_id) "+
  328.         " AND (`mn_history`.`mn_test_id` = `mn_scores`.`mn_test_id`)"+
  329.         " WHERE mn_history.mn_test_id="+mnTest.id+
  330.         " GROUP BY mn_history.stu_id,mn_history.mn_test_id"+
  331.         " ORDER BY  totalmark desc";
  332.     stmt=con.createStatement();
  333.     rs=stmt.executeQuery(sql);
  334.     i=0;
  335.     int imark=0;
  336.     int tempPos=1;
  337.     float fmark=0;
  338.     int tmark=Integer.MAX_VALUE;
  339.     while(rs.next()){
  340.         i++;
  341.         imark=rs.getInt("totalmark");
  342.         fmark=rs.getFloat("totalmark");
  343.         if(i<=i10)
  344.             f10+=fmark;
  345.         if(i<=i30)
  346.             f30+=fmark;
  347.         //查找分数的排名
  348.         if(debug){
  349.             out.print("<br><br>student totalmark="+Student.total_mark +
  350.             "<br>sql totalmark="+rs.getInt("totalmark"));
  351.         }
  352.         if(Student.total_mark==imark){
  353.             Student.posAll=tempPos;
  354.             if(mnTest.testPeople>100)
  355.                 Student.posPercent=100*tempPos/mnTest.testPeople;
  356.             else
  357.                 Student.posPercent=tempPos;
  358.         }
  359.         else if(tmark>imark){//分数不同
  360.             tempPos++;
  361.             tmark=imark;
  362.         }
  363.     }
  364.     rs.close();
  365.     stmt.close();
  366.     Student.avgTop10=df.format(f10/i10);
  367.     Student.avgTop30=df.format(f30/i30);
  368.     if(debug){
  369.         out.print("<br>Query student's position: sql="+sql);
  370.     }
  371.     }
  372.     catch(SQLException se){
  373.         out.print("<br> Query student's position sql="+sql);
  374.         out.print("<br>"+se.toString());
  375.     }
  376.     catch(Exception e){
  377.         out.print("<br> Query student's total position sql="+sql);
  378.         out.print("<br>"+e.toString());
  379.     }
  380.     //各科目的成绩单
  381.     sql=" SELECT  test.paper as testpaper,test.testnum as testnum,mn_scores.test_rs,`subject`.`id` AS  `subid`,`subject`.`Name` AS `subname`,  FORMAT(`test`.`mark`,0) AS `totalmark`,  FORMAT(`mn_scores`.`score`,0) AS `score` "+
  382.         " FROM  `mn_scores`  LEFT OUTER JOIN `subject` ON (`mn_scores`.`sub_id` = `subject`.`ID`)"+
  383.         " LEFT JOIN `test` ON (`mn_scores`.`test_id` = `test`.`id`)"+
  384.         " WHERE  (`mn_test_id` = "+mnTest.id+") AND (`stu_id` = '"+Student.id+"')"+
  385.         " ORDER BY `subid`";
  386.     try{
  387.         stmt=con.createStatement();
  388.         rs=stmt.executeQuery(sql);
  389.         String temp=null;
  390.         String [] arrtemp=null;
  391.         String [] tests=null;
  392.         while(rs.next()){
  393.             Subject s=new Subject();
  394.             s.sub_id=rs.getInt("subid");
  395.             s.name=rs.getString("subname");
  396.             s.totalMark=rs.getString("totalmark");
  397.             s.realMark=rs.getString("score");
  398.             s.testnum=rs.getInt("testnum");
  399.             //处理试题信息
  400.             temp=rs.getString("testpaper");
  401.             tests=temp.split("#");
  402.             StringBuffer Answer=new StringBuffer();
  403.             StringBuffer Mark=new StringBuffer();
  404.             StringBuffer Dif=new StringBuffer();
  405.             StringBuffer testIDs=new StringBuffer();
  406.             StringBuffer Rate=new StringBuffer();
  407.             for(i=0;i<s.testnum;i++){
  408.                 //取回试题号
  409.                 arrtemp=tests[i].split("@");
  410.                 testIDs.append(arrtemp[0]+",");//题号
  411.                 Rate.append(T_Question.getCorrectRate(con,Integer.parseInt(arrtemp[0]))+",");
  412.                 Answer.append(arrtemp[1]+",");//答案
  413.     Mark.append(arrtemp[2]+",");
  414.                 Dif.append(arrtemp[3]+",");
  415.             }
  416.             s.arrAnswer=Answer.toString().split(",");
  417.             s.arrDif=Dif.toString().split(",");
  418.             s.arrMark=Mark.toString().split(",");
  419.             s.arrID=testIDs.toString().split(",");
  420.             s.arrRate=Rate.toString().split(",");
  421.             Answer=null;
  422.             Mark=null;
  423.             Dif=null;
  424.             testIDs=null;
  425.             //处理科目考试结果
  426.             temp=rs.getString("test_rs");
  427.             arrtemp=temp.split("#");
  428.             //s.arrAnswer=arrtemp[0].split(",");
  429.             //s.arrMark=arrtemp[1].split(",");
  430.             s.arrSubAnswer=arrtemp[0].split(",");
  431.             s.arrTF=arrtemp[1].split(",");
  432.             //s.arrDif=arrtemp[4].split(",");
  433.             s.arrSubMark=arrtemp[2].split(",");
  434.             subs.addElement(s);
  435.         }
  436. rs.close();
  437.         stmt.close();
  438.         if(debug){
  439.             out.print("<br>subject info sql="+sql);
  440.             out.print("<br>subject info="+subs.toString());
  441.         }
  442.     }
  443.     catch(SQLException se){
  444.         out.print("<br> subject info error sql="+sql);
  445.         out.print("<br>"+se.toString());
  446.     }
  447.     catch(Exception e){
  448.         out.print("<br> subject info error sql="+sql);
  449.         out.print("<br>"+e.toString());
  450.     }
  451.     //科目的平均
  452.     try{
  453.         //分校平均
  454.         sql="SELECT   `UserInfo`.`jh_area`,  `mn_history`.`mn_test_id`,  `mn_scores`.`sub_id`,"+
  455.         "  FORMAT(AVG(`mn_scores`.`score`),2) AS `score_avg`"+
  456.         "  FROM  `mn_history` "+
  457.         "  LEFT OUTER JOIN `mn_scores` ON (`mn_history`.`stu_id` = `mn_scores`.`stu_id`) "+
  458.         "  AND (`mn_history`.`mn_test_id` = `mn_scores`.`mn_test_id`)"+
  459.         "  LEFT OUTER JOIN `UserInfo` ON (`mn_history`.`stu_id` = `UserInfo`.`vcUserNo`) "+
  460.         "  WHERE"+
  461.         "  (`UserInfo`.`jh_area` = '"+Student.jh_area+"') AND "+
  462.         "  (`mn_history`.`mn_test_id` = "+mnTest.id+") "+
  463.         "  GROUP BY  `UserInfo`.`jh_area`,  `mn_history`.`mn_test_id`,  `mn_scores`.`sub_id`"+
  464.         "  ORDER BY  `mn_scores`.`sub_id`";
  465.         stmt=con.createStatement();
  466.         rs=stmt.executeQuery(sql);
  467.         i=0;
  468.         Subject s=null;
  469.         while(rs.next()){
  470.             s=(Subject)subs.elementAt(i);
  471.             s.avgArea=rs.getString("score_avg");
  472.             i++;
  473.         }
  474. rs.close();
  475.         stmt.close();
  476.         if(debug){
  477.             out.print("<br>subject area_avg sql="+sql);
  478.             out.print("<br>subject info="+subs.toString());
  479.         }
  480.         //全体平均
  481.         sql="SELECT  `mn_scores`.`mn_test_id`,  `mn_scores`.`sub_id`,"+
  482.         "  FORMAT(AVG(`mn_scores`.`score`),2) AS `score_avg`"+
  483.         "  FROM  mn_history LEFT OUTER JOIN mn_scores ON(mn_history.stu_id=mn_scores.stu_id) "+
  484.         "  AND (`mn_history`.`mn_test_id` = `mn_scores`.`mn_test_id`)"+
  485.         "  WHERE mn_history.mn_test_id="+mnTest.id+
  486.         "  GROUP BY   `mn_scores`.`mn_test_id`,  `mn_scores`.`sub_id`"+
  487.         "  ORDER BY   `mn_scores`.`sub_id`";
  488.         stmt=con.createStatement();
  489.         rs=stmt.executeQuery(sql);
  490.         i=0;
  491.         s=null;
  492.         while(rs.next()){
  493.             s=(Subject)subs.elementAt(i);
  494.             s.avgTotal=rs.getString("score_avg");
  495.             i++;
  496.         }
  497. rs.close();
  498.         stmt.close();
  499.         if(debug){
  500.             out.print("<br>subject total sql="+sql);
  501.             out.print("<br>subject info="+subs.toString());
  502.         }
  503.     }
  504.     catch(SQLException se){
  505.         out.print("<br> subject total error sql="+sql);
  506.         out.print("<br>"+se.toString());
  507.     }
  508.     catch(Exception e){
  509.         out.print("<br> subject total error sql="+sql);
  510.         out.print("<br>"+e.toString());
  511.     }
  512.     //10% top 30% top
  513.     //
  514.     DecimalFormat df=new DecimalFormat("####.##");
  515.     for(j=0;j<subs.size();j++){
  516.     //每一科目
  517.     Subject s=(Subject)subs.elementAt(j);
  518.     try{
  519.         sql="  SELECT mn_history.mn_test_id,mn_history.stu_id, mn_scores.score, mn_scores.sub_id "+
  520.             "  FROM  mn_history LEFT OUTER JOIN mn_scores ON(mn_history.stu_id=mn_scores.stu_id) "+
  521.             "  AND (`mn_history`.`mn_test_id` = `mn_scores`.`mn_test_id`)"+
  522.             "  WHERE mn_history.mn_test_id="+mnTest.id+
  523.             "  AND  sub_id="+s.sub_id+
  524.             "  ORDER BY mn_scores.score DESC";
  525.         stmt=con.createStatement();
  526.         rs=stmt.executeQuery(sql);
  527.         //top10
  528.         i10=Math.round(mnTest.testPeople *0.1);
  529.         i30=Math.round(mnTest.testPeople *0.3);
  530.         if(i10==0) i10=1;
  531.         if(i30==0) i30=1;
  532.         f10=0;
  533.         f30=0;
  534.         if(debug){
  535.             out.print("<br><br><br>Begin:j="+j+"<br>sub_name="+s.name +
  536.             "<br>f10="+f10+"<br>i30="+i30+"<br>f30="+f30);
  537.         }
  538.         i=0;
  539.         int tempPos=1;
  540.          float fmark=Float.MAX_VALUE;
  541.         float tempf=0;
  542.         float realf=Float.parseFloat(s.realMark);
  543.         if(debug){
  544.             out.print("<br>top10-top30:"+
  545.                 "<br>i10="+i10+
  546.                 "<br>i30="+i30);
  547.         }
  548.         while(rs.next()){
  549.             tempf=rs.getFloat("score");
  550.             if(debug){
  551.                 out.print("<br>sub_real_mark="+realf+
  552.                 "<br>rs:score="+tempf);
  553.             }
  554.             i++;
  555.             if(i<=i10)
  556.                 f10+=tempf;
  557.             if(i<=i30)
  558.                 f30+=tempf;
  559.             if(tempf==realf){
  560.                         s.posAll=String.valueOf(tempPos);
  561.                         if(mnTest.testPeople<=100)
  562.                             s.posPercent=s.posAll;
  563.                         else
  564.                             s.posPercent=String.valueOf(100*tempPos/mnTest.testPeople);
  565.             }
  566.             else if(fmark>tempf){
  567.                 tempPos++;
  568.                 fmark=tempf;
  569.            }
  570.         }
  571.         if(debug){
  572.             out.print("<br>end:i10="+i10+"<br>f10="+f10+"<br>i30="+i30+
  573.                 "<br>f30="+f30+"<br>posall="+s.posAll);
  574.         }
  575.         rs.close();
  576.         stmt.close();
  577.         df=new DecimalFormat("####.00");
  578.         s.avgTop10=df.format(f10/i10);
  579.         s.avgTop30=df.format(f30/i30);
  580.         if(debug){
  581.             out.print("<br>avgTop10="+s.avgTop10+"<br>avgTop30="+s.avgTop30);
  582.             out.print("<br>subject top10-30 sql="+sql);
  583.         }
  584.     }
  585.     catch(SQLException se){
  586.         out.print("<br> subject info error sql="+sql);
  587.         out.print("<br>"+se.toString());
  588.     }
  589.     catch(Exception e){
  590.         out.print("<br> subject info error sql="+sql);
  591.         out.print("<br>"+e.toString());
  592.     }
  593.     }//end for
  594.     //更新历史记录
  595.     //先将这次查询的结果存入mn_history
  596.     try{
  597.         sql=" select * from mn_history where mn_test_id="+mnTest.id+
  598.             " and stu_id='"+Student.id+"'";
  599.         stmt=con.createStatement();
  600.         rs=stmt.executeQuery(sql);
  601.         if(rs.next()){
  602.             rs.close();
  603.             stmt.close();
  604.             StringBuffer sb=new StringBuffer();
  605.             for(i=0;i<subs.size();i++){
  606.                 Subject s=(Subject)subs.elementAt(i);
  607.                 sb.append(s.name+":"+s.realMark+"#");
  608.                 }
  609.             sql=" update mn_history set totalmark="+Student.total_mark+","+
  610.                 " submark='"+sb.toString()+"',test_date='"+Student.test_date+"',"+
  611.                 " sub_num="+mnTest.sub_num+","+
  612.                 " totalpeople="+mnTest.testPeople+","+
  613.                 " position="+Student.posAll+","+
  614.                 " top10avg="+Student.avgTop10+","+
  615.                 " top30avg="+Student.avgTop30+
  616.                 " where stu_id='"+Student.id+"' and mn_test_id="+mnTest.id;
  617.             stmt=con.createStatement();
  618.             stmt.executeUpdate(sql);
  619.             if(debug) out.println("<br>update mn_history sql="+sql);
  620.             stmt.close();
  621.         }
  622.         else{
  623.             //将新记录插入数据库
  624.             rs.close();
  625.             stmt.close();
  626.             StringBuffer sb=new StringBuffer();
  627.             for(i=0;i<subs.size();i++){
  628.                 Subject s=(Subject)subs.elementAt(i);
  629.                 sb.append(s.name+":"+s.realMark+"#");
  630.                 }
  631.             sql=" insert into mn_history(stu_id,mn_test_id,totalmark,submark,test_date,sub_num,"+
  632.                 " position,top10avg,top30avg,testpeople) "+
  633.                 " values('"+Student.id+"',"+mnTest.id+","+Student.total_mark+",'"+
  634.                     sb.toString()+"','"+Student.test_date+"',"+mnTest.sub_num+","+
  635.                     Student.posAll+","+Student.avgTop10+","+Student.avgTop30+","+mnTest.testPeople+")";
  636.             stmt=con.createStatement();
  637.             stmt.executeUpdate(sql);
  638.             stmt.close();
  639.         }
  640.     }catch(SQLException se){
  641.         out.print("<br> insert into mn_history sql="+sql);
  642.         out.print("<br>"+se.toString());
  643.     }
  644.     catch(Exception e){
  645.         out.print("<br> insert into mn_history sql="+sql);
  646.         out.print("<br>"+e.toString());
  647.     }
  648.     //从mn_history中选取记录 stu_id,mn_test_id,totalmark,submark,test_date
  649.      try{
  650.   sql="SELECT   MAX(`mn_history`.`sub_num`) AS `maxsub` FROM  `mn_history`"+
  651. " WHERE  (stu_id = '"+Student.id+"')";
  652. stmt=con.createStatement();
  653.         rs=stmt.executeQuery(sql);
  654.         
  655.         if(rs.next())
  656.           maxHisSubNum=rs.getInt("maxsub");
  657. else
  658. maxHisSubNum=0;
  659. rs.close();
  660. stmt.close();
  661.         sql=" SELECT   `mn_test`.`sub_num`,`mn_test`.`testpeople`,`mn_history`.`totalpeople`,  "+
  662.             " `mn_history`.`mn_test_id`,  `mn_history`.`totalmark`,  `mn_history`.`position`,"+
  663.             " `mn_history`.`top10avg`,  `mn_history`.`top30avg`,  `mn_history`.`submark`,"+
  664.             " DATE_FORMAT(`mn_history`.`test_date`,"%Y-%m-%e") AS `test_date`, "+
  665.             " `mn_history`.`stu_id` "+
  666.             " FROM  `mn_history`  LEFT OUTER JOIN `mn_test` ON (`mn_history`.`mn_test_id` = `mn_test`.`id`)"+
  667.             " WHERE  (`mn_history`.`stu_id` = '"+Student.id+"')"+" AND (`mn_test`.`grade_note` = '"+gradenote +"')"+
  668.             " ORDER BY  `test_date` DESC";
  669.         stmt=con.createStatement();
  670.         rs=stmt.executeQuery(sql);
  671.         hisRS=new Vector();
  672.         if(debug)
  673.             out.print("<br> query mn_history sql="+sql);
  674.         String submarks;
  675.         while(rs.next()){
  676.         //构造一条历史记录/
  677.             History h=new History();
  678.             h.sub_num=rs.getInt("sub_num");
  679.             h.testdate=rs.getString("test_date");
  680.             h.mn_test_id=rs.getString("mn_test_id");
  681.             h.stu_id=rs.getString("stu_id");
  682.             h.totalmark=rs.getInt("totalmark");
  683.             submarks=rs.getString("submark");
  684.             h.sub_marks=submarks.split("#");
  685.             if(rs.getInt("testpeople")==rs.getInt("totalpeople")){
  686.                 //模拟考试的总人数没有变化
  687.                 h.top10avg=rs.getString("top10avg");
  688.                 h.top30avg=rs.getString("top30avg");
  689.                 h.position=rs.getString("position");
  690.                 h.testPeople=rs.getInt("totalpeople");
  691.             }
  692.             else{
  693.             //历史排名 //重新求排名
  694.             h.testPeople=rs.getInt("testpeople");
  695.             i10=Math.round(h.testPeople *0.1);//top10
  696.             i30=Math.round(h.testPeople *0.3);
  697.             if(i10==0) i10=1;
  698.             if(i30==0) i30=1;
  699.             f10=0;
  700.             f30=0;
  701.         try{
  702.             sql=" SELECT mn_history.stu_id,mn_history.mn_test_id,  FORMAT(SUM(mn_scores.score),0) AS totalmark"+
  703.                 " FROM  mn_history LEFT OUTER JOIN mn_scores ON(mn_history.stu_id=mn_scores.stu_id) "+
  704.                 " AND (`mn_history`.`mn_test_id` = `mn_scores`.`mn_test_id`)"+
  705.                 " WHERE mn_history.mn_test_id="+h.mn_test_id+
  706.                 " GROUP BY mn_history.stu_id,mn_history.mn_test_id"+
  707.                 " ORDER BY  totalmark desc";
  708.             Statement tempstmt=con.createStatement();
  709.             ResultSet temprs=tempstmt.executeQuery(sql);
  710.             i=0;
  711.             int imark=0;
  712.             int tempPos=1;
  713.             float fmark=0;
  714.             int tmark=Integer.MAX_VALUE;
  715.             while(temprs.next()){
  716.                 i++;
  717.                 imark=temprs.getInt("totalmark");
  718.                 fmark=temprs.getFloat("totalmark");
  719.                 if(i<=i10)
  720.                     f10+=fmark;
  721.                 if(i<=i30)
  722.                     f30+=fmark;
  723.                 //查找分数的排名
  724.                 if(debug){
  725.                     out.print("<br><br>history student totalmark="+Student.total_mark +
  726.                         "<br>sql totalmark="+temprs.getInt("totalmark"));
  727.                 }
  728.                 if(h.totalmark==imark){
  729.                     h.position=String.valueOf(tempPos);
  730.                     //Student.posAll=tempPos;
  731.                 }
  732.                 else if(tmark>imark){//分数不同
  733.                     tempPos++;
  734.                     tmark=imark;
  735.                 }
  736.             }//end while
  737.             temprs.close();
  738.             tempstmt.close();
  739.             df=new DecimalFormat("####.00");
  740.             h.top10avg=df.format(f10/i10);
  741.             h.top30avg=df.format(f30/i30);
  742.             if(debug){
  743.                 out.print("<br>Query history student's position: sql="+sql);
  744.             }
  745.         }
  746.         catch(SQLException se){
  747.             out.print("<br> Query history student's position sql="+sql);
  748.             out.print("<br>"+se.toString());
  749.         }
  750.         catch(Exception e){
  751.             out.print("<br> Query history student's total position sql="+sql);
  752.             out.print("<br>"+e.toString());
  753.         }
  754.         //将查询回的信息写入数据库
  755.         try{
  756.             sql=" update mn_history set "+
  757.                 " totalpeople="+h.testPeople+","+
  758.                 " position="+h.position+","+
  759.                 " top10avg="+h.top10avg+","+
  760.                 " top30avg="+h.top30avg+
  761.                 " where stu_id='"+Student.id+"' and mn_test_id="+mnTest.id;
  762.             stmt=con.createStatement();
  763.             stmt.executeUpdate(sql);
  764.             if(debug) out.println("<br> update mn_history sql="+sql);
  765.         }
  766.         catch(SQLException se){
  767.             out.print("<br> update history  position sql="+sql);
  768.             out.print("<br>"+se.toString());
  769.         }
  770.         catch(Exception e){
  771.             out.print("<br> update history  position sql="+sql);
  772.             out.print("<br>"+e.toString());
  773.         }
  774.         }//end else
  775.         hisRS.addElement(h);
  776.         }//end while
  777.     }catch(SQLException se){
  778.         out.print("<br> select from mn_history error sql="+sql);
  779.         out.print("<br>"+se.toString());
  780.     }
  781.     catch(Exception e){
  782.         out.print("<br> select from mn_history error sql="+sql);
  783.         out.print("<br>"+e.toString());
  784.     }
  785.     %>
  786. <HTML><HEAD><TITLE>模拟考试成绩查询</TITLE>
  787. <META http-equiv=Content-Type content="text/html; charset=gb2312">
  788. <link rel="stylesheet" type="text/css" href="../css.css">
  789. <META content="MSHTML 6.00.2462.0" name=GENERATOR></HEAD>
  790. <BODY>
  791.  <A
  792. href="http://jsptestonline.cosoft.org.cn/">首页</A>--共创题库--在线测试-模拟考试成绩查询
  793. <P align="center"> </P>
  794. <div align="center">
  795.   <table width="91%" height=832 border=0 align="center" bordercolor=#d3add1>
  796.     <tbody>
  797.       <tr>
  798.         <td height="32" align="center" valign=middle><form action="Query_mark_mn_print.jsp" method="post" name="report" target="_blank" id="report">
  799.             <table width="30%" border="0" align="right" cellpadding="0" cellspacing="0">
  800.               <tr>
  801.                 <td width="2%">&nbsp;</td>
  802.                 <td width="62%"><input name="stuID" type="hidden" id="stuID" value="<%=studentID%>">
  803.                   <input name="mn_testID" type="hidden" id="mn_testID" value="<%=mn_testID%>">
  804.                   <input name="graphURLmn" type="hidden" id="graphURLmn" value="<%=graphURLmn%>">
  805.                   <input name="graphURLstu" type="hidden" id="graphURLstu" value="<%=graphURLstu%>">
  806.                   <input name="filenamemn" type="hidden" id="filenamemn" value="<%=filenamemn%>">
  807.                   <input name="filenamestu" type="hidden" id="filenamestu" value="<%=filenamestu%>"></td>
  808.                 <td width="32%"><input type="submit" name="Submit" value="打印"></td>
  809.                 <td width="4%">&nbsp;</td>
  810.               </tr>
  811.             </table>
  812.             </form></td>
  813.       </tr>
  814.       <tr>
  815.         <td height="32" align="center" valign=middle><strong><font size="+2" face="宋体">个人成绩单(表)</font></strong>
  816.         </td>
  817.       </tr>
  818.       <tr>
  819.         <td height="43" align="center" valign=middle><table width="100%" border="0">
  820.             <tr>
  821.               <td width="53%">考试名称:&nbsp;</td>
  822.               <td width="10%">&nbsp;</td>
  823.               <td width="37%"><div align="left">共创教育研究院</div></td>
  824.             </tr>
  825.             <tr>
  826.               <td>
  827.                 <%--=Student.jh_area_sch--%>
  828.                 <%=mnTest.name%></td>
  829.               <td>&nbsp;</td>
  830.               <td width="37%"><div align="left">电话:010-68130545</div></td>
  831.             </tr>
  832.             <tr>
  833.               <td><em> </em></td>
  834.               <td>&nbsp;</td>
  835.               <td width="37%"><div align="left">网址:cosoft.org.cn</div></td>
  836.             </tr>
  837.           </table></td>
  838.       </tr>
  839.       <tr>
  840.         <td height="654" align="center" valign="top">
  841.           <table width="100%" border="1" cellpadding="0" cellspacing="0">
  842.             <tr>
  843.               <td height="37" width="20%"> <div align="center">所属学校</div></td>
  844.               <td width="20%"><div align="center">姓名</div></td>
  845.               <td width="20%"><div align="center">学号</div></td>
  846.               <td width="20%"><div align="center">年级</div></td>
  847.               <td width="20%"><div align="center">考试日期</div></td>
  848.             </tr>
  849.             <tr>
  850.               <td height="37"><div align="center"><%=Student.school%></div></td>
  851.               <td><div align="center"><%=Student.name%></div></td>
  852.               <td><div align="center"><%=Student.id%></div></td>
  853.               <td><div align="center"><%=Student.grade%></div></td>
  854.               <td><div align="center"><%=Student.test_date%></div></td>
  855.             </tr>
  856.           </table>
  857.           <div align="left"><br>
  858.             成绩和排名:</div>
  859.           <table width="100%" border="1" cellpadding="0" cellspacing="0">
  860.             <tr>
  861.               <td height="37" width="21%"> <div align="center">成绩</div></td>
  862.               <td width="14%"><div align="center">10%平均</div></td>
  863.               <td width="14%"><div align="center">30%平均</div></td>
  864.               <td width="32%"> <div align="center" width="33%">全部参加人员排名</div></td>
  865.               <td width="19%"> <div align="center" width"33%">100人换算排名</div></td>
  866.             </tr>
  867.             <tr valign="middle">
  868.               <td height="37"><div align="center"><%=Student.total_mark%>分(满分<%=mnTest.totalMark%>分)</div></td>
  869.               <td><div align="center"><%=Student.avgTop10%>分</div></td>
  870.               <td><div align="center"><%=Student.avgTop30%></div></td>
  871.               <td> <div align="center"><%=Student.posAll%>名(全部参加排名者<%=mnTest.testPeople%>人)</div></td>
  872.               <td> <div align="center"><%=Student.posPercent%></div></td>
  873.             </tr>
  874.           </table>
  875.           <div align="left"><br>
  876.             成绩单:</div>
  877.           <table width="100%" border="1" cellpadding="0" cellspacing="0">
  878.             <tr>
  879.               <td width="12%" height="37">&nbsp;</td>
  880.               <td width="11%"><div align="center">分数</div></td>
  881.               <td width="11%"><div align="center">得分</div></td>
  882.               <!--td width="11%"><div align="center">分校平均</div></td-->
  883.               <td width="11%"><div align="center">全体平均</div></td>
  884.               <td width="11%"><div align="center">10%平均</div></td>
  885.               <td width="11%"><div align="center">30%平均</div></td>
  886.               <td width="11%"><div align="center">总排名</div></td>
  887.               <td width="11%"><div align="center">100名排名</div></td>
  888.             </tr>
  889.             <%
  890.               for(i=0;i<subs.size();i++){
  891.                 Subject s=(Subject)subs.elementAt(i);
  892.               %>
  893.             <tr valign="middle">
  894.               <td height="37" > <div align="center"><%=s.name%></div></td>
  895.               <td> <div align="center"><%=s.totalMark%></div></td>
  896.               <td> <div align="center"><%=s.realMark%></div></td>
  897.               <!--td><div align="center"><%=s.avgArea%></div></td-->
  898.               <td><div align="center"><%=s.avgTotal%></div></td>
  899.               <td><div align="center"><%=s.avgTop10%></div></td>
  900.               <td><div align="center"><%=s.avgTop30%></div></td>
  901.               <td><div align="center"><%=s.posAll%></div></td>
  902.               <td><div align="center"><%=s.posPercent%></div></td>
  903.             </tr>
  904.             <%}%>
  905.           </table>
  906.           <div align="left"><br>
  907.             判分表及难易度:准确率 A(0~20%)、B(21~40%)、C(41~60%)、D(61~80%)、E(81~100%) :</div>
  908.           <%
  909.             df=new DecimalFormat("00");
  910.             for(i=0;i<subs.size();i++){
  911.                 Subject s=(Subject)subs.elementAt(i);
  912.                 colwidth=" width=""+String.valueOf(80.00/s.testnum)+"%"";
  913.          %> <table width="100%" border="1" cellspacing="0" cellpadding="0">
  914.             <tr>
  915.               <td width="8%" height="31" nowrap> <div align="center"><strong><font size="+1">科目</font></strong></div></td>
  916.               <td colspan="<%=s.testnum+1%>" width="92%">&nbsp;
  917.               </td>
  918.             </tr>
  919.             <tr>
  920.               <td rowspan="8"  width="8%"><div align="center"><%=s.name%></div></td>
  921.               <td width="12%" height="22" nowrap> <div align="center">题号</div></td>
  922.               <%for(j=1;j<=s.testnum;j++)
  923.                   out.println("<td "+colwidth+"><div align="center">"+df.format(j)+"</div></td>");
  924.               %>
  925.             </tr>
  926.             <tr>
  927.               <td   height="22" nowrap> <div align="center">正确答案</div></td>
  928.               <%for(j=0;j<s.arrAnswer.length;j++)
  929.                   out.println("<td "+colwidth+"><div align="center">"+s.arrAnswer[j]+"</div></td>");
  930.               %>
  931.             </tr>
  932.             <tr>
  933.               <td   height="22" nowrap> <div align="center">个人答案</div></td>
  934.               <%for(j=0;j<s.arrSubAnswer.length;j++)
  935.                   out.println("<td "+colwidth+"><div align="center">"+s.arrSubAnswer[j]+"</div></td>");
  936.               %>
  937.             </tr>
  938.             <tr>
  939.               <td height="22"  > <div align="center">对错</div></td>
  940.               <%for(j=0;j<s.arrTF.length;j++)
  941.                   out.println("<td "+colwidth+"><div align="center">"+s.arrTF[j]+"</div></td>");
  942.               %>
  943.             </tr>
  944.             <tr>
  945.               <td height="22" nowrap> <div align="center">分值</div></td>
  946.               <%for(j=0;j<s.arrMark.length;j++)
  947.                   out.println("<td "+colwidth+"><div align="center">"+s.arrMark[j]+"</div></td>");
  948.               %>
  949.             </tr>
  950.             <tr>
  951.               <td  height="22" nowrap> <div align="center">得分</div></td>
  952.               <%for(j=0;j<s.arrSubMark.length;j++)
  953.                   out.println("<td "+colwidth+"><div align="center">"+s.arrSubMark[j]+"</div></td>");
  954.               %>
  955.             </tr>
  956.             <tr>
  957.               <td  height="22" nowrap> <div align="center">难易度</div></td>
  958.               <%for(j=0;j<s.arrDif.length;j++)
  959.                   out.println("<td "+colwidth+"><div align="center">"+s.arrDif[j]+"</div></td>");
  960.               %>
  961.             </tr>
  962.             <tr>
  963.               <td  height="22" nowrap> <div align="center">准确率</div></td>
  964.               <%for(j=0;j<s.arrDif.length;j++)
  965.                   out.println("<td "+colwidth+"><div align="center">"+s.arrRate[j]+"</div></td>");
  966.               %>
  967.             </tr>
  968.           </table>
  969.           <%}//end for 科目判分%> <div align="left"><br>
  970.             历史记录 :</div>
  971.           <%
  972.         colwidth=" width=""+String.valueOf(88.00/(maxHisSubNum+4))+"%"";
  973.         %> <table width="100%" border="1" cellpadding="0" cellspacing="0">
  974.             <tr>
  975.               <td width="12%" height="31" nowrap> <div align="center"><strong>考试日期</strong></div></td>
  976.               <td <%=colwidth%> nowrap><div align="center"><strong>总分</strong></div></td>
  977.               <td <%=colwidth%> nowrap><div align="center"><strong>10%平均</strong></div></td>
  978.               <td <%=colwidth%> nowrap><div align="center"><strong>30%平均</strong></div></td>
  979.               <td <%=colwidth%> nowrap><div align="center"><strong>排名</strong></div></td>
  980.               <%
  981.                /*
  982.     for(i=0;i<subs.size();i++){
  983.                     out.println("<td "+colwidth+" nowrap><div align="center"><strong>"+
  984.                         ((Subject)subs.elementAt(i)).name+"</div></td>");
  985.                 }
  986. */
  987. for(i=0;i<maxHisSubNum;i++){
  988.                     out.println("<td "+colwidth+" nowrap>&nbsp;</td>");
  989.                 }
  990.               %>
  991.             </tr>
  992.             <%for(i=0;i<hisRS.size();i++){
  993.                 History h=(History)hisRS.elementAt(i);
  994.             %>
  995.             <tr>
  996.               <td nowrap> <div align="center"><%=h.testdate%></div></td>
  997.               <td nowrap> <div align="center"><%=h.totalmark%></div></td>
  998.               <td nowrap> <div align="center"><%=h.top10avg%></div></td>
  999.               <td nowrap> <div align="center"><%=h.top30avg%></div></td>
  1000.               <td nowrap> <div align="center"><%=h.position%></div></td>
  1001.               <%for(j=0;j<h.sub_num;j++)
  1002.                 {   String [] submark=h.sub_marks[j].split(":");
  1003.                     //out.println("<td><div align="center">"+submark[1]+"</div></td>");
  1004.                     out.println("<td nowrap><div align="center">"+h.sub_marks[j]+"</div></td>");
  1005.                 }
  1006. for(;j<maxHisSubNum;j++)
  1007. out.println("<td nowrap>&nbsp;</td>");
  1008.                 %>
  1009.             </tr>
  1010.             <%}%>
  1011.           </table> 
  1012.         </td>
  1013.       </tr>
  1014.       <tr>
  1015.         <td height="35" align="center" valign=middle>
  1016. <br>
  1017. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  1018.             <tr>
  1019.               <td width="0%">&nbsp;</td>
  1020.               <td width="45%"><div align="right"><img src="<%= graphURLmn %>" width=350 height=250 border=0 ></div></td>
  1021.               <td width="8%">&nbsp;</td>
  1022.               <td width="47%"><img src="<%= graphURLstu %>" width=350 height=250 border=0 ></td>
  1023.             </tr>
  1024.             <tr>
  1025.               <td>&nbsp;</td>
  1026.               <td><div align="right"></div></td>
  1027.               <td>&nbsp;</td>
  1028.               <td>&nbsp;</td>
  1029.             </tr>
  1030.           </table></td>
  1031.       </tr>
  1032.     </tbody>
  1033.   </table>
  1034. </div>
  1035. </BODY></HTML>
  1036. <%
  1037. }
  1038. }
  1039. catch(Exception e){
  1040.     System.out.print(e.toString());
  1041. }
  1042. finally{
  1043.     DBCon.dropConnection();
  1044. }
  1045. %>