⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 registry_jsp.java

📁 论坛源码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package org.apache.jsp.web.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.io.*;
import java.util.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.text.*;

public final class registry_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  public String getServletInfo() {
    return "database handler";
  }

  private static java.util.Vector _jspx_dependants;

  static {
    _jspx_dependants = new java.util.Vector(1);
    _jspx_dependants.add("/web/jsp/incdb.jsp");
  }

  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;

request.setCharacterEncoding("GB2312");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!--¿ªÊ¼µ¼Èëpackages-->\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!--µ¼Èë½áÊø-->");
      out.write("\r\n");
      out.write("\r\n");
      twm.bbsuser user = null;
      synchronized (_jspx_page_context) {
        user = (twm.bbsuser) _jspx_page_context.getAttribute("user", PageContext.PAGE_SCOPE);
        if (user == null){
          user = new twm.bbsuser();
          _jspx_page_context.setAttribute("user", user, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');

int userid,userclass;
String username,userpassword,useremail,userhomepage,hpname,usersex,comefrom,usersign;
java.util.Date dateandtime,userbirthday;
String strSQL;
byte[] tmpbyte;
java.sql.ResultSet sqlRst;				   
String B1=request.getParameter("B1");
String tempSTR;

      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("\r\n");
      out.write("<head>\r\n");
      out.write("<title>用户注册</title>\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"bbs03.css\">\r\n");
      out.write("\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");
      out.write("\r\n");
      out.write("<script Language=\"JavaScript\">\r\n");
      out.write("<!--\r\n");
      out.write("function isspacestring(mystring)\r\n");
      out.write("{ var istring=mystring;\r\n");
      out.write("  var temp,i,strlen;\r\n");
      out.write("  temp=true;\r\n");
      out.write("  strlen=istring.length;\r\n");
      out.write("  for (i=0;i<strlen;i++)\r\n");
      out.write("  {\r\n");
      out.write("    if ((istring.substring(i,i+1)!=\" \")&(temp))\r\n");
      out.write("     { temp=false;  }\r\n");
      out.write("  }\r\n");
      out.write(" return temp;\r\n");
      out.write("}\r\n");
      out.write("\r\n");
      out.write("function firstisspace(mystring)\r\n");
      out.write("{ var istring=mystring;\r\n");
      out.write("  var temp,i,strlen;\r\n");
      out.write("  temp=false;\r\n");
      out.write("    if (istring.substring(0,1)==\" \")\r\n");
      out.write("     { temp=true;  }\r\n");
      out.write(" return temp;\r\n");
      out.write("}\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("function isemail(mystring)\r\n");
      out.write("{\r\n");
      out.write("  var istring=mystring;\r\n");
      out.write("  var atpos=mystring.indexOf(\"@\");\r\n");
      out.write("  var temp=true;\r\n");
      out.write("  if (atpos==-1) //email中没有@符号;不正确的EMAIL\r\n");
      out.write("  {\r\n");
      out.write("     temp=false;\r\n");
      out.write("  }\r\n");
      out.write("  return temp;\r\n");
      out.write("}\r\n");
      out.write("\r\n");
      out.write("function check_input(theForm)\r\n");
      out.write("{\r\n");
      out.write("\r\n");
      out.write("   if ((theForm.username.value == \"\")|(firstisspace(theForm.username.value)))\r\n");
      out.write("  {\r\n");
      out.write("    alert(\"请输入用户名.不能以空格开头.\");\r\n");
      out.write("    theForm.username.focus();\r\n");
      out.write("    return (false);\r\n");
      out.write("  }\r\n");
      out.write("  \r\n");
      out.write("  if (theForm.username.value.length > 20)\r\n");
      out.write("    {\r\n");
      out.write("    alert(\"用户名长度应小于20个字符或数字.\");\r\n");
      out.write("    theForm.username.focus();\r\n");
      out.write("    return (false);\r\n");
      out.write("  }\r\n");
      out.write("\r\n");
      out.write("  if ((theForm.userpassword.value == \"\")|(isspacestring(theForm.userpassword.value)))\r\n");
      out.write("  {\r\n");
      out.write("    alert(\"请输入密码.\");\r\n");
      out.write("    theForm.userpassword.focus();\r\n");
      out.write("    return (false);\r\n");
      out.write("  }\r\n");
      out.write("\r\n");
      out.write("  if (theForm.userpassword.value.length > 10)\r\n");
      out.write("  {\r\n");
      out.write("    alert(\"密码长度应小于10.\");\r\n");
      out.write("    theForm.user_password.focus();\r\n");
      out.write("    return (false);\r\n");
      out.write("  }\r\n");
      out.write("\r\n");
      out.write("  if (theForm.userpassword.value != theForm.userpassword2.value)\r\n");
      out.write("  {\r\n");
      out.write("    alert(\"两次密码不相同,请重新输入密码.\");\r\n");
      out.write("    theForm.userpassword.focus();\r\n");
      out.write("    return (false);\r\n");
      out.write("  }\r\n");
      out.write("  return (true);\r\n");
      out.write("}\r\n");
      out.write("//-->\r\n");
      out.write("</script>\r\n");
      out.write("\r\n");
      out.write("<div align=\"center\">\r\n");
      out.write("<table  bgcolor=\"#EFFFCE\" border=\"1\" width=\"600\" bordercolorlight=\"#000000\" cellspacing=\"0\" cellpadding=\"0\" bordercolordark=\"#FFFFFF\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td width=\"600\" align=\"center\">\r\n");
      out.write("      <form method=\"post\" action=\"registry.jsp\"  onsubmit=\"return check_input(this)\" name=\"registry\">\r\n");
      out.write("        <p align=\"center\" style=\"margin-top: 0; margin-bottom: 0\"><b><font size=\"4\"><br>\r\n");
      out.write("        新 用 户 注 册&nbsp;&nbsp; </font></b><font color=\"#FF0000\">(*</font>不能为空<font color=\"#FF0000\">)</font></p>   \r\n");
      out.write("    \r\n");
      out.write("        <div align=\"center\">   \r\n");
      out.write("          <center>   \r\n");
      out.write("        <table   bgcolor=\"#EFFFCE\" border=\"0\" width=\"95%\" height=\"85\">   \r\n");
      out.write("          <tr>   \r\n");
      out.write("            <td width=\"540\" height=\"41\"> \r\n");
      out.write("              <p style=\"margin-top: 0; margin-bottom: 0\">用 户 名:\r\n");
      out.write("\t\t\t  <input class=\"intext\" type=\"text\" name=\"username\" size=\"20\" >&nbsp;\r\n");
      out.write("\t\t\t  <font color=\"#FF0000\">*</font>用户名长度应小于20个字符或数字!!</p>\r\n");
      out.write("              <p>密 &nbsp; 码:\r\n");
      out.write("               <input class=\"intext\" type=\"password\" name=\"userpassword\" size=\"10\">\r\n");
      out.write("               <font color=\"#FF0000\">*</font>密码长度应小于10!!</p>\r\n");
      out.write("              <p> 重复密码:\r\n");
      out.write("               <input class=\"intext\" type=\"password\" name=\"userpassword2\" size=\"10\">\r\n");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -