diff options
author | INOPIAE <inopiae@cacert.org> | 2012-12-08 06:49:43 +0100 |
---|---|---|
committer | INOPIAE <inopiae@cacert.org> | 2012-12-08 06:49:43 +0100 |
commit | 31ce1742e5f4137878ce931c3b5ad3da726a62df (patch) | |
tree | 04f4b7c5fd7d370e6d7a34b2a90753d0852898ee /www | |
parent | 7baaa9a0ac611329539a43031ca3d0e81bba2b5f (diff) | |
download | cacert-devel-31ce1742e5f4137878ce931c3b5ad3da726a62df.tar.gz cacert-devel-31ce1742e5f4137878ce931c3b5ad3da726a62df.tar.xz cacert-devel-31ce1742e5f4137878ce931c3b5ad3da726a62df.zip |
bug 795: Changed contact form to just one form with two different send buttons and added a hidden field robotest for honeypot.
in styles/default.css a new style ".robotic" is added for the robotest
Diffstat (limited to 'www')
-rw-r--r-- | www/index.php | 43 | ||||
-rw-r--r-- | www/styles/default.css | 4 |
2 files changed, 28 insertions, 19 deletions
diff --git a/www/index.php b/www/index.php index 41b6d7a..4d2e774 100644 --- a/www/index.php +++ b/www/index.php @@ -563,7 +563,14 @@ require_once('../includes/lib/l10n.php'); $subject = stripslashes($_REQUEST['subject']); $message = stripslashes($_REQUEST['message']); $secrethash = $_REQUEST['secrethash2']; - + $robotest = $_REQUEST['robotest']; + + //check for spam via honeypot + if ($robotest!=""){ + + + } + if($_SESSION['_config']['secrethash'] != $secrethash || $secrethash == "" || $_SESSION['_config']['secrethash'] == "") { $id = $oldid; @@ -603,26 +610,24 @@ require_once('../includes/lib/l10n.php'); } } - if($oldid == 11 && $process != "" && $_REQUEST['support'] != "yes") - { - $message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message; - - sendmail("support@cacert.org", "[CAcert.org] ".$subject, $message, $email, "", "", "CAcert Support"); - showheader(_("Welcome to CAcert.org")); - echo _("Your message has been sent."); - showfooter(); - exit; - } - - if($oldid == 11 && $process != "" && $_REQUEST['support'] == "yes") + if($oldid == 11 && $process != "") { $message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message; - - sendmail("cacert-support@lists.cacert.org", "[website form email]: ".$subject, $message, "website-form@cacert.org", "cacert-support@lists.cacert.org, $email", "", "CAcert-Website"); - showheader(_("Welcome to CAcert.org")); - echo _("Your message has been sent to the general support list."); - showfooter(); - exit; + if (isset($process[0])){ + $message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message; + sendmail("cacert-support@lists.cacert.org", "[website form email]: ".$subject, $message, "website-form@cacert.org", "cacert-support@lists.cacert.org, $email", "", "CAcert-Website"); + showheader(_("Welcome to CAcert.org")); + echo _("Your message has been sent to the general support list."); + showfooter(); + exit; + } + if (isset($process[1])){ + sendmail("support@cacert.org", "[CAcert.org] ".$subject, $message, $email, "", "", "CAcert Support"); + showheader(_("Welcome to CAcert.org")); + echo _("Your message has been sent."); + showfooter(); + exit; + } } if(!array_key_exists('signup',$_SESSION) || $_SESSION['signup']['year'] < 1900) diff --git a/www/styles/default.css b/www/styles/default.css index 9fdd85c..c97e429 100644 --- a/www/styles/default.css +++ b/www/styles/default.css @@ -651,3 +651,7 @@ div.footerbar { padding: 10px 10px 10px 10px; } +/************ Honeypot ***********/ + +.robotic { display: none; } + |