X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fspamcop%2Fspamcop.php;h=c7b1397c6d20b988fe47a28f8d45d2f9c0dbfe49;hp=6139a097982b803749fcae55c37b12d3d0d126e1;hb=ea5f4b8eaf805c4cc4e9533e87d057300a7fe666;hpb=76911253eb850bacde3d86c8cb7b4af072e67ebe;ds=sidebyside diff --git a/plugins/spamcop/spamcop.php b/plugins/spamcop/spamcop.php index 6139a097..c7b1397c 100644 --- a/plugins/spamcop/spamcop.php +++ b/plugins/spamcop/spamcop.php @@ -5,9 +5,12 @@ ** Copyright (c) 1999-2003 The SquirrelMail development team ** Licensed under the GNU GPL. For full terms see the file COPYING. ** - ** $Id$ + ** $Id$ + * @package plugins + * @subpackage spamcop **/ +/** @ignore */ define('SM_PATH','../../'); /* SquirrelMail required files. */ @@ -30,7 +33,7 @@ function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id, TRUE, $response, $readmessage, $uid_support); $message = $message->parent; } - if ($response = 'OK') { + if ($response == 'OK') { $subject = encodeHeader($message->rfc822_header->subject); array_shift($body_a); $body = implode('', $body_a) . "\r\n"; @@ -55,33 +58,29 @@ function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id, } - /* GLOBALS */ - $username = $_SESSION['username']; - $key = $_COOKIE['key']; - $onetimepad = $_SESSION['onetimepad']; - $mailbox = $_GET['mailbox']; - $passed_id = $_GET['passed_id']; - if (isset($_GET['startMessage'])) { - $startMessage = $_GET['startMessage']; - } else { - $startMessage = 1; - } - if (isset($_GET['passed_ent_id'])) { - $passed_ent_id = $_GET['passed_ent_id']; - } else { - $passed_ent_id = ''; - } - if ( isset($_SESSION['compose_messages']) ) { - $compose_messages = &$_SESSION['compose_messages']; - } +/* GLOBALS */ - if ( isset($_SESSION['composesession']) ) { - $composesession = $_SESSION['composesession']; - } else { - $composesession = 0; - sqsession_register($composesession, 'composesession'); - } - /* END GLOBALS */ +sqgetGlobalVar('username', $username, SQ_SESSION); +sqgetGlobalVar('key', $key, SQ_COOKIE); +sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); + +sqgetGlobalVar('mailbox', $mailbox, SQ_GET); +sqgetGlobalVar('passed_id', $passed_id, SQ_GET); + +if (! sqgetGlobalVar('startMessage', $startMessage, SQ_GET) ) { + $startMessage = 1; +} +if (! sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) { + $passed_ent_id = ''; +} + +sqgetGlobalVar('compose_messages', $compose_messages, SQ_SESSION); + +if(! sqgetGlobalVar('composesession', $composesession, SQ_SESSION) ) { + $composesession = 0; + sqsession_register($composesession, 'composesession'); +} +/* END GLOBALS */ displayPageHeader($color, $mailbox); @@ -126,33 +125,31 @@ function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id, $HowItLooks .= '<' . $em . '>'; } -?> -

Sending this spam report will give you back a reply with URLs that you -can click on to properly report this spam message to the proper authorities. -This is a free service. By pressing the "Send Spam Report" button, you -agree to follow SpamCop's rules/terms of service/etc.

+echo "

"; +echo _("Sending this spam report will give you back a reply with URLs that you can click on to properly report this spam message to the proper authorities. This is a free service. By pressing the \"Send Spam Report\" button, you agree to follow SpamCop's rules/terms of service/etc."); +echo "

"; + +?> - +
- -
+
- + - - - + ?> + + +
+ else $report_email = 'quick.' . $spamcop_id . '@spam.spamcop.net'; $form_action = SM_PATH . 'src/compose.php'; -?>
- - - - - - - - - +?> + + + + + + + 50000) { + if (strlen($spam_message) == 50000) { $Warning = "\n[truncated by SpamCop]\n"; - $Message = substr($Message, 0, 50000 - strlen($Warning)) . $Warning; + $spam_message = substr($spam_message, 0, 50000 - strlen($Warning)) . $Warning; } if (isset($js_web) && $js_web) { -?> - - - - - + + + + +