userRegPost.jsp
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:5k
- <%@ page language="java" contentType="text/html;charset=UTF-8"
- errorPage="err.jsp" %>
- <%@ include file="./GVinc/gvImport.jsp" %>
- <%
- response.setHeader("Pragma","No-cache");//HTTP 1.1
- response.setHeader("Cache-Control","no-cache");//HTTP 1.0
- response.setHeader("Expires","0");//防止被proxy
- String userName, userPass, userSex, userName2, userEmail, userQuestion, userAnswer;
- String userBirthday, userWeb, userQQ, userArea, userCity, userWork, userPen, userIntro, userTxt;
- String userYear, userMonth, userDate;
- int userAreaId = TypeChange.stringToInt(request.getParameter("gvUserAreaId"));
- boolean actPost;
- String act="add";
- if(request.getParameter("act")==null){
- act = "add";
- }else{
- act = request.getParameter("act").trim();
- }
- //if(act.equals("add")){
- userName = request.getParameter("gvUserName").trim();
- //}else{
- //userName = gvUserName;
- //}
- //out.print(userName);
- userPass = request.getParameter("gvUserPass").trim();
- userEmail = request.getParameter("gvUserEmail").trim();
- userYear = request.getParameter("gvUserYear");
- userMonth = request.getParameter("gvUserMonth");
- userDate = request.getParameter("gvUserDate");
- if(userName==null||userPass==null||userEmail==null){
- out.print(OutPrint.prtCenter("注册时 用户名、密码、电子邮件均不能为空!","",2));
- out.close();
- if(true)return;
- }else{
- if(request.getMethod().equals("POST")){
- cui = null;
- cui = cu.userInfo(userName);
- //判断社区是否存在同名用户ID
- if(cui!=null && !act.equals("edit")){
- out.print(OutPrint.prtCenter("社区内已有同名用户存在,请换名注册!","",2));
- out.close();
- if(true)return;
- }else{
- cu.setUserName(userName);
- cu.setUserPass(userPass);
- cu.setUserSex(TypeChange.stringToByte(request.getParameter("gvUserSex")));
- cu.setUserName2(request.getParameter("gvUserName2").trim());
- cu.setUserEmail(request.getParameter("gvUserEmail").trim());
- //if(act.equals("add")){
- cu.setUserQuestion(request.getParameter("gvUserQuestion"));
- cu.setUserAnswer(request.getParameter("gvUserAnswer"));
- //}
- cu.setUserBirthday(userYear + "-" + userMonth + "-" + userDate);
- cu.setUserEmailOpen(TypeChange.stringToShort(request.getParameter("gvUserEmailOpen")));
- cu.setUserWeb(request.getParameter("gvUserWeb").trim());
- cu.setUserQQ(request.getParameter("gvUserQQ").trim());
- cu.setUserArea(request.getParameter("gvUserArea").trim());
- cu.setUserCity(request.getParameter("gvUserCity").trim());
- cu.setUserPen(request.getParameter("gvUserPen").trim());
- cu.setUserWork(request.getParameter("gvUserWork").trim());
- cu.setUserIntro(request.getParameter("gvUserIntro").trim());
- cu.setUserRegip(request.getRemoteAddr());
- cu.setUserLastip(request.getRemoteAddr());
- cu.setUserAreaId(userAreaId);
- cu.setUserPic("");
- cu.setUserID(gvUserID);
- cu.setAct(act);
- actPost = cu.userRegPost();
- //out.print(cu.getMessage());
- if(!actPost){
- out.print(OutPrint.prtCenter(cu.getMessage(),"",2));
- out.close();
- if(true)return;
- }
- }
- }
- }
- %>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title><%=clubName%> 用户注册提交</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <link href="./GVimgs/favicon.ico" rel="Bookmark">
- <link rel="icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
- <link rel="shortcut icon" href="./GVimgs/favicon.ico" type="image/x-icon" />
- <link href="./GVinc/main.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <DIV id="waitDiv" style="LEFT: 40%; VISIBILITY: hidden; POSITION: absolute; TOP: 20%; TEXT-ALIGN: center">
- <TABLE cellPadding=6 border=0>
- <TBODY><TR><TD align=middle>
- <IMG src="GVimgs/loading.gif" alt="请稍候..." width="30" height="30">
- <BR>
- <FONT color="red">数据载入中,请稍候...</FONT></TD></TR></TBODY></TABLE></DIV>
- <script type="text/javascript" src="GVscript/GVtopCode.js"></script>
- <script type="text/javascript" src="GVscriptInc/topBar.js"></script>
- <SCRIPT language="javascript">
- prtie('<%=clubName%>>>提交注册信息');
- gv_showWait('waitDiv', 1); </SCRIPT>
- <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">
- <tr class="tab1">
- <td>
- <strong>您的位置</strong>>><a href="default.jsp" target="_parent">社区首页</a>>><a href="main.jsp">进站画面</a>>><a href="userAgree.jsp">提交注册信息</a>
- </td>
- </tr>
- </table>
- <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
- <tr>
- <td align="center" class="bg2 key"><%=clubName%> 感谢您的注册!您现在可以操作以下内容……</td>
- </tr>
- <tr>
- <td align="center" class="bg2">
- <%
- cui = null;
- cui = cu.userInfo(userName);
- %>
- <a href="userInfo.jsp?userID=<%=cui.getUserID()%>" target="_self">查看个人资料</a></td>
- </tr>
- <tr><td align="center" class="bg2">
- <a href="userLogin.jsp" target="_self">立即登陆社区</a>
- </td></tr>
- <tr>
- <td align="center" class="bg2"><a href="main.jsp" target="_self">返回社区首页 </a></td>
- </tr>
- <tr>
- <td align="center" class="bg2"><a href="userBox.jsp" target="_self">进入个人工具箱</a></td>
- </tr>
- </table>
- <%=Gfoot()%>
- </body>
- </html>