| Server IP : 104.21.37.246 / Your IP : 104.23.243.32 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/cp648411/www/simded.com/include/ |
Upload File : |
<?php include('../include72/class.php');?>
<?php include('../include/mail.php');?>
<?php
/*echo '<pre>';
print_r($_POST);
echo '</pre>';*/
//exit;
$sql = 'email = "'.$_POST['email'].'"';
$list = array('table'=>$_POST['fogetpassty'],'where'=>$sql);
$view = $view_db->view($list);
$row = $view_db->q($view);
if($row['id'] > 0)
{
$get = date('U').'//'.$_POST['email'].'//'.$_POST['fogetpassty'];
$get = base64_encode($get);
$body =
'<table width="100%" border="0">
<tr>
<td><img src="'.$domain.'/images/Logo.jpg" width="220" ></td>
<td>'.$util_class->day_m_th($date).'</td>
</tr>
<tr>
<td colspan="2">เรียนผู้ใช้บริการ</td>
</tr>
<tr>
<td colspan="2">คุณ : '.$row['name'].' '.$row['lastname'] . '</td>
</tr>
<tr>
<td colspan="2">ชื่อผู้ใช้งาน : '.$row['email'].'</td>
</tr>
<tr>
<td colspan="2">'.'<a href="'.$domain.'/reset_password/index.php?g='.$get.'">คลิกเพิ่อรีเซตรหัสผ่าน</a>'.'</td>
</tr>
</table>
<br><br>'.$contact;
$body = $body;
//exit;
$mail->SetFrom($from, $from);
$mail->AddReplyTo($from, $from);
$mail->MsgHTML($body);
$txt = $txtname. ' :: Reset Password';
$mail->Subject = $txt;
$mail->AddAddress($row['email']); // ผู้รับ
if(!$mail->Send())
{
echo "<br> Mailer Error: " . $mail->ErrorInfo;
unset($_SESSION['er']);
exit();
}
else
{
?><div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true" style="font-family:Verdana, Geneva, sans-serif;">×</span></button>
<strong></strong> <span> ระบบได้จัดส่งรหัสผ่านใหม่ให้ทางอีเมลแล้วค่ะ</span>
</div>
<?php
}
}
else
{
?>
<div class="alert alert-danger" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true" style="font-family:Verdana, Geneva, sans-serif;">×</span></button>
<strong>Warning!</strong> <span> emailไม่ถูกต้องกรุณาลองใหม่อีกครั้งค่ะ</span>
</div>
<?php
}
?>