📄 userreg.jsp
字号:
<%@ page language="java" contentType="text/html;charset=UTF-8" errorPage="err.jsp" %>
<%@ include file="./GVinc/gvImport.jsp" %><%
String userName="", userPass="", userName2="", userEmail="";
short userEmailOpen = 1;
byte userSex = 1 ;
String userQuestion="", userAnswer="", userBirthday="", userWeb="", userQQ="";
String userArea="", userCity="", userWork="", userPen="我爱社区,我爱GamVan!", userIntro="", userTxt="";
String userYear="0", userMonth="0", userDate="0";
String act=ParamUtils.getStringParameter(request,"act","add");
int userAreaId = 0;
if(act.equals("edit")){
if(gvUserID<=0){
out.print(prtCenter("您尚未登陆,无权进行此项操作!","userLogin.jsp",1));
out.close();
}else{
userName = gvUserName;
cui = cu.userInfo(gvUserID);
userBirthday = cui.getUserBirthday();
//out.print(userBirthday);
if(userBirthday!=null && !userBirthday.equals("")){
String [] ubd = userBirthday.trim().split("-");
userYear = String.valueOf(ubd[0]);
userMonth = ubd[1];
userDate = ubd[2];
}else{
userYear = "0";
userMonth = "0";
userDate = "0";
}
userEmail = cui.getUserEmail();
userEmailOpen = cui.getUserEmailOpen();
userPen = cui.getUserPen();
userArea = cui.getUserArea().trim();
userCity = cui.getUserCity();
userIntro = cui.getUserIntro();
userWeb = cui.getUserWeb();
userQQ = cui.getUserQQ();
userName2 = cui.getUserName2();
userWork = cui.getUserWork();
userSex = cui.getUserSex();
userAreaId = cui.getUserAreaId();
userQuestion = cui.getUserQuestion();
userAnswer = cui.getUserAnswer();
}
}
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=clubTitle%> - 填写注册资料</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" />
<STYLE type="text/css" media="screen">
@import url(./GVinc/GamVanClubStyle.css);
</STYLE>
</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 language="javascript" type="text/javascript" src="GVscript/GVtopCode.js"></script>
<script language="javascript" type="text/javascript" src="GVscript/userReg.js"></script>
<script language="javascript" type="text/javascript" src="GVscriptInc/topBar.js">
gv_showWait('waitDiv', 1);
prtie2('<%=clubName%> - 填写注册资料');
</script>
<DIV class="line"></DIV>
<DIV class="list_table_0">
<%=com.gamvan.club.ClubHtmlConst.gamvan_menu("填写注册信息")%>
</DIV>
<DIV class="line"></DIV>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
<form action="userRegPost.jsp" method="post" name="Gforms" onSubmit="return CheckForm();">
<tr>
<td width="120" class="tab1">
<strong>登陆ID</strong>
</td>
<td class="bg2">
<input style="width:200 px" name="gvUserName" type="text" id="gvUserName" value="<%=userName%>" <%if(act.equals("edit")){out.print("readonly=\"true\"");}%> size="30" maxlength="30" />
(社区唯一标识注册后不能更改—)
</td>
</tr>
<tr>
<td class="tab1"><strong>登陆密码</strong></td>
<td class="bg2">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100"><input style="width:200 px" onKeyUp="CreateRateUserPassReq('Gforms')" name="gvUserPass" type="password" id="gvUserPass" size="30" maxlength="30" /> </td>
<td width="10"></td><td>
<TABLE width="200" border=0 cellPadding=0 cellSpacing=0 >
<TBODY><TR><TD vAlign=top noWrap width=0>
<A href="#">密码强度参考</A>
</TD>
<TD><DIV id="passwdRating">太短</DIV>
</TD></TR><TR><TD height=3></TD></TR>
<TR><TD colSpan=2>
<TABLE id="passwdBarDiv" cellSpacing=0 cellPadding=0 width="200" bgColor="#ffffff" border=0>
<TBODY><TR>
<TD id="posBar" width="0%" bgColor="#e0e0e0" height="4"></TD>
<TD id="negBar" width="100%" bgColor="#e0e0e0" height="4"></TD>
</TR></TBODY>
</TABLE>
</TD></TR>
</TBODY></TABLE> </td>
</tr>
</table>
<script language="javascript">
<!--
/* Checks Browser Compatibility */
//document.getElementById("passwdBarDiv").style.display = "block";
var agt = navigator.userAgent.toLowerCase();
var is_op = (agt.indexOf("opera") != -1);
var is_ie = (agt.indexOf("msie") != -1) && document.all && !is_op;
var is_mac = (agt.indexOf("mac") != -1);
var is_gk = (agt.indexOf("gecko") != -1);
var is_sf = (agt.indexOf("safari") != -1);
function gff(str, pfx) {
var i = str.indexOf(pfx);
if (i != -1) {
var v = parseFloat(str.substring(i + pfx.length));
if (!isNaN(v)) {
return v;
}
}
return null;
}
function Compatible() {
if (is_ie && !is_op && !is_mac) {
var v = gff(agt, "msie ");
if (v != null) {
return (v >= 6.0);
}
}
if (is_gk && !is_sf) {
var v = gff(agt, "rv:");
if (v != null) {
return (v >= 1.4);
}else{
v = gff(agt, "galeon/");
if (v != null) {
return (v >= 1.3);
}
}
}
if (is_sf) {
var v = gff(agt, "applewebkit/");
if (v != null) {
return (v >= 124);
}
}
return false;
}
/* We also try to create an xmlhttp object to see if the browser supports it */
myxmlhttp = CreateXmlHttpReq(RateUserPassXmlHttpHandler);
isBrowserCompatible = Compatible() && myxmlhttp;
if (!isBrowserCompatible || hidePasswordBar) {
document.getElementById("passwdBarDiv").style.display = "none";
}
//-->
</script></td>
</tr>
<tr>
<td class="tab1"><strong>确认密码</strong></td>
<td class="bg2">
<input style="width:200 px" name="gvUserPass2" type="password" id="gvUserPass2" size="30" maxlength="30" />(同上)
</td>
</tr>
<tr>
<td class="tab1"><strong>性别</strong></td>
<td class="bg2">
<input name="gvUserSex" type="radio" value="1" <%if(userSex==1){out.print(" checked=\"checked\"");}%> />男
<input type="radio" name="gvUserSex" value="2" <%if(userSex==2){out.print(" checked=\"checked\"");}%> />女
<input type="radio" name="gvUserSex" value="0" <%if(userSex==0){out.print(" checked=\"checked\"");}%> />保密
</td>
</tr>
<tr>
<td class="tab1"><strong>电子邮件(Email)</strong></td>
<td class="bg2"><input name="gvUserEmail" type="text" id="gvUserEmail" value="<%=userEmail%>" size="30" maxlength="50" /></td>
</tr>
<tr>
<td class="tab1"><strong>邮件是否公开</strong></td>
<td class="bg2">
<select name="gvUserEmailOpen" id="gvUserEmailOpen">
<option value="2" <%if(userEmailOpen==2){out.print(" selected=\"selected\"");}%>>完全保密</option>
<option value="0" <%if(userEmailOpen==0){out.print(" selected=\"selected\"");}%> >社区内公开</option>
<option value="1" <%if(userEmailOpen==1){out.print(" selected=\"selected\"");}%>>仅对好友公开</option>
</select>
</td>
</tr>
<%
if(!act.equals("edit")){
%>
<tr>
<td class="tab1"><strong>密码提示问题</strong></td>
<td class="bg2">
<input name="gvUserQuestion" type="text" id="gvUserQuestion" size="30" maxlength="50" value=""/>
(例如:你是谁?) (忘记密码时使用此功能找回密码)<br />
只能提交一次,以后不能更改</td>
</tr>
<tr>
<td class="tab1">
<strong>密码提示答案</strong>
</td>
<td class="bg2">
<input name="gvUserAnswer" type="text" id="gvUserAnswer" size="30" maxlength="50" value=""/>
(例如:我是小宝) (忘记密码时使用此功能找回密码)<br />
只能提交一次,以后不能更改
</td>
</tr>
<%
}
%>
<tr>
<td width="120" class="tab1"><strong>笔名</strong></td>
<td class="bg2"><input name="gvUserName2" type="text" id="gvUserName2" value="<%=userName2%>" size="30" maxlength="30" /></td>
</tr>
<tr>
<td class="tab1"><strong>生日</strong></td>
<td class="bg2">
<select name="gvUserYear" id="gvUserYear">
<option value="0" selected="selected">年份</option>
<%
String txt = new String("");
txt = "";
for(int i=1940;i<2046;i++){
txt+="<option value=\"" + i + "\" ";
if(i==Integer.parseInt(userYear)){
txt+=" selected";
}
txt += ">" + i + "年</option>";
}
out.print(txt);
%>
</select>
<select name="gvUserMonth" id="gvUserMonth">
<option value="0" selected="selected">月份</option>
<%
txt = "";
for(int i=1;i<13;i++){
txt += "<option value=\"" + i + "\" ";
if(i==Integer.parseInt(userMonth)){
txt+=" selected";
}
txt += ">" + i + "月</option>";
}
out.print(txt);
%>
</select>
<select name="gvUserDate" id="gvUserDate">
<option value="0" selected="selected">日期</option>
<%
txt = "";
for(int i=1;i<32;i++){
txt += "<option value=\"" + i + "\" ";
if(i==TypeChange.stringToInt(userDate)){
txt+=" selected";
}
txt += ">" + i + "日</option>";
}
out.print(txt);
%>
</select>
</td>
</tr>
<tr>
<td class="tab1"><strong>个人主页</strong></td>
<td class="bg2"><input name="gvUserWeb" type="text" id="gvUserWeb" value="<%=userWeb%>" size="30" maxlength="50" /></td>
</tr>
<tr>
<td class="tab1">
<strong>QQ</strong>
</td>
<td class="bg2">
<input name="gvUserQQ" type="text" id="gvUserQQ" value="<%=userQQ%>" size="20" maxlength="30" />
</td>
</tr>
<tr>
<td class="tab1"><strong>所在地区</strong></td>
<td colspan="2" class="bg2">
<input name="gvUserArea" type="text" id="gvUserArea" value="<%=userArea%>" size="15" maxlength="16" />
<script language="javascript">
function chaArea(){
document.Gforms.gvUserArea.value=Gforms.gvUserAreaId.options[Gforms.gvUserAreaId.selectedIndex].text;
}
</script>
<select onChange="javascript:chaArea();" name="gvUserAreaId" id="gvUserAreaId">
<option value="0" selected>选择地区</option>
<%
com.gamvan.club.group.GroupCollection clubgc = new com.gamvan.club.group.GroupCollection();
clubgc.setGroupLayer(0);
clubgc.setGroupType(1);
List listArea = clubgc.groupList();
%>
<c:set var="isid" value="<%=String.valueOf(userAreaId)%>"/>
<c:forEach var="gIDD" items="<%=listArea%>">
<c:choose>
<c:when test="${gIDD.groupID==isid}">
<option value="<c:out value="${gIDD.groupID}" escapeXml="false"/>" selected><c:out value="${gIDD.groupName}" escapeXml="false"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${gIDD.groupID}" escapeXml="false"/>"><c:out value="${gIDD.groupName}" escapeXml="false"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</td>
</tr>
<tr>
<td class="tab1"><strong>所在城市</strong></td>
<td class="bg2">
<input name="gvUserCity" type="text" id="gvUserCity" value="<%=userCity%>" size="15" maxlength="16" />
</td>
</tr>
<tr>
<td class="tab1"><strong>职业</strong></td>
<td class="bg2">
<input name="gvUserWork" type="text" id="gvUserWork" value="<%=userWork%>" size="15" maxlength="16" />
</td>
</tr>
<tr>
<td class="tab1"><strong>个人签名</strong></td>
<td class="bg2">
<textarea name="gvUserPen" cols="50" rows="5" id="gvUserPen"><%=es.unHtmlEncoder(userPen)%></textarea><br />发帖可跟随在帖子底部
</td>
</tr>
<tr>
<td class="tab1"><strong>自我介绍</strong></td>
<td class="bg2">
<textarea name="gvUserIntro" cols="50" rows="5" id="gvUserIntro">
<%=es.unHtmlEncoder(userIntro)%>
</textarea><br />让朋友们更加了解你
</td>
</tr>
<tr>
<td class="tab1"> </td>
<td height="30" class="bg2">
<!--
<INPUT id="infoShow" name="infoShow" type=checkbox value="1" onclick="showInfo()">
<span id=divTxt>高级设置选项</span>
-->
<input type="hidden" name="act" value="<%=act%>" class="btn">
<input type="submit" name="gvSubmit" value="提交数据" class="btn">
<input name="gvBack" type="button" class="btn" onClick="javascript:history.back();" value="放弃"/>
</td>
</tr>
</form>
</table>
<script language="JavaScript">
<!--
function showInfo(){
if (document.Gforms.infoShow.checked == true) {
document.getElementById("div1").style.display = "";;
//document.getElementById("divTxt").innerText="";
}else{
document.getElementById("div1").style.display = "none";
//document.getElementById("divTxt").innerText="";
}
}
-->
</script>
<%=Gfoot()%>
</body>
</html>
<!-- Powered by www.GamVan.com -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -