X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Finfo%2Foptions.php;h=3295c1c7e23073f4e82a6f8ede705fd44415659a;hp=fc78d8d066040471d951d92d4731c731b77908e1;hb=01c372f1c182a45c71fdaa1dfc205641a0870025;hpb=a9e1e670fab4399260e0790e018393c7dcefcecc diff --git a/plugins/info/options.php b/plugins/info/options.php index fc78d8d0..3295c1c7 100644 --- a/plugins/info/options.php +++ b/plugins/info/options.php @@ -1,16 +1,13 @@ -'. + _("Plugin is disabled."). + '

'; + exit; +} + /* GLOBALS */ -sqgetGlobalVar('username', $username, SQ_SESSION); -sqgetGlobalVar('key', $key, SQ_COOKIE); -sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); +sqgetGlobalVar('username', $username, SQ_SESSION); +sqgetGlobalVar('key', $key, SQ_COOKIE); +sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); sqgetGlobalVar('submit', $submit, SQ_POST); @@ -48,8 +57,7 @@ for($i = 0; $i <= 9; $i++){ $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $caps_array = get_caps($imap_stream); -$list = array ( - 'TEST_0', +$list = array ('TEST_0', 'TEST_1', 'TEST_2', 'TEST_3', @@ -60,35 +68,37 @@ $list = array ( 'TEST_8', 'TEST_9'); -print "
IMAP server information

\n"; -print "

\n"; -print "
\n"; -print "
Server Capability response:
\n"; +echo '
'._("IMAP server information")."

\n". + '
'. + '

\n". + '
\n". + '
'. + _("Server Capability response:"). + "
\n"; foreach($caps_array[0] as $value) { - print htmlspecialchars($value); + echo htmlspecialchars($value); } -print "
\n"; +echo "
\n"; if (!isset($submit) || $submit == 'default') { - print "
Select the IMAP commands you would like to run. - Most commands require a selected mailbox so the select command is already setup. - You can clear all the commands and test your own IMAP command strings. The commands are - executed in order. The default values are simple IMAP commands using your default_charset - and folder_prefix from SquirrelMail when needed.

-
NOTE: These commands are live, any changes made will effect your current - email account.

\n"; + echo '

'. + _("Select the IMAP commands you would like to run. Most commands require a selected mailbox so the select command is already setup. You can clear all the commands and test your own IMAP command strings. The commands are executed in order. The default values are simple IMAP commands using your default_charset and folder_prefix from SquirrelMail when needed."). + "

\n". + '

'. + _("NOTE: These commands are live, any changes made will effect your current email account."). + "


\n"; if (!isset($submit)) { $submit = ''; } } else { - print 'folder_prefix = ' . htmlspecialchars($folder_prefix)."
\n" . - 'default_charset = '.htmlspecialchars($default_charset)."\n"; + echo 'folder_prefix = ' . htmlspecialchars($folder_prefix)."
\n" . + 'default_charset = '.htmlspecialchars($default_charset)."\n"; } -print "

\n"; +echo "

\n"; if ($submit == 'submit') { @@ -118,30 +128,32 @@ elseif (!$submit || $submit == 'default') { 'TEST_9' => ""); } -print "
\n"; -print "
\n"; -print "\n"; -print "
SelectTest NameIMAP command string
\n"; +echo "\n". + "
\n". + '\n". + '\n
'. _("Select"). + ''._("Test Name"). + ''._("IMAP command string")."
'; foreach($type as $index=>$value) { - print "
\n$index\n"; - print addInput($index, $value, 60); + echo " />$index\n". + addInput($index, $value, 60); } -print "

\n"; -print "
". - addSubmit('submit','submit'). - addSubmit('clear','submit'). - addSubmit('default','submit'). - "

\n"; +echo "

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

\n"; $tests = array(); @@ -154,19 +166,26 @@ if ($submit == 'submit') { } } for ($i=0;$i\n"; - print ""; - print "\n"; $response = imap_test($imap_stream, $type[$tests[$i]]); - print "\n"; - print "
".$tests[$i]."
Request:
Response:
"; + echo '
\n". + '\n". + '\n". + '\n". + '
'.$tests[$i]."
'. + _("Request:")."
'. + _("Response:")."
'; print_response($response); - print "

\n"; + echo "

\n"; } } - print "
"; + echo '
'; sqimap_logout($imap_stream); - do_hook('info_bottom'); + +/** + * Optional hook in info plugin + * + * Hook allows attaching plugin to bottom of info plugin + */ +do_hook('info_bottom'); ?> +