?? jcy_ry_new_submit.jsp
字號:
<%@ page contentType="text/html; charset=GBK" language="java" import="java.sql.*,com.vstsoft.std.*" errorPage="errorPage.jsp" %>
<%vststd std = new vststd();%>
<%
String errtext = "";
String username = std.getValue(request, "username");
String sfzh = std.getValue(request, "sfzh");
if (username.equals(""))
errtext = "請?zhí)顚懶彰?quot;;
else if (sfzh.equals(""))
errtext = "請?zhí)顚懮矸葑C號碼!";
else if (!std.checkNumber(sfzh))
errtext = "身份證號碼必須為數(shù)字!";
else if (sfzh.length() != 15 & sfzh.length() != 18)
errtext = "請正確填寫身份證號碼!身份證號碼長度必須為15或者18位數(shù)字!";
else if (!username.equals("") && !sfzh.equals("")){
String sql_select = "select count(*) from jcy_ry where username = '"+username+"' and sfzh = '"+sfzh+"'";
sun.jdbc.rowset.CachedRowSet crs = std.getResultBySelect(sql_select);
crs.next();
String num = crs.getString(1);
if (!num.equals("0"))
errtext = "此公務(wù)員已經(jīng)存在!";
else
errtext = "ok";
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>無標(biāo)題文檔</title>
</head>
<body onLoad="parent.f_err('<%=errtext%>', '<%=username%>', '<%=sfzh%>')">
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -