ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/thietkewebvumi.com/code/ |
<?php class contact{ function contact() { global $CORE; switch ($CORE->input['code']) { default : $this -> goDetail(); break; case 'dangky_trienlam' : $this->goTrienlam(); break; case 'check_captcha' : $this->goCheckCaptcha(); break; case 'newletter' : $this->goNewletter(); break; case 'email_feed' : $this->emailFeed(); break; } } function emailFeed(){ global $CORE; $email = $CORE->input['email']; $subject = 'Äăng ký nháºn tin từ website thanhdosg.com'; $body = ''; $body .= 'Email: '.$email.'<br>'; $headers = 'Content-type: text/html; charset=utf-8'; $headers .= 'To: Admin <'.$CORE->vars['email_address'].'>' . "\n"; $headers .= 'From: '.$email.' <'.$email.'>' . "\n"; include("lib/phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); $mail->CharSet = 'utf-8'; $mail->IsSMTP(); $mail->SMTPAuth = true; $mail->SMTPSecure = "ssl"; $mail->Host = "smtp.gmail.com"; $mail->Port = "465"; $mail->Username = "contact@ischool.vn"; $mail->Password = "ischool123"; $mail->FromName = $CORE->vars['sitename']; $mail->Subject = $subject; $mail->WordWrap = 50; $mail->MsgHTML($body); $mail->AddAddress($CORE->vars['email_address'], $CORE->vars['sitename']); //$mail->AddAddress('movieandtube@gmail.com', $CORE->vars['sitename']); $mail->IsHTML(true); if(!$mail->Send()) { echo 0; exit(); } else { echo $CORE->vars['email_address']; exit(); } } function goNewletter(){ global $CORE,$DB; $email = $CORE->input['email']; $row_check = $DB->fetch_row($DB->query("SELECT * FROM NNCCMS_maillist WHERE email='$email' LIMIT 1")); if($row_check){ $show = 1; echo $show; exit(); }else{ $DB->query("INSERT INTO `NNCCMS_maillist` (`email` ,`joined` ,`ip_address` ,`regcode` ,`notes`)VALUES ('$email', '".time()."', '".$CORE->ip."','' , '');"); echo 2; exit(); } } function goCheckCaptcha(){ global $CORE; require("include/captcha-secureimage/securimage.php"); $captcha = trim($_POST['captcha']); $img = new Securimage(); if(!$img->check($captcha)) { $err = 1; }else{ $err = 2; } echo $err; exit(); } function goDetail(){ global $CORE, $smarty,$print,$func; $smarty->assign('title','Contact from '.$CORE->vars['sitename']); $smarty->assign('description', 'Khách hà ng thiết kế website tại VMDesign Co., Ltd có thể chá»n mẫu giao diện và đặt mẫu nà y là m website của mình.'); $smarty->assign('cur_url', $func->current_url()); $smarty->assign('og_image', 'https://thietkewebvumi.com/upload/collect/logo_1586751887.png'); $smarty->assign('type',$CORE->input['type']); if(isset($CORE->input['submitbt'])) { if(isset($_POST['g-recaptcha-response'])){ $captcha=$_POST['g-recaptcha-response']; } if(!$captcha){ echo '<h2>Please check the the captcha form.</h2>'; exit; } $secretKey = "6LdY7u4UAAAAAOZHZaw9r3I5wi5lj4FJaOjtbI7g"; $ip = $_SERVER['REMOTE_ADDR']; $url = 'https://www.google.com/recaptcha/api/siteverify?secret=' . urlencode($secretKey) . '&response=' . urlencode($captcha); $response = file_get_contents($url); $responseKeys = json_decode($response,true); // should return JSON with success as true if($responseKeys["success"]) { } else { echo '<h2>Please check the the captcha form.</h2>'; exit; } $id = $CORE->input['id']; $hoten = $CORE->input['hoten']; $dienthoai = $CORE->input['dienthoai']; $email = $CORE->input['email']; $diachi = $CORE->input['diachi']; $tieude = $CORE->input['tieude']; $noidung = $CORE->input['noidung']; $subject = 'Liên hệ từ thietkewebvumi.com'; $body = 'Há» tên: '.$hoten. '<br/>'; $body .= 'Äiện thoại: '.$dienthoai. '<br/>'; $body .= 'Email: ' . $email . '<br>'; $body .= 'Äịa chỉ: ' . $diachi . '<br>'; $body .= 'Tiêu Ä‘á»: ' .$tieude. '<br>'; $body .= 'Ná»™i dung: ' .$noidung. '<br>'; $headers = 'Content-type: text/html; charset=utf-8'; $headers .= 'To: Admin <' . $CORE->vars['email_address'] . '>' . "\n"; $headers .= 'From: ' . $email . ' <' . $email . '>' . "\n"; include("lib/phpmailer/PHPMailerAutoload.php"); $mail = new PHPMailer(); $mail->CharSet = 'utf-8'; $mail->IsSMTP(); $mail->SMTPAuth = true; $mail->SMTPSecure = "ssl"; $mail->Host = "smtp.gmail.com"; $mail->Port = "465"; $mail->Username = "contact@ischool.vn"; $mail->Password = "ischool123"; $mail->FromName = $CORE->vars['sitename']; $mail->Subject = $subject; $mail->WordWrap = 50; $mail->MsgHTML($body); $mail->AddAddress($CORE->vars['email_address'], $CORE->vars['sitename']); $mail->AddAddress('movieandtube@gmail.com', $CORE->vars['sitename']); $mail->IsHTML(true); $mail->AddReplyTo($email ,$hoten); if (!$mail->Send()) { echo 'smtp error'; exit(); } else { $_SESSION['send_mail'] = 1; $print->refresh('contact.html'); } } } } $run = new contact(); ?>