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

教育系统应用

开发平台:

WORD

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <!-- saved from url=(0041)http://jsptestonline.cosoft.org.cn/senior/none_xt.jsp -->
  3. <%@ page contentType="text/html; charset=gb2312" language="java"%>
  4. <%@ page import="java.sql.*" %>
  5. <%@ page import="jinghua.*"%>
  6. <jsp:useBean id="DBCon" class="jinghua.JinghuaConn" scope="session">
  7. </jsp:useBean>
  8. <%!Connection con;
  9. boolean debug=false;
  10. String studentID="";
  11. String gradenote="";
  12. Statement stmt=null;
  13. ResultSet rs=null;
  14. String sql="";
  15. %>
  16. <%
  17. try{
  18.     studentID=(String)session.getAttribute("studentID");
  19.     if(studentID==null){
  20.         throw new Exception();
  21.     }
  22. }catch(Exception e){
  23.     Tools.showalert("您还没有登录,或连接超时,请重新登录!",out);
  24.    Tools.showJS("window.open('../login.jsp','_self')",out);
  25. }
  26. try{
  27.     con=DBCon.getConnection();
  28.     //获取学生的年级信息
  29.     //sql="select id,gradenote,grade.Name as gn "+
  30.     //"from student  INNER JOIN grade ON (student.gradenote = grade.note) "+
  31.     //" where stuid='"+studentID+"'";
  32.     sql="select id,gradenote from UserInfo where vcUserNo='"+studentID+"'";
  33.     try{
  34.         stmt=con.createStatement();
  35.         rs=stmt.executeQuery(sql);
  36.         if(rs.next()){
  37.             gradenote=rs.getString("gradenote");
  38.             rs.close();
  39.             stmt.close();
  40.         }
  41.         if(debug){
  42.             out.print("<br>stuID="+studentID+"<br>gradenote="+gradenote);
  43.         }
  44.     }
  45.     catch(SQLException se){
  46.         out.print("<br> query student error sql="+sql);
  47.         out.print("<br>"+se.toString());
  48.     }
  49.     catch(Exception e){
  50.         out.print("<br> query student error sql="+sql);
  51.         out.print("<br>"+e.toString());
  52.     }
  53. %>
  54. <HTML><HEAD><TITLE>共创学堂</TITLE>
  55. <META http-equiv=Content-Type content="text/html; charset=gb2312">
  56. <LINK
  57. href="style/style.css" type=text/css rel=stylesheet>
  58. <SCRIPT src="js/html.js"></SCRIPT>
  59. <SCRIPT src="js/gnb_menus_layer.js"></SCRIPT>
  60. <SCRIPT src="js/menu.js"></SCRIPT>
  61. <SCRIPT src="js/jumpmenu.js"></SCRIPT>
  62. <SCRIPT src="js/Valid.js"></SCRIPT>
  63. <META content="MSHTML 6.00.2722.900" name=GENERATOR></HEAD>
  64. <BODY bgColor=#ffffff text=#000000 vlink="#0000FF">
  65. <CENTER>
  66. <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  67.   <TBODY>
  68.   <TR>
  69.       <TD vAlign=bottom align=right width=160><A
  70.       href="http://jsptestonline.cosoft.org.cn/"><IMG height=45 src="images/logo.gif"
  71.       width=160></A></TD>
  72.     <TD align=right>
  73.       <TABLE cellSpacing=0 cellPadding=0 width=260 border=0>
  74.         <TBODY>
  75.         <TR>
  76.             <TD vAlign=bottom width=7 bgColor=#b2aeb8><IMG height=18
  77.             src="images/pic_top_y.gif" width=7></TD>
  78.           <TD align=right bgColor=#b2aeb8>
  79.             <TABLE height=18 cellSpacing=0 cellPadding=0 width=240 border=0>
  80.               <TBODY>
  81.               <TR>
  82.                   <TD><IMG height=11 src="images/ico_t_mail.gif"
  83.                 width=13></TD>
  84.                 <TD><A class=black
  85.                   href="http://jsptestonline.cosoft.org.cn/help/use/use_004.jsp">在线咨询</A></TD>
  86.                   <TD><IMG height=15 src="images/ico_t_help.gif"
  87.                 width=13></TD>
  88.                 <TD><A class=black
  89.                   href="http://jsptestonline.cosoft.org.cn/help/buy/buy_001.jsp">申请服务</A></TD>
  90.                   <TD><IMG height=13 src="images/ico_t_lc.gif"
  91.                 width=14></TD>
  92.                 <TD><A class=black
  93.                   href="http://jsptestonline.cosoft.org.cn/help/product/pro_001.jsp">产品介绍</A></TD>
  94.                   <TD width=10><IMG height=10 src="images/blank.gif"
  95.                   width=10></TD>
  96.                 </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  97.       <TABLE height=12 cellSpacing=0 cellPadding=0 width=100 border=0>
  98.         <TBODY>
  99.         <TR>
  100.             <TD><IMG height=1 src="images/blank.gif"
  101.         width=618></TD>
  102.           </TR></TBODY></TABLE>
  103.       <TABLE cellSpacing=0 cellPadding=0>
  104.         <TBODY>
  105.         <TR>
  106.           <TD>
  107.             <TABLE style="PADDING-BOTTOM: 1px" cellSpacing=0 cellPadding=0
  108.             border=0>
  109.               <TBODY>
  110.               <TR>
  111.                         <TD id=gnb_link_www
  112.                 onmouseover="javascript:showSubMenuLayer('www')"
  113.                 style="POSITION: relative"
  114.                 onmouseout="javascript:hideSubMenuLayer('www')" align=middle
  115.                 width=40><SPAN class=gnbMenu><A id=gnb_link_text_www
  116.                   style="POSITION: relative"
  117.                   href="http://jsptestonline.cosoft.org.cn/index.jsp">首页</A></SPAN></TD>
  118.                   <TD><IMG height=7 src="images/pic_top_line.gif"
  119.                 width=1></TD>
  120.                         <TD id=gnb_link_senior
  121.                 onmouseover="javascript:showSubMenuLayer('senior')"
  122.                 style="POSITION: relative"
  123.                 onmouseout="javascript:hideSubMenuLayer('senior')" align=middle
  124.                 width=70><SPAN class=gnbMenu><A id=gnb_link_text_senior
  125.                   style="FONT-WEIGHT: bold; COLOR: #b77bb4; POSITION: relative"
  126.                   href="http://jsptestonline.cosoft.org.cn/senior/index.jsp">高考通</A></SPAN></TD>
  127.                   <TD><IMG height=7 src="images/pic_top_line.gif"
  128.                 width=1></TD>
  129.                         <TD id=gnb_link_junior
  130.                 onmouseover="javascript:showSubMenuLayer('junior')"
  131.                 style="POSITION: relative"
  132.                 onmouseout="javascript:hideSubMenuLayer('junior')" align=middle
  133.                 width=70><SPAN class=gnbMenu><A id=gnb_link_text_junior
  134.                   style="POSITION: relative"
  135.                   href="http://jsptestonline.cosoft.org.cn/junior/index.jsp">中考通</A></SPAN></TD>
  136.                   <TD><IMG height=7 src="images/pic_top_line.gif"
  137.                 width=1></TD>
  138.                         <TD id=gnb_link_exercises
  139.                 onmouseover="javascript:showSubMenuLayer('exercises')"
  140.                 style="POSITION: relative"
  141.                 onmouseout="javascript:hideSubMenuLayer('exercises')"
  142.                 align=middle width=70><SPAN class=gnbMenu><A
  143.                   id=gnb_link_text_exercises style="POSITION: relative"
  144.                   href="http://jsptestonline.cosoft.org.cn/exercises/index.jsp">共创题库</A></SPAN></TD>
  145.                   <TD><IMG height=7 src="images/pic_top_line.gif"
  146.                 width=1></TD>
  147.                         <TD id=gnb_link_community
  148.                 onmouseover="javascript:showSubMenuLayer('community')"
  149.                 style="POSITION: relative"
  150.                 onmouseout="javascript:hideSubMenuLayer('community')"
  151.                 align=middle width=70><SPAN class=gnbMenu><A
  152.                   id=gnb_link_text_community style="POSITION: relative"
  153.                   href="http://jsptestonline.cosoft.org.cn/community/index.jsp">学员社区</A></SPAN></TD>
  154.                   <TD><IMG height=7 src="images/pic_top_line.gif"
  155.                 width=1></TD>
  156.                         <TD id=gnb_link_myjh
  157.                 onmouseover="javascript:showSubMenuLayer('myjh')"
  158.                 style="POSITION: relative"
  159.                 onmouseout="javascript:hideSubMenuLayer('myjh')" align=middle
  160.                 width=70><SPAN class=gnbMenu><A id=gnb_link_text_myjh
  161.                   style="POSITION: relative"
  162.                   href="http://jsptestonline.cosoft.org.cn/myjh/index.jsp">我的共创</A></SPAN></TD>
  163.                   <TD><IMG height=7 src="images/pic_top_line.gif"
  164.                 width=1></TD>
  165.                         <TD id=gnb_link_help
  166.                 onmouseover="javascript:showSubMenuLayer('help')"
  167.                 style="POSITION: relative"
  168.                 onmouseout="javascript:hideSubMenuLayer('help')" align=middle
  169.                 width=70><SPAN class=gnbMenu><A id=gnb_link_text_help
  170.                   style="POSITION: relative"
  171.                   href="http://jsptestonline.cosoft.org.cn/help/index.jsp">服务中心</A></SPAN></TD>
  172.                       </TR></TBODY></TABLE></TD>
  173.             <TD><IMG height=10 src="images/blank.gif"
  174.         width=10></TD>
  175.           </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  176.   <TABLE cellSpacing=0 cellPadding=0 width="100%"
  177. background=images/bg_top_senior.gif border=0>
  178.     <TBODY>
  179.     <TR>
  180.     <TD align=right height=6>
  181.       <TABLE cellSpacing=0 cellPadding=0 width=778 border=0>
  182.         <TBODY>
  183.         <TR>
  184.             <TD><IMG style="MARGIN-LEFT: 345px" height=6
  185.             src="images/menu_other.gif"
  186.   width=66></TD>
  187.           </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  188. <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#d3add1 border=0>
  189.   <TBODY>
  190.   <TR>
  191.       <TD align=middle><IMG height=1 src="images/blank.gif"
  192.   width=778></TD>
  193.     </TR>
  194.   <TR>
  195.     <TD align=right height=26>
  196.       <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  197.         <TBODY>
  198.         <TR>
  199.             <TD style="COLOR: #ffffff" noWrap><IMG height=10
  200.             src="images/blank.gif" width=20><SPAN
  201.             style="FONT-WEIGHT: bold; COLOR: #ffffff">高考通</SPAN></TD>
  202.             <TD style="COLOR: #ffffff" noWrap width=466><IMG height=11
  203.             src="images/ico_bit.gif" width=9><A class=white
  204.             href="http://jsptestonline.cosoft.org.cn/senior/index.jsp">高考通</A>  <IMG
  205.             height=11 src="images/ico_bit.gif" width=9><A class=white
  206.             href="http://jsptestonline.cosoft.org.cn/senior/none_g3.jsp">高考通高三</A>  <IMG
  207.             height=11 src="images/ico_bit.gif" width=9><A class=white
  208.             href="http://jsptestonline.cosoft.org.cn/senior/none_g2.jsp">高考通高二</A>  <IMG
  209.             height=11 src="images/ico_bit.gif" width=9><A class=white
  210.             href="http://jsptestonline.cosoft.org.cn/senior/none_g1.jsp">高考通高一</A>  </TD>
  211.           </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  212. <TABLE cellSpacing=0 cellPadding=0 width=770 border=0>
  213.   <TBODY>
  214.   <TR>
  215.     <TD width=620>依靠共创,学习倍感轻松</TD>
  216.     <TD align=right width=150></TD></TR></TBODY></TABLE>
  217.   <table width="770" border="0" cellspacing="0" cellpadding="0">
  218.     <tr>
  219.       <td><img src="images/temp.gif" width="770" height="144"></td>
  220.     </tr>
  221.   </table>
  222.   <!--begin 内容区 -->
  223.   <table width="770" border="0" cellspacing="0" cellpadding="0">
  224.     <tr valign="top" align="center">
  225.       <td width="178" class=bd_menul> <br>
  226.         <table border="0" cellspacing="0" cellpadding="0">
  227.           <tr>
  228.             <td>
  229. <a href="stu_test_free.jsp">
  230.               <img src="images/bt_test_free.gif" width="97" height="43" border="0" onClick="Open_free_test()"></a></td>
  231.           </tr>
  232.   <tr>
  233.             <td>&nbsp;</td>
  234.           </tr>
  235.   <tr>
  236.             <td><a href="stuUnit.jsp"><img src="images/bt_test_01.gif" width="97" height="43" border="0"></a></td>
  237.           </tr>
  238.           <tr>
  239.             <td>&nbsp;</td>
  240.           </tr>
  241.           <tr>
  242.             <td><a href="stu_test_mn.jsp"><img src="images/bt_test_05.gif" width="105" height="46" border="0"></a></td>
  243.           </tr>
  244.           <tr>
  245.             <td>&nbsp;</td>
  246.           </tr>
  247.           <tr>
  248.             <td><a href="QueryMark_Type.jsp"><img src="images/bt_test_03.gif" width="97" height="43" border="0"></a></td>
  249.           </tr>
  250.           <tr>
  251.             <td>&nbsp;</td>
  252.           </tr>
  253.           <tr>
  254.             <td><a href="stu_04.html"><img src="images/bt_test_04.gif" width="97" height="43" border="0"></a></td>
  255.           </tr>
  256.   <tr>
  257.             <td>&nbsp;</td>
  258.           </tr>
  259.           <tr>
  260.             <td><a href="../errorpad/errorpad.jsp" target="_self"><img src="images/bt_test_errorpad.gif" width="97" height="43" border="0"></a></td>
  261.           </tr>
  262.         </table>
  263.       <p>&nbsp;</p></td>
  264.       <td> <br>
  265.         <br>
  266.         <table width="540" border="0" cellspacing="1" cellpadding="2" bgcolor="#d3add1">
  267.         <%
  268. //查询该年级(gradenote)的模拟考试信息
  269. //正在进行的模拟考试
  270. sql="select * from mn_test where  status=2 and grade_note='"+gradenote+"' and "+
  271.     "begin_date<=CURRENT_DATE  order by begin_date";
  272. stmt=con.createStatement();
  273. rs=stmt.executeQuery(sql);
  274. while(rs.next()){
  275. %>
  276.     <tr bgcolor="#FFFFFF">
  277.             <td colspan="5">
  278.             <a href="mn_test.jsp?mn_testID=<%=rs.getInt("id")%>&stuID=<%=studentID%>"
  279.                         title="<%=rs.getString("name")%>"
  280.    target="_blank">★ <%=rs.getString("name")%>
  281.   </a>
  282.             &nbsp;</td>
  283.           </tr>
  284. <%
  285. }
  286. rs.close();
  287. stmt.close();
  288. //未来进行的模拟考试
  289. sql="select * from mn_test where status=2 and grade_note='"+gradenote+"' and "+
  290.     "begin_date>CURRENT_DATE  order by begin_date";
  291. stmt=con.createStatement();
  292. rs=stmt.executeQuery(sql);
  293. while(rs.next()){
  294. %>
  295.           <tr bgcolor="#FFFFFF">
  296.             <td colspan="5">★ <%=rs.getString("name")%></td>
  297.           </tr>
  298. <%
  299. }
  300. rs.close();
  301. stmt.close();
  302. %>
  303.         </table>
  304.   </td>
  305.     </tr>
  306.   </table>
  307.   <!--end 内容区 -->
  308.   <!--begin bottom -->
  309.   <TABLE
  310. style="BORDER-TOP: #dbdbdb 1px solid; MARGIN-TOP: 10px; MARGIN-BOTTOM: 10px; BACKGROUND-COLOR: #f6f6f6"
  311. cellSpacing=0 cellPadding=0 width="100%" border=0>
  312.   <TBODY>
  313.   <TR>
  314.     <TD align=middle colSpan=2 height=30>
  315.       <TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
  316.         <TBODY>
  317.         <TR>
  318.           <TD><A href="http://jsptestonline.cosoft.org.cn/index.html"
  319.             target=_blank>关于我们</A> | <A
  320.             href="http://jsptestonline.cosoft.org.cn/contact/3_ywhz.html"
  321.             target=_blank>联系方式</A> | 网站地图 | <A
  322.             href="http://jsptestonline.cosoft.org.cn/about/service.html"
  323.             target=_blank>服务条款</A> | <A
  324.             href="http://jsptestonline.cosoft.org.cn/about/privacy.html"
  325.             target=_blank>隐私权保护</A> | <A
  326.             href="http://jsptestonline.cosoft.org.cn/about/copyright.html"
  327.             target=_blank>版权声明</A></TD>
  328.           <TD align=middle width=220>版权所有:<A href="http://jsptestonline.cosoft.org.cn/"
  329.             target=_blank>共创教育机构</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!--end bottom --></CENTER></BODY></HTML>
  330. <%}
  331. catch(Exception e){
  332.     System.out.print(e.toString());
  333. }
  334. finally{
  335.     DBCon.dropConnection();
  336. }
  337. %>