<!--#include file="sd_mdb.asp"-->
<!--#include file="sd_md5.asp"-->
<%
userqq=request.form("userqq")
useremail=request.form("useremail")
password=md5(request.form("password"))
userpassword=request.form("userpassword")
if trim(userqq)="" or trim(useremail)="" then
	response.write "<script LANGUAGE='javascript'>alert('请填写您的QQ号和邮箱地址！');history.go(-1);</script>"
else
	set rs=server.CreateObject("adodb.recordset")
	sql="Select * From [sd_USER] where sd_user='"&session("sd_username")&"'and sd_Pass='"&password&"'"
	rs.open sql,conn,1,3
	if not(rs.bof and rs.eof) then
		if trim(userpassword)<>"" then
			rs("sd_Pass")=md5(userpassword)
		end if
		rs("sd_qq")=userqq
		rs("sd_email")=useremail
		rs.update
		session("sd_password")=rs("sd_Pass")
		session("sd_qq")=rs("sd_qq")
		session("sd_email")=rs("sd_email")
		rs.close
		set rs=nothing
		response.write "<script LANGUAGE='javascript'>alert('修改成功！');this.location.href='sd_userinfo.asp';</script>"
	else
		rs.close
		set rs=nothing
		response.write "<script LANGUAGE='javascript'>alert('对不起，修改失败！您的原始密码错误或者尚未登录！');this.location.href='sd_userinfo.asp';</script>"
	end if
end if
%>