?? testermod.jsp
字號:
<%@ page contentType="text/html;charset=GB2312" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setCharacterEncoding("GB2312");
webmaster.datamanager.Webdata webdb = new webmaster.datamanager.Webdata();
String iID=webdb.getRequestAValue(request,"iID");
if( iID.equals(""))
{
session.setAttribute("ErrorMsg","頁面參數錯誤!");
response.sendRedirect("/pctest/error.jsp");
return;
}
String id=null;
String vcUserNo=null;
String vcName=null;
String enSex=null;
String daBrith=null;
String vcEmail=null;
String vcNick=null;
String vcPass=null;
String vcQuestion=null;
String vcAnswer=null;
String vcTel=null;
String vcHomeAdd=null;
String vcZipCode=null;
String vcSchool=null;
String vcParentName=null;
String vcParentEmail=null;
String vcParentTel=null;
String vcProvince=null;
String vcTarget=null;
String vcAdage=null;
String vcOldGrade=null;
String vcOldClass=null;
String gradenote=null;
String vcIDCard=null;
String vcPolitical=null;
String vcEducation=null;
String vcWorkTitle=null;
String vcMarriage=null;
String daWorkDate=null;
String vcMemo=null;
String vcWorkUnit=null;
String syspower=null;
String ModifyDate=null;
java.sql.ResultSet rs = webdb.query("select * from userinfo where id = '"+iID+"'");
if(rs.next()){
id=webdb.getRsStr(rs,"id");
vcUserNo=webdb.getRsStr(rs,"vcUserNo");
vcName=webdb.getRsStr(rs,"vcName");
enSex=webdb.getRsStr(rs,"enSex");
daBrith=webdb.getRsStr(rs,"daBrith");
vcEmail=webdb.getRsStr(rs,"vcEmail");
vcNick=webdb.getRsStr(rs,"vcNick");
vcPass=webdb.getRsStr(rs,"vcPass");
vcQuestion=webdb.getRsStr(rs,"vcQuestion");
vcAnswer=webdb.getRsStr(rs,"vcAnswer");
vcTel=webdb.getRsStr(rs,"vcTel");
vcHomeAdd=webdb.getRsStr(rs,"vcHomeAdd");
vcZipCode=webdb.getRsStr(rs,"vcZipCode");
vcSchool=webdb.getRsStr(rs,"vcSchool");
vcParentName=webdb.getRsStr(rs,"vcParentName");
vcParentEmail=webdb.getRsStr(rs,"vcParentEmail");
vcParentTel=webdb.getRsStr(rs,"vcParentTel");
vcProvince=webdb.getRsStr(rs,"vcProvince");
vcTarget=webdb.getRsStr(rs,"vcTarget");
vcAdage=webdb.getRsStr(rs,"vcAdage");
vcOldGrade=webdb.getRsStr(rs,"vcOldGrade");
vcOldClass=webdb.getRsStr(rs,"vcOldClass");
gradenote=webdb.getRsStr(rs,"gradenote");
gradenote=webdb.getRsStr(rs,"gradenote");
vcIDCard=webdb.getRsStr(rs,"vcIDCard");
vcPolitical=webdb.getRsStr(rs,"vcPolitical");
vcEducation=webdb.getRsStr(rs,"vcEducation");
vcWorkTitle=webdb.getRsStr(rs,"vcWorkTitle");
vcMarriage=webdb.getRsStr(rs,"vcMarriage");
daWorkDate=webdb.getRsStr(rs,"daWorkDate");
vcMemo=webdb.getRsStr(rs,"vcMemo");
vcWorkUnit=webdb.getRsStr(rs,"vcWorkUnit");
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 del(t)
{
document.URL=t;
}
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);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -