| 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/(Del)eizo.hkosl.com/global/webadmin/ |
Upload File : |
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
<?php
require_once("configure.php");
//data decryption
//include_once('../phpseclib0.3.6/Crypt/RSA.php');
set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib0.3.6');
include('Crypt/RSA.php');
$rsa = new Crypt_RSA();
$private_key = "MIICXAIBAAKBgQDH0i//hwmPSCUNAS9UiD3wSH43NxwRKwGtHQKGarANuYNacSXb +rS2N0WKihz+aSkevePj5GZPtu21Fpx0Tt541DBlUrYL0vPK4S6QUX8I5vsOQ/Xu Iyh9NKcD2fbmf/1QrC+q7pv6xa6ctaV8u1RPGI7CAIPtMCrh9Pbg+EFo0wIDAQAB AoGATSi2HRMtV1UR7YggGSG03SR5DGQs49o5/vldQL9QtTQF6zYW2u9fuZ71LO5x DLJZzQOhTJ4k/bIS7yLIjkboM4x75DlRpG14Umi+d2GePB+r9UiqeZ67Zh7OvKFU 1CIkNC2J9G0U2G4RSG2UAZKkimIofmptq7dXa5oYYNL74t0CQQDi4RHoxIhqh9mw rLxvawgcq6gseKuY5zEgJMHGtNQTIGqn1LgxCCwNx5473xc7jW6GQbgCtDVwGqeb VkejSSsFAkEA4XgGfrAFHSQdZ9+GkNsT+eZioX5wyxP78b3csTRPPii4NudJmyeu yHmmhhJV6fknQ9ZsYqLwHH3gJpzXeH/79wJAEL3S+H4oItRLeAIHFaGsQ5FXI5Dz +KB2u4x60BLf41ltBV1pChU0SwAD6R8ZM8fH9Bg9X9W0a8VLwOao+p+XkQJBANG3 MGNaGgeW9fsOAD5wZ85Dqm4IC6X4upmKPeJdg2+PtHjs/Jvid0JlVKzUFTGB3DHP GhVM9QWrV3jS3eBpOtUCQB6Fyf7bkMHxRwa2QLoB3bM/gvk0mJPCBFpILfI5RZZG XezjDt3Xo/MqppBr8nybC42OxjbID9ALPPe/VX9AVmA=";
$rsa->loadKey($private_key); // private key
$customer_id = $_GET["customer_id"];
$sql3 = "select * from customer_warranty where customer_id = ? and deleted = ?";
if (!($sth3 = $dbh->prepare($sql3))) {
throw new Exception('[' . $sth3->errorCode() . ']: ' . print_r($sth3->errorInfo()));
}
if (!$sth3->execute(array($customer_id, "0"))) {
throw new Exception('[' . $sth3->errorCode() . ']: ' . print_r($sth3->errorInfo()));
}
$row3 = $sth3->fetch(PDO::FETCH_ASSOC);
$customer_email = $rsa->decrypt(base64_decode($row3{"email"}));
$customer_name_email = $rsa->decrypt(base64_decode($row3{"customer_name"}));
//send email
require_once("inc/class.phpmailer.php");
//email content to customer
if($row3{"email_lang"} == "tc"){
$email_to_customer_subject = "成功登記EIZO網上保養";
$email_to_admin_subject = "成功登記EIZO網上保養 - ".$row3{"serial_number"};
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;color:#000;background:#fff">
<div>
尊敬的客戶:<br><br>
<?php
if ($row3{"free_mix_color"} == 1) {
echo "恭喜!你獲贈";
}
if ($row3{"free_mix_color"} == 1) {
echo " 1次免費上門色彩校準服務";
if ($row3{"extend_warranty_year"} == 0) {
echo "!";
}
}
if ($row3{"free_mix_color"} == 1 && $row3{"extend_warranty_year"} > 0) {
echo " 和";
}
if ( $row3{"extend_warranty_year"} > 0) {
echo " ".$row3{"extend_warranty_year"}."個月保養期延長優惠! ";
}
?>
非常感謝你選購EIZO顯示器和登記網上保養服務!
<br><br> 保養資料<br><br>
</div>
產品型號: <?= $row3{"model_code"} ?><br>
序號: <?= $row3{"serial_number"} ?><br>
購買日期: <?= $row3{"date_of_purchase"} ?><br>
保養到期日:<?php
echo Date('Y-m-d', strtotime($row3{"date_of_purchase"} . "+" . $row3{"fixed_warranty_year"} . " year +" . ($row3{"extend_warranty_year"}) . " month"));
?><br>
保養細則: <?= $row3{"warranty_detail_tc"} ?>
<br><br> 備註:<br>
<?php
if ($row3{"free_mix_color"} == 1) {
echo "• 預約申請免費上門色彩校準服務,請致電(852) 8101-6388。 <br>";
}
echo "• 請保留和出示收據正本。如未能提供有效的文件,我們保留拒絕提供服務之權利。";
?>
<div>
<br> 聯強國際(香港)有限公司謹啟 <br><br>
如有疑問,歡迎致電我們的客戶支援團隊。<br><br>
HK: (852) 8101-6388 / Macau: (853) 2875-7235 / info@eizo.com.cn<br><br>
<div style="text-align: center;">
**毋須回覆此郵件**
</div>
</div>
</body>
</html>
<?php
$email_customer_body = ob_get_contents();
ob_end_clean();
}else if($row3{"email_lang"} == "en"){
$email_to_customer_subject = "Successful Registration of EIZO Online Warranty Registration";
$email_to_admin_subject = "Successful Registration of EIZO Online Warranty Registration
- ".$row3{"serial_number"};
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;color:#000;background:#fff">
<div>
Dear Customer,<br><br>
<?php
if($row3{"free_mix_color"} == 1 || $row3{"extend_warranty_year"} > 0) {
echo "Congratulations! You're entitled to ";
}
if($row3{"free_mix_color"} == 1 ){
echo " a Free On-site Calibration Service";
if($extend_warranty_year == 0){
echo "!";
}
}
if ($row3{"free_mix_color"} == 1 && $row3{"extend_warranty_year"} > 0) {
echo " and";
}
if($row3{"extend_warranty_year"} > 0){
echo " an additional ".$row3{"extend_warranty_year"} ."-months extended warranty! ";
}
?>
Thank you very much for your purchase and registering the warranty online!
<br><br>
Warranty registration details
</div>
Model: <?=$row3{"model_code"}?><br>
Serial number: <?=$row3{"serial_number"}?><br>
Date of purchase: <?=$row3{"date_of_purchase"}?><br>
Warranty Expiry Date:<?php
echo Date('Y-m-d', strtotime($row3{"date_of_purchase"} ."+".$row3{"fixed_warranty_year"}." year +".($row3{"extend_warranty_year"}) ." month"));
?><br>
Warranty Terms: <?=$row3{"warranty_detail_en"}?>
<br><br>
Remarks:<br>
<?php
if($row3{"free_mix_color"} == 1){
echo "• To make an appointment for the Free On-site Calibration Service, please call (852) 8101-6388. <br>";
}
echo "• Please kindly keep and present the original invoice when requesting warranty service. If the proof of purchase cannot be provided, we reserve the rights to refuse service.";
?>
<br>
<div>
<br><br>
Yours sincerely,<br>
Synnex Technology International (HK) Ltd
<br><br>
For any inquiries, please contact our Customer Support team.<br><br>
HK: (852) 8101-6388 / Macau: (853) 2875-7235 / info@eizo.com.cn<br><br>
<div style="text-align: center;">
**Reply to this email is not required**
</div>
</div>
</body>
</html>
<?php
$email_customer_body = ob_get_contents();
ob_end_clean();
}else if($row3{"email_lang"} == "sc"){ ob_start(); ?>
<?php
$email_customer_body = ob_get_contents();
ob_end_clean();
}else{}
?>
<?php
//$enquiryemail = "kelvinchan@onesolution.com.hk";
$enquiryemail = $row0{"enquiryemail"};
$company_name = $row0{"companyname_en"};
//for customer
$x_mail = new PHPMailer();
$x_mail->IsSMTP();
$x_mail->Host = "localhost";
$x_mail->SMTPAuth = true;
/*$x_mail->Host = 'smtp.mandrillapp.com'; // Specify main and backup server
$x_mail->Port = 587; // Set the SMTP port
$x_mail->SMTPAuth = true; // Enable SMTP authentication
$x_mail->Username = 'garricklam@onesolution.com.hk'; // SMTP username
$x_mail->Password = 'lYtE-w6jVOD4vZQrurvraQ'; // SMTP password
$x_mail->SMTPSecure = 'tls';*/
$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($customer_email, $customer_name_email);
//$x_mail->AddAddress("kelvinchan@onesolution.com.hk", $company_name);
$x_mail->AddBCC("kelvinchan@onesolution.com.hk", $company_name);
$x_mail->WordWrap = 50;
$x_mail->IsHTML(true);
$x_mail->Subject = $email_to_customer_subject;
$x_mail->Body = $email_customer_body;
//$dbh = null;
if ($x_mail->Send()) {
echo '<script type="text/javascript">
alert("Email to customer Sent!");
</script>';
} else {
echo '<script type="text/javascript">
alert("Email to customer cannot not send!");
</script>';
}
//for admin
/*$x_mail2 = new PHPMailer();
$x_mail2->IsSMTP();
$x_mail2->Host = "localhost";
$x_mail2->SMTPAuth = true;
$x_mail2->CharSet = "UTF-8";
$x_mail2->Sender = $enquiryemail;
$x_mail2->AddReplyTo($enquiryemail, $company_name);
$x_mail2->From = $enquiryemail;
$x_mail2->FromName = $company_name;
//send to user not send to client
$x_mail2->AddAddress($enquiryemail, $company_name);
//$x_mail->AddAddress("kelvinchan@onesolution.com.hk", $company_name);
$x_mail2->AddBCC("kelvinchan@onesolution.com.hk", $company_name);
$x_mail2->WordWrap = 50;
$x_mail2->IsHTML(true);
$x_mail2->Subject = $email_to_admin_subject;
//$x_mail2->Body = $email_admin_body;
$x_mail2->Body = $email_customer_body;
if ($x_mail2->Send()) {
echo '<script type="text/javascript">
alert("Email to customer Sent!");
</script>';
} else {
echo '<script type="text/javascript">
alert("Email to customer cannot not send!");
</script>';
}*/
echo '<script type="text/javascript">
window.location.href="customer_warranty_index.php";
</script>';
?>