?? testerinfo.jsp
字號:
<%@ page contentType="text/html;charset=GB2312" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
String studentID=null;
String sql=null;
try{
studentID=(String)session.getAttribute("studentID");
if(studentID==null){
throw new Exception();
}
}catch(Exception e){
jinghua.Tools.showalert("您還沒有登錄,或連接超時,請重新登錄!",out);
jinghua.Tools.showJS("window.open('../login.jsp','_self')",out);
}
try{
webmaster.datamanager.Webdata webdb = new webmaster.datamanager.Webdata();
sql="select * from UserInfo where vcUserNo='"+studentID+"'";
java.sql.ResultSet rs = webdb.query(sql);
if(!rs.next())
return;
String id=webdb.getRsStr(rs,"id");
String vcUserNo=webdb.getRsStr(rs,"vcUserNo");
String vcName=webdb.getRsStr(rs,"vcName");
String enSex=webdb.getRsStr(rs,"enSex");
String daBrith=webdb.getRsStr(rs,"daBrith");
String vcEmail=webdb.getRsStr(rs,"vcEmail");
String vcNick=webdb.getRsStr(rs,"vcNick");
String vcPass=webdb.getRsStr(rs,"vcPass");
String vcQuestion=webdb.getRsStr(rs,"vcQuestion");
String vcAnswer=webdb.getRsStr(rs,"vcAnswer");
String vcTel=webdb.getRsStr(rs,"vcTel");
String vcHomeAdd=webdb.getRsStr(rs,"vcHomeAdd");
String vcZipCode=webdb.getRsStr(rs,"vcZipCode");
String vcSchool=webdb.getRsStr(rs,"vcSchool");
String vcParentName=webdb.getRsStr(rs,"vcParentName");
String vcParentEmail=webdb.getRsStr(rs,"vcParentEmail");
String vcParentTel=webdb.getRsStr(rs,"vcParentTel");
String vcProvince=webdb.getRsStr(rs,"vcProvince");
String vcTarget=webdb.getRsStr(rs,"vcTarget");
String vcAdage=webdb.getRsStr(rs,"vcAdage");
String vcOldGrade=webdb.getRsStr(rs,"vcOldGrade");
String vcOldClass=webdb.getRsStr(rs,"vcOldClass");
String gradenote=webdb.getRsStr(rs,"gradenote");
String vcIDCard=webdb.getRsStr(rs,"vcIDCard");
String vcPolitical=webdb.getRsStr(rs,"vcPolitical");
String vcEducation=webdb.getRsStr(rs,"vcEducation");
String vcWorkTitle=webdb.getRsStr(rs,"vcWorkTitle");
String vcMarriage=webdb.getRsStr(rs,"vcMarriage");
String daWorkDate=webdb.getRsStr(rs,"daWorkDate");
String vcMemo=webdb.getRsStr(rs,"vcMemo");
String vcWorkUnit=webdb.getRsStr(rs,"vcWorkUnit");
String ModifyDate=webdb.getRsStr(rs,"ModifyDate");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" media="all" href="../common/js/calendar/calendar-win2k-cold-1.css" title="win2k-cold-1" />
<script type="text/javascript" src="../common/js/calendar/calendar.js"></script>
<script type="text/javascript" src="../common/js/calendar/calendar-me.js"></script>
<script type="text/javascript" src="../common/js/calendar/calendar-setup.js"></script>
<link href="../common/css/SchoolManage.css" rel="stylesheet" type="text/css" />
<link href="../common/css/style.css" rel="stylesheet" type="text/css"/>
<!--style end-->
<SCRIPT language=JavaScript>
<!--
function selected(cal, date) {
cal.sel.value = date;
if (cal.dateClicked && (cal.sel.id == "sel1" ))
cal.callCloseHandler();
}
function closeHandler(cal) {
cal.hide();
calendar = null;
}
function showCalendar(id, format, showsTime, showsOtherMonths) {
var el = document.getElementById(id);
if (calendar != null) {
calendar.hide(); // so we hide it first.
} else {
var cal = new Calendar(true, null, selected, closeHandler);
if (typeof showsTime == "string") {
cal.showsTime = true;
cal.time24 = (showsTime == "24");
}
if (showsOtherMonths) {
cal.showsOtherMonths = true;
}
calendar = cal; // remember it in the global var
cal.setRange(1900, 2070); // min/max year allowed.
cal.create();
}
calendar.setDateFormat(format); // set the specified date format
calendar.parseDate(el.value); // try to parse the text in field
calendar.sel = el; // inform it what input field we use
calendar.showAtElement(el.nextSibling, "Br"); // show the calendar
return false;
}
-->
</SCRIPT>
<title>計算機等級應用基礎在線測試系統</title>
<SCRIPT language=JavaScript>
<!--
function isNumber(str)
{
var i,flag=false;
for(i=0;i<str.length;i++)
{
if(str.substr(i,1)<"0"||str.substr(i,1)>"9")
{
if(str.substr(i,1)=="."&&!flag)
flag=true;
else if(str.substr(i,1)=="-"&&i==0)
continue;
else
return false;
}
}
return true;
}
function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11)
{
this[0] = m0;
this[1] = m1;
this[2] = m2;
this[3] = m3;
this[4] = m4;
this[5] = m5;
this[6] = m6;
this[7] = m7;
this[8] = m8;
this[9] = m9;
this[10] = m10;
this[11] = m11;
}
function isDate(str)
{
var a,s,i,a0,a1,a2;
var month=new montharr(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
a=str.split("-");
if(a.length!=3){
a=str.split("/");
if(a.length!=3) return false;
}
for(i=0;i<3;i++)
{
if(!isNumber(a[i])) return false;
}
a0=eval(a[0]);
a1=eval(a[1]);
a2=eval(a[2]);
if (((a0 % 4 == 0) && (a0 % 100 != 0)) || (a0 % 400 == 0))
month[1] = 29;
if(a1<1||a1>12)
return false;
if(a2<1||a2>month[a1-1])
return false;
return true;
}
function isEmail(strEmail) {
if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
return true;
else
return false;
}
function trim(s)
{
// Remove leading spaces and carriage returns
while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
{
s = s.substring(1,s.length);
}
// Remove trailing spaces and carriage returns
while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
{
s = s.substring(0,s.length-1);
}
return s;
}
function checkdata(form) {
if (trim( form.vcPass.value)=="") {
alert("\請輸入用戶密碼 !!")
return false;
}
if(form.vcPass.value!=form.vcPass2.value){
alert("\用戶密碼不一致 !!")
return false;
}
if (trim( form.vcName.value)=="") {
alert("\請輸入用戶的真實姓名 !!")
return false;
}
if (form.gradenote.selectedIndex==0) {
alert("請選擇計算機等級信息!")
return false;
}
if(! (form.enSex[0].checked || form.enSex[1].checked)){
alert("\請選擇性別 !!");
return false;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -