<!-- #include File="../conn/conn.asp" -->
<!--#include file="../inc/md5.asp"-->
<%
username=request("username")
password=request("password")
set rs=server.createobject("adodb.recordset")
sql="select * from Websen_worldec_master where UserName='"&username&"'"
rs.open sql,conn,3,3
if not rs.eof then
rs("PassWord")=md5(password,16)
rs.update
response.Write("<script >alert('密码修改成功!');window.location.href='ModifyPassword.asp'</script>")
response.End()	
else
rs.addnew
rs("UserName")=UserName
rs("PassWord")=md5(password,16)
rs("Flag")="01, 02, 03, 04, 05, 06, 07, 08, 11, 12, 13, 14, 15, 16, 17, 18, 19, 110, 21, 22, 23, 31, 41, 51, 52, 61, 62, 63, 71, 81, 82, 91, 101, 111, 112, 121, 0"
rs("LastLogin")=now()
rs("LastLoginIp")=Request.ServerVariables("REMOTE_ADDR")
rs.update
response.Write("<script >alert('用户添加成功!');window.location.href='ModifyPassword.asp'</script>")
response.End()
end if
rs.close
%>