ZhuCe.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:4k
源码类别:

手机WAP编程

开发平台:

ASP/ASPX

  1. <!--#Include File="Inc/xkon.Asp"--><%
  2. Private c,s
  3. Set c=New xkon_Response
  4. Set s=New xkon_Request
  5. If Read_SZ("ZhuCe")="0" Then Call xkon_Error("新用户注册已关闭")
  6. Private Function xkon_FenXi1(Str)
  7. Dim Str1
  8. Str1=Str
  9. Str1=Replace(Str1,xkon_S("注册协议"),Replace(Read_SZ("ZhuCe_XieYi"),Chr(13),"<br/>"))
  10. xkon_FenXi1=Str1
  11. End Function
  12. Private Sub ZhuCe3()
  13. Dim Str1
  14. Str1=Read_Text("ZhuCe3")
  15. Str1=xkon_FenXi(Str1)
  16. Str1=Replace(Str1,xkon_S("账号"),ZhangHao)
  17. Str1=Replace(Str1,xkon_S("密码"),MiMa)
  18. c.Write(Str1)
  19. End Sub
  20. Dim ZhangHao
  21. Private Function Get_ZhangHao1()
  22. Dim ZhangHao1
  23. ZhangHao1=s.Form_aa("ZhangHao",Clng(Read_SZ("YongHuMing_Length_d")),Clng(Read_SZ("YongHuMing_Length_c")))
  24. If ZhangHao1="" Then
  25. Call xkon_Error("账号不能为空")
  26. End If
  27. Get_ZhangHao1=ZhangHao1
  28. End Function
  29. Private Function Get_ZhangHao2()
  30. Call OpenData()
  31. Dim Cn1,Cn2
  32. Set Cn1=Server.CreateObject("Adodb.Command")
  33. Cn1.ActiveConnection=Conn
  34. Cn1.CommandType=1
  35. Cn1.CommandText="Select id From ZhangHao Order By ID Desc"
  36. Set Cn2=Cn1.Execute
  37. If Cn2.Eof Then
  38. Get_ZhangHao2=1
  39. Else
  40. Get_ZhangHao2=Cn2("ID")+1
  41. End If
  42. Set Cn2=Nothing
  43. Set Cn1=Nothing
  44. Call CloseData()
  45. End Function
  46. Public Function ZhuCe3()
  47. If Read_SZ("ZhuCe_GuiLv")="1" Then
  48. ZhangHao=Get_ZhangHao1()
  49. Else
  50. ZhangHao=Get_ZhangHao2()
  51. End If
  52. Dim MiMa1,MiMa2
  53. MiMa1=s.Form_aa("MiMa1",Clng(Read_SZ("MiMa_Length_d")),Clng(Read_SZ("MiMa_Length_c")))
  54. If MiMa1="" Then
  55. Call xkon_Error("密码不能为空")
  56. End If
  57. MiMa2=s.Form("MiMa2")
  58. If MiMa1<>MiMa2 Then
  59. Call xkon_Error("密码与确认密码不相同")
  60. End If
  61. Dim Rep_YongHu
  62. Rep_YongHu=Split(Read_SZ("Rep_YongHu"),"|")
  63. Dim i,BaoHan
  64. BaoHan=false
  65. For i=0 To Ubound(Rep_YongHu)
  66. If InStr(ZhangHao,Rep_YongHu(i))>0 Then BaoHan=True:Exit For
  67. Next
  68. If BaoHan=True Then Call xkon_Error("用户名中包含不可注册的字符"&Rep_YongHu(i))
  69. Call OpenData()
  70. Dim Cn1,Cn2,J_ID
  71. Set Cn1=Server.CreateObject("Adodb.Command")
  72. Cn1.ActiveConnection=Conn
  73. Cn1.CommandType=1
  74. Cn1.CommandText="Select id From ZhangHao Order By Id Desc"
  75. Set Cn2=Cn1.Execute
  76. If Cn2.Eof Then
  77. J_ID=1
  78. Else
  79. J_ID=Cn2("ID")+1
  80. End If
  81. Set Cn2=Nothing
  82. Set Cn1=Nothing
  83. Set Cn1=Server.CreateObject("Adodb.Command")
  84. Cn1.ActiveConnection=Conn
  85. Cn1.CommandType=1
  86. Cn1.CommandText="Select id From ZhangHao Where ZhangHao='"&ZhangHao&"'"
  87. Set Cn2=Cn1.Execute
  88. If Not Cn2.Eof Then
  89. Call xkon_Error("该账号已被注册")
  90. End If
  91. Set Cn2=Nothing
  92. Set Cn1=Nothing
  93. 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()&"')")
  94. Call CloseData()
  95. c.Write(xkon_FenXi(Replace(Replace(Read_Text("ZhuCe3"),xkon_S("账号"),ZhangHao),xkon_S("密码"),MiMa1)))
  96. End Function
  97. Call H_Title("注册会员")
  98. Dim l
  99. l=s.QueryString("l")
  100. Select Case l
  101. Case ""
  102. c.Write(xkon_FenXi1(xkon_FenXi(Read_Text("ZhuCe1"))))
  103. Case "2"
  104. c.Write(xkon_FenXi(Read_Text("ZhuCe2")))
  105. Case "3"
  106. Call ZhuCe3()
  107. End Select
  108. Call H_End()
  109. Set c=Nothing
  110. Set s=Nothing
  111. %>