Code: Select all
<?
define('IN_SITE', true);
include_once("includes/common.php");
//include_once($physical_path['DB_Access']. 'Country.php');
//$country = new Country();
if($_POST['Submit'] == 'Send')
{
///mail to client
global $mail2;
$mail2 = '';
$mail2 = new htmlMimeMail();
$mail2->setFrom($_POST['mem_email']);
$mail2->setSubject('Enquiry Request Received');
$tpl2 = new Smarty;
$tpl2->template_dir = $physical_path['EmailTemplate'];
$tpl2->compile_dir = $physical_path['Site_Root']. 'templates_c/';
$tpl2->debugging = DEBUG;
$tpl2->assign(array("mem_fname" => $_POST['mem_fname'],
"mem_email" => $_POST['mem_email'],
"mem_tel_no" => $_POST['mem_tel_no'],
"enquiry" => $_POST['enquiry'],
//"mem_country" => $country->GetCountryName($_POST['mem_country']),
));
$mail2->setHtml($tpl2->fetch('enquiry'. $config['tplEx']));
// print $mail2->html;die;
$result = $mail2->send(array($config[WC_CONTACT_US]));
header("location: enquiry.php?success=true");
exit();
}
if($_GET['success'] == true)
{
$tpl->assign(array( "T_Body" => 'enquiry_finish'. $config['tplEx'],
));
}
else
{
//$country_rec = $country->GetCountryList();
//$arr_country = fillDbCombo($country_rec,'country_id','country_name',$_POST['mem_country']);
$tpl->assign(array( "T_Body" => 'enquiry'. $config['tplEx'],
"JavaScript" => array("enquiry.js"),
"msg" => $error_msg,
//"country" => $arr_country,
));
}
$tpl->display('default_layout'. $config['tplEx']);
?>