一个BBS的源代码(六)
一个BBS的源代码(六),一个BBS的源代码(六)
'=====================================
Case "Adduser"
'=====================================
' 添加用户
'==============
Userid = Trim(Request("Userid"))
Password = Trim(Request("Password"))
Confirm = Trim(Request("Confirm"))
Email = Trim(Request("Email"))
WrongMsg = ""
If Userid = "" Then WrongMsg = WrongMsg + "<DD<LI账号为空。</LI"
If Password = "" Then WrongMsg = WrongMsg + "<DD<LI密码为空。</LI"
If Confirm = "" Then WrongMsg = WrongMsg + "<DD<LI重复密码为空。</LI"
If Email = "" Then WrongMsg = WrongMsg + "<DD<LI邮件地址为空。</LI"
If WrongMsg = "" Then
If Password < Confirm Then WrongMsg = WrongMsg + "<DD<LI两次输入密码不相同。</LI"
If Not CheckEmail( Email ) Then WrongMsg = WrongMsg + "<DD<LI非法邮件地址。</LI"
If WrongMsg = "" Then
SQL = "SELECT * FROM bbsmember WHERE [账号]='" & SqlStr(Userid) & "'"
RecMember.Open SQL , Con , 1
If RecMember.BOF AND RecMember.EOF Then UserExist = False Else UserExist = True
RecMember.Close
If Not UserExist Then
SQL = "INSERT INTO bbsmember ([账号],[密码],[邮件]) VALUES('" &_
SqlStr( Userid ) & "','" &_
SqlStr( Password ) & "','" &_
SqlStr( Email ) & "')"
Con.Execute( SQL )
Else
WrongMsg = WrongMsg + "<DD<LI用户名已经存在。</LI"
End If
End If
End If
%
<TABLE align=center border=0 cellPadding=7 cellSpacing=0 width=650
<TR
<TD class=menu
<%
If WrongMsg = "" Then ' 显示成功信息
%
恭喜你!你已经成功注册!<BR<BR
<A href="/"返回“飞林庄”</A<BR
<A href="<%= ASP_FILE_NAME %?Job=List"返回“经验交流”</A<BR
<A href="<%= ASP_FILE_NAME %?Job=Write"发表文章</A<BR
<%
Else ' 显示错误信息
%
操作失败:<BR
<%= WrongMsg %<BR<BR
<A href="javascript:history.back()"返回上一页</A
<%
End If
%
</TD
</TR
</TABLE
<%
'==============================
Case "Send"
'==============================
' 发送邮件
' (把文章发送到用户信箱)
'=============================
Which = Request("Which")
Email = Trim( Request("Email") )
%
<TABLE align=center border=0 cellPadding=7 cellSpacing=0 width=650
<TR
<TD