From af9600cf5d74085d6d25f1999432d3a31db7701f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=A4nzer?= Date: Tue, 16 Oct 2012 22:27:42 +0200 Subject: Source code taken from cacert-20121013.tar.bz2 --- includes/mysql.php.sample | 2 +- pages/account/40.php | 14 ++------------ pages/index/11.php | 4 ++-- www/account.php | 2 +- www/wot.php | 32 ++++++++++++++++++++++++++++++-- 5 files changed, 36 insertions(+), 18 deletions(-) diff --git a/includes/mysql.php.sample b/includes/mysql.php.sample index ff5cfc3..eb86401 100644 --- a/includes/mysql.php.sample +++ b/includes/mysql.php.sample @@ -28,7 +28,7 @@ function sendmail($to, $subject, $message, $from, $replyto = "", $toname = "", $fromname = "", $errorsto = "returns@cacert.org", $extra="") { - $lines = explode('\n', $message); + $lines = explode("\n", $message); $message = ""; foreach($lines as $line) { diff --git a/pages/account/40.php b/pages/account/40.php index fa0c52f..b1a7fdb 100644 --- a/pages/account/40.php +++ b/pages/account/40.php @@ -19,15 +19,6 @@ if(!array_key_exists('secrethash',$_SESSION['_config'])) $_SESSION['_config']['s ?>

-

support@cacert.org" - ) ?> -

- -

@@ -36,7 +27,7 @@ if(!array_key_exists('secrethash',$_SESSION['_config'])) $_SESSION['_config']['s

-
+ @@ -61,7 +52,7 @@ if(!array_key_exists('secrethash',$_SESSION['_config'])) $_SESSION['_config']['s

- + @@ -98,4 +89,3 @@ Australia

document.form2.secrethash2.value = pagehash; --> -*/ diff --git a/pages/index/11.php b/pages/index/11.php index 8391903..60c8941 100644 --- a/pages/index/11.php +++ b/pages/index/11.php @@ -27,7 +27,7 @@ if(!array_key_exists('secrethash',$_SESSION['_config'])) $_SESSION['_config']['s

- + @@ -52,7 +52,7 @@ if(!array_key_exists('secrethash',$_SESSION['_config'])) $_SESSION['_config']['s

- +
diff --git a/www/account.php b/www/account.php index d1dd695..0b32c2c 100644 --- a/www/account.php +++ b/www/account.php @@ -47,7 +47,7 @@ $message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message; - sendmail("cacert-support@lists.cacert.org, $email", "[website form email]: ".$subject, $message, "website-form@cacert.org", "cacert-support@lists.cacert.org, $email", "", "CAcert Website"); + 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."); diff --git a/www/wot.php b/www/wot.php index bf5d301..2878534 100644 --- a/www/wot.php +++ b/www/wot.php @@ -442,8 +442,36 @@ $iecho= "c"; where `to`='".$user['id']."' group by `to` HAVING SUM(`points`) > 0")); if($points > 0) { - sendmail($user['email'], "[CAcert.org] ".$_REQUEST['subject'], $_REQUEST['message'], - $_SESSION['profile']['email'], "", "", $_SESSION['profile']['fname']." ".$_SESSION['profile']['lname']); + $my_translation = L10n::get_translation(); + L10n::set_translation($user['language']); + + $subject = "[CAcert.org] ".sprintf(_("Message from %s"), + $_SESSION['profile']['fname']); + + $body = sprintf(_("Hi %s,"), $user['fname'])."\n\n"; + $body .= sprintf(_("%s %s has sent you a message via the ". + "contact an Assurer form on CAcert.org."), + $_SESSION['profile']['fname'], + $_SESSION['profile']['lname'])."\n\n"; + $body .= sprintf(_("Subject: %s"), $_REQUEST['subject'])."\n"; + $body .= _("Message:")."\n"; + $body .= $_REQUEST['message']."\n\n"; + $body .= "------------------------------------------------\n\n"; + $body .= _("Please note, that this is NOT a message on behalf ". + "of CAcert but another CAcert community member. If ". + "you suspect that the contact form might have been ". + "abused, please write to support@cacert.org")."\n\n"; + $body .= _("Best regards")."\n"; + $body .= _("Your CAcert Community"); + + sendmail($user['email'], $subject, $body, + $_SESSION['profile']['email'], //from + "", //replyto + "", //toname + $_SESSION['profile']['fname']." ". + $_SESSION['profile']['lname']); //fromname + + L10n::set_translation($my_translation); showheader(_("My CAcert.org Account!"));?>

-- cgit v1.2.1