📄 admin_005faddnewuser_jsp.java
字号:
package org.apache.jsp.admin;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class admin_005faddnewuser_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.List _jspx_dependants;
static {
_jspx_dependants = new java.util.ArrayList(2);
_jspx_dependants.add("/admin/../ch.jsp");
_jspx_dependants.add("/admin/checkadmin.jsp");
}
public Object 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,
"", 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');
out.write('\n');
request.setCharacterEncoding("gb2312");
response.setContentType("text/html;charset=gb2312");//½â¾öÖÐÎÄÂÒÂë
out.write('\r');
out.write('\n');
if(session.getAttribute("name")==null){
session.setAttribute("error","Äã·Ç·¨µÇ¼Ŷ!Çë´ÓÕýÈ·µÄµØÖ·µÇ¼£¡");
out.println("<script>document.location='../errorpage.jsp';</script>");
}
out.write("\r\n");
out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("<title>无标题文档</title>\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write(".adduser {\r\n");
out.write("\tfont-size: 36px;\r\n");
out.write("\tcolor: #0000FF;\r\n");
out.write("}\r\n");
out.write("body,td,th {\r\n");
out.write("\tfont-size: 13px;\r\n");
out.write("}\r\n");
out.write("body {\r\n");
out.write("\tbackground-image: url(../images/R6C.GIF);\r\n");
out.write("}\r\n");
out.write("-->\r\n");
out.write("</style>\r\n");
out.write("<script language=\"JavaScript\" type=\"text/JavaScript\">\r\n");
out.write("<!--\r\n");
out.write("function MM_findObj(n, d) { //v4.01\r\n");
out.write(" var p,i,x; if(!d) d=document; if((p=n.indexOf(\"?\"))>0&&parent.frames.length) {\r\n");
out.write(" d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}\r\n");
out.write(" if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];\r\n");
out.write(" for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);\r\n");
out.write(" if(!x && d.getElementById) x=d.getElementById(n); return x;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("function MM_validateForm() { //v4.0\r\n");
out.write(" var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;\r\n");
out.write(" for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);\r\n");
out.write(" if (val) { nm=val.name; if ((val=val.value)!=\"\") {\r\n");
out.write(" if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');\r\n");
out.write(" if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\\n';\r\n");
out.write(" } else if (test!='R') { num = parseFloat(val);\r\n");
out.write(" if (isNaN(val)) errors+='- '+nm+' must contain a number.\\n';\r\n");
out.write(" if (test.indexOf('inRange') != -1) { p=test.indexOf(':');\r\n");
out.write(" min=test.substring(8,p); max=test.substring(p+1);\r\n");
out.write(" if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\\n';\r\n");
out.write(" } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\\n'; }\r\n");
out.write(" } if (errors) alert('The following error(s) occurred:\\n'+errors);\r\n");
out.write(" document.MM_returnValue = (errors == '');\r\n");
out.write("}\r\n");
out.write("//-->\r\n");
out.write("</script>\r\n");
out.write("</head>\r\n");
out.write("\r\n");
out.write("<body>\r\n");
out.write("<form name=\"form1\" method=\"post\" action=\"admin_addnewuser_post.jsp\">\r\n");
out.write(" <p><strong>添加借书证用户</strong></p>\r\n");
out.write(" <p>姓名:\r\n");
out.write(" <input name=\"username\" type=\"text\" id=\"username\">\r\n");
out.write(" </p>\r\n");
out.write(" <p>性别:\r\n");
out.write(" <input name=\"sex\" type=\"radio\" value=\"男\" checked>\r\n");
out.write("男\r\n");
out.write("<input type=\"radio\" name=\"sex\" value=\"女\"> \r\n");
out.write("女\r\n");
out.write("</p>\r\n");
out.write(" <p>年龄:\r\n");
out.write(" <select name=\"age\" id=\"select\">\r\n");
out.write(" <option value=\"17\">17</option>\r\n");
out.write(" <option value=\"18\">18</option>\r\n");
out.write(" <option value=\"19\">19</option>\r\n");
out.write(" <option value=\"20\" selected>20</option>\r\n");
out.write(" <option value=\"21\">21</option>\r\n");
out.write(" <option value=\"22\">22</option>\r\n");
out.write(" <option value=\"23\">23</option>\r\n");
out.write(" <option value=\"24\">24</option>\r\n");
out.write(" <option value=\"25\">25</option>\r\n");
out.write(" <option value=\"26\">26</option>\r\n");
out.write(" <option value=\"27\">27</option>\r\n");
out.write(" <option value=\"28\">28</option>\r\n");
out.write(" <option value=\"29\">29</option>\r\n");
out.write(" <option value=\"30\">30</option>\r\n");
out.write(" </select>\r\n");
out.write(" </p>\r\n");
out.write(" <p>系别: \r\n");
out.write(" <select name=\"dep\" size=\"1\" id=\"dep\">\r\n");
out.write(" <option value=\"光电\">光电</option>\r\n");
out.write(" <option value=\"网络\">网络</option>\r\n");
out.write(" <option value=\"计算机\">计算机</option>\r\n");
out.write(" <option value=\"会计\">会计</option>\r\n");
out.write(" <option value=\"网络工程\">网络工程2班</option>\r\n");
out.write(" </select> \r\n");
out.write(" </p>\r\n");
out.write(" <p>借书证号:\r\n");
out.write(" <input name=\"borrowid\" type=\"text\" id=\"borrowid\">\r\n");
out.write("</p>\r\n");
out.write(" <p>\r\n");
out.write(" <input name=\"Submit\" type=\"submit\" onClick=\"MM_validateForm('username','','R');return document.MM_returnValue\" value=\"添加用户\">\r\n");
out.write(" <input type=\"reset\" name=\"Submit2\" value=\"清除\">\r\n");
out.write(" </p>\r\n");
out.write("</form>\r\n");
out.write("</body>\r\n");
out.write("</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 + -