userReg.jsp
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:11k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

Java

  1. <%@ page language="java" contentType="text/html;charset=UTF-8" errorPage="err.jsp" %>
  2. <%@ include file="./GVinc/gvImport.jsp" %>
  3. <jsp:useBean id="gct" scope="request" class="com.gamvan.club.group.GroupCollection"/> 
  4. <%
  5. String userName="", userPass="", userName2="", userEmail="";
  6. short userEmailOpen = 1;
  7. byte userSex = 1 ;
  8. String userQuestion="", userAnswer="", userBirthday="", userWeb="", userQQ="";
  9. String userArea="", userCity="", userWork="", userPen="我爱社区,我爱GamVan!", userIntro="", userTxt="";
  10. String userYear="0", userMonth="0", userDate="0";
  11. String act="add";
  12. int userAreaId = 0;
  13. if(request.getParameter("act")!=null){
  14. act = request.getParameter("act");
  15. }
  16. if(act.equals("edit")){
  17. if(gvUserName==null || gvUserName.equals("")){
  18. out.print(prtCenter("您尚未登陆,无权进行此项操作!","userLogin.jsp",1));
  19. out.close();
  20. }else{
  21. userName = gvUserName;
  22. cui = cu.userInfo(gvUserID);
  23. userBirthday = cui.getUserBirthday();
  24. //out.print(userBirthday);
  25. if(userBirthday!=null && !userBirthday.equals("")){
  26. String [] ubd = userBirthday.trim().split("-");
  27. userYear = String.valueOf(ubd[0]);
  28. userMonth = ubd[1];
  29. userDate = ubd[2];
  30. }else{
  31. userYear = "0";
  32. userMonth = "0";
  33. userDate = "0";
  34. }
  35. userEmail = cui.getUserEmail();
  36. userEmailOpen = cui.getUserEmailOpen();
  37. userPen = cui.getUserPen();
  38. userArea = cui.getUserArea().trim();
  39. userCity = cui.getUserCity();
  40. userIntro = cui.getUserIntro();
  41. userWeb = cui.getUserWeb();
  42. userQQ = cui.getUserQQ();
  43. userName2 = cui.getUserName2();
  44. userWork = cui.getUserWork();
  45. userSex = cui.getUserSex();
  46. userAreaId = cui.getUserAreaId();
  47. userQuestion = cui.getUserQuestion();
  48. userAnswer = cui.getUserAnswer();
  49. }
  50. }
  51. %>
  52. <html xmlns="http://www.w3.org/1999/xhtml">
  53. <head>
  54. <title><%=clubTitle%></title>
  55. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  56. <link href="./GVimgs/favicon.ico" rel="Bookmark"> 
  57. <link rel="icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
  58. <link rel="shortcut icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
  59. <link href="./GVinc/main.css" rel="stylesheet" type="text/css" />
  60. </head>
  61. <body>
  62. <DIV id="waitDiv" style="LEFT: 40%; VISIBILITY: hidden; POSITION: absolute; TOP: 20%; TEXT-ALIGN: center">
  63. <TABLE cellPadding=6 border=0>
  64. <TBODY><TR><TD align=middle>
  65. <IMG  src="GVimgs/loading.gif" alt="请稍候..." width="30" height="30">
  66. <BR>
  67. <FONT color="red">数据载入中,请稍候...</FONT></TD></TR></TBODY></TABLE></DIV>
  68. <script type="text/javascript" src="GVscript/GVtopCode.js"></script>
  69. <script type="text/javascript" src="GVscript/userReg.js"></script>
  70. <script type="text/javascript" src="GVscript/userReg.js"></script>
  71. <script type="text/javascript" src="GVscriptInc/topBar.js"></script>
  72. <SCRIPT language="javascript">
  73. gv_showWait('waitDiv', 1); 
  74. prtie2('<%=clubName%>__个人工具箱__填写注册资料');
  75. </SCRIPT>
  76. <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
  77. <tr class="tab1"><td>
  78. <%=com.gamvan.club.ClubHtmlConst.gamvan_menu("填写注册信息")%>&nbsp;&nbsp;
  79. </td></tr>
  80. </table>
  81. <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
  82. <form action="userRegPost.jsp" method="post"  name="Gforms" onSubmit="return CheckForm();"><tr>
  83. <td width="120" class="tab1">
  84. <strong>登陆ID</strong>
  85. </td>
  86.     <td class="bg2">
  87. <input name="gvUserName" type="text" id="gvUserName" value="<%=userName%>" <%if(act.equals("edit")){out.print("readonly="true"");}%> size="30" maxlength="30" />
  88. (社区唯一标识注册后不能更改)</td>
  89.   </tr>
  90.   <tr>
  91.     <td class="tab1"><strong>登陆密码</strong></td>
  92.     <td class="bg2"><input name="gvUserPass" type="password" id="gvUserPass" size="30" maxlength="30" />
  93.     (6位以上)</td>
  94.   </tr>
  95.   <tr>
  96.     <td class="tab1"><strong>确认密码</strong></td>
  97.     <td class="bg2"><input name="gvUserPass2" type="password" id="gvUserPass2" size="30" maxlength="30" />
  98.     (同上)</td>
  99.   </tr>
  100.   <tr>
  101.     <td class="tab1"><strong>性别</strong></td>
  102.     <td class="bg2">
  103. <input name="gvUserSex" type="radio" value="1" <%if(userSex==1){out.print(" checked="checked"");}%> />男
  104. &nbsp;&nbsp;
  105. <input type="radio" name="gvUserSex" value="2" <%if(userSex==2){out.print(" checked="checked"");}%> />女
  106. &nbsp;&nbsp;
  107. <input type="radio" name="gvUserSex" value="0" <%if(userSex==0){out.print(" checked="checked"");}%> />保密
  108. </td>
  109.   </tr>
  110.   <tr>
  111.     <td class="tab1"><strong>电子邮件(Email)</strong></td>
  112.     <td class="bg2"><input name="gvUserEmail" type="text" id="gvUserEmail" value="<%=userEmail%>" size="30" maxlength="50" /></td>
  113.   </tr>
  114.   <tr>
  115.     <td class="tab1"><strong>邮件是否公开</strong></td>
  116.     <td class="bg2">
  117. <select name="gvUserEmailOpen" id="gvUserEmailOpen">
  118. <option value="2" <%if(userEmailOpen==2){out.print(" selected="selected"");}%>>完全保密</option>
  119. <option value="0" <%if(userEmailOpen==0){out.print(" selected="selected"");}%> >社区内公开</option>
  120. <option value="1" <%if(userEmailOpen==1){out.print(" selected="selected"");}%>>仅对好友公开</option>
  121.   
  122. </select></td>
  123.   </tr>
  124. <%
  125. if(!act.equals("edit")){
  126. %>
  127.   <tr>
  128.     <td class="tab1"><strong>密码提示问题</strong></td>
  129.     <td class="bg2">
  130. <input name="gvUserQuestion" type="text" id="gvUserQuestion" size="30" maxlength="50" value=""/>
  131. (例如:你是谁?) (忘记密码时使用此功能找回密码)<br />
  132. 只能提交一次,以后不能更改</td>
  133. </tr>
  134. <tr><td class="tab1"><strong>密码提示答案</strong></td>
  135. <td class="bg2">
  136. <input name="gvUserAnswer" type="text" id="gvUserAnswer" size="30" maxlength="50"  value=""/>
  137. (例如:我是小宝) (忘记密码时使用此功能找回密码)<br />
  138. 只能提交一次,以后不能更改</td>
  139.   </tr>
  140. <%
  141. }
  142. %> 
  143.   <tr>
  144.     <td width="120" class="tab1"><strong>笔名</strong></td>
  145.     <td class="bg2"><input name="gvUserName2" type="text" id="gvUserName2" value="<%=userName2%>" size="30" maxlength="30" /></td>
  146.   </tr>
  147.   <tr>
  148.     <td class="tab1"><strong>生日</strong></td>
  149.     <td class="bg2">
  150. <select name="gvUserYear" id="gvUserYear">
  151. <option value="0" selected="selected">年份</option>
  152. <%
  153. String txt = new String("");
  154. txt = "";
  155.  for(int i=1940;i<2046;i++){
  156.  txt+="<option value="" + i + "" ";
  157.  if(i==Integer.parseInt(userYear)){
  158.   txt+=" selected";
  159.  }
  160.  txt += ">" + i + "年</option>";
  161.  }
  162.  out.print(txt);
  163. %>
  164. </select>
  165. <select name="gvUserMonth" id="gvUserMonth">
  166. <option value="0" selected="selected">月份</option>
  167.  <%
  168. txt = "";
  169. for(int i=1;i<13;i++){
  170. txt += "<option value="" + i + "" ";
  171. if(i==Integer.parseInt(userMonth)){
  172. txt+=" selected";
  173. }
  174. txt += ">" + i + "月</option>";
  175. }
  176.  out.print(txt);
  177. %>
  178. </select>
  179. <select name="gvUserDate" id="gvUserDate">
  180.   <option value="0" selected="selected">日期</option>
  181.  <%
  182. txt = "";
  183. for(int i=1;i<32;i++){
  184. txt += "<option value="" + i + "" ";
  185. if(i==Integer.parseInt(userDate)){
  186. txt+=" selected";
  187. }
  188. txt += ">" + i + "日</option>";
  189. }
  190. out.print(txt);
  191. %>
  192. </select></td>
  193.   </tr>
  194.   <tr>
  195.     <td class="tab1"><strong>个人主页</strong></td>
  196.     <td class="bg2"><input name="gvUserWeb" type="text" id="gvUserWeb" value="<%=userWeb%>" size="30" maxlength="50" /></td>
  197.   </tr>
  198.   <tr>
  199.     <td class="tab1"><strong>QQ</strong></td>
  200.     <td class="bg2"><input name="gvUserQQ" type="text" id="gvUserQQ" value="<%=userQQ%>" size="20" maxlength="30" />
  201. </td>
  202.   </tr>
  203.   <tr>
  204.     <td class="tab1"><strong>所在地区</strong></td>
  205.     <td colspan="2" class="bg2">
  206. <input  name="gvUserArea" type="text" id="gvUserArea" value="<%=userArea%>" size="15" maxlength="16" />
  207. <script language="javascript">
  208. function chaArea(){
  209. document.Gforms.gvUserArea.value=Gforms.gvUserAreaId.options[Gforms.gvUserAreaId.selectedIndex].text;
  210. }
  211. </script>
  212. <select onChange="javascript:chaArea();" name="gvUserAreaId" id="gvUserAreaId">
  213. <option value="0" selected>选择地区</option>
  214. <%
  215. StringBuffer sql_1 = new StringBuffer();
  216. sql_1.append("from GroupItem as gi ");
  217. sql_1.append(" where gi.groupLayer=0 and  gi.groupType=1");
  218. sql_1.append(" order by gi.groupOrder desc");
  219. %>
  220. <c:set value="<%=sql_1.toString()%>"  target="${gct}" property="sql" />
  221. <c:set var="isid" value="<%=String.valueOf(userAreaId)%>"/>
  222. <c:forEach var="gIDD" items="<%=gct.groupQuery()%>"> 
  223. <c:choose>
  224. <c:when test="${gIDD.groupID==isid}">
  225. <option value="<c:out value="${gIDD.groupID}" escapeXml="false"/>" selected><c:out value="${gIDD.groupName}" escapeXml="false"/></option>
  226. </c:when>
  227. <c:otherwise>
  228. <option value="<c:out value="${gIDD.groupID}" escapeXml="false"/>"><c:out value="${gIDD.groupName}" escapeXml="false"/></option>
  229. </c:otherwise>
  230. </c:choose>
  231. </c:forEach>
  232. </select>  </tr>
  233.   <tr>
  234.     <td class="tab1"><strong>所在城市</strong></td>
  235.     <td class="bg2">
  236.     <input name="gvUserCity" type="text" id="gvUserCity" value="<%=userCity%>" size="15" maxlength="16" />    </td>
  237.   </tr>
  238.   <tr>
  239.     <td class="tab1"><strong>职业</strong></td>
  240.     <td class="bg2">
  241. <input name="gvUserWork" type="text" id="gvUserWork" value="<%=userWork%>" size="15" maxlength="16" /></td>
  242.   </tr>
  243.   <tr>
  244.     <td class="tab1"><strong>个人签名</strong></td>
  245.     <td class="bg2">
  246. <textarea name="gvUserPen" cols="50" rows="5" id="gvUserPen">
  247. <%=es.unHtmlEncoder(userPen)%>
  248. </textarea>
  249.     <br />
  250.     发帖可跟随在帖子底部</td>
  251.   </tr>
  252.   <tr>
  253.     <td class="tab1"><strong>自我介绍</strong></td>
  254.     <td class="bg2">
  255. <textarea name="gvUserIntro" cols="50" rows="5" id="gvUserIntro">
  256. <%=es.unHtmlEncoder(userIntro)%>
  257. </textarea>
  258.     <br />
  259.     让朋友们更加了解你</td>
  260.   </tr>
  261. <tr>
  262. <td class="tab1">&nbsp;</td>
  263. <td height="30" class="bg2">
  264. <!--
  265. <INPUT id="infoShow" name="infoShow" type=checkbox value="1" onclick="showInfo()">
  266. <span id=divTxt>高级设置选项</span>
  267. -->
  268. <input  type="hidden" name="act" value="<%=act%>"  class="btn">
  269. <input  type="submit" name="gvSubmit" value="提交数据"  class="btn">
  270. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  271. <input name="gvBack" type="button" class="btn" onClick="javascript:history.back();" value="放弃"/>
  272. </tr>
  273. </form>
  274. </table>
  275. <script language="JavaScript">
  276. <!--
  277. function showInfo(){
  278. if (document.Gforms.infoShow.checked == true) {
  279. document.getElementById("div1").style.display = "";;
  280. //document.getElementById("divTxt").innerText="";
  281. }else{
  282. document.getElementById("div1").style.display = "none";
  283. //document.getElementById("divTxt").innerText="";
  284. }
  285. }
  286. -->
  287. </script>
  288. <%=Gfoot()%>
  289. </body>
  290. </html>
  291. <!-- Powered by www.GamVan.com -->