"; $x_or_h_in = " /"; } else if($x_or_html == "html") { $x_or_h_br = "
"; $x_or_h_in = ""; } else { $x_or_h_br = "
"; $x_or_h_in = " /"; } // Unique ID generators (random values would require a session) $fl = "$form_location"; $fv = "$form_version"; $fp = "$gb_possession"; $fd = date("TOZ"); // The Pierre Modification if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])){ $fh = $_SERVER['HTTP_X_FORWARDED_FOR']; } else{ $fh = gethostbyaddr($_SERVER['REMOTE_ADDR']); } $form_id = ''.$fd.''.$fp.''.$fl.''.$fv.''.$fh.''; $trap1_value = ''.$fp.''.$fv.''.$fh.''.$fl.''.$fd.''; $send_value = ''.$fh.''.$fd.''.$fv.''.$fp.''.$fl.''; $form_id = strtoupper(trim(rtrim(str_replace(array("&", "/", "#", "\\", ":", "%", "|", "^", ";", "@", "?", "+", "$", ".", "~", "-", "=", "_", " ",), 'PjT31cXa', $form_id)))); $trap1_value = strtoupper(trim(rtrim(str_replace(array("&", "/", "#", "\\", ":", "%", "|", "^", ";", "@", "?", "+", "$", ".", "~", "-", "=", "_", " ",), 'Hr2WgPmz', $trap1_value)))); $send_value = strtoupper(trim(rtrim(str_replace(array("&", "/", "#", "\\", ":", "%", "|", "^", ";", "@", "?", "+", "$", ".", "~", "-", "=", "_", " ",), 'Li8s7bkd', $send_value)))); $send_value = "GB$send_value"; echo'
'."\n"; if ($_POST) { // Posted variables $name = $_POST['name']; $firm = $_POST['firm']; $email = $_POST['email']; $phone = $_POST['phone']; $fax = $_POST['fax']; $url = $_POST['url']; $address1 = $_POST['address1']; $address2 = $_POST['address2']; $city = $_POST['city']; $prov = $_POST['prov']; $code = $_POST['code']; $practice = $_POST['practice']; $language = $_POST['language']; $experience = $_POST['experience']; $call = $_POST['call']; $insured = $_POST['insured']; $pro = $_POST['pro']; $coi = $_POST['coi']; $pll = $_POST['pll']; $reason = $_POST['reason']; $message = $_POST['message']; $formid = $_POST['GB'.$form_id.'']; $trap1 = $_POST['GB'.$trap1_value.'']; $trap2 = $_POST['p-mail']; $spamq = $_POST['spamq']; $gbcc = @$_POST['gbcc']; $ltd = date("l, F jS, Y \\a\\t g:i a", time()+$time_offset*60*60); $ip = getenv("REMOTE_ADDR"); $hr = getenv("HTTP_REFERER"); $hst = gethostbyaddr( $_SERVER['REMOTE_ADDR'] ); $ua = $_SERVER['HTTP_USER_AGENT']; // Strip slashes, html, php, binary, and scrub posted vars $name = stripslashes(strip_tags(trim($name))); $firm = stripslashes(strip_tags(trim($firm))); $email = stripslashes(strip_tags(trim(strtolower($email)))); $phone = stripslashes(strip_tags(trim($phone))); $fax = stripslashes(strip_tags(trim($fax))); $url = stripslashes(strip_tags(trim($url))); $address1 = stripslashes(strip_tags(trim($address1))); $address2 = stripslashes(strip_tags(trim($address2))); $city = stripslashes(strip_tags(trim($city))); $prov = stripslashes(strip_tags(trim($prov))); $code = stripslashes(strip_tags(trim($code))); $practice = stripslashes(strip_tags(trim($practice))); $language = stripslashes(strip_tags(trim($language))); $experience = stripslashes(strip_tags(trim($experience))); $call = stripslashes(strip_tags(trim($call))); $insured = stripslashes(strip_tags(trim($insured))); $pro = stripslashes(strip_tags(trim($pro))); $coi = stripslashes(strip_tags(trim($coi))); $pll = stripslashes(strip_tags(trim($pll))); $reason = stripslashes(strip_tags(trim($reason))); $message = stripslashes(strip_tags(trim($message))); $spamq = strtolower(trim($spamq)); $gb_randoma = strtolower(trim($gb_randoma)); $ltd = stripslashes(strip_tags(trim($ltd))); $ip = stripslashes(strip_tags(trim($ip))); $hr = stripslashes(strip_tags(trim($hr))); $hst = stripslashes(strip_tags(trim($hst))); $ua = stripslashes(strip_tags(trim($ua))); $formid = stripslashes(strip_tags(trim($formid))); $send_value = stripslashes(strip_tags(trim($send_value))); // Email header $gb_email_header = "From: $gb_email_address\n"."Reply-To: $email\n"."MIME-Version: 1.0\n"."Content-type: text/plain; charset=\"utf-8\"\n"."Content-transfer-encoding: quoted-printable\n\n"; // Strip more html, php, and binary, then scrub $gb_email_header = stripslashes(strip_tags(trim($gb_email_header))); // Identify exploits $head_expl = "/(bcc:|cc:|document.cookie|document.write|onclick|onload)/i"; $inpt_expl = "/(content-type|to:|bcc:|cc:|document.cookie|document.write|onclick|onload)/i"; // Modify referrer to counter bogus www/no.www mismatch errors $form_location = strtolower(trim(rtrim(str_replace(array("http", "www", "&", "/", "#", "\\", ":", "%", "|", "^", ";", "@", "?", "+", "$", ".", "~", "-", "=", "_", " ",), '', $form_location)))); $new_referrer = strtolower(trim(rtrim(str_replace(array("http", "www", "&", "/", "#", "\\", ":", "%", "|", "^", ";", "@", "?", "+", "$", ".", "~", "-", "=", "_", " ",), '', $_SERVER['HTTP_REFERER'])))); // Carbon Copy request negotiation if($gbcc == "gbcc") { $gb_cc = ", $email"; $cc_notify1 = "".$x_or_h_br."(A carbon copy has also been sent to this address.)"; $cc_notify2 = "(Copy sent)"; $cc_notify3 = ""; } else { $gb_cc = ""; $cc_notify1 = ""; $cc_notify2 = ""; $cc_notify3 = ""; } // Required fields need stuffing or get an error showing fields needed if(!isset($name,$firm,$email,$practice,$language,$experience,$call,$insured,$spamq) || empty($name) || empty($firm) || empty($email) || empty($practice) || empty($language) || empty($experience) || empty($call) || empty($insured) || empty($spamq)){ print(' Results: '.$error_heading.'

Required Field(s) Missed: The following “Required” fields were not filled in. Using your “Back” button, please go back and fill in all required fields.

'."\n"); echo('
'."\n"); echo('
Empty Field(s):
'."\n"); if(empty($name)) { echo('
“Enter your full name”
'."\n"); } if(empty($firm)) { echo('
“Enter your firm name”
'."\n"); } if(empty($email)) { echo('
“Enter your email address”
'."\n"); } if(empty($practice)) { echo('
“Enter your prefferred area of practice”
'."\n"); } if(empty($language)) { echo('
“Enter your Languages including Sign Language”
'."\n"); } if(empty($experience)) { echo('
“Enter your experience or training in dealing with disability issues”
'."\n"); } if(empty($call)) { echo('
“Enter Date of Call to the Bar”
'."\n"); } if(empty($insured)) { echo('
“Enter Practicing Insured Status”
'."\n"); } if(empty($spamq)) { echo('
“'.$gb_randomq.'”
'."\n"); } echo('
'."\n"); } else { // Or the email doesn't seem to be properly formed or has illegal email characters if(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})", "$email")) { echo(' Results: '.$error_heading.'

Invalid Email Address: The email address you have submitted seems to be invalid. Using your “Back” button, please go back and check the address you entered. Please try not to worry, '.$i_or_we.' do respect your privacy.

'."\n"); // Anti-spam trap 1 } else if($trap1 !== "") { echo(' Results: '.$error_heading.'

Anti-Spam Trap 1 Field Populated: You populated a spam trap anti-spam input so you must be a spambot. Go away!

'."\n"); // Anti-spam trap 2 } else if($trap2 !== "") { echo(' Results: '.$error_heading.'

Anti-Spam Trap 2 Field Populated: You populated a spam trap anti-spam input that is meant to confuse automated spam-sending machines. If you accidently entered data in this field, using your “Back” button, please go back and remove it before submitting this form. Sorry for the confusion.

'."\n"); // Input length error tripping } else if(strlen($name) > 40 || strlen($email) > 40 || strlen($phone) > 30 || strlen($url) > 60 || strlen($gbcc) > 4) { echo(' Results: '.$error_heading.'

Input Maxlength Violation: Certain inputs have been populated beyond that which is allowed by the form. Therefore you must be trying to post remotely and are probably a spambot. Go away!

'."\n"); // Contact reason validation } else if(!in_array($reason, $gb_options)) { echo(' Results: '.$error_heading.'

Contact Reason Violation: You have tried to post a “Contact Reason” which doesn’t exist in '.$my_or_our.' menu. Therefore you must be trying to post remotely and are probably a spambot. Go away!

'."\n"); // Check the IP black list } else if(in_array($ip, $ip_blacklist)) { echo(' Results: '.$error_heading.'

Blacklisted IP Address: Sorry, but your IP address has been blocked. Perhaps you have abused your form submission privileges in the past. If you’ve sent spam to '.$me_or_us.' in the past, this could be the reason.

'."\n"); // Form value confirmation } else if($formid !== "GB".$form_id."") { echo(' Results: '.$error_heading.'

Form ID Value Mismatch: The submitted ID does not match registered ID of this form which means you’re trying to post remotely so this mean you must be a spambot. Go away!

'."\n"); // My long version of Jem's exploit killer } else if(preg_match($head_expl, $gb_email_header) || preg_match($inpt_expl, $name) || preg_match($inpt_expl, $email) || preg_match($inpt_expl, $phone) || preg_match($inpt_expl, $url) || preg_match($inpt_expl, $message)) { echo(' Results: '.$error_heading.'

Injection Exploit Detected: It seems that you’re possibly trying to apply a header or input injection exploit in '.$my_or_our.' form. If you are, please stop at once! If not, using your “Back” button, please go back and check to make sure you haven’t entered content-type, to:, bcc:, cc:, document.cookie, document.write, onclick, or onload in any of the form inputs. If you have and you’re trying to send a legitimate message, for security reasons, please find another way of communicating these terms.

'."\n"); // Let match the referrer to ensure it's sent from here and not elsewhere } else if($new_referrer !== $form_location) { echo(' Results: '.$error_heading.'

Referrer Missing or Mismatch: It looks like you’re trying to post remotely or you have blocked referrers on your user agent or browser. Using your “Back” button, please go back and try again or use '.$my_or_our.' regular email, '.$gb_email_address.', to circumvent Referrer Mismatch.

Attention Site Admin: Be sure to double check the last section in the form’s configuration file and edit accordingly. If “Form Location” is manually entered, make sure it matches the page URL exactly — as seen on your browser’s address bar. A misconfigured URL is typically the cause of this error.

'."\n"); // Anti-spam verification } else if($spamq !== "$gb_randoma") { echo(' Results: '.$error_heading.'

Anti-Spam Question/Answer Mismatch: The answer you supplied to the anti-spam question is incorrect. Using your “Back” button, please go back and try again or use '.$my_or_our.' regular email, '.$gb_email_address.', if having Anti-Spam question difficulty.

'."\n"); // And now let's see if the variable for submit matches what's required } else if(!(isset($_POST[''.$send_value.'']))) { echo(' Results: '.$error_heading.'

Submit Variable Mismatch: It looks like you’re trying to post remotely as the submit variable is unmatched. Using your “Back” button, please go back and try again or try '.$my_or_our.' regular email, '.$gb_email_address.', to circumvent Variable Mismatch.

'."\n"); // Holy smokes, looks like all's cool and we can send the message } else { $gb_content = "Results from $gb_contact_name,\n\nFrom the $gb_website_name page by $name. Please forward to appropriate coordinator/director so we may follow up with $name:\n\n Email: $email $cc_notify2\n Phone: $phone\n Fax: $fax\n Website: $url\n Street: $address1\n Suite/Unit: $address2\n City: $city\n Province: $prov\n Postal Code: $code\n Area of Practice: $practice\n Languages: $language\n Experienced in Disability Issues: $experience\n Date called to the Bar: $call\n Practicing Insured Status: $insured\n Interested in Pro-Bono work: $pro\n Interested in Community Outreach: $coi\n Interested in Plain Language Legislation: $pll\n Reason: $reason\n\nMessage:\n $message\n\n\n--------------------------\nOther Data and Information:\n IP Address: $ip\n Time Stamp: $ltd\n Referrer: $hr\n Host: $hst\n User Agent: $ua\n"; $gb_ccmail = "Hello $name,\n\nThis is a copy of the email you sent to $gb_website_name. If appropriate to your message, you should receive a response quickly. You successfully sent the following information:\n\n Email: $email $cc_notify2\n Phone: $phone\n Fax: $fax\n Website: $url\n Street: $address1\n Suite/Unit: $address2\n City: $city\n Province: $prov\n Postal Code: $code\n Area of Practice: $practice\n Languages: $language\n Experienced in Disability Issues: $experience\n Date called to the Bar: $call\n Practicing Insured Status: $insured\n Interested in Pro-Bono work: $pro\n Interested in Community Outreach: $coi\n Interested in Plain Language Legislation: $pll\n Reason: $reason\n\nMessage:\n $message\n\n\n--------------------------\nOther Data and Information:\n Time Stamp: $ltd\n\n"; // Remove tags and slashes from content-including header then trim it again $gb_content = stripslashes(strip_tags(trim($gb_content))); $gb_ccmail = stripslashes(strip_tags(trim($gb_ccmail))); // The mail function helps, let's send this stuff mail("$gb_email_address", "[$gb_website_name] From $name", $gb_content, $gb_email_header); if($gb_cc !== "") { mail("$gb_cc", "[Copy] Email sent to $gb_website_name", $gb_ccmail, $gb_email_header); } // And let's inform the user and show them what they sent echo(' Results: '.$success_heading.' [ Reset Form ]

Message Sent: Thank You! '.$name.'. You have successfully sent a message to reachAbility.

If appropriate to your message, '.$i_or_we.' will get back to you shortly. You submitted the following information:

Message:

'.$message.'

—'.$name.'

Time Stamp:
Form Submitted: '.$ltd.'
'."\n"); } } } else { // No errors so far? No successes so far? No confirmation? Hmm. Maybe the user needs a contact form ?> class="main_formhead"> Form Warning! It seems that the PHP mail() function isn’t enabled on your server. Sorry, but to use this plugin this function must be enabled. Please contact your web hosting provider to ask if they will enable this function for your domain. Optionally, should your web hosting provider deny your request, you may want to try this PHP Email Protector script.

'); } ?>
#results">
Use this form to contact Privacy ]'); } else { echo(''); } ?>
*Required contact info:

Optional contact info:


*Required: Experience info:
*Required: Experience or training in dealing with disability issues?:
*Required: Date of Call to the Bar:
* Practicing Insured Status?
Does Pro Bono Legal Services interest you?:

Pro Bono Legal Services for clients with disability related problems (Please note individual lawyers are requested to provide services of up to three hours, on a pro bono basis, any commitment beyond that time is a matter between you and the client.)


Does Community Outreach Initiative interest you?:

Community Outreach Initiative (reachAbility organizes information sessions for schools, agencies and other organizations, where a lawyer will speak with them on a specific disability-related legal issue.)


Does Plain Language Legislation Initiative interest you?:

Plain Language Legislation Initiative - reachAbility invites those with education and experience in Law to assist in translating legislation pertaining to persons with disabilities into verbiage that more easily understood by the public.

Contact reason:
Comments area:
Required anti-spam question: >
>
Thanks for contacting . We appreciate your feedback. Check this box if you want a carbon copy of this email.'.$x_or_h_br.''."\n"); } else { echo(''."\n"); } ?> > Secure and Accessible PHP Contact Form '.$form_version.' by Mike Cherim.

'."\n"); } else { echo(' '."\n"); } ?>
'."\n"); //Include HTML require_once("html_bot.inc"); ########################################################## ?>