?? stu_test_free.jsp
字號:
<%@ page import="java.util.*,
java.sql.*,
java.lang.*" %>
<%@ 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();
//獲取學(xué)生的年級信息
//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());
}
//--年級,科目,知識點三個下拉列表框聯(lián)動-->
out.print(Tools.sub_know(con));
//out.print(Tools.grade_sub(con));
%>
<!--年級,科目,知識點三個下拉列表框聯(lián)動-->
<script language="JavaScript">
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]);
}
}
}
</script>
<script language="javascript">
function CheckForm(f)
{
if( f.testnumber.value.length<1)
{
alert("您還有輸入測驗的試題數(shù)!");
return false;
}
if(!isNumberString(f.testnumber.value,"1234567890."))
{
alert("嘿!您在試題數(shù)里填了東西,但怎么不是數(shù)字呢?\n");
return false;
}else if(f.testnumber.value<10){
alert("每次測驗至少要有10道試題!!");
return false;
}else if(f.testnumber.value>100){
alert("學(xué)堂提供最多100道試題的測驗!!");
return false;
}
if( !(f.testorder[0].checked || f.testorder[1].checked||f.testorder[2].checked) ) {
alert("您還沒有選擇測試順序!")
return false;
}
return true;
}
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>共創(chuàng)學(xué)堂</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" >
<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">申請服務(wù)</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">產(chǎn)品介紹</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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -