regpost.jsp
上传用户:nbluoke
上传日期:2013-08-09
资源大小:4851k
文件大小:3k
源码类别:

教育系统应用

开发平台:

WORD

  1. <%@ page contentType="text/html;charset=gb2312" pageEncoding="gb2312" %>
  2. <%@ page import="reg"%>
  3. <html>
  4. <head>
  5. <title>注册</title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  7. <link href="css.css" rel="stylesheet" type="text/css">
  8. </head>
  9. <body leftmargin="0" topmargin="0">
  10. <%
  11.  String ID = new String(request.getParameter("ID").getBytes("ISO8859_1")).trim();
  12.  String username = new String(request.getParameter("username").getBytes("ISO8859_1")).trim();
  13.  String password = new String(request.getParameter("password").getBytes("ISO8859_1")).trim();
  14.  String confirm = new String(request.getParameter("confirm").getBytes("ISO8859_1")).trim();
  15.  String syspower = new String(request.getParameter("syspower").getBytes("ISO8859_1")).trim();
  16. %>
  17. <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  18.   <tr> 
  19.     <td height="80" colspan="5"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  20.         <tr> 
  21.           <td width="120">&nbsp;</td>
  22.           <td class="caption">注册</td>
  23.           <td width="200">&nbsp;</td>
  24.         </tr>
  25.       </table></td>
  26.   </tr>
  27.   <tr> 
  28.     <td width="100" align="center" valign="top">&nbsp;</td>
  29.     <td width="1" valign="top"></td>
  30.     <td width="400" align="center" valign="top">
  31. <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
  32.         <tr>
  33.           <td>&nbsp;</td>
  34.         </tr>
  35.       </table>
  36. <jsp:useBean id="regID" class="reg" scope="session"/>
  37. <%
  38.  if(regID.reg(ID,username,password,confirm,syspower))
  39.  {
  40.   out.print("ok");
  41.   String newID = regID.getID() + ""; 
  42. %>
  43.       <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
  44.         <tr align="center"> 
  45.           <td height="30" colspan="2" bgcolor="#CCCCCC" class="deepred">恭喜您,注册成功!</td>
  46.         </tr>
  47.         <tr> 
  48.           <td width="50%" height="24" align="center" bgcolor="#FFFFFF">ID</td>
  49.           <td align="center" bgcolor="#FFFFFF"><%=ID%></td>
  50.         </tr>
  51.         <tr> 
  52.           <td width="50%" height="24" align="center" bgcolor="#FFFFFF">用户</td>
  53.           <td align="center" bgcolor="#FFFFFF"><%=username%></td>
  54.         </tr>
  55.         <tr> 
  56.           <td width="50%" height="24" align="center" bgcolor="#FFFFFF">密码</td>
  57.           <td align="center" bgcolor="#FFFFFF"><%=password%></td>
  58.         </tr>
  59.         <tr> 
  60.           <td width="50%" height="24" align="center" bgcolor="#FFFFFF">syspower</td>
  61.           <td align="center" bgcolor="#FFFFFF"><%=syspower%></td>
  62.         </tr>
  63.       </table>
  64. <%
  65.   out.print("<br>");
  66.   out.print("<a href="login.jsp">返回</a>");
  67.   out.print("<a href=javascript:window.close()>关闭</a>");
  68.  }else{
  69.   out.print("注册失败!<br>");
  70.   out.print("该用户名已有人使用,请使用另外的用户名!");
  71.   out.print("<a href=javascript:history.go(-1)>返回</a>");
  72.  } 
  73. %>
  74.    </td>
  75.     <td width="1" valign="top"></td>
  76.     <td width="100">&nbsp;</td>
  77.   </tr>
  78.   <tr align="center"> 
  79.     <td height="60" colspan="5" class="white">copyright&copy; 2003 Examination123</td>
  80.   </tr>
  81. </table>
  82. </body>
  83. </html>
  84.