X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Finfo%2Foptions.php;h=d09ee6cd9528df10e40e2c4236c079cbc7452822;hp=2c0a64b08d48fc7d9dede9279970b2ac260523b2;hb=3ba5c6063eb9282838b862d4f206266d0034e905;hpb=3f6dd931c687028827bd0c17148628603de5c6d7 diff --git a/plugins/info/options.php b/plugins/info/options.php index 2c0a64b0..d09ee6cd 100644 --- a/plugins/info/options.php +++ b/plugins/info/options.php @@ -6,26 +6,27 @@ * This is where it all happens :) * * @author Jason Munro - * @copyright © 1999-2005 The SquirrelMail Project Team + * @copyright © 1999-2007 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins * @subpackage info */ -/** @ignore */ -define('SM_PATH','../../'); +/** + * Path for SquirrelMail required files. + * @ignore + */ +require('../../include/init.php'); /* SquirrelMail required files. */ -require_once(SM_PATH . 'include/validate.php'); -require_once(SM_PATH . 'functions/page_header.php'); -require_once(SM_PATH . 'functions/imap.php'); +require_once(SM_PATH . 'functions/imap_general.php'); require_once(SM_PATH . 'functions/forms.php'); require_once(SM_PATH . 'plugins/info/functions.php'); global $username, $color, $folder_prefix, $default_charset; $default_charset = strtoupper($default_charset); -displayPageHeader($color, 'None'); +displayPageHeader($color); $mailbox = 'INBOX'; /** @@ -34,16 +35,13 @@ $mailbox = 'INBOX'; * prevent use of plugin if it is not enabled */ if (! is_plugin_enabled('info')) { - error_box(_("Plugin is disabled."),$color); - echo ''; + error_box(_("Plugin is disabled.")); + // display footer (closes html) and stop script execution + $oTemplate->display('footer.tpl'); exit; } /* GLOBALS */ -sqgetGlobalVar('username', $username, SQ_SESSION); -sqgetGlobalVar('key', $key, SQ_COOKIE); -sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); - sqgetGlobalVar('submit', $submit, SQ_POST); for($i = 0; $i <= 9; $i++){ @@ -55,7 +53,7 @@ for($i = 0; $i <= 9; $i++){ /* END GLOBALS */ -$imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); +$imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0); $caps_array = get_caps($imap_stream); $list = array ('TEST_0', 'TEST_1', @@ -68,10 +66,10 @@ $list = array ('TEST_0', 'TEST_8', 'TEST_9'); -echo '
'._("IMAP server information")."

\n". - '
'. +echo '
'._("IMAP server information")."

\n". + '
'. '

\n". - '
\n". + '
\n". '
'. _("Server Capability response:"). "
\n"; @@ -98,7 +96,7 @@ else { 'default_charset = '.htmlspecialchars($default_charset)."\n"; } -echo "

\n"; +echo "

\n"; if ($submit == 'submit') { @@ -129,7 +127,7 @@ elseif (!$submit || $submit == 'default') { } echo "
\n". - "
\n". + "
\n". '\n". @@ -148,12 +146,12 @@ foreach($type as $index=>$value) { addInput($index, $value, 60); } -echo "
'. _("Select"). ''._("Test Name"). ''._("IMAP command string")."

\n". - '
'. +echo "
\n". + '
'. addSubmit('submit','submit'). - addSubmit('clear','submit'). - addSubmit('default','submit'). - "

\n"; + addSubmit('clear','submit',array('id'=>'clear')). + addSubmit('default','submit',array('id'=>'default')). + "
\n"; $tests = array(); @@ -172,7 +170,7 @@ if ($submit == 'submit') { $starttime = (float)$sec + (float)$usec; } - echo '
\n". + echo '
\n". '\n". '\n"; @@ -194,10 +192,10 @@ if ($submit == 'submit') { '\n"; } - echo "
'.$tests[$i]."
'. _("Request:")."
'.sprintf(_("%s ms"),round((($endtime - $starttime)*1000),3))."

\n"; + echo "
\n"; } } -echo '
'; +echo ''; sqimap_logout($imap_stream); /** @@ -205,6 +203,6 @@ sqimap_logout($imap_stream); * * Hook allows attaching plugin to bottom of info plugin */ -do_hook('info_bottom'); +do_hook('info_bottom', $null); ?> - \ No newline at end of file +