?? jcy_ry_modify.jsp
字號:
{
alert("公務員編號沒有填寫。");
document.form1.usercode.focus();
return(false);
}
if (isNumberString(trim(form1.year.value),"1234567890")!=1 || trim(form1.year.value).length!=4 || trim(form1.year.value) <= 1900 )
{
alert("\請輸入正確的生日年份!!")
return false;
}
if (isNumberString(trim(form1.day.value),"1234567890")!=1 || trim(form1.day.value)<1 || trim(form1.day.value)>31)
{
alert("\請輸入正確的生日日期!!")
return false;
}
if (check_null(trim(v_sxzy)))
{
alert("您沒有填寫所學專業。");
document.form1.sxzy.focus();
return(false);
}
if (check_null(trim(v_qx)))
{
alert("請選擇所屬區縣。");
return(false);
}
if (check_null(trim(v_dwdm)))
{
alert("請選擇工作單位!");
return(false);
}
if (check_null(trim(v_gzbm)))
{
alert("您沒有填寫工作部門。");
document.form1.gzbm.focus();
return(false);
}
if(document.form1.ry_startdate.value.length==0)
{
alert("請輸入從事工作起始日期!");
document.form1.ry_startdate.focus();
return(false);
}
if(document.form1.ry_enddate.value.length==0)
{
alert("請輸入從事工作止日期!");
document.form1.ry_enddate.focus();
return(false);
}
if(document.form1.zxrq.value.length==0)
{
alert("請輸入注銷日期!");
document.form1.zxrq.focus();
return(false);
}
if (trim(v_xphm).length != 0 && trim(v_xphm).length != 9)
{
alert("胸牌號碼長度為9位,請正確填寫!");
document.form1.xphm.focus();
return(false);
}
if (trim(v_zjhm).length != 0 && trim(v_zjhm).length != 9)
{
alert("證件號碼長度為9位,請正確填寫!");
document.form1.zjhm.focus();
return(false);
}
if (check_null(trim(v_fzjg)))
{
alert("您沒有填寫發證機關。");
document.form1.fzjg.focus();
return(false);
}
}
*/
function check_null(v_flag)
{
if(v_flag.length==0)
return(true);
}
function check_number(num)
{
for(var i=0;i<num.length;i++)
{
var a=num.substr(i,1);
if (a<'0' || a>'9')
return ('1');
}
return('0');
}
function check_number_length(num,len1,len2)
{
if(num.length==len1||num.length==len2)
return(check_number(num));
else return('2');
}
function check_length(num,len1,len2)
{
if(num.length==len1||num.length==len2)
return(false);
}
function f_err(err)
{
if (err == "ok")
{
alert("公務員信息保存成功!");
window.open("jcy_ry_cx_select.jsp","_self");
return;
}
alert(err);
}
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);
}
function leftTrim(text)
{
for(var i = 0;i < text.length;i++)
if(text.charAt(i) != " ")
return text.substring(i,text.length);
return "";
}
function rightTrim(text)
{
for(var i = text.length -1;i >= 0;i--)
if(text.charAt(i) != " ")
return text.substring(0,i + 1);
return "";
}
function trim(text)
{
return leftTrim(rightTrim(text));
}
</script>
<title>公務員信息(修改頁)</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link rel="stylesheet" href="../style.css" type="text/css">
<%
String uid = request.getParameter("uid");
String sql_modify_view = "select * from jcy_ry where userid = '"+uid+"'";
sun.jdbc.rowset.CachedRowSet crs = std.getResultBySelect(sql_modify_view);
crs.next();
String username = crs.getString("username");
String sfzh = crs.getString("sfzh");
String xb = crs.getString("xb");
String usercode = crs.getString("usercode");
String csrq = crs.getString("csrq");
String year = csrq.substring(0,4);
String month= csrq.substring(5,7);
String day = csrq.substring(8);
String mz = crs.getString("mz");
String whcd = crs.getString("whcd");
String sxzy = crs.getString("sxzy");
String zzmm = crs.getString("zzmm");
String qx = crs.getString("qx");
String jd = crs.getString("jddm");
String sfjx = crs.getString("sfjd");
String gzdw = crs.getString("dwdm");
String sszb = crs.getString("zbdm");
String ssbz = crs.getString("ssbz");
String zjlb = crs.getString("zjlb");
String zw = crs.getString("zw");
String xphm = crs.getString("xphm");
String zjhm = crs.getString("zjhm");
String fzjg = crs.getString("fzjg");
String gzbm = crs.getString("gzbm");
String gzqr = crs.getString("gzqr");
String gzzr = crs.getString("gzzr");
String zxrq = crs.getString("zxrq");
String zxyy = crs.getString("zxyy");
String ryzt = crs.getString("ryzt");
strReplace strReplace = new strReplace();
if(zxrq!=null){
zxrq=zxrq.substring(0,10);
zxrq=strReplace.replace(zxrq,"-",".");
}
//modify yhy
if(gzqr!=null){
gzqr = gzqr.substring(0,10);
gzqr = strReplace.replace(gzqr,"-",".");
}
//out.print(gzzr.equals(""));//這樣寫會報錯,原因,null不能用于“”比較,為什么不明。
if(gzzr!=null){
gzzr = gzzr.substring(0,10);
gzzr = strReplace.replace(gzzr,"-",".");
}
//modify end
username = (username != null)?username:"";
sfzh = (sfzh != null)?sfzh:"";
xb = (xb != null)?xb:"";
usercode = (usercode != null)?usercode:"";
csrq = (csrq != null)?csrq.substring(0,10):"";
mz = (mz != null)?mz:"";
whcd = (whcd != null)?whcd:"";
sxzy = (sxzy != null)?sxzy:"";
zzmm = (zzmm != null)?zzmm:"";
qx = (!qx.equals(""))?qx:"";
jd = (jd != null)?jd:"";
sfjx = (sfjx != null)?sfjx:"";
gzdw = (gzdw != null)?gzdw:"";
sszb = (sszb != null)?sszb:"";
ssbz = (ssbz != null)?ssbz:"";
zjlb = (zjlb != null)?zjlb:"";
zw = (zw != null)?zw:"";
xphm = (xphm != null)?xphm:"";
zjhm = (zjhm != null)?zjhm:"";
fzjg = (fzjg != null)?fzjg:"";
gzbm = (gzbm != null)?gzbm:"";
gzqr = (gzqr != null)?gzqr:"";
gzzr = (gzzr != null)?gzzr:"";
zxrq = (zxrq != null)?zxrq:"";
zxyy = (zxyy != null)?zxyy:"";
%>
<%
if (!curruserszqx.equals("001") && !curruserszqx.equals(qx))
{
%>
<Script Language=javascript>
alert("您沒有修改別區公務員權限!")
window.open("../index.jsp","_top")
</Script>
<% }
%>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"> <br>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="14" align="left" background="../images/caozuo01.gif"> </td>
<td background=".././images/caozuo02.gif" align="center" width="771"><b><font color="#FF6600" size="3">公務員信息(修改頁)</font></b>
</td>
<td width="15"><img src=".././images/caozuo03.gif" width="15" height="84"></td>
</tr>
</table>
<table width="800" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEF9FF">
<tr>
<td width="15" background=".././images/caozuo04.gif"><img src=".././images/caozuo04.gif" width="15" height="6"></td>
<td align="center">
<form name="form1" method="post" action="jcy_ry_submit.jsp?uid=<%=uid%>" target="submitx" onSubmit="return(f_modifyCheck())">
<table width="750" cellspacing="1" cellpadding="0" bgcolor="#000099">
<tr>
<td>
<table align=center bordercolordark=#ffffff bordercolorlight=#666699
cellpadding=0 cellspacing=1 width=100% bgcolor="#000099">
<tr bgcolor="#EEF9FF">
<td width="95" height="30" align="center"><b><font color="#105781">姓名<font color="#FF0000">*</font></font></b></td>
<td width="90"><b><font color="#105781">
<input name="username" type="text" value="<%=username%>" maxlength="20" style="width:80px">
</font></b></td>
<td width="75" align="center"><b><font color="#105781">身份證號<font color="#FF0000">*
</font> </font></b></td>
<td width="138">
<input name="sfzh" type="text" value="<%=sfzh%>" size="19" maxlength="18">
</td>
<td width="100" align="center"><b><font color="#105781">性別<font color="#FF0000">*</font></font></b></td>
<td width="143" align="center"> <%=std.popRadioWithSelect("select dm, mc from dm_mx where dmm = '0004'", xb, "xb", 2)%> </td>
<td width="75" height="102" rowspan="3" align="center"><font color="#105781">
<a href="jcy_ry_ryzp.jsp?uid=<%=uid%>" target="_blank"><img src="jcy_ry_ryzp.jsp?uid=<%=uid%>" width=75 height=102 border="0">
</a> </font></td>
</tr>
<tr bgcolor="#EEF9FF">
<td width="95" height="30" align="center"><b><font color="#105781">用戶名<font color="#FF0000">*
</font> </font></b></td>
<td colspan="3"><input name="usercode" type="text" value="<%=usercode%>" maxlength="20" style="width:80px">
</td>
<td align="center"><b><font color="#105781">民族<font color="#FF0000">*
</font></font></b></td>
<td><select name="mz" style="width:80px">
<option value="" selected>-請選擇-</option>
<%=std.popListWithSelect("select dm, mc from dm_mx where dmm = '0006' ",mz)%> </select>
</td>
</tr>
<tr bgcolor="#EEF9FF">
<td width="95" height="30" align="center"><b><font color="#105781">出生日期<font color="#FF0000">*</font></font></b></td>
<td colspan="3"> <input type=text name=year size=5 value=<%=year%> maxlength=4>
<b><font color="#105781">年</font></b> <select name=month>
<option value=01<%if (month.equals("01")) {out.print(" selected");}%>>01</option>
<option value=02<%if (month.equals("02")) {out.print(" selected");}%>>02</option>
<option value=03<%if (month.equals("03")) {out.print(" selected");}%>>03</option>
<option value=04<%if (month.equals("04")) {out.print(" selected");}%>>04</option>
<option value=05<%if (month.equals("05")) {out.print(" selected");}%>>05</option>
<option value=06<%if (month.equals("06")) {out.print(" selected");}%>>06</option>
<option value=07<%if (month.equals("07")) {out.print(" selected");}%>>07</option>
<option value=08<%if (month.equals("08")) {out.print(" selected");}%>>08</option>
<option value=09<%if (month.equals("09")) {out.print(" selected");}%>>09</option>
<option value=10<%if (month.equals("10")) {out.print(" selected");}%>>10</option>
<option value=11<%if (month.equals("11")) {out.print(" selected");}%>>11</option>
<option value=12<%if (month.equals("12")) {out.print(" selected");}%>>12</option>
</select> <b><font color="#105781">月</font></b> <input type=text name=day size=2 maxlength=2 value=<%=day%>>
<b><font color="#105781">日</font></b></td>
<td align="center"><b><font color="#105781">政治面目<font color="#FF0000">*</font>
</font></b></td>
<td><select name="zzmm" style="width:80px">
<option value="" selected>-請選擇-</option>
<%=std.popListWithSelect("select dm, mc from dm_mx where dmm = '5004' ",zzmm)%> </select>
</td>
</tr>
<tr bgcolor="#EEF9FF">
<td width="95" height="30" align="center"><b><font color="#105781">文化程度<font color="#FF0000">*</font></font></b></td>
<td> <select name="whcd" style="width:90px">
<option value="" selected>-請選擇-</option>
<%=std.popListWithSelect("select dm, mc from dm_mx where dmm = '5005' ", whcd)%> </select>
</td>
<td align="center"><b><font color="#105781">所學專業<font color="#FF0000">*</font></font></b></td>
<td> <input name="sxzy" type="text" value="<%=sxzy%>" style="width:80px">
</td>
<td width="103" align="center"><b><font color="#105781">是否街鄉公務員<font color="#FF0000">*</font>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -