stu_test_free1.jsp
资源名称:0102010.rar [点击查看]
上传用户:nbluoke
上传日期:2013-08-09
资源大小:4851k
文件大小:18k
源码类别:
教育系统应用
开发平台:
WORD
- <%@ page contentType="text/html; charset=gb2312" language="java"%>
- <%@ page import="java.sql.*" %>
- <%@ page import="jinghua.*"%>
- <jsp:useBean id="DBCon" class="jinghua.JinghuaConn" scope="session">
- </jsp:useBean>
- <%!Connection con;
- boolean debug=false;
- String studentID="";
- String gradenote="";
- Statement stmt=null;
- ResultSet rs=null;
- String sql="";
- %>
- <%
- try{
- studentID=(String)session.getAttribute("studentID");
- if(studentID==null){
- throw new Exception();
- }
- }catch(Exception e){
- Tools.showalert("您还没有登录,或连接超时,请重新登录!",out);
- Tools.showJS("window.open('../login.jsp','_self')",out);
- }
- try{
- con=DBCon.getConnection();
- //获取学生的年级信息
- //sql="select id,gradenote,grade.Name as gn "+
- //"from student INNER JOIN grade ON (student.gradenote = grade.note) "+
- //" where stuid='"+studentID+"'";
- sql="select id,gradenote from UserInfo where vcUserNo='"+studentID+"'";
- try{
- stmt=con.createStatement();
- rs=stmt.executeQuery(sql);
- if(rs.next()){
- gradenote=rs.getString("gradenote");
- rs.close();
- stmt.close();
- }
- if(debug){
- out.print("<br>stuID="+studentID+"<br>gradenote="+gradenote);
- }
- }
- catch(SQLException se){
- out.print("<br> query student error sql="+sql);
- out.print("<br>"+se.toString());
- }
- catch(Exception e){
- out.print("<br> query student error sql="+sql);
- out.print("<br>"+e.toString());
- }
- //--年级,科目,知识点三个下拉列表框联动-->
- out.print(Tools.sub_know(con));
- out.print(Tools.grade_sub(con));
- }
- catch(Exception e){
- System.out.print(e.toString());
- }
- finally{
- DBCon.dropConnection();
- }
- %>
- <!--年级,科目,知识点三个下拉列表框联动-->
- <script language="JavaScript">
- function changegs(locationid){
- document.myform.Subject.length =1;
- document.myform.KnowPoint.length =1;
- var locationid=locationid;
- var i;
- for (i=0;i < gscount; i++){
- if (grade_sub[i][0] == locationid) {
- document.myform.Subject.options[document.myform.Subject.length] = new Option(grade_sub[i][2], grade_sub[i][1]);
- }
- }
- }
- function changesk(locationid){
- document.myform.KnowPoint.length =1;
- var locationid=locationid;
- var i;
- for (i=0;i < gskcount; i++){
- if (grade_sub_know[i][1] == locationid){
- document.myform.KnowPoint.options[document.myform.KnowPoint.length] = new Option(grade_sub_know[i][3], grade_sub_know[i][2]);
- }
- }
- }
- function InitForm(){
- changegs('<%=gradenote%>')
- }
- </script>
- <script language="javascript">
- function CheckForm(f)
- {
- if( f.testnumber.value.length<1)
- {
- alert("您还有输入测验的试题数!");
- return false;
- }
- if(!isNumberString(f.testnumber.value,"1234567890."))
- {
- alert("嘿!您在试题数里填了东西,但怎么不是数字呢?n");
- return false;
- }else if(f.testnumber.value<10){
- alert("每次测验至少要有10道试题!!");
- return false;
- }else if(f.testnumber.value>100){
- alert("学堂提供最多100道试题的测验!!");
- return false;
- }
- if( !(f.testorder[0].checked || f.testorder[1].checked||f.testorder[2].checked) ) {
- alert("您还没有选择测试顺序!")
- return false;
- }
- return ture;
- }
- function isNumberString (InString,RefString)
- {
- if(InString.length==0) return (false);
- for (Count=0; Count < InString.length; Count++) {
- TempChar= InString.substring (Count, Count+1);
- if (RefString.indexOf (TempChar, 0)==-1)
- return (false);
- }
- return (true);
- }
- </script>
- <HTML><HEAD><TITLE>共创学堂</TITLE>
- <META http-equiv=Content-Type content="text/html; charset=gb2312">
- <LINK
- href="style/style.css" type=text/css rel=stylesheet>
- <SCRIPT src="js/html.js"></SCRIPT>
- <SCRIPT src="js/gnb_menus_layer.js"></SCRIPT>
- <SCRIPT src="js/menu.js"></SCRIPT>
- <SCRIPT src="js/jumpmenu.js"></SCRIPT>
- <SCRIPT src="js/Valid.js"></SCRIPT>
- <META content="MSHTML 6.00.2722.900" name=GENERATOR></HEAD>
- <BODY bgColor=#ffffff text=#000000 vlink="#0000FF" onLoad="InitForm()">
- <CENTER>
- <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD vAlign=bottom align=right width=160><A
- href="http://jsptestonline.cosoft.org.cn/"><IMG height=45 src="images/logo.gif"
- width=160></A></TD>
- <TD align=right>
- <TABLE cellSpacing=0 cellPadding=0 width=260 border=0>
- <TBODY>
- <TR>
- <TD vAlign=bottom width=7 bgColor=#b2aeb8><IMG height=18
- src="images/pic_top_y.gif" width=7></TD>
- <TD align=right bgColor=#b2aeb8>
- <TABLE height=18 cellSpacing=0 cellPadding=0 width=240 border=0>
- <TBODY>
- <TR>
- <TD><IMG height=11 src="images/ico_t_mail.gif"
- width=13></TD>
- <TD><A class=black
- href="http://jsptestonline.cosoft.org.cn/help/use/use_004.jsp">在线咨询</A></TD>
- <TD><IMG height=15 src="images/ico_t_help.gif"
- width=13></TD>
- <TD><A class=black
- href="http://jsptestonline.cosoft.org.cn/help/buy/buy_001.jsp">申请服务</A></TD>
- <TD><IMG height=13 src="images/ico_t_lc.gif"
- width=14></TD>
- <TD><A class=black
- href="http://jsptestonline.cosoft.org.cn/help/product/pro_001.jsp">产品介绍</A></TD>
- <TD width=10><IMG height=10 src="images/blank.gif"
- width=10></TD>
- </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
- <TABLE height=12 cellSpacing=0 cellPadding=0 width=100 border=0>
- <TBODY>
- <TR>
- <TD><IMG height=1 src="images/blank.gif"
- width=618></TD>
- </TR></TBODY></TABLE>
- <TABLE cellSpacing=0 cellPadding=0>
- <TBODY>
- <TR>
- <TD>
- <TABLE style="PADDING-BOTTOM: 1px" cellSpacing=0 cellPadding=0
- border=0>
- <TBODY>
- <TR>
- <TD id=gnb_link_www
- onmouseover="javascript:showSubMenuLayer('www')"
- style="POSITION: relative"
- onmouseout="javascript:hideSubMenuLayer('www')" align=middle
- width=40><SPAN class=gnbMenu><A id=gnb_link_text_www
- style="POSITION: relative"
- href="http://jsptestonline.cosoft.org.cn/index.jsp">首页</A></SPAN></TD>
- <TD><IMG height=7 src="images/pic_top_line.gif"
- width=1></TD>
- <TD id=gnb_link_senior
- onmouseover="javascript:showSubMenuLayer('senior')"
- style="POSITION: relative"
- onmouseout="javascript:hideSubMenuLayer('senior')" align=middle
- width=70><SPAN class=gnbMenu><A id=gnb_link_text_senior
- style="FONT-WEIGHT: bold; COLOR: #b77bb4; POSITION: relative"
- href="http://jsptestonline.cosoft.org.cn/senior/index.jsp">高考通</A></SPAN></TD>
- <TD><IMG height=7 src="images/pic_top_line.gif"
- width=1></TD>
- <TD id=gnb_link_junior
- onmouseover="javascript:showSubMenuLayer('junior')"
- style="POSITION: relative"
- onmouseout="javascript:hideSubMenuLayer('junior')" align=middle
- width=70><SPAN class=gnbMenu><A id=gnb_link_text_junior
- style="POSITION: relative"
- href="http://jsptestonline.cosoft.org.cn/junior/index.jsp">中考通</A></SPAN></TD>
- <TD><IMG height=7 src="images/pic_top_line.gif"
- width=1></TD>
- <TD id=gnb_link_exercises
- onmouseover="javascript:showSubMenuLayer('exercises')"
- style="POSITION: relative"
- onmouseout="javascript:hideSubMenuLayer('exercises')"
- align=middle width=70><SPAN class=gnbMenu><A
- id=gnb_link_text_exercises style="POSITION: relative"
- href="http://jsptestonline.cosoft.org.cn/exercises/index.jsp">共创题库</A></SPAN></TD>
- <TD><IMG height=7 src="images/pic_top_line.gif"
- width=1></TD>
- <TD id=gnb_link_community
- onmouseover="javascript:showSubMenuLayer('community')"
- style="POSITION: relative"
- onmouseout="javascript:hideSubMenuLayer('community')"
- align=middle width=70><SPAN class=gnbMenu><A
- id=gnb_link_text_community style="POSITION: relative"
- href="http://jsptestonline.cosoft.org.cn/community/index.jsp">学员社区</A></SPAN></TD>
- <TD><IMG height=7 src="images/pic_top_line.gif"
- width=1></TD>
- <TD id=gnb_link_myjh
- onmouseover="javascript:showSubMenuLayer('myjh')"
- style="POSITION: relative"
- onmouseout="javascript:hideSubMenuLayer('myjh')" align=middle
- width=70><SPAN class=gnbMenu><A id=gnb_link_text_myjh
- style="POSITION: relative"
- href="http://jsptestonline.cosoft.org.cn/myjh/index.jsp">我的共创</A></SPAN></TD>
- <TD><IMG height=7 src="images/pic_top_line.gif"
- width=1></TD>
- <TD id=gnb_link_help
- onmouseover="javascript:showSubMenuLayer('help')"
- style="POSITION: relative"
- onmouseout="javascript:hideSubMenuLayer('help')" align=middle
- width=70><SPAN class=gnbMenu><A id=gnb_link_text_help
- style="POSITION: relative"
- href="http://jsptestonline.cosoft.org.cn/help/index.jsp">服务中心</A></SPAN></TD>
- </TR></TBODY></TABLE></TD>
- <TD><IMG height=10 src="images/blank.gif"
- width=10></TD>
- </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
- <TABLE cellSpacing=0 cellPadding=0 width="100%"
- background=images/bg_top_senior.gif border=0>
- <TBODY>
- <TR>
- <TD align=right height=6>
- <TABLE cellSpacing=0 cellPadding=0 width=778 border=0>
- <TBODY>
- <TR>
- <TD><IMG style="MARGIN-LEFT: 345px" height=6
- src="images/menu_other.gif"
- width=66></TD>
- </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#d3add1 border=0>
- <TBODY>
- <TR>
- <TD align=middle><IMG height=1 src="images/blank.gif"
- width=778></TD>
- </TR>
- <TR>
- <TD align=right height=26>
- <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD style="COLOR: #ffffff" noWrap><IMG height=10
- src="images/blank.gif" width=20><SPAN
- style="FONT-WEIGHT: bold; COLOR: #ffffff">高考通</SPAN></TD>
- <TD style="COLOR: #ffffff" noWrap width=466><IMG height=11
- src="images/ico_bit.gif" width=9><A class=white
- href="http://jsptestonline.cosoft.org.cn/senior/index.jsp">高考通</A> <IMG
- height=11 src="images/ico_bit.gif" width=9><A class=white
- href="http://jsptestonline.cosoft.org.cn/senior/none_g3.jsp">高考通高三</A> <IMG
- height=11 src="images/ico_bit.gif" width=9><A class=white
- href="http://jsptestonline.cosoft.org.cn/senior/none_g2.jsp">高考通高二</A> <IMG
- height=11 src="images/ico_bit.gif" width=9><A class=white
- href="http://jsptestonline.cosoft.org.cn/senior/none_g1.jsp">高考通高一</A> </TD>
- </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
- <TABLE cellSpacing=0 cellPadding=0 width=770 border=0>
- <TBODY>
- <TR>
- <TD width=620>依靠共创,学习倍感轻松</TD>
- <TD align=right width=150></TD></TR></TBODY></TABLE>
- <table width="770" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><img src="images/temp.gif" width="770" height="144"></td>
- </tr>
- </table>
- <!--begin 内容区 -->
- <table width="770" border="0" cellspacing="0" cellpadding="0">
- <tr valign="top" align="center">
- <td width="178" class=bd_menul> <br>
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td>
- <a href="stu_test_free.jsp">
- <img src="images/bt_test_free.gif" width="97" height="43" border="0" onClick="Open_free_test()"></a></td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td><a href="stuUnit.jsp"><img src="images/bt_test_01.gif" width="97" height="43" border="0"></a></td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td><a href="stu_test_mn.jsp"><img src="images/bt_test_05.gif" width="105" height="46" border="0"></a></td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td><a href="QueryMark_Type.jsp"><img src="images/bt_test_03.gif" width="97" height="43" border="0"></a></td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td><a href="stu_04.html"><img src="images/bt_test_04.gif" width="97" height="43" border="0"></a></td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td><a href="../errorpad/errorpad.jsp" target="_self"><img src="images/bt_test_errorpad.gif" width="97" height="43" border="0"></a></td>
- </tr>
- </table>
- <p> </p></td>
- <td> <p><br>
- <br>
- </p>
- <FORM action="free_test_paper.jsp" method="post" name="myform" target="_blank" id="myform" onSubmit="return CheckForm(this)">
- <table width="422" border="0" cellspacing="0" cellpadding="0" style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; BORDER-LEFT: #cccccc 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #f3f3f3">
- <tr>
- <td height="35" colspan="5" align="center" valign="baseline" nowrap><font size="+1"><strong>请选择测验内容
- </strong></font></td>
- </tr>
- <tr>
- <td width="115" height="43" align="center" valign="baseline" nowrap>
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="30%" nowrap><div align="center"><strong> </strong></div></td>
- <td width="70%" nowrap><div align="left"><font size="+1"><strong>科 目:</strong></font></div></td>
- </tr>
- <tr>
- <td> <div align="center"> </div></td>
- <td><div align="left"><font size="+1"><strong>
- <select name=Subject
- size="1" id=select8 onclick="changesk(document.myform.Subject.options[document.myform.Subject.selectedIndex].value)">
- <option value="-1" selected>全 部</option>
- </select>
- </strong></font></div></td>
- </tr>
- </table></td>
- <td width="200" align="center" valign="baseline" nowrap >
- <table width="94%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td nowrap><strong>知识点:</strong></td>
- </tr>
- <tr>
- <td> <select name=KnowPoint id="select9">
- <option value="-1" selected>----全 部----</option>
- </select> </td>
- </tr>
- </table></td>
- <td width="105" colspan="2" align="center" valign="baseline" nowrap>
- <table width="92%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td nowrap><strong>难易度:</strong></td>
- </tr>
- <tr>
- <td> <select name=hard id="select10">
- <option value="1" selected>任意</option>
- <option value="2">容易</option>
- <option value="3">中等</option>
- <option value="4">较难</option>
- </select> </td>
- </tr>
- </table></td>
- </tr>
- <tr valign="middle">
- <td height="29" colspan="5" align="center" nowrap> <strong>测试顺序:</strong>
- <input type="radio" name="testorder" value="1">
- 随机顺序
- <input type="radio" name="testorder" value="2">
- 从难到易
- <input type="radio" name="testorder" value="3">
- 从易到难</td>
- </tr>
- <tr valign="middle">
- <td height="14" colspan="5" align="center" nowrap><font color="#000000"><strong>试题数</strong></font><strong>:</strong>
- <input name="testnumber" type="text" id="testnumber2" value="10" size="10">
- </td>
- </tr>
- <tr>
- <td height="15" colspan="5" align="center" valign="baseline" nowrap>
- <input name="testbegin" type="submit" class="s02" id="testbegin2" value="开 始">
- </td>
- </tr>
- </table>
- </FORM></td>
- </tr>
- </table>
- <!--end 内容区 -->
- <!--begin bottom -->
- <TABLE
- style="BORDER-TOP: #dbdbdb 1px solid; MARGIN-TOP: 10px; MARGIN-BOTTOM: 10px; BACKGROUND-COLOR: #f6f6f6"
- cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD align=middle colSpan=2 height=30>
- <TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
- <TBODY>
- <TR>
- <TD><A href="http://jsptestonline.cosoft.org.cn/index.html"
- target=_blank>关于我们</A> | <A
- href="http://jsptestonline.cosoft.org.cn/contact/3_ywhz.html"
- target=_blank>联系方式</A> | 网站地图 | <A
- href="http://jsptestonline.cosoft.org.cn/about/service.html"
- target=_blank>服务条款</A> | <A
- href="http://jsptestonline.cosoft.org.cn/about/privacy.html"
- target=_blank>隐私权保护</A> | <A
- href="http://jsptestonline.cosoft.org.cn/about/copyright.html"
- target=_blank>版权声明</A></TD>
- <TD align=middle width=220>版权所有:<A href="http://jsptestonline.cosoft.org.cn/"
- target=_blank>共创教育机构</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!--end bottom --></CENTER></BODY></HTML>