📄 userregister_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import com.am.*;
public final class userRegister_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n\r\n");
com.am.OpenDB dbconn = null;
synchronized (application) {
dbconn = (com.am.OpenDB) _jspx_page_context.getAttribute("dbconn", PageContext.APPLICATION_SCOPE);
if (dbconn == null){
dbconn = new com.am.OpenDB();
_jspx_page_context.setAttribute("dbconn", dbconn, PageContext.APPLICATION_SCOPE);
}
}
out.write("\r\n<html>\r\n<head>\r\n\t<title>银行数据监控系统</title>\r\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n\t<script language=JavaScript type=\"\" >\r\n<!--\r\n\t\tfunction checkform()\r\n\t\t{\r\n\t\t\tif (FORM1.txtusername.value==\"\") {\r\n\t\t alert( \"请填写用户名.\" );\r\n\t\t FORM1.txtusername.focus();\r\n\t\t return false;\r\n\t\t\t}\r\n\t\t\tif (FORM1.txtuserPassword.value==\"\") {\r\n\t\t alert( \"请填写密码.\" );\r\n\t\t FORM1.txtuserPassword.focus();\r\n\t\t return false;\r\n\t\t\t}\r\n\t\t\tif (FORM1.txtuserPassword1.value==\"\") {\r\n\t\t alert( \"请填写确认密码.\" );\r\n\t\t FORM1.txtuserPassword1.focus();\r\n\t\t return false;\r\n\t\t\t}\r\n\t\t\tif (FORM1.txtuserPassword.value != FORM1.txtuserPassword1.value) {\r\n\t\t\t\talert( \"两次密码不一致.\" );\r\n\t\t\t\tFORM1.txtuserPassword.focus();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tstr1=FORM1.txtemail.value;\r\n\t\t\tkey=str1.match('@');\r\n\t\t\tif (key==null) {\r\n\t\t\t\talert( \"Email填写错误.\" );\r\n\t\t\t\tFORM1.txtemail.focus();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tvar UnCheck=true;\r\n\t\t\tfor (i=0;i<document.FORM1.myfields.length;i++)\r\n\t\t\t{\r\n\t\t\t\tif (document.FORM1.myfields[i].checked)\r\n");
out.write("\t\t\t\t{\r\n\t\t\t\t\tUnCheck=false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (UnCheck)\r\n\t\t\t{\r\n\t\t\t\talert(\"请选择权限.\");\r\n\t\t\t\tdocument.FORM1.myfields[0].focus();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true ;\r\n\t\t}\r\n\t//-->\r\n\t</script>\r\n</head>\r\n<body>\r\n\t<div align=center>\r\n\t<form action=userRegisterSave.jsp method=post name=FORM1 onsubmit=\"checkform()\" >\r\n\t\t<table width=\"52%\" height=\"361\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"beijing.JPG\">\r\n\t\t\t\t<tr valign=\"middle\" >\r\n\t\t\t\t<td colspan=\"3\" align=\"center\" background=\"061ci.jpg\"><br>\r\n\t\t\t\t<p>\r\n\t\t\t\t<strong>\r\n\t\t\t\t<font color=\"#000099\" size=6>银行数据监控系统</font>\r\n\t\t\t\t</strong>\r\n\t\t\t\t</p>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=21% align=\"right\" bgcolor=\"#DFDFDF\">\r\n\t\t\t\t<font face=Arial,Helvetica color=navy size=3 >用户名:</font>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td width=\"79%\">\r\n\t\t\t\t<input type=\"text\" name=\"txtusername\" size=\"30\">\r\n\t\t\t\t<font color=\"red\">*</font>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=21% align= \"right\" bgcolor=\"#DFDFDF\">\r\n\t\t\t\t<font face=Arial,Helvetica color=navy size=3>密码 :</font>\r\n");
out.write("\t\t\t\t</td>\r\n\t\t\t\t<td >\r\n\t\t\t\t<input size=30 name=\"txtuserPassword\" type=\"password\">\r\n\t\t\t\t<font color=\"red\">*</font>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=21% align=right bgcolor=\"#DFDFDF\">\r\n\t\t\t\t<font face=Arial,Helvetica color=navy size=3>确认密码:</font>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t<input size=30 name=\"txtuserPassword1\" type=\"password\">\r\n\t\t\t\t<font color=\"red\">*</font>\r\n\t\t </tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=21% align=right bgcolor=\"#DFDFDF\">\r\n\t\t\t\t<font face=Arial,Helvetica color=navy size=3>姓名:</font>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td >\r\n\t\t\t\t<input size=30 name=\"txtname\" type=\"text\" >\r\n\t\t\t\t<font color=\"red\">*</font>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=21% align=right bgcolor=\"#DFDFDF\">\r\n\t\t\t\t<font face=Arial,Helvetica color=navy size=3 >所在公司:</font>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t<input size=30 name=\"txtcompany\" type=\"text\">\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=21% align=right bgcolor=\"#DFDFDF\">\r\n\t\t\t\t<font face=Arial,Helvetica color=navy size=3>所属部门:</font>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td >\r\n\t\t\t\t<input size=30 name=\"txtdepart\" type=\"text\">\r\n");
out.write("\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=21% align=right bgcolor=\"#DFDFDF\">\r\n\t\t\t\t<font face=Arial,Helvetica color=navy size=3>Email:</font>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td >\r\n\t\t\t\t<input type=text size=30 name=\"txtemail\" >\r\n\t\t\t\t<font color=\"red\">*</font>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=21% align=right bgcolor=\"#DFDFDF\">\r\n\t\t\t\t<font face=Arial,Helvetica color=navy size=3 >使用权限:</font>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\r\n ");
Statement stmtworkgroups=null;
ResultSet rsworkgroups=null;
String strSqlworkgroups="";
try{
stmtworkgroups=dbconn.getConnection().createStatement();
strSqlworkgroups="select * from workgroup where tag=0 order by id";
rsworkgroups=stmtworkgroups.executeQuery(strSqlworkgroups);
}catch(Exception ex){}
try{
while(rsworkgroups.next())
{
out.write("\r\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"txtmyfields\" value=rsworkgroups.getLong(\"ID\") >\r\n\r\n ");
out.print(rsworkgroups.getString("note")+rsworkgroups.getString("fieldName"));
out.write("\r\n <br>\r\n\r\n\t\t\t\t");
}}catch(Exception ex){}
try{
stmtworkgroups.close();
rsworkgroups.close();
}catch(Exception ex){}
out.write("\r\n </td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"2\">\r\n\t\t\t\t<font size=\"3\" color=\"#0000FF\">\r\n\t\t\t\t<center>带<font color=\"red\">*</font>为必填项</center>\r\n\t\t\t\t</font>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td align=center colspan=2>\r\n <input type=submit value=\"提交\" name=\"btnSubmit\">\r\n\t\t\t\t \r\n\t\t\t\t<input type=reset value=\"重填\" name=\"btnReset\">\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t </table>\r\n\t</form>\r\n\t</div>\r\n</body>\r\n</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -