<?php include("sql/conn.php"); 
session_start(); //开着身份验证，以后写

if (empty($_SESSION['yzm']))
{
exit;
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><?php include("adm/all/gjz.txt"); ?> 密码找回1</title>
<meta name="description" content="<?php include("adm/all/description.txt"); ?> 密码找回1" />
<meta name="keywords" content="<?php include("adm/all/gjz.txt"); ?> 密码找回1" />
<link  href="css/css<?php include("adm/all/css.txt"); ?>.css" rel="stylesheet" type="text/css">
</head>
<body >
<div id="top">
<?php include("user.php");  ?>
</div>
<?php include("gh.php");  ?>

<div align="center">
<?php include("logo.php");  ?>

<div id="dh" ><?php 
 if(file_exists("dh1.php"))
 {
include("dh1.php"); 
 }
 else
 {
include("action/dh1.php"); 
 }
?></div>

</div>

<div align="center">
<div id="nr">


<br><br><br><br><style>
td{font-size:9pt;word-break: break-all}
.corner{font-size:0;}
.corner_bo{background:blue}
.corner_bg{background:#6699ff}
#tit{height:22px;color:white;}
#txt{line-height:150%;background:white;border:1px solid blue}
#tl,#tr,#bl,#br,#corner_tl,#corner_tr,#corner_bl,#corner_br{width:3px;height:3px}
#t,#b,#corner_t,#corner_b{height:3px}
#l,#r,#corner_l,#corner_r{width:3px}
</style>
<script src=corner.js></script>
<table cellpadding=0 cellspacing=0 width=400 align=center>
<tr><td id=tl></td><td id=t></td><td id=tr></td></tr>
<tr><td id=l></td>
<td id=box>
<table cellpadding=3 cellspacing=0 width=100%>
<tr id=tit><td>
<b>TTPK.NET免费发布 祝您心想事成！</b>
</td></tr>
<tr><td height=200 id=txt>
<p align="left">

<?php
echo "用户名";
echo $_POST['name'];
echo "<br>电子邮件";
echo $_POST['e'];
echo "<br>验证码";
echo $_POST['yzm1'];


$result = mysql_query("SELECT * FROM user WHERE name='".$_POST['name']."'");
while($row = mysql_fetch_array($result))
  {
            if ($row['e']==$_POST['e'])
			{
            echo "<br />太棒了，电子邮件已发送到您的邮箱！<strong>请查收</strong>！"; 
			
$e = $row['e'];
$ym = $row['name'];
$zm = $row['pass'];
////echo $ym.$zm;

class Jmail
{
public $Username;   //邮局用户名
public $Password;   //密码
public $FormName ;   //发件人姓名
public $From ;   //发件人地址
public $Addrecipient ; //收件人地址
public $Ttile ; //邮件标题
public $Content;   //邮件内容
public $Smtp; //邮件服务器
function Send(){
$Jmail = new com("Jmail.Message");   //实例化一个Jmail对象
$Jmail->SiLent=true; //设置成True的话Jmail不会提示错误只会返回True和False
$Jmail->LogGing = false;   //是否开启日志
$Jmail->CharSet = "GB2312"; //设定字符串编码
$Jmail->ContentType = "Text/html"; //邮件的格式为HTML格式
$Jmail->MailServerUsername = $this->Username; //发信箱用户名
$Jmail->MailServerPassword = $this->Password; //发信箱密码
$Jmail->FromName = $this->FromName;   //发件人姓名
$Jmail->From = $this->From; //发件人地址
$Jmail->AddRecipient($this->Addrecipient); //收件人地址
$Jmail->Subject = $this->Title;//Email标题
$Jmail->Body = $this->Content; //Email正文
$JmailError = $Jmail->Send($this->Smtp); //Smtp服务器
if($JmailError){   //判断邮件是否发送成功
return true;
}else{
return false;
}
}
}
$jmail = new Jmail();
$jmail->Username = "wjbd002";
$jmail->Password = "l111111";
$jmail->FromName = "TTPK自助发布";
$jmail->From = "wjbd002@126.com";
$jmail->Addrecipient = $e;//收件人
$jmail->Title = "www.ttpk.net自助发布[".$ym."]的密码找回[请不要回复此邮件]!";////这是标题，
$jmail->Content = "您的密码是[".$zm."]，请及时登陆www.ttpk.net修改密码！";//////这是内容
$jmail->Smtp = "smtp.126.com";
if($jmail->Send()){
echo "发送成功!";
}else{
echo "发送失败!";
}
            }
			else
			{
            echo "<br />邮箱与用户名不符，您可能记错了！"; 
            }
  }
?>
</p>
<Br>
</td></tr></table>
</td>
<td id=r></td>
</tr>
<tr><td id=bl></td><td id=b></td><td id=br></td></tr>
</table>
<script>
function setcorner(id)
{
var html;
if(id=="t")
{
html="<table class=corner id=corner_t cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bo></td></tr><tr><td class=corner_bg></td></tr><tr><td class=corner_bg></td></tr>"
html+="</table>"
}
if(id=="b")
{
html="<table class=corner id=corner_b cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bg></td></tr><tr><td class=corner_bg></td></tr><tr><td class=corner_bo></td></tr>"
html+="</table>"
}
if(id=="l")
{
html="<table class=corner id=corner_l cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bo></td><td class=corner_bg></td><td class=corner_bg></td></tr>"
html+="</table>"
}
if(id=="r")
{
html="<table class=corner id=corner_r cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bg></td><td class=corner_bg></td><td class=corner_bo></td></tr>"
html+="</table>"
}
if(id=="tl")
{
html="<table class=corner id=corner_tl cellpadding=0 cellspacing=0>"
html+="<tr><td bgcolor=white></td><td bgcolor=white></td><td class=corner_bo></td></tr>"
html+="<tr><td bgcolor=white></td><td class=corner_bo></td><td class=corner_bg></td></tr>"
html+="<tr><td class=corner_bo></td><td class=corner_bg></td><td class=corner_bg></td></tr>"
html+="</table>"
}
if(id=="tr")
{
html="<table class=corner id=corner_tr cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bo></td><td bgcolor=white></td><td bgcolor=white></td></tr>"
html+="<tr><td class=corner_bg></td><td class=corner_bo></td><td bgcolor=white></td></tr>"
html+="<tr><td class=corner_bg></td><td class=corner_bg></td><td class=corner_bo></td></tr>"
html+="</table>"
}
if(id=="bl")
{
html="<table class=corner id=corner_bl cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bo></td><td class=corner_bg></td><td class=corner_bg><td class=corner_bg></tr>"
html+="<tr><td bgcolor=white></td><td class=corner_bo></td><td class=corner_bg></td></tr>"
html+="<tr><td bgcolor=white></td><td bgcolor=white></td><td class=corner_bo></td></tr>"
html+="</table>"
}
if(id=="br")
{
html="<table class=corner id=corner_br cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bg></td><td class=corner_bg></td><td class=corner_bo></td></tr>"
html+="<tr><td class=corner_bg></td><td class=corner_bo></td><td bgcolor=white></td></tr>"
html+="<tr><td class=corner_bo></td><td bgcolor=white></td><td bgcolor=white></td></tr>"
html+="</table>"
}
eval(id+".innerHTML=html")
}
function corner(border,bgcolor)
{
setcorner("tl")
setcorner("tr")
setcorner("bl")
setcorner("br")
setcorner("t")
setcorner("b")
setcorner("l")
setcorner("r")
corner_t.style.width=box.offsetWidth
corner_b.style.width=box.offsetWidth
corner_l.style.height=box.offsetHeight
corner_r.style.height=box.offsetHeight
box.style.background=bgcolor
}
corner("blue","#6699ff");
</script><br><br><br><br>




</div></div>


<?php 
 if(file_exists("foot.php"))
 {
include("foot.php"); 
 }
 else
 {
include("action/foot.php"); 
 }
?>
</body>


<?php include("sql/close.php");?>