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 isEmail($str)
{
if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $str))
return true;
else
return false;
}
function form_1_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_1_class='form_1_error';
$form_1_error='';
$form_1_spam=0;
$form_1_td_1_class='form_1_info';
$form_1_td_1_error=' ';
$form_1_td_1_value='';
$form_1_td_2_class='form_1_info';
$form_1_td_2_error=' ';
$form_1_td_2_value='';
$form_1_td_3_class='form_1_info';
$form_1_td_3_error=' ';
$form_1_td_3_value='';
$form_1_td_4_class='form_1_info';
$form_1_td_4_error=' ';
$form_1_td_4_value='';
$form_1_td_5_class='form_1_info';
$form_1_td_5_error=' ';
$form_1_td_5_value='';
if ('zfzpzghi'==my_get_post('form_1_submit'))
{
$form_1_error_string='There are errors which need correction.';
$form_1_td_1_error_class='form_1_error';
$form_1_td_1_error_must='Error: This field is required!';
$form_1_td_1_error_spam='Error: http: < > are not allowed!';
$form_1_td_1_value=my_get_post('Name' ,true);
$form_1_body.='Name : '.my_get_post('Name')."\r\n";
if (''==trim(my_get_post('Name'))) {$form_1_td_1_class=$form_1_td_1_error_class; $form_1_td_1_error=$form_1_td_1_error_must; $form_1_error=$form_1_error_string;}
$form_1_td_1_spam=form_1_count_spam(my_get_post('Name'));
if ($form_1_td_1_spam>0)
{
if ($form_1_td_1_class!=$form_1_td_1_error_class) {$form_1_td_1_class=$form_1_td_1_error_class; $form_1_td_1_error=$form_1_td_1_error_spam; $form_1_error=$form_1_error_string;}
$form_1_spam += $form_1_td_1_spam;
}
$form_1_td_2_error_class='form_1_error';
$form_1_td_2_error_must='Error: This field is required!';
$form_1_td_2_error_validation='Error: This field must be an email!';
$form_1_td_2_error_spam='Error: http: < > are not allowed!';
$form_1_td_2_value=my_get_post('Email' ,true);
$form_1_body.='Email : '.my_get_post('Email')."\r\n";
if (''==trim(my_get_post('Email'))) {$form_1_td_2_class=$form_1_td_2_error_class; $form_1_td_2_error=$form_1_td_2_error_must; $form_1_error=$form_1_error_string;}
if ($form_1_td_2_class!=$form_1_td_2_error_class && ''!=trim(my_get_post('Email')) && !isEmail(my_get_post('Email'))) {$form_1_td_2_class=$form_1_td_2_error_class; $form_1_td_2_error=$form_1_td_2_error_validation; $form_1_error=$form_1_error_string;}
$form_1_td_2_spam=form_1_count_spam(my_get_post('Email'));
if ($form_1_td_2_spam>0)
{
if ($form_1_td_2_class!=$form_1_td_2_error_class) {$form_1_td_2_class=$form_1_td_2_error_class; $form_1_td_2_error=$form_1_td_2_error_spam; $form_1_error=$form_1_error_string;}
$form_1_spam += $form_1_td_2_spam;
}
$form_1_td_3_error_class='form_1_error';
$form_1_td_3_value=my_get_post('Address' ,true);
$form_1_body.='Address : '.my_get_post('Address')."\r\n";
$form_1_td_4_error_class='form_1_error';
$form_1_td_4_error_spam='Error: http: < > are not allowed!';
$form_1_td_4_value=my_get_post('Telephone' ,true);
$form_1_body.='Telephone : '.my_get_post('Telephone')."\r\n";
$form_1_td_4_spam=form_1_count_spam(my_get_post('Telephone'));
if ($form_1_td_4_spam>0)
{
if ($form_1_td_4_class!=$form_1_td_4_error_class) {$form_1_td_4_class=$form_1_td_4_error_class; $form_1_td_4_error=$form_1_td_4_error_spam; $form_1_error=$form_1_error_string;}
$form_1_spam += $form_1_td_4_spam;
}
$form_1_td_5_error_class='form_1_error';
$form_1_td_5_value=my_get_post('Comments' ,true);
$form_1_body.='Comments : '.my_get_post('Comments')."\r\n";
if (''!=trim(my_get_post('street'))) $form_1_spam += 10;
if (''!=trim(my_get_post('street2'))) $form_1_spam += 10;
if (''!=trim(my_get_post('phone'))) $form_1_spam += 10;
if (''!=trim(my_get_post('youremail'))) $form_1_spam += 10;
if (''==trim($form_1_error) && 0==$form_1_spam)
{
$receiver='youremail@email.com';
$subject='Form Result -- Contact';
if (isEmail( $form_1_td_22_value )) $header='From: '.$form_1_td_22_value;
$subject= substr($subject, 0, 255);
$subject=str_replace("\n", " ", $subject);
$subject=str_replace("\r", " ", $subject);
$body=str_replace("\n.", "\n..", $form_1_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://products.htm';
if (!headers_sent()){
header('Location: '.$url); exit;
}else{
echo '';
echo '';
echo ' ';
echo ' '; exit;
}
exit;
}
}
if (trim($form_1_error)) $form_1_error="
$form_1_error ";
}
if ($form_1_spam >= 3) sleep(20);
if ($form_1_spam >= 3) $form_1_td_1_value='';
if ($form_1_spam >= 3) $form_1_td_2_value='';
if ($form_1_spam >= 3) $form_1_td_3_value='';
if ($form_1_spam >= 3) $form_1_td_4_value='';
if ($form_1_spam >= 3) $form_1_td_5_value='';
?>
Human resources Consultants Brisbane
Human Resources Consultants Brisbane
Follow us!
Please tell us what you think about our website, company, products, or services. If you provide us with your contact information, we will be able to reach you in case we have any questions. Or you can contact us on the number below!
People Factor Group emails regular HR eZines to our website subscribers. You can use the below form to register your contact details if you would like to receive these free human resource tips, ideas and strategies - type SUBSCRIBE in the comments section. Naturally, you can unsubscribe from our eZine's at anytime - just type UNSUBSCRIBE in the comments section.
People Factor Group never shares your personal details with anyone.
2010 TRAINING CALENDAR
Learn more
FAIR WORK and You
From 1 January 2010 there were important changes in Australia ’s workplace laws that affect all employers and employees.
Learn more
NEWS and EVENTS
For the latest news and updates on HR, IR, ER and WH&S
News
Copyright human resources consultants Brisbane People Factor Group 2010. All rights reserved.
Powered by
eCommerce Website Builder © 2003-2009