ZhuCe.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:4k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#Include File="Inc/xkon.Asp"--><%
- Private c,s
- Set c=New xkon_Response
- Set s=New xkon_Request
- If Read_SZ("ZhuCe")="0" Then Call xkon_Error("新用户注册已关闭")
- Private Function xkon_FenXi1(Str)
- Dim Str1
- Str1=Str
- Str1=Replace(Str1,xkon_S("注册协议"),Replace(Read_SZ("ZhuCe_XieYi"),Chr(13),"<br/>"))
- xkon_FenXi1=Str1
- End Function
- Private Sub ZhuCe3()
- Dim Str1
- Str1=Read_Text("ZhuCe3")
- Str1=xkon_FenXi(Str1)
- Str1=Replace(Str1,xkon_S("账号"),ZhangHao)
- Str1=Replace(Str1,xkon_S("密码"),MiMa)
- c.Write(Str1)
- End Sub
- Dim ZhangHao
- Private Function Get_ZhangHao1()
- Dim ZhangHao1
- ZhangHao1=s.Form_aa("ZhangHao",Clng(Read_SZ("YongHuMing_Length_d")),Clng(Read_SZ("YongHuMing_Length_c")))
- If ZhangHao1="" Then
- Call xkon_Error("账号不能为空")
- End If
- Get_ZhangHao1=ZhangHao1
- End Function
- Private Function Get_ZhangHao2()
- Call OpenData()
- Dim Cn1,Cn2
- Set Cn1=Server.CreateObject("Adodb.Command")
- Cn1.ActiveConnection=Conn
- Cn1.CommandType=1
- Cn1.CommandText="Select id From ZhangHao Order By ID Desc"
- Set Cn2=Cn1.Execute
- If Cn2.Eof Then
- Get_ZhangHao2=1
- Else
- Get_ZhangHao2=Cn2("ID")+1
- End If
- Set Cn2=Nothing
- Set Cn1=Nothing
- Call CloseData()
- End Function
- Public Function ZhuCe3()
- If Read_SZ("ZhuCe_GuiLv")="1" Then
- ZhangHao=Get_ZhangHao1()
- Else
- ZhangHao=Get_ZhangHao2()
- End If
- Dim MiMa1,MiMa2
- MiMa1=s.Form_aa("MiMa1",Clng(Read_SZ("MiMa_Length_d")),Clng(Read_SZ("MiMa_Length_c")))
- If MiMa1="" Then
- Call xkon_Error("密码不能为空")
- End If
- MiMa2=s.Form("MiMa2")
- If MiMa1<>MiMa2 Then
- Call xkon_Error("密码与确认密码不相同")
- End If
- Dim Rep_YongHu
- Rep_YongHu=Split(Read_SZ("Rep_YongHu"),"|")
- Dim i,BaoHan
- BaoHan=false
- For i=0 To Ubound(Rep_YongHu)
- If InStr(ZhangHao,Rep_YongHu(i))>0 Then BaoHan=True:Exit For
- Next
- If BaoHan=True Then Call xkon_Error("用户名中包含不可注册的字符"&Rep_YongHu(i))
- Call OpenData()
- Dim Cn1,Cn2,J_ID
- Set Cn1=Server.CreateObject("Adodb.Command")
- Cn1.ActiveConnection=Conn
- Cn1.CommandType=1
- Cn1.CommandText="Select id From ZhangHao Order By Id Desc"
- Set Cn2=Cn1.Execute
- If Cn2.Eof Then
- J_ID=1
- Else
- J_ID=Cn2("ID")+1
- End If
- Set Cn2=Nothing
- Set Cn1=Nothing
- Set Cn1=Server.CreateObject("Adodb.Command")
- Cn1.ActiveConnection=Conn
- Cn1.CommandType=1
- Cn1.CommandText="Select id From ZhangHao Where ZhangHao='"&ZhangHao&"'"
- Set Cn2=Cn1.Execute
- If Not Cn2.Eof Then
- Call xkon_Error("该账号已被注册")
- End If
- Set Cn2=Nothing
- Set Cn1=Nothing
- Conn.Execute("Insert Into ZhangHao(ID,ZhangHao,MiMa,BiaoShi,NiChen,XingBie,NianLin,GeRenSuoMing,JingBi,ZhuCeShiJian,ZuiHouDenLuShiJian,ZuiHouDenLuIP,ZiShu,YeShu,SuoDing,ZhuangTai,ZuiHouShuaXin)values('"&J_ID&"','"&ZhangHao&"','"&MiMa1&"','"&Get_Rnd_Str()&J_ID&"','"&Replace(Read_SZ("MoRen_NiChen"),xkon_s("账号"),J_ID)&"','"&Read_SZ("MoRen_XingBie")&"','"&Read_SZ("MoRen_NianLin")&"','"&Read_SZ("MoRen_GeRenSuoMing")&"','"&Read_SZ("MoRen_JingBi")&"','"&Now()&"','"&Now()&"','"&ReadUsip()&"','"&Read_SZ("MoRen_ZiShu")&"','"&Read_SZ("MoRen_YeShu")&"','0','"&Read_SZ("HuiYuan_ZhuCe_ZhuangTai")&"','"&Now()&"')")
- Call CloseData()
- c.Write(xkon_FenXi(Replace(Replace(Read_Text("ZhuCe3"),xkon_S("账号"),ZhangHao),xkon_S("密码"),MiMa1)))
- End Function
- Call H_Title("注册会员")
- Dim l
- l=s.QueryString("l")
- Select Case l
- Case ""
- c.Write(xkon_FenXi1(xkon_FenXi(Read_Text("ZhuCe1"))))
- Case "2"
- c.Write(xkon_FenXi(Read_Text("ZhuCe2")))
- Case "3"
- Call ZhuCe3()
- End Select
- Call H_End()
- Set c=Nothing
- Set s=Nothing
- %>