| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/hkosl.com/innoutstorage/webadmin/ |
Upload File : |
<?php
exit;
require_once('basic_info.php');
switch ($_GET['type']) {
case 1: //contact us
//send email
$email_subject = "Online Enquiry";
$_POST["template-contactform-name"] = 'Test';
$_POST["template-contactform-phone"] = '21231231';
$_POST["template-contactform-email"] = 'test@test.com';
$_POST["template-contactform-message"] = 'test content';
//email content to customer
ob_start();
?>
<html>
<head>
<META name=GENERATOR content="MSHTML 8.00.6001.19394">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="font-family:arial,helvetica,sans-serif !important;color:#000;background:#fff;">
<table>
<tr>
<td valign="top">Name:</td>
<td valign="top"><?= $_POST["template-contactform-name"] ?></td>
</tr>
<tr>
<td valign="top">Phone:</td>
<td valign="top"><?= $_POST["template-contactform-phone"] ?></td>
</tr>
<tr>
<td valign="top">Email:</td>
<td valign="top"><?= $_POST["template-contactform-email"] ?></td>
</tr>
<tr>
<td valign="top">Message:</td>
<td valign="top"><?= nl2br($_POST["template-contactform-message"]); ?></td>
</tr>
</table>
<br><br><br><br>
<?= $site_info{"companyname_" . $langcode} ?><br> <a href='<?= $site_info{"url"} ?>' target='_blank'><?= $site_info{"url"} ?></a>
</body>
</html>
<?php
$email_body = ob_get_contents();
ob_end_clean();
$enquiryemail = $site_info{"enquiryemail"};
$company_name = $site_info{"companyname_" . $langcode};
//for customer
$x_mail = new PHPMailer();
$x_mail->CharSet = "UTF-8";
$x_mail->Sender = $enquiryemail;
$x_mail->AddReplyTo($enquiryemail, $company_name);
$x_mail->From = $enquiryemail;
$x_mail->FromName = $company_name;
//send to user not send to client
//$x_mail->AddAddress($enquiryemail, $company_name);
$x_mail->AddAddress('kelvinchan@onesolution.com.hk', 'Kelvin Chan');
$x_mail->WordWrap = 50;
$x_mail->IsHTML(true);
$x_mail->Subject = $email_subject;
$x_mail->Body = $email_body;
var_dump($email_body);
if ($x_mail->Send()) {
echo "<script>alert('Your online enquiry has sent. We will reply you as soon as possible.');</script>";
exit;
} else {
echo "<script>alert('Your online enquiry cannot send. Please try again.');</script>";
exit;
}
break;
}