From 416d776e7243a942b21151cc503ab44830dec6ca Mon Sep 17 00:00:00 2001 From: INOPIAE Date: Wed, 12 Dec 2012 00:29:01 +0100 Subject: bug 792:layout in forms, code in www/account.php --- pages/account/40.php | 6 +++--- pages/index/11.php | 4 ++-- www/account.php | 43 ++++++++++++++++++++++--------------------- www/index.php | 1 - 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/pages/account/40.php b/pages/account/40.php index 04d628e..ad78697 100644 --- a/pages/account/40.php +++ b/pages/account/40.php @@ -27,7 +27,7 @@ if(!array_key_exists('secrethash',$_SESSION['_config'])) $_SESSION['_config']['s

-
+ @@ -42,8 +42,8 @@ if(!array_key_exists('secrethash',$_SESSION['_config'])) $_SESSION['_config']['s : - - + + "> diff --git a/pages/index/11.php b/pages/index/11.php index 95488b7..8a52c10 100644 --- a/pages/index/11.php +++ b/pages/index/11.php @@ -42,8 +42,8 @@ if(!array_key_exists('secrethash',$_SESSION['_config'])) $_SESSION['_config']['s : - - + + "> 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."); -- cgit v1.2.1