X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fspamcop%2Fspamcop.php;h=83f57230348b034b0c5f8a36e424422f4bc5bb97;hb=0f610dca6fd52a148e290f79cdfcfc572998b475;hp=704b61ef57f02c5982ba1da24759aaec64d6b290;hpb=9538cd4c6f9026a3bd661a2fd8a029e3b9152ad6;p=squirrelmail.git diff --git a/plugins/spamcop/spamcop.php b/plugins/spamcop/spamcop.php index 704b61ef..83f57230 100644 --- a/plugins/spamcop/spamcop.php +++ b/plugins/spamcop/spamcop.php @@ -1,37 +1,42 @@ parent; } - if ($response = 'OK') { - $subject = encodeHeader($message->rfc822_header->subject); + if ($response == 'OK') { array_shift($body_a); $body = implode('', $body_a) . "\r\n"; @@ -55,36 +60,42 @@ 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); - - displayPageHeader($color, $mailbox); +sqgetGlobalVar('mailbox', $mailbox, SQ_GET); +sqgetGlobalVar('passed_id', $passed_id, SQ_GET); +sqgetGlobalVar('js_web', $js_web, SQ_GET); + +if (! sqgetGlobalVar('startMessage', $startMessage, SQ_GET) ) { + $startMessage = 1; +} +if (! sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) { + $passed_ent_id = 0; +} +if (! sqgetGlobalVar('js_web', $js_web, SQ_GET) ) { + $js_web = 0; +} + +sqgetGlobalVar('compose_messages', $compose_messages, SQ_SESSION); + +if(! sqgetGlobalVar('composesession', $composesession, SQ_SESSION) ) { + $composesession = 0; + sqsession_register($composesession, 'composesession'); +} +/* END GLOBALS */ + +// js_web variable is 1 only when link opens web based report page in new window +// and in new window menu line or extra javascript code is not needed. +if ($js_web) { + displayHTMLHeader(_("SpamCop reporting")); + echo "
\n"; +} else { + displayPageHeader($color,$mailbox); +} $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); @@ -113,7 +124,7 @@ function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id, $message = sqimap_get_message($imap_stream, $passed_id, $mailbox); $composeMessage = getMessage_RFC822_Attachment($message, $composeMessage, $passed_id, - $passed_ent_id='', $imap_stream); + $passed_ent_id, $imap_stream); $compose_messages[$session] = $composeMessage; sqsession_register($compose_messages, 'compose_messages'); @@ -126,82 +137,74 @@ 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 "
"; + +?> -- | -- + |