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

📄 registerstep2.jsp

📁 LyBBS基于Struts1.3/Ajax的架构
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ include file="common/include/taglibs.jsp" %>
<html:html>
<head>
<title><lybbs:web key="forumName"/></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="bookmark" href="favicon.ico" type="image/x-icon">
<%@ include file="common/include/header.jsp" %>
<script language="JavaScript">
function checkUserName() {
  var userName = document.registerForm.userName.value;
  if(userName.length>0) {
    buffalo.remoteCall("commonService.isUserNameExist",[userName], function(reply) {
      if(reply.getResult()) {
        document.getElementById("userNameMemo").innerHTML="<font color=#FF0000><bean:message key="error.user.register.usernameexist"/></font>";
        document.registerForm.userName.focus();
      }
      else {
        document.getElementById("userNameMemo").innerHTML="Passed";
      }
    });
  }
}
function checkEmail() {
  var email = document.registerForm.email.value;
  if(email.length>0) {
    buffalo.remoteCall("commonService.isEmailExist",[email], function(reply) {
      if(reply.getResult()) {
        document.getElementById("emailMemo").innerHTML="<font colr=#FF0000><bean:message key="error.user.register.emailreserved"/></font>";
      }
      else {
        document.getElementById("emailMemo").innerHTML="Passed";
      }
    });
  }
}
function check() {
  var invalidError="<bean:message key="error.input.invalid"/>";
  if (document.registerForm.userName.value=="") {
    alert("<bean:message key="error.user.login.usernameblank"/>");
    document.registerForm.userName.focus();
    return false;
  }
  else if (document.registerForm.userName.value.indexOf("\'")!=-1 || document.registerForm.userName.value.indexOf("\"")!=-1 || document.registerForm.userName.value.indexOf(",")!=-1 || document.registerForm.userName.value.indexOf("<")!=-1 || document.registerForm.userName.value.indexOf(">")!=-1) {
    alert("<bean:message key="error.user.register.usernameinvalid"/>");
    document.registerForm.userName.focus();
    return false;
  }
  else if(document.registerForm.password.value=="") {
    alert("<bean:message key="error.user.login.passwordblank"/>");
    document.registerForm.password.focus();
    return false;
  }
  else if (document.registerForm.password.value.indexOf("\'")!=-1 || document.registerForm.password.value.indexOf("\"")!=-1 || document.registerForm.password.value.indexOf("*")!=-1 || document.registerForm.password.value.indexOf("<")!=-1 || document.registerForm.password.value.indexOf(">")!=-1) {
    alert("<bean:message key="error.user.register.passwordinvalid"/>");
    document.registerForm.password.focus();
    return false;
  }
  else if(document.registerForm.email.value=="") {
    alert("<bean:message key="error.user.register.emailblank"/>");
    document.registerForm.email.focus();
    return false;
  }
  else if(document.registerForm.email.value.indexOf("@")==-1 || document.registerForm.email.value.indexOf(".")==-1) {
    alert("<bean:message key="error.user.register.emailinvalid"/>");
    document.registerForm.email.focus();
    return false;
  }
  else if(document.registerForm.password.value!=document.registerForm.password2.value) {
    alert("<bean:message key="error.user.register.twopassword"/>");
    document.registerForm.password2.focus();
    return false;
  }
  else if(checkInputValue(document.registerForm.userName.value)) {
    alert(invalidError);
    document.registerForm.userName.focus();
    return false;
  }
  else if(checkInputValue(document.registerForm.password.value)) {
    alert(invalidError);
    document.registerForm.password.focus();
    return false;
  }
  else if(checkInputValue(document.registerForm.email.value)) {
    alert(invalidError);
    document.registerForm.email.focus();
    return false;
  }
  else if(checkInputValue(document.registerForm.homePage.value)) {
    alert(invalidError);
    document.registerForm.homePage.focus();
    return false;
  }
  else if(checkInputValue(document.registerForm.imageUrl.value)) {
    alert(invalidError);
    document.registerForm.imageUrl.focus();
    return false;
  }
   else if(checkInputValue(document.registerForm.qq.value)) {
     alert(invalidError);
     document.registerForm.qq.focus();
     return false;
   }
   else if(checkInputValue(document.registerForm.icq.value)) {
     alert(invalidError);
     document.registerForm.icq.focus();
     return false;
   }
  return true;
}
 function setProvince() {
   document.registerForm.province.value="<bean:message key="common.lybbs.others"/>";
   document.registerForm.city.value="";
 }
</script>
<script src="lybbs/common/js/comefrom.js"></script>
</head>
<body topmargin=0 leftmargin=0>
<TABLE class=tableCommonStyle cellSpacing=1 cellPadding=3 border=0 align=center>
 <TR>
  <TD height=4 class=bgStyle></TD>
 </TR>
 <TR>
  <TD class=noBgStyle>
    <lybbs:typeAdTag/>
  </TD>
 </TR>
 <TR>
  <TD height=4 class=bgStyle></TD>
 </TR>
 <tr>
  <td class=menuStyle height=22>
    <table width=100% cellpadding=0 cellspacing=0 border=0>
    <tr>
    <td align=left>
    <lybbs:typeUserHeaderTag forumID="0"/>
    </td>
    <td align=right>
      <lybbs:web key="returnHomeLink"/>
    </td>
    </tr>
    </table>
  </td>
 </tr>
</table>
<br>
<table class=tableCommonStyle cellpadding=3 cellspacing=1 border=0 align=center>
 <tr>
  <td class=navStyle vAlign=center height=25>
    <img src="lybbs/images/forum_nav.gif" width="9" height="9" align="absMiddle"> <a href="bbs_index.do"><lybbs:web key="forumName"/></a> <bean:message key="common.lybbs.arrow"/> <bean:message key="common.lybbs.register"/>
  </td>
 </tr>
</table>
<br>
<table class=tableNoBgStyle cellpadding=0 cellspacing=0 border=0 align=center>
 <tr>
  <td>&nbsp;</td>
  <td align=right>
    <a href="javascript:openScript('bbs_help.do?helpon=register',500,400)"><img src="lybbs/images/help_b.gif" border=0></a>
  </td>
 </tr>
</table>
<html:form action="bbs_registerSubmit.do" method="post" enctype="multipart/form-data" onsubmit="return check()">
<table class=tableCommonStyle cellpadding=3 cellspacing=1 border=0 align=center>
    <tr>
     <td class=forumColorOne width=40%>
      <b><bean:message key="common.lybbs.username"/>:&nbsp; </b><br><bean:message key="jsp.register.username.comment"/>
     </td>
     <td class=forumColorTwo width=60%>
      <html:text property="userName" maxlength="12" onblur="checkUserName()"/>&nbsp;* <span id="userNameMemo"><bean:message key="common.lybbs.mustinput"/></span>
     </td>
    </tr>
    <tr>
     <td class=forumColorOne width=40%>
      <b><bean:message key="common.lybbs.password"/>:&nbsp; </b><br><bean:message key="jsp.register.password.comment"/>
     </td>
     <td class=forumColorTwo width=60%>
       <html:password property="password" maxlength="20"/>&nbsp;* <bean:message key="common.lybbs.mustinput"/>
     </td>
    </tr>
    <tr>
     <td class=forumColorOne>
      <b><bean:message key="common.lybbs.password"/>:&nbsp; </b><br><bean:message key="jsp.register.password.confirm"/>
     </td>
     <td class=forumColorTwo>
      <html:password property="password2" maxlength="20"/>&nbsp;* <bean:message key="common.lybbs.mustinput"/>
     </td>
    </tr>
    <tr>
     <td class=forumColorOne>
      <b><bean:message key="jsp.register.emailaddress"/>:&nbsp; </b><br><bean:message key="jsp.register.emailaddress.comment"/>
     </td>
     <td class=forumColorTwo>
      <html:text property="email" maxlength="40" onblur="checkEmail()"/>&nbsp;* <span id="emailMemo"><bean:message key="common.lybbs.mustinput"/></span>
     </td>
    </tr>
    <tr>
     <td class=forumColorOne>
      <b><bean:message key="jsp.register.lostquestion"/>:&nbsp; </b><br><bean:message key="jsp.register.lostquestion.comment"/>
     </td>
     <td class=forumColorTwo>
      <html:text property="lostQuestion" maxlength="20"/>
     </td>
    </tr>
    <tr>
     <td class=forumColorOne>
      <b><bean:message key="jsp.register.lostanswer"/>:&nbsp; </b><br><bean:message key="jsp.register.lostanswer.comment"/>
     </td>
     <td class=forumColorTwo>
      <html:text property="lostAnswer" maxlength="20"/>
     </td>
    </tr>
   </table>

   <table class=tableCommonStyle cellpadding=3 cellspacing=1 border=0 align=center id=adv style="display:none;">
    <tr>
     <td class=forumColorOne width=40%>
      <b><bean:message key="jsp.register.viewemailaddress"/></b><br><bean:message key="jsp.register.viewemailaddress.comment"/>
     </td>
     <td class=forumColorTwo width=60%>
      <input name="showEmail" type="radio" value="1" checked> <bean:message key="common.lybbs.yes"/>&nbsp;&nbsp;<input name="showEmail" type="radio" value="0"> <bean:message key="common.lybbs.no"/>
     </td>
    </tr>
    <logic:equal name="publicStyleBean" property="editUserTitleSelf" value="1">
    <tr>
     <td class=forumColorOne><b><bean:message key="jsp.register.newmembertitle"/>:&nbsp; </b><BR><bean:message key="jsp.register.newmembertitle.comment"/></td>
     <td class=forumColorTwo><html:text property="newMemberTitle" size="10" maxlength="30"/></td>
    </tr>
    </logic:equal>
    <logic:equal name="publicStyleBean" property="editJhmpSelf" value="1">
    <tr>
     <td class=forumColorOne><b><bean:message key="jsp.register.newsocialpart"/>:&nbsp; </b><BR><bean:message key="jsp.register.newsocialpart.comment"/></td>
     <td class=forumColorTwo><html:text property="newSocialPart" size="10" maxlength="40"/></td>
    </tr>
    </logic:equal>
    <tr>
     <td class=forumColorOne><b><bean:message key="jsp.register.sex"/></b></td>
     <td class=forumColorTwo>
      <html:select property="sex" size="1">
        <html:option value="sect" key="common.lybbs.secret"/>
        <html:option value="male" key="jsp.register.sex.male"/>
        <html:option value="feml" key="jsp.register.sex.female"/>
      </html:select>
     </td>
    </tr>
    <tr>
     <td class=forumColorOne><b><bean:message key="jsp.register.education"/></b></td>
     <td class=forumColorTwo>
      <html:select property="education" size="1">
        <html:option value="secret" key="common.lybbs.secret"/>
        <html:option value="primary" key="jsp.register.education.primaryschool"/>
        <html:option value="middle" key="jsp.register.education.middleschool"/>
        <html:option value="high" key="jsp.register.education.highschool"/>
        <html:option value="higher" key="jsp.register.education.highereducation"/>
        <html:option value="college" key="jsp.register.education.college"/>
        <html:option value="master" key="jsp.register.education.master"/>
        <html:option value="doctor" key="jsp.register.education.doctor"/>
        <html:option value="postdoc" key="jsp.register.education.postdoctor"/>
      </html:select>
     </td>
    </tr>
    <tr>
     <td class=forumColorOne><b><bean:message key="jsp.register.marry"/></b></td>
     <td class=forumColorTwo>
      <html:select property="marry" size="1">
        <html:option value="secret" key="common.lybbs.secret"/>
        <html:option value="single" key="jsp.register.marry.single"/>
        <html:option value="married" key="jsp.register.marry.married"/>
        <html:option value="divorce" key="jsp.register.marry.divorce"/>
        <html:option value="lost" key="jsp.register.marry.lost"/>
      </html:select>
     </td>
    </tr>
    <tr>
     <td class=forumColorOne><b><bean:message key="jsp.register.work"/></b></td>
     <td class=forumColorTwo>
      <html:select property="work" size="1">
        <html:option value="secret" key="common.lybbs.secret"/>
        <html:option value="computer" key="jsp.register.work.computer"/>
        <html:option value="finance" key="jsp.register.work.finance"/>
        <html:option value="commerce" key="jsp.register.work.commerce"/>
        <html:option value="service" key="jsp.register.work.service"/>

⌨️ 快捷键说明

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