?? add_user3.asp
字號:
<!--#include file="my_conn.asp"-->
<!--#include file="fun_char.asp"-->
<%
'if request("ok")="ok" then
'ok等于ok是提交完成
if session("register")<>1 then
ErrMsg=ErrMsg+"<br><li>對不起,請勿重復注冊會員..."
else
'''''''''''''''''''''''''''''''''''''''''
if Str_Length(request("UName"))<4 or Str_Length(request("UName"))>16 then
ErrMsg=ErrMsg+"<br><li>對不起,您的用戶名稱過短或過長(長度為5-16位)..."
elseif Instr(request("UName"),".")>0 or Instr(request("UName"),",")>0 or Instr(request("UName"),"/")>0 or Instr(request("UName"),":")>0 or Instr(request("UName"),";")>0 or Instr(request("UName"),"\")>0 or Instr(request("UName"),"&")>0 or Instr(request("UName"),"=")>0 or Instr(request("UName"),"?")>0 or Instr(request("UName"),"'")>0 or Instr(request("UName"),chr(32))>0 or Instr(request("UName"),chr(34))>0 then
ErrMsg=ErrMsg+"<br><li>對不起,您的用戶名稱含有非法字符..."
else
UName=request("UName")
set rsk=server.createobject("adodb.recordset")
queryk="select top 1 * from KeepWords"
rsk.open queryk,conn,1,1
if Chk_Master(UName,rsk("WrdWords"))=true then
ErrMsg=ErrMsg+"<br><li>對不起,您的用戶名稱為本站所保留,請重新選擇..."
end if
rsk.close
set rsk=nothing
end if
if Str_Length(request("PassWord1"))<5 or Str_Length(request("PassWord1"))>16 then
ErrMsg=ErrMsg+"<br><li>對不起,您的用戶密碼過短或過長(長度為5-16位)..."
elseif Chk_PassWord(request("PassWord1"))=0 then
ErrMsg=ErrMsg+"<br><li>對不起,您的用戶密碼含有非法字符..."
elseif request("PassWord1")<>request("PassWord2") then
ErrMsg=ErrMsg+"<br><li>對不起,您的用戶密碼和確認密碼不一致..."
else
UPass=request("PassWord1")
end if
if request("RealName")="" then
ErrMsg=ErrMsg+"<br><li>對不起,請輸入您的真實姓名..."
else
RealName=request("RealName")
end if
if request("city")="" then
ErrMsg=ErrMsg+"<br><li>對不起,請輸入您所在的城市..."
else
UCity=request("UCity")
end if
'if uemail<>"" then
if Chk_Email(request("UEmail"))=false then
ErrMsg=ErrMsg+"<br><li>對不起,請輸入正確有效的電子郵件..."
else
UEmail=request("UEmail")
end if
'end if
UOicq=request("UOicq")
if request("tel")="" then
ErrMsg=ErrMsg+"<br><li>對不起,請輸入您的電話號碼..."
else
UPhone=request("UPhone")
end if
UMobile=request("UMobile")
UClass="假球會"
RegTime=now()
Scenes=0
BeginTime=now()
EndTime=now()
RegIp=request.servervariables("REMOTE_ADDR")
LastIp=request.servervariables("REMOTE_ADDR")
LastTime=now()
'if ErrMsg="" then
set rs=server.CreateObject("adodb.recordset")
query="select * from Reg_User where UName='"&UName&"'"
rs.Open query,conn,3,3
if rs.RecordCount >=1 then
ErrMsg=ErrMsg+"<br><li>對不起,此用戶名稱已被注冊..."
end if
if ErrMsg="" then
'else
rs.AddNew
rs("UName")=UName
rs("UPass")=UPass
rs("RealName")=RealName
rs("UCity")=request.form("city")
rs("UEmail")=UEmail
if request.form("oicq")<>"" then
rs("UOicq")=request.form("oicq")
end if
rs("UPhone")=request.form("tel")
if UMobile<>"" then
rs("UMobile")=UMobile
end if
rs("UClass")=UClass
rs("RegTime")=RegTime
rs("BeginTime")=BeginTime
rs("EndTime")=EndTime
rs("Scenes")=Scenes
rs("RegIp")=RegIp
rs("LastTime")=LastTime
rs("LastIp")=LastIp
rs.Update
session("register")=0
'end if
rs.Close
set rs=nothing
ErrMsg="<br><li>注冊成功!!"
end if
'''''''''''''''''''''''''''''''''
end if
'end if
%>
<HTML><HEAD><TITLE>::用戶注冊::</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK
href="../images/deane.css" type=text/css rel=stylesheet>
<STYLE>P {
FONT-SIZE: 9pt; WORD-SPACING: 3pt; FONT-FAMILY: "宋體"; LETTER-SPACING: 3pt
}
A {
FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: "宋體"; TEXT-DECORATION: none
}
A:hover {
FONT-SIZE: 9pt; COLOR: #000000
}
DIV {
FONT-SIZE: 9pt
}
TR {
FONT-SIZE: 9pt
}
TABLE {
FONT-SIZE: 9pt; FONT-FAMILY: "宋體"
}
TD {
FONT-SIZE: 9pt; WORD-SPACING: 2pt; FONT-FAMILY: "宋體"; LETTER-SPACING: 1pt
}
INPUT {
BORDER-RIGHT: #000000 1px groove; BORDER-TOP: #000000 1px groove; FONT-SIZE: 9pt; BORDER-LEFT: #000000 1px groove; COLOR: black; BORDER-BOTTOM: #000000 1px groove
}
.ff {
BORDER-RIGHT: 0px dashed; BORDER-TOP: 0px dashed; FONT-SIZE: 12px; BORDER-LEFT: 0px dashed; BORDER-BOTTOM: 1px dashed; BACKGROUND-COLOR: #efefef
}
</STYLE>
<SCRIPT>
function w_open(url)
{window.open(url,'_blank','toolbar=no,directories=no,status=yes,scrollbars=yes,resize=no,menubar=no,width=400,height=350,top=20,left=200')}
</SCRIPT>
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 background="../IMAGES/bg.gif">
<br>
<table cellspacing=2 cellpadding=0 width="98%" align=center
border=0>
<tr>
<td align=middle bgcolor=#996600 height=30>
<div align="center"><b>用戶注冊結果</b></div>
</td>
</tr>
<tr>
<td align=middle valign="top"> <br>
<br>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" style="border:#000000 1px double" bgcolor="#E0D3C2">
<tr>
<td>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><br>
<%=ErrMsg%></td>
</tr>
</table>
<br>
</td>
</tr>
</table>
<div align="center"><br>
<input type="button" name="Button" value=" 點擊此鍵關閉 " onClick=window.close()>
<br>
<br>
<br>
<br>
</div>
</td>
</tr>
</table>
</BODY></HTML>
<%
'end if%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -