function my_get_post($name,$escape=false) { $var_read = ''; if (isset($_POST[$name])) { $var_read = $_POST[$name]; if (get_magic_quotes_gpc()) $var_read=stripslashes($var_read); if ($escape) $var_read=htmlspecialchars($var_read,ENT_QUOTES); } return $var_read; } function form_49_count_spam($str) { $nb=0; $word='http:'; if (stristr($str,$word)) $nb++; $word='<'; if (stristr($str,$word)) $nb++; $word='>'; if (stristr($str,$word)) $nb++; return $nb; } $form_49_class='form_49_error'; $form_49_error=''; $form_49_spam=0; $form_49_td_546_class='form_49_info_546'; $form_49_td_546_error=' '; $form_49_td_546_value=''; $form_49_td_547_class='form_49_info_547'; $form_49_td_547_error=' '; $form_49_td_547_value=''; $form_49_td_548_class='form_49_info_548'; $form_49_td_548_error=' '; $form_49_td_548_value=''; $form_49_td_549_class='form_49_info_549'; $form_49_td_549_error=' '; $form_49_td_549_value=''; $form_49_td_550_class='form_49_info_550'; $form_49_td_550_error=' '; $form_49_td_550_value=''; $form_49_td_551_class='form_49_info_551'; $form_49_td_551_error=' '; $form_49_td_551_value=''; $form_49_td_552_class='form_49_info_552'; $form_49_td_552_error=' '; $form_49_td_552_value=''; $form_49_td_553_class='form_49_info_553'; $form_49_td_553_error=' '; $form_49_td_553_value=''; $form_49_td_554_class='form_49_info_554'; $form_49_td_554_error=' '; $form_49_td_554_value=''; $form_49_td_555_class='form_49_info_555'; $form_49_td_555_error=' '; $form_49_td_555_value=''; $form_49_td_558_class='form_49_info_558'; $form_49_td_558_error=' '; $select_1250_value='IhavereadandagreetotheTermsConditions'; $select_1250_checked='0'; if ('hgqnfphe'==my_get_post('form_49_submit')) { $form_49_error_string='There are errors which need correction.'; $form_49_td_546_error_class='form_49_error_546'; $form_49_td_546_error_spam='Error: http: < > are not allowed!'; $form_49_td_546_value=my_get_post('ContactName' ,true); $form_49_body.='ContactName : '.my_get_post('ContactName')."\r\n"; $form_49_td_546_spam=form_49_count_spam(my_get_post('ContactName')); if ($form_49_td_546_spam>0) { if ($form_49_td_546_class!=$form_49_td_546_error_class) {$form_49_td_546_class=$form_49_td_546_error_class; $form_49_td_546_error=$form_49_td_546_error_spam; $form_49_error=$form_49_error_string;} $form_49_spam += $form_49_td_546_spam; } $form_49_td_547_error_class='form_49_error_547'; $form_49_td_547_error_spam='Error: http: < > are not allowed!'; $form_49_td_547_value=my_get_post('ContactEmail' ,true); $form_49_body.='ContactEmail : '.my_get_post('ContactEmail')."\r\n"; $form_49_td_547_spam=form_49_count_spam(my_get_post('ContactEmail')); if ($form_49_td_547_spam>0) { if ($form_49_td_547_class!=$form_49_td_547_error_class) {$form_49_td_547_class=$form_49_td_547_error_class; $form_49_td_547_error=$form_49_td_547_error_spam; $form_49_error=$form_49_error_string;} $form_49_spam += $form_49_td_547_spam; } $form_49_td_548_error_class='form_49_error_548'; $form_49_td_548_error_spam='Error: http: < > are not allowed!'; $form_49_td_548_value=my_get_post('NameofMarket' ,true); $form_49_body.='NameofMarket : '.my_get_post('NameofMarket')."\r\n"; $form_49_td_548_spam=form_49_count_spam(my_get_post('NameofMarket')); if ($form_49_td_548_spam>0) { if ($form_49_td_548_class!=$form_49_td_548_error_class) {$form_49_td_548_class=$form_49_td_548_error_class; $form_49_td_548_error=$form_49_td_548_error_spam; $form_49_error=$form_49_error_string;} $form_49_spam += $form_49_td_548_spam; } $form_49_td_549_error_class='form_49_error_549'; $form_49_td_549_error_spam='Error: http: < > are not allowed!'; $form_49_td_549_value=my_get_post('MarketAddress' ,true); $form_49_body.='MarketAddress : '.my_get_post('MarketAddress')."\r\n"; $form_49_td_549_spam=form_49_count_spam(my_get_post('MarketAddress')); if ($form_49_td_549_spam>0) { if ($form_49_td_549_class!=$form_49_td_549_error_class) {$form_49_td_549_class=$form_49_td_549_error_class; $form_49_td_549_error=$form_49_td_549_error_spam; $form_49_error=$form_49_error_string;} $form_49_spam += $form_49_td_549_spam; } $form_49_td_550_error_class='form_49_error_550'; $form_49_td_550_error_spam='Error: http: < > are not allowed!'; $form_49_td_550_value=my_get_post('City' ,true); $form_49_body.='City : '.my_get_post('City')."\r\n"; $form_49_td_550_spam=form_49_count_spam(my_get_post('City')); if ($form_49_td_550_spam>0) { if ($form_49_td_550_class!=$form_49_td_550_error_class) {$form_49_td_550_class=$form_49_td_550_error_class; $form_49_td_550_error=$form_49_td_550_error_spam; $form_49_error=$form_49_error_string;} $form_49_spam += $form_49_td_550_spam; } $form_49_td_551_error_class='form_49_error_551'; $form_49_td_551_error_spam='Error: http: < > are not allowed!'; $form_49_td_551_value=my_get_post('MarketDaysDates' ,true); $form_49_body.='MarketDaysDates : '.my_get_post('MarketDaysDates')."\r\n"; $form_49_td_551_spam=form_49_count_spam(my_get_post('MarketDaysDates')); if ($form_49_td_551_spam>0) { if ($form_49_td_551_class!=$form_49_td_551_error_class) {$form_49_td_551_class=$form_49_td_551_error_class; $form_49_td_551_error=$form_49_td_551_error_spam; $form_49_error=$form_49_error_string;} $form_49_spam += $form_49_td_551_spam; } $form_49_td_552_error_class='form_49_error_552'; $form_49_td_552_error_spam='Error: http: < > are not allowed!'; $form_49_td_552_value=my_get_post('MarketTimes' ,true); $form_49_body.='MarketTimes : '.my_get_post('MarketTimes')."\r\n"; $form_49_td_552_spam=form_49_count_spam(my_get_post('MarketTimes')); if ($form_49_td_552_spam>0) { if ($form_49_td_552_class!=$form_49_td_552_error_class) {$form_49_td_552_class=$form_49_td_552_error_class; $form_49_td_552_error=$form_49_td_552_error_spam; $form_49_error=$form_49_error_string;} $form_49_spam += $form_49_td_552_spam; } $form_49_td_553_error_class='form_49_error_553'; $form_49_td_553_error_spam='Error: http: < > are not allowed!'; $form_49_td_553_value=my_get_post('Telephone' ,true); $form_49_body.='Telephone : '.my_get_post('Telephone')."\r\n"; $form_49_td_553_spam=form_49_count_spam(my_get_post('Telephone')); if ($form_49_td_553_spam>0) { if ($form_49_td_553_class!=$form_49_td_553_error_class) {$form_49_td_553_class=$form_49_td_553_error_class; $form_49_td_553_error=$form_49_td_553_error_spam; $form_49_error=$form_49_error_string;} $form_49_spam += $form_49_td_553_spam; } $form_49_td_554_error_class='form_49_error_554'; $form_49_td_554_error_spam='Error: http: < > are not allowed!'; $form_49_td_554_value=my_get_post('MarketDescription' ,true); $form_49_body.='MarketDescription : '.my_get_post('MarketDescription')."\r\n"; $form_49_td_554_spam=form_49_count_spam(my_get_post('MarketDescription')); if ($form_49_td_554_spam>0) { if ($form_49_td_554_class!=$form_49_td_554_error_class) {$form_49_td_554_class=$form_49_td_554_error_class; $form_49_td_554_error=$form_49_td_554_error_spam; $form_49_error=$form_49_error_string;} $form_49_spam += $form_49_td_554_spam; } $form_49_td_555_error_class='form_49_error_555'; $form_49_td_555_error_spam='Error: http: < > are not allowed!'; $form_49_td_555_value=my_get_post('Comments' ,true); $form_49_body.='Comments : '.my_get_post('Comments')."\r\n"; $form_49_td_555_spam=form_49_count_spam(my_get_post('Comments')); if ($form_49_td_555_spam>0) { if ($form_49_td_555_class!=$form_49_td_555_error_class) {$form_49_td_555_class=$form_49_td_555_error_class; $form_49_td_555_error=$form_49_td_555_error_spam; $form_49_error=$form_49_error_string;} $form_49_spam += $form_49_td_555_spam; } $form_49_td_558_error_class='form_49_error_558'; $form_49_td_558_error_must='Error: This field is required!'; $form_49_body.='Agreement : '.my_get_post('Agreement')."\r\n"; if (my_get_post('Agreement') == $select_1250_value) $select_1250_checked=1; else $select_1250_checked=0; if ($select_1250_checked!=1) {$form_49_td_558_class=$form_49_td_558_error_class; $form_49_td_558_error=$form_49_td_558_error_must; $form_49_error=$form_49_error_string;} if (''==trim($form_49_error) && 0==$form_49_spam) { $receiver='info@onecommunitytoday.com'; $subject='Form Result -- Farm Market'; $subject= substr($subject, 0, 255); $subject=str_replace("\n", " ", $subject); $subject=str_replace("\r", " ", $subject); $body=str_replace("\n.", "\n..", $form_49_body); if ($body!="") { $result=mail($receiver,$subject,$body,$header); if (!result) { echo 'ERROR: The PHP mail function mail($receiver,$subject,$body,$header); does not work properly on your server, please contact your web hosting.'; exit; } } if ($result) { $url='http://www.onecommunitytoday.com/Thankyou.htm'; if (!headers_sent()){ header('Location: '.$url); exit; }else{ echo ''; echo ''; exit; } exit; } } if (trim($form_49_error)) $form_49_error="
|
Home::Feedback::Site Map |
|
| ||||
Sonoma County - One People, One Community, Today! Copyright © OneCommunityToday Sonoma County.com. All rights reserved. www.onecommunitytoday.com is powered by Website Builder © 2003-2010 |