submit.asp
上传用户:shxinnian
上传日期:2013-01-14
资源大小:155k
文件大小:3k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

Windows_Unix

  1. <%
  2. response.buffer="True"
  3. If request.form("pwd")<>request.form("cpwd") Then
  4. response.write "<script>alert('对不起,您两次输入的密码不一致!');history.back();</Script>"
  5. response.end
  6. End If
  7. If len(request.form("year"))<4 Then
  8. response.write "<script>alert('请正确填写您的生日!');history.back();</Script>"
  9. response.end
  10. End If
  11. If not isnumeric(request.form("oicq")) Then
  12. response.write "<script>alert('对不起,您的OICQ号码输入错误!');history.back();</Script>"
  13. response.end
  14. End If
  15. If len(request.form("sfzh"))<>15 and len(request.form("sfzh"))<>18 Then
  16. response.write "<script>alert('你输入的身份证号码数目不对!');history.back();</Script>"
  17. response.end
  18. End If
  19. If not isnumeric(request.form("sfzh")) Then
  20. response.write "<script>alert('对不起,您的身份证号码输入错误!');history.back();</Script>"
  21. response.end
  22. End If
  23. If len(request.form("oicq"))<5 Then
  24. response.write "<script>alert('对不起,您的OICQ号码输入错误!');history.back();</Script>"
  25. response.end
  26. End If
  27. %>
  28. <!--#include file="conn.asp"-->
  29. <%
  30. dim rs_t
  31. dim sql_t
  32. dim uID,pwd,cpwd,question,answer,rname,sex,mz,year,month,day,blcjzl,oicq,user_province,user_city,jbyydm,sfzh,tel1,addr1,zy,whcd,yzkzh
  33. uID=Request.form("uID")
  34. pwd=Request.form("pwd")
  35. cpwd=Request.form("cpwd")
  36. question=Request.form("question")
  37. answer=Request.form("answer")
  38. rname=Request.form("rname")
  39. sex=Request.form("sex")
  40. mz=Request.form("mz")
  41. year=Request.form("year")
  42. month=Request.form("month")
  43. day=Request.form("day")
  44. blcjzl=Request.form("blcjzl")
  45. user_province=Request.form("user_province")
  46. user_city=Request.form("user_city")
  47. jbyydm=Request.form("jbyydm")
  48. sfzh=Request.form("sfzh")
  49. oicq=Request.form("oicq")
  50. tel1=Request.form("tel1")
  51. addr1=Request.form("addr1")
  52. zy=Request.form("zy")
  53. whcd=Request.form("whcd")
  54. yzkzh=Request.form("yzkzh")
  55. set rs_t=Server.CreateObject("adodb.recordset")
  56. sql_t ="select uID from member where uID='"&uID&"'"
  57. rs_t.open sql_t,conn,1,1
  58. If not rs_t.eof then
  59. response.write "<script>alert('对不起,您设定的用户名已经被别人占用了!');history.back();</Script>"
  60. response.end
  61. End If
  62. dim rs,sql
  63. set rs=Server.CreateObject("Adodb.Recordset")
  64. sql="select * from member where (id is null)"
  65. rs.open sql,conn,1,3
  66. rs.addnew
  67. rs("uID")=uID
  68. rs("pwd")=pwd
  69. rs("question")=question
  70. rs("answer")=answer
  71. rs("rname")=rname
  72. rs("sex")=sex
  73. rs("mz")=mz
  74. rs("year")=year
  75. rs("month")=month
  76. rs("day")=day
  77. If blcjzl<>"http://" Then
  78. rs("blcjzl")=blcjzl
  79. End If
  80. rs("user_province")=user_province
  81. rs("user_city")=user_city
  82. rs("jbyydm")=jbyydm
  83. rs("sfzh")=sfzh
  84. rs("tel1")=tel1
  85. rs("addr1")=addr1
  86. rs("zy")=zy
  87. rs("whcd")=whcd
  88. rs("yzkzh")=yzkzh
  89. rs("oicq")=oicq
  90. rs("date")=date()
  91. rs("time")=time()
  92. rs("ip")=request.ServerVariables("REMOTE_ADDR")
  93. rs.update
  94. rs_t.close
  95. set rs_t=nothing
  96. rs.close
  97. set rs=nothing
  98. conn.close
  99. set conn=nothing
  100. response.redirect"success.htm"
  101. %>
  102. <html>
  103. <head>
  104. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  105. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  106. <meta name="ProgId" content="FrontPage.Editor.Document">
  107. <title></title>
  108. </head>
  109. <body>
  110. </body>
  111. </html>