?? register.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="admin/md5.asp"-->
<%
response.Buffer = true
'****************************************************************
'* joinboard BBS Ver2.3.0/友盟論壇 Ver2.3.0
'*
'* 版權(quán)所有: JoinBoard V2.3
'*
'* 程序制作: 友盟工作室
'*
'* 主頁地址: http://joinboard.com 友盟論壇
'*
'* 論壇地址: http://bbs.joinboard.com/、http://youmeng.com
'*
'****************************************************************
'* Powered by: JoinBoard V2.3
'* Copyright 2003-2004. - All Rights Reserved.
'* JoinBoard is a trademark of YouMeng Studio.
'****************************************************************
%>
<!--#include file="admin/BBSConfig.asp"-->
<!--#include file="INC/online.asp"-->
<!--#include file="INC/ShowMsg.asp"-->
<!--#include file="INC/header.asp"-->
<!--#include file="INC/style.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="joinboard,forum,bbs,youmeng,友盟論壇">
<title><%=BBS_Config(0)%> - 注冊會員</title>
<link href="<%=Css_path%>" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<%
Call onlineuser()
call top()
response.Write "<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""path-table"">"
response.Write "<tr><td>"
response.write "<img src="""& BBS_Skin(3) &"JBB_bullet.gif""> <a href="""& BBSHomeUrl &""">"& BBS_Config(0) &"</a> <img src="""& BBS_Skin(3) &"JBB_bullet.gif""> 會員注冊"
response.Write "</td></tr></table>"
if username <> "" then
ShowMsg "我們的記錄顯示你在本論壇已經(jīng)注冊了 "& username &" 這個用戶名. <br>如果你忘記了密碼, 請點(diǎn)<a href=""lostpass.asp"">這里</a>. 如果你想要編輯個人資料, 請點(diǎn) <a href=""usercp.asp?action=editproinfo"">這里</a>."
Call Bottom
response.End
End if
if BBS_Config(7) <> True then
ShowMsg "對不起!~本論壇暫時停止注冊,點(diǎn)擊 <a href="""&BBSHomeUrl&""">這里</a> 返回首頁."
Call Bottom
response.End
End if
url = request.ServerVariables("HTTP_REFERER")
action=trim(request.QueryString("action"))
SELECT Case action
Case "agree"
Call agree()
Case "regform"
Call regform()
Case "reg"
Call reg()
Case else
response.Redirect("?action=agree")
End SELECT
'====================================
Sub reg()
username = Replace(trim(request.Form("username")),"'","")
if Len(username) < CINT(BBS_Config(8)) or Len(username) > CINT(BBS_Config(9)) then
ShowMsg "<b>錯誤:</b>用戶名只可為 "& CINT(BBS_Config(8)) &"-"& CINT(BBS_Config(9)) &" 個字符<br><br><a href=javascript:history.back()><<< 返回上一步</a>"
Call Bottom
response.End
End if
'----------------------------------------------------------------
usernamestay = BBS_Config(11)
if username <> "" and usernamestay <> "" then
usernamestay=Split(usernamestay,",",-1,1)
For notuser = 0 To UBound(usernamestay,1)
if usernamestay(notuser) = username then
ShowMsg "對不起!~ 您輸入的用戶名:<font color=""#0000FF""><b> "& username &" </b></font>禁止在本站注冊!,請<a href=""javascript:history.back()"">返回</a>重新輸入!~"
Call Bottom
response.End
End if
Next
End if
'----------------------------------------------------------------
userpass = Replace(trim(request.Form("userpass")),"'","")
if Len(userpass) < 6 or Len(userpass) > 16 then
ShowMsg "<b>錯誤:</b>密碼只可為 6-16個字符<br><br><a href=javascript:history.back()><<< 返回上一步</a>"
Call Bottom
response.End
End if
userpass2 = Replace(trim(request.Form("userpass2")),"'","")
if userpass <> userpass2 then
ShowMsg "<b>錯誤:</b>兩次輸入的密碼不一致<br><br><a href=javascript:history.back()><<< 返回上一步</a>"
Call Bottom
response.End
End if
email = Replace(trim(request.Form("email")),"'","")
if Instr(4,Email,".") < 1 then Emailtrue = 1
if Instr(2,Email,"@") < 1 then Emailtrue = 1
if Len(Email) < 9 then Emailtrue = 1
if Emailtrue = 1 then
ShowMsg "<b>錯誤:</b>請輸入正確的 Email<br><br><a href=javascript:history.back()><<< 返回上一步</a>"
Call Bottom
response.End
End if
email2 = Replace(trim(request.Form("email2")),"'","")
if Email <> email2 then
ShowMsg "<b>錯誤:</b>兩次輸入的Email不一致<br><br><a href=javascript:history.back()><<< 返回上一步</a>"
Call Bottom
response.End
End if
'--------------------------------------------------------
if BBS_Config(10)=true then
set rs1 = Conn.ExeCute("select email from JBB_user where email='"& email &"'")
if Not(rs1.Eof and rs1.Bof) then
set rs1 = Nothing
ShowMsg "對不起,本論壇已經(jīng)限制了一個Email只能注冊一個帳號,請重新選擇您的Email。<br><br><a href=""javascript:history.back()""><<< 返回上一步</a>~"
Call Bottom
response.End
End if
set rs1 = Nothing
End if
'--------------------------------------------------------
birthday = request.Form("year")&"-"&request.Form("month")&"-"&request.Form("day")
oicq = replace(trim(request.Form("oicq")),"'","")
styleid = trim(request.Form("styleid"))
set rs = server.CreateObject("adodb.recordset")
rs.open "select * from JBB_user where username = '"& username &"'",conn,1,3
if rs.eof and rs.bof then
rs.addnew
rs("username") = username
rs("userpass") = md5(userpass)
rs("usertitle") = replace(trim(request.Form("usertitle")),"'","''")
rs("usergroup") = 5
rs("email") = email
rs("showemail") = request.Form("showemail")
rs("styleid") = styleid
rs("homepage") = replace(trim(request.Form("homepage")),"'","")
if IsNumeric(oicq) then
rs("oicq") = oicq
End if
rs("msn") = replace(trim(request.Form("msn")),"'","")
if IsDate(birthday) then
rs("birthday") = birthday
End if
rs("usersex") = request.Form("usersex")
rs("useradd") = replace(trim(request.Form("useradd")),"'","''")
rs("signature") = replace(rtrim(request.Form("signature")),"'","''")
rs("regtime") = Now()
rs("regip") = userip
rs("lastonline") = Now()
rs("avatars") = request.Form("avatars")
rs.update
else
rs.close
set rs = Nothing
ShowMsg "對不起!~ 您輸入的用戶名:<font color=""#0000FF""><b> "& username &" </b></font>已經(jīng)有人注冊!,請<a href=""javascript:history.back()"">返回</a>重新輸入!~"
Call Bottom
response.End
End if
rs.close
set rs = Nothing
set rs = conn.execute("select userid from JBB_user where username='"& username &"'")
if Not rs.eof then
newuserid = rs(0)
End if
set rs = Nothing
response.Cookies(JBBMasterCookies)("userid") = newuserid
response.Cookies(JBBMasterCookies)("username") = username
response.Cookies(JBBMasterCookies)("userpass") = md5(userpass)
response.Cookies(JBBMasterCookies)("usergroup") = 5
if cstr(styleid) > 1 then
response.Cookies(JBBMasterCookies)("styleid") = styleid
End if
Application.Lock
Application(JBBMasterCookies&"Home_userInfo") = ""
Application.UnLock
ShowMsg "<font color=""#000000"">感謝您在<b> "& board_name &" </b>注冊,正在以您的身份登錄論壇,如果您不想等待,請點(diǎn)擊 <a href="""&BBSHomeUrl&"""><font color=""#0000FF"">這里</font></a> 回到首頁</font>"
response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='3; URL="&BBSHomeUrl&"'>")
End Sub
'====================================
Sub regform()
if right(lcase(url),25) <> "register.asp?action=agree" then
response.Redirect("register.asp?action=agree")
End if
%>
<script language="javascript">
<!--
function isok(theform)
{
if (theform.username.value.length < <%=CINT(BBS_Config(8))%>)
{
alert("用戶名不能為空且至少<%=CINT(BBS_Config(8))%>個字符!");
theform.username.focus();
return (false);
}
if (theform.username.value.length > <%=CINT(BBS_Config(9))%>)
{
alert("用戶名不能超過<%=CINT(BBS_Config(9))%>個字符!");
theform.username.focus();
return (false);
}
if (theform.userpass.value.length<6)
{
alert("用戶密碼不能為空且至少6個字符!");
theform.userpass.focus();
return (false);
}
if (theform.userpass.value!=theform.userpass2.value)
{
alert("您的密碼確認(rèn)與上面密碼不符!");
theform.userpass2.focus();
return (false);
}
if (theform.email.value.length<5|theform.email.value.indexOf("@")==-1|theform.email.value.indexOf(".")==-1)
{alert("請輸入正確的Eail地址!");
theform.email.focus( );
return(false);}
if (theform.email.value!=theform.email2.value)
{
alert("您兩次輸入的Email不相符!");
theform.email2.focus();
return (false);
}
return (true);
}
-->
</script>
<form name="theForm" method="post" action="?action=reg" onsubmit="return isok(this)">
<table border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr class="table-title">
<td colspan="2">帶 <font color="#FF0000">*</font> 的項(xiàng)目都要求填寫.請注意密碼區(qū)分大小寫.</td>
</tr>
<tr class="table-light">
<td width="35%"><font color="#FF0000">*</font>用戶名:(<%=CINT(BBS_Config(8))&"-"&CINT(BBS_Config(9))%>個字符)</td>
<td width="65%" class="table-light">
<input name="username" type="text" id="username"></td>
</tr>
<tr>
<td class="table-dark"><font color="#FF0000">*</font>密碼:(6-16個字符)</td>
<td class="table-dark"><input name="userpass" type="password" id="userpass" maxlength="16"></td>
</tr>
<tr>
<td class="table-light"><font color="#FF0000">*</font>確認(rèn)密碼:</td>
<td class="table-light"><input name="userpass2" type="password" id="userpass2" maxlength="16"></td>
</tr>
<tr>
<td class="table-dark"><font color="#FF0000">*</font>Email:<br>
請輸入一個有效的Email地址,你可以設(shè)置隱藏.</td>
<td class="table-dark"><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td class="table-light"><font color="#FF0000">*</font>確認(rèn)
Email</td>
<td class="table-light"><input name="email2" type="text" id="email2"></td>
</tr>
</table>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="table"id=jb style="DISPLAY: none">
<tr class="table-title">
<td colspan="2">個人喜好</td>
</tr>
<tr>
<td width="35%" class="table-light">在個人資料中顯示Email?</td>
<td class="table-light">是
<input name="showemail" type="radio" value="1" checked>
否
<input type="radio" name="showemail" value="0"></td>
</tr>
<tr>
<td class="table-dark">用戶頭銜</td>
<td class="table-dark"><input name="usertitle" type="text" id="usertitle"></td>
</tr>
<tr class="table-light">
<td valign="top" class="table-light">個性頭像</td>
<td>
<table width="400" border="0" cellpadding="4" cellspacing="1">
<tr>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -