/**
* Message and Spam Filter Plugin - Spam Options
*
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright 1999-2012 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
*/
/**
- * Path for SquirrelMail required files.
- * @ignore
+ * Include the SquirrelMail initialization file.
*/
-define('SM_PATH','../../');
+require('../../include/init.php');
-/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
-include_once(SM_PATH . 'functions/imap.php');
+include_once(SM_PATH . 'functions/imap_general.php');
+include_once(SM_PATH . 'functions/imap_messages.php');
include_once(SM_PATH . 'plugins/filters/filters.php');
/* get globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('action', $action, SQ_GET);
/* end globals */
-displayPageHeader($color, 'None');
+displayPageHeader($color);
if (sqgetGlobalVar('spam_submit',$spam_submit,SQ_POST)) {
$spam_filters = load_spam_filters();
if (isset($action) && $action == 'spam') {
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+ $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
$boxes = sqimap_mailbox_list($imapConnection);
sqimap_logout($imapConnection);
$numboxes = count($boxes);
echo '</table>';
}
?>
-</body></html>
\ No newline at end of file
+</body></html>