| Server IP : 104.21.37.246 / Your IP : 104.23.243.33 [ 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 : /home2/cp648411/public_html/simded.com/mybackend/report_problems/ |
Upload File : |
<?php require_once("../include/class.php");?>
<?php include("table_name.php");?>
<?php
include("../include/mail.php");
$sql = array('table'=>$name_table,'where'=>"id = '". $_POST["id"]."'");
$view_sql = $view_db->view($sql);
$row = $view_db->q($view_sql);
$list_sh = array('table'=>'shop','where'=>'id = "'.$row['id_shop'].'"');
$view_sh = $view_db->view($list_sh);
$row_sh = $view_db->q($view_sh);
$date = date("Y-m-d H:i:s");
$body =
'
สวัสดีค่ะ,คุณ '.$row_sh['name'].' '.$row_sh['lastname'].'<br><br>
'
.
'คำถาม:<br>'.$row['detail']."<br><br><br>"
.
'ตอบกลับ จากsimded :<br>'.$_POST['detail'].'<br><br>'
.$contact;
$body = $body;
//exit;
$from = '[email protected]';
$mail->SetFrom($from, $from);
$mail->AddReplyTo($from, $from);
$mail->MsgHTML($body);
$txt = $txtname.' :: ตอบกลับ';
$mail->Subject = $txt;
$mail->AddAddress($row_sh['email']); // ผู้รับ
$_SESSION['er'] = 'false';
if(!$mail->Send())
{
echo "<br> Mailer Error: " . $mail->ErrorInfo;
unset($_SESSION['er']);
exit();
}
else
{
$list = array(
'table'=>'report_problems_mail',
'report_problems_id'=>"'".@$_POST["id"]."'",
'detail'=>"'".@$_POST["detail"]."'",
'createdate'=>"'".$date."'"
);
$add = $actiondata_db->add_db($list);
$_SESSION['er'] = 'true';
if( $add['suc'] <> 1)
{
$_SESSION['er'] = 'false';
}
?>
<meta http-equiv="refresh" content="0;URL=detail.php?id=<?php echo $row['id']?>">
<?php
}
?>