/**
* FormHandler basic script.
*
* @package FormHandler
* @version 1.0
* @author Nico Smit, Grafisch Goed
*/
/**
* Variables
*
* Field Example
* @toEmail / recipient info@grafischgoed.nl
* @required email,bedrijfsnaam
* @subject contactformulier
* @succesvolverzonden
* / send_form 3049 / www....
*
* if multiple pages
* @start 1
* @next_page 3049 / www....
*/
/*function get_referer(){
$referer = $HTTP_REFERER;
$referer = str_replace("http://", "",$referer);
$referer = trim(str_replace("www.", "",$referer));
if(strpos($referer,"/")){
$referer_new = substr($referer,0,strrpos($referer,"/"));
$referer_new2 = substr($referer,0,strpos($referer,"?"));}
}*/
if(isset($_SESSION['mail_session'])&&!isset($set_form_values)){
// Fields to Avoid
$exclude_fields = array('start','submit','submit1','submit2','verstuur','subject','recipient','required','next_page','send_form','succesvolverzonden','toemail','mail','respond_id','conditions');
foreach ($_SESSION['mail_session'] as $inputfield => $value) {
$value = stripslashes($value);
if (!@in_array(strtolower($inputfield), $exclude_fields)) {
if($a==1) $used_input = $inputfield;
if(strpos($inputfield,"_")!==false) $set_form_values .= 'inputfields["'.str_replace("_"," ", $inputfield).'"]= "'.$value.'";';
$set_form_values .= 'inputfields["'.$inputfield.'"]= "'.$value.'";';
$a++;
} // endif
} // enforeach
}
// CAPTCHA 1
if(strpos($content, '{captcha}')!==false){
$captcha_words = $conf['captcha_words'];
$captcha_word = ''.$captcha_words[rand(0,count($captcha_words)-1)].'';
$content = str_replace('{captcha_word}', $captcha_word, $content);
$content = str_replace('{captcha}', '', $content);
}
// CAPTCHA 2
$secret_key = 'antstdpamd1231';
if(strpos($content, '
', $content);
}
if($set_form_values){
$javascript_set_form_values = '';
}
if($javascript_set_form_values) {
$content = $content.$javascript_set_form_values;
}
?>
Offerte | Smit Stucadoorswerk