Record; $breadcrumbs = new Breadcrumbs(); $breadcrumbs->addStep($page_record['PageTitle'], ''); //--------------------------------------------------------------------------------------------------------- $tpl = new TemplatePower("$_SERVER[DOCUMENT_ROOT]/tpl/template.html"); $tpl->assignInclude("CONTENT","$_SERVER[DOCUMENT_ROOT]/tpl/controller_template.html"); $tpl->assignInclude("CONTROLLER_CONTENT","tpl/contact.html"); $tpl->assignInclude("CATEGORIES", "$_SERVER[DOCUMENT_ROOT]/tpl/categories.php"); $tpl->assignInclude("TESTIMONIALS", "$_SERVER[DOCUMENT_ROOT]/tpl/testimonials.php"); $tpl->assignInclude("TAGS", "$_SERVER[DOCUMENT_ROOT]/tpl/tags.php"); //$tpl->assignInclude("TOP_MENU",GetTopMenu("menu_contact.html")); $tpl->assignInclude("LEFT_MENU","$_SERVER[DOCUMENT_ROOT]/tpl/featured.php"); $tpl->assignInclude("BASKET", "$_SERVER[DOCUMENT_ROOT]/tpl/cart.php"); $tpl->prepare(); //META $tpl->assign("META_TITLE", $page_record['PageMetaTitle']); $tpl->assign("META_KEYWORDS", $page_record['PageMetaKeywords']); $tpl->assign("META_DESCRIPTION", $page_record['PageMetaDescription'] ); //CONTENT $tpl->assign("PAGE_TITLE", $page_record['PageTitle']); $tpl->assign("PAGE_DESCRIPTION", $page_record['PageText']); //BREADCRUMBS $tpl->assign("PATH", $breadcrumbs->getLinks() ); //--------------------------------------------------------------------------------------------------------- if ($_SERVER['REQUEST_METHOD'] == "POST") { try { $response = recaptcha_check_answer(RECAPTCHA_PRIVATE_KEY, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$response->is_valid) throw new Exception("Please, enter correct check code"); //$vImage->loadCodes(); //if ($vImage->checkCode()) //else //{ $tpl->newBlock("AFTER_CONTACT"); $mail = new PHPMailer(); $mail->From = FilterFromEmail($_POST['Email']); $mail->FromName = FilterFromName($_POST['Name']); $mail->AddAddress(ADMMAIL); $mail->WordWrap = 50; $mail->IsHTML(false); $mail->Subject = $_POST['Subject']; $mail->Body = $_POST['Message'].' Tel.: '.$_POST['Phone']; $mail->Send(); } catch (Exception $e) { //} //else //{ $tpl->newBlock("CONTACT"); $tpl->assign(HtmlspecialcharsArray($_POST)); $tpl->assign("ErrorMessage","Please, enter correct check code"); } } else { $tpl->newBlock("CONTACT"); $tpl->assign(HtmlspecialcharsArray($_POST)); } //$tpl->assign("checkcode_box","" . $vImage->showCodBox(0,"")); $tpl->assign("recaptcha", recaptcha_get_html(RECAPTCHA_PUBLIC_KEY, $response->error)); //--------------------------------------------------------------------------------------------------------- //$tpl->assignGlobal('home','
  • Home
  • '); $_addit_inc = ' '; $tpl->assignGlobal("inc_additional", $_addit_inc); $tpl->assignGlobal('home','
  • Home
  • '); $tpl->printToScreen(); ?>