assign('seo_title', htmlspecialchars($settings['html_title'])); $smarty->assign('seo_desc', htmlspecialchars($settings['meta_description'])); $smarty->assign('seo_keys', htmlspecialchars($settings['meta_keywords'])); // Get form $contact_confirm = ''; if(!empty($_POST['action']) && $_POST['action'] == 'contacti_out') { escape($_POST); //print_r($_POST); //Get post: //*********************** //Check post for hack: $my_insecure_array = array( 'naam' => $naam, 'vraag' => $vraag, 'email' => $email ); if ( check_my_insecure_array($my_insecure_array, "Replay TO CONTACT ACTION") ) { exit; } // End check hack //****************** $errors = array(); $_SESSION['user_ip'] = $_SERVER['REMOTE_ADDR']; $_SESSION['referer'] = BASE_URL; if ($naam == '') { $errors['error_name'] = $translations['aanmelden']['name_error']; } if ($vraag == '') { $errors['error_vraag'] = $translations['aanmelden']['vraag_error']; } if ($email == '') { $errors['error_email'] = $translations['aanmelden']['email_error']; } if (!validate_email($email)) { $errors['error_email'] = $translations['aanmelden']['email_invalid']; } //Antispam: if(isset($_POST['uas']) && $_POST['uas'] != ''){ //Spam exit; } if (!empty($tel)) { if( substr($tel, 0, 1) == "8") { exit; } } if ($captcha_code == '') { $errors['error_captcha'] = "Vijfcijferig code is niet correct. Voer de vijf cijfers correct in ..."; } else { if ($captcha_code != $_SESSION['security_number']) { $errors['error_captcha'] = "Vijfcijferig code is niet correct. Voer de vijf cijfers in van de afbeelding..."; } } if (empty($errors)) { $afzender = $email; $stars_email_1 = 'info@three-stars.nl'; $subject = "Contact vanuit de website 3-stars.nl"; $msg = "Geachte threestars,

" . convert2HtmlEmail($vraag); $msg .= "

Met vriendelijke groet.
"; $msg .= "
" . ucfirst($naam) . "
"; if (!empty($tel)) $msg .= $tel . "
"; $msg .= $email . "

"; $msg .= "
Verzonden vanuit " . BASE_URL . "

"; $msg .= " n1 = " . $captcha_code . " n2 = " . $_SESSION['security_number']; //echo $msg; $costel = new Postman(); $costel->MailSendReservation($stars_email_1, $afzender, $subject, $msg); //echo $msg; $costel = new Postman(); $costel->MailSendReservation("abderahimxx@gmail.com", $afzender, $subject, $msg); $smarty->assign('sendreservation_success_code', 1); $smarty->assign('sendreservation_msg', $msg); $smarty->assign('sendreservation_mailadres', $email); //Send template //$contact_confirm = 'success'; //$smarty->assign('contact_confirm', $contact_confirm); //$template = 'b_contact.tpl'; redirect_to(BASE_URL . "contact_confirm"); exit; } else { $smarty->assign('errors', $errors); $smarty->assign('contact_confirm', $contact_confirm); $template = 'b_contact.tpl'; } } else { $smarty->assign('contact_confirm', $contact_confirm); $template = 'b_contact.tpl'; } ?>