validate(getr('captcha')); $merr=false; if ($botcheck==1) { $merr=contactus_submitform(); }else{ echo "

Anti-robot check answered incorrectly!

"; } if ($merr) { echo "

Your enquiry has been submitted. Thank you.

"; echo "

".getg('postscript','','contactus')."

"; } else { echo "

An error has occured whilst sending your message.
You may try again using the data below.
If unsuccessful, we suggest you phone us, or use the email contact address.

"; } }else{ setg('already_submitted','false','contactus'); ?>

Firstly, please prove you are human by entering the number described below as digits.. set("captcha",1,1000000); $captcha->cksum2js(); $thispage=$_SERVER['PHP_SELF']; $thiscaptcha=gets('captcha'); $post_name=getr('name'); $post_address=getr('address'); $post_email=getr('email'); $post_telephone=getr('telephone'); $post_message=getr('message'); $post_attachments=getr('attachments'); $ats='@'; $our_telephone=getg('our_telephone','-','contactus'); $direct_mail_account=getg('direct_mail_account','webform','contactus'); $form_mail_account=getg('form_mail_account','webform','contactus'); $domain_name=getg('domain_name','example','contactus'); $toplevel_domain=getg('toplevel_domain','com','contactus'); $encto=contactus_strtohex($direct_mail_account.$ats.$domain_name.'.'.$toplevel_domain); $fencto=contactus_strtohex($form_mail_account.$ats.$domain_name.'.'.$toplevel_domain); $enctel=contactus_strtohex($our_telephone); echo ""; echo <<
Anti-robot check:
*  

$thiscaptcha[1]
$thiscaptcha[2]
    $thiscaptcha[3]
Name
*
Address

E-mail
*
Telephone

Message

  

END; } function contactus_launch_mailclient($text) { return "$text"; } function contactus_show_email($text) { return "$text"; } function contactus_show_tel($text) { return "$text"; } function contactus_submitform(){ $captcha = new captcha(); $thiscaptcha=gets('captcha'); $at_symbol="@"; $form_mail_account=getg('form_mail_account','webform','contactus'); $domain_name=getg('domain_name','example','contactus'); $toplevel_domain=getg('toplevel_domain','com','contactus'); $subject = getg('subject','Website Enquiry','contactus'); $to = $form_mail_account . $at_symbol . $domain_name . '.' . $toplevel_domain; $headers = "From: ". getr('email') . "\r\nX-Mailer: Hyperframe Site Mailer" ; $body = "~Website Form Enquiry~ \n\n"; foreach ($_POST as $thisid => $thisvalue){ if (stripos("|submit|captcha|message|",$thisid)<1){ $body.= "$thisid : $thisvalue \n"; } if (stripos("|message|",$thisid)>0){ $body.= "\n $thisvalue \n"; } } // echo "
$headers 
$body
"; if ($domain_name=="example"){ $merr=true; echo "

~ Demo mode only. No data sent ~

"; }else{ $merr=mail($to, $subject, $body, $headers); } return $merr; } function contactus_strtohex($string) { $hex=''; for ($i=0; $i < strlen($string); $i++) { $hex .= dechex(ord($string[$i])); } return $hex; } function contactus_hextostr($hex) { $string=''; for ($i=0; $i < strlen($hex)-1; $i+=2) { $string .= chr(hexdec($hex[$i].$hex[$i+1])); } return $string; } ?>