潮南社区

<%=bbsinfo("bbsname")%> → 用户注册

<%menu=request.querystring("menu") select case menu case"" %>
| 请输入用户名： |
|  | <%case"getname" getpassword=true username=trim(Request.Form("username")) set rs=conn.execute("select ask from [member] where username='"&username&"'") if rs.eof then mes="·该用户不存在·" getpassword=false else ask=rs("ask") end if set rs=nothing if getpassword=false then %> <%=mes%> <%else%>

| 问题： | <%=ask%>
| 请输入答案： |

<%end if %> <% case"get" username=trim(Request.Form("username")) anser=trim(Request.Form("anser")) set rs=conn.execute("select * from [member] where username='"&username&"' and anser='"&md5(anser)&"'") if rs.eof then response.write"答案错误" else %>
| 新密码： |
| 确认新密码： |
<%end if%> <%case"change" username=trim(Request.Form("username")) anser=trim(Request.Form("anser")) newpass=trim(Request.Form("newpass")) repwd=trim(Request.Form("repwd")) function strLength(str) ON ERROR RESUME NEXT dim WINNT_CHINESE WINNT_CHINESE = (len("论坛")=2) if WINNT_CHINESE then dim l,t,c dim i l=len(str) t=l for i=1 to l c=asc(mid(str,i,1)) if c<0 then c=c+65536 if c>255 then t=t+1 end if next strLength=t else strLength=len(str) end if if err.number<>0 then err.clear end function if isnull(newpass) or newpass="" or strlength(newpass)>16 or Instr(newpass,"=")>0 or Instr(newpass,"%")>0 or Instr(newpass,chr(32))>0 or Instr(newpass,"?")>0 or Instr(newpass,"&")>0 or Instr(newpwd,";")>0 or Instr(newpass,",")>0 or Instr(newpass,"'")>0 or Instr(newpass,",")>0 or Instr(newpass,chr(34))>0 or Instr(newpass,chr(9))>0 or Instr(newpass,"")>0 or Instr(newpass,"$")>0 then response.write"你的密码含有非法字符" elseif newpass<>repwd then response.write"你的重复密码与原密码不相同" else conn.execute("update [member] set password='"&md5(newpass)&"' where username='"&username&"'") %>修改密码成功 <% end if set rs=nothing end select%>