<!-- #include file="../conn.asp"-->
<!-- #include file="../admin/check_master.asp" -->
<!--#include file="../inc/md5.asp"-->
<%
clubuser_id=request("id")
clubuser_name=trim(request.form("name"))
clubuser_password=request.form("password")
jingyuan=request.form("jingyuan")
tili=request.form("tili")
clubuser_phone=request.form("phone")
clubuser_fax=request.form("fax")
clubuser_url=request.form("url")
clubuser_email=request.form("email")
clubuser_address=request.form("address")
clubuser_note=request.form("note")
clubuser_reg_date=request.form("reg_date")
clubuser_enter_count=request.form("enter_count")
clubuser_question=trim(request.form("clubuser_question"))

for i=1 to len(clubuser_name)
cl=mid(clubuser_name,i,1)
if cl="'" or cl="<" or cl=">" or cl="%" or cl="/" or cl="-" or cl="#" or cl="$" then
   response.write "<script langugae=javascript>alert('用户名不能有非法字符%-/$#<>');"
   response.write "history.go(-1);"
   response.write "</script>"
   response.end   
end if
next

for i=1 to len(clubuser_password)
pwd=mid(clubuser_password,i,1)
if pwd="'" or pwd="<" or pwd=">" or pwd="%" or pwd="/" or pwd="#" or pwd="$" or pwd="-" then
   response.write "<script langugae=javascript>alert('密码中不能有非法字符%-/$#<>！');"
   response.write "history.go(-1);"
   response.write "</script>"
   response.end   
end if
next

if clubuser_password="" then
	response.write "<br><br><center>"
	response.write "用户密码不能为空，请重新输入！"
	response.write "</center>"
	response.end
end if
if clubuser_question="" then
	response.write "<br><br><center>"
	response.write "查询密码问题不能为空，请重新输入！"
	response.write "</center>"
	response.end
end if

clubuser_answer=md5(trim(request.form("clubuser_answer")))
if clubuser_answer="" then
	response.write "<br><br><center>"
	response.write "查询密码答案不能为空，请重新输入！"
	response.write "</center>"
	response.end
end if

set rs=server.createobject("adodb.recordset")
sql="select * from clubuser where clubuser_id="&request("id")
rs.open sql,conn,1,3
'rs("clubuser_name")=clubuser_name
'rs("clubuser_nickname")=clubuser_name
if rs("clubuser_password")<>clubuser_password then
rs("clubuser_password")=md5(clubuser_password)
end if
rs("jingyuan")=jingyuan
rs("tili")=tili
rs("clubuser_phone")=clubuser_phone
rs("clubuser_fax")=clubuser_fax
rs("clubuser_url")=clubuser_url
rs("clubuser_email")=clubuser_email
rs("clubuser_address")=clubuser_address
rs("clubuser_note")=clubuser_note
if(clubuser_reg_date<>"") then
  rs("clubuser_reg_date")=clubuser_reg_date
else
  rs("clubuser_reg_date")=date
end if
if(clubuser_enter_count="") then
  rs("clubuser_enter_count")=1
else
  rs("clubuser_enter_count")=cint(clubuser_enter_count)
end if
if rs("clubuser_question")<>clubuser_question then
rs("clubuser_question")=md5(clubuser_question)
end if
if rs("clubuser_answer")<>clubuser_answer then
rs("clubuser_answer")=md5(clubuser_answer)
end if
rs.update
rs.close
'set rs=noting
conn.close
set conn=nothing
response.redirect request("reurl")
%>

