diff options
author | INOPIAE <inopiae@cacert.org> | 2012-12-12 00:29:01 +0100 |
---|---|---|
committer | INOPIAE <inopiae@cacert.org> | 2012-12-12 00:29:01 +0100 |
commit | 416d776e7243a942b21151cc503ab44830dec6ca (patch) | |
tree | 5df21f92474c85d0565504769d3ac45c0d4e6ef4 /www | |
parent | eb10111cf01bbb864c67e21b2bb20701e49ad3ee (diff) | |
download | cacert-devel-416d776e7243a942b21151cc503ab44830dec6ca.tar.gz cacert-devel-416d776e7243a942b21151cc503ab44830dec6ca.tar.xz cacert-devel-416d776e7243a942b21151cc503ab44830dec6ca.zip |
bug 792:layout in forms, code in www/account.php
Diffstat (limited to 'www')
-rw-r--r-- | www/account.php | 43 | ||||
-rw-r--r-- | www/index.php | 1 |
2 files changed, 22 insertions, 22 deletions
diff --git a/www/account.php b/www/account.php index 0b32c2c..3f115e0 100644 --- a/www/account.php +++ b/www/account.php @@ -25,34 +25,35 @@ } else if($id == 19) { include_once("../pages/account/19.php"); exit; - } else if($oldid == 40 && $_REQUEST['process'] != "" && $_POST['support'] != "yes") { - $who = stripslashes($_REQUEST['who']); - $email = stripslashes($_REQUEST['email']); - $subject = stripslashes($_REQUEST['subject']); - $message = stripslashes($_REQUEST['message']); - - $message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message; - - sendmail("support@cacert.org", "[CAcert.org] ".$subject, $message, $email, $email, "", "CAcert Website"); - showheader(_("Welcome to CAcert.org")); - echo _("Your message has been sent."); - showfooter(); - exit; - } else if($oldid == 40 && $_REQUEST['process'] != "" && $_POST['support'] == "yes") { + } else if($oldid == 40 && $_REQUEST['process'] != "") { $who = stripslashes($_REQUEST['who']); $email = stripslashes($_REQUEST['email']); $subject = stripslashes($_REQUEST['subject']); $message = stripslashes($_REQUEST['message']); + //check for spam via honeypot + if(!isset($_REQUEST['robotest']) || !empty($_REQUEST['robotest'])){ + echo _("Form could not be send."); + showfooter(); + exit; + } - $message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message; + $message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message; + if (isset($process[0])){ + 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; + } - 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; } else if($id == 51 && $_GET['img'] == "show") { $query = "select * from `tverify` where `id`='".intval($_GET['photoid'])."' and `modified`=0"; $res = mysql_query($query); diff --git a/www/index.php b/www/index.php index f203d61..3cddb47 100644 --- a/www/index.php +++ b/www/index.php @@ -614,7 +614,6 @@ require_once('../includes/lib/l10n.php'); { $message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message; 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."); |