<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!--#include file=../config.asp-->
<!--#include file=../mail.asp-->
<!--#include file=../md5.asp-->
<link href="inc_style.css" rel="stylesheet" type="text/css">
<%
dim rs,sql,id,password,username,email
id=trim(request("id"))
if not isnumeric(id) or id="" then
response.write "<li>参数错误！"
response.end
end if
password=trim(request("password"))
if password="" or len(password)<3 or len(password)>15 then
response.write "<li>密码必须在3-15位之间！"
call cl()
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select username,password,email from [jle_user] where id="&id
rs.open sql,conn,1,3
if rs.eof or rs.bof then
response.write "<li>参数错误！"
call cl()
response.end
end if
username=trim(rs("username"))
email=trim(rs("email"))
rs("password")=md5(password)
rs.update
rs.close
set rs=nothing
closedb
response.write "<li>修改密码成功，并且给用户发了一封邮件，以便及时通知用户！"
call cl()
call mail()
%>
<%
sub mail()
dim mailbody,Jmail
mailbody="您好,"&username&"!<br>管理员已为你成功修改了密码！现在资料为：登陆帐号：[<b>"&username&"</b>] 你的新密码是：[<b>"&password&"</b>]<br> 如果您要发布您的相关信息可以到 <a href="&web&">"&web&"</a> 进行发布！我们的失误，给您带来的不便，请见谅！<br>谢谢您使用我们<a href="&web&">"&title&"</a>为您提供的真诚服务！<br>["&title&"]打造长春信息发布平台<br>服务热线:029-83732767   QQ:113728857"   '邮件内容
Set Jmail=server.createobject("Jmail.Message")
Jmail.Charset ="gb2312"
JMail.ContentType = "text/html"
Jmail.Silent =true
Jmail.Priority = 3
Jmail.MailServerUserName = mailname
Jmail.MailServerPassword = mailpass
Jmail.From = mailform
Jmail.FromName =""&title&""
Jmail.Subject ="密码修改成功！-"&title&""
Jmail.AddRecipient ""&email&""
Jmail.Body = mailbody
Jmail.Send(mailsmtp)
Set Jmail=nothing
end sub
%>
<%sub cl()%>
<body onLoad="setTimeout(window.close, 2000)">
<%end sub%>