<!--#include file="../inc/conn.asp"-->
<!-- #include file="../inc/htmlencode2.asp"-->
<!--#include file="../inc/md5.asp" -->
<%
if request.cookies("name")="" then
   response.write "<script language='javascript'>"
   response.write "alert('登录超时或你还没有登录！');"
   response.write "history.go(-1);"
   response.write "</script>"
   response.end
end if
if len(request.form("signname"))>150 then
   response.write "<script language='javascript'>"
   response.write "alert('签名档不能超过150字！');"
   response.write "history.go(-1);"
   response.write "</script>"
   response.end
end if
set rs_arrest=server.createobject("adodb.recordset")
Sql_arrest="select * from BBS_arrest where kind='Keyword' order by id asc"
rs_arrest.open sql_arrest,conn,1,1
do while not rs_arrest.eof
	if (instr(request.form("signname"),rs_arrest("content"))<>0 or instr(request.form("name"),rs_arrest("content"))<>0) then
		response.write "<SCRIPT language=JavaScript>alert('对不起，所填内容中不能含有"&rs_arrest("content")&"关键字！');"
   	    response.write "history.go(-1);"
   		response.write "</script>"        
        response.end		
	end if
rs_arrest.movenext
loop
rs_arrest.close
set rs_arrest=nothing

sql="select * from clubuser where clubuser_name='"&request.cookies("name")&"'"
set rsr=server.createobject("adodb.recordset")
rsr.open sql,conn,1,3
rsr("clubuser_nickname")=trim(request.form("name"))
rsr("clubuser_password")=md5(request.form("password"))
rsr("clubuser_question")=trim(request.form("question"))
rsr("clubuser_answer")=trim(request.form("answer"))
rsr("clubuser_sex")=request.form("sex")
rsr("clubuser_email")=trim(request.form("email"))
rsr("signname")=htmlencode2(request.form("signname"))
if request("img")<>"" then
rsr("userimg")=request("img")
end if
rsr.update
'request.cookies("name")=trim(request.form("name"))
msg="恭喜你，修改个人信息成功！"
sign=1
  response.write"<SCRIPT language=JavaScript>alert('恭喜你，修改个人信息成功！');"
  response.write "window.location.href='../bbs/main.asp';</script>"
  response.end
'response.redirect "../bbs/bbs.asp"
%>
