X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Finfo%2Foptions.php;h=e18ea2ffe9eea8c5efa9f7badf07b763e3bf36c7;hp=0578ffca419b833be9cfc279167c67eb43f8101e;hb=b11fe0462e9ecdb480ffa02d0ba9cd546140ab6f;hpb=a7b90f05ac8a08954d355b96ab133ddaa2690221 diff --git a/plugins/info/options.php b/plugins/info/options.php index 0578ffca..e18ea2ff 100644 --- a/plugins/info/options.php +++ b/plugins/info/options.php @@ -1,25 +1,60 @@ "; + echo _("Plugin is disabled."); + echo "

"; + 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++){ + $varc = 'CHECK_TEST_'.$i; + sqgetGlobalVar($varc, $$varc, SQ_POST); + $vart = 'TEST_'.$i; + sqgetGlobalVar($vart, $$vart, SQ_POST); +} + +/* END GLOBALS */ + $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $caps_array = get_caps($imap_stream); $list = array ( @@ -34,29 +69,39 @@ $list = array ( 'TEST_8', 'TEST_9'); -print "
IMAP server information

\n"; -print "

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

\n"; +print "
"; +print "

\n"; +print "
\n"; +print "
"; +echo _("Server Capability response:"); +print "
\n"; foreach($caps_array[0] as $value) { - print $value; + print htmlspecialchars($value); } -print "
\n"; +print "
\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"; + print "

"; + 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."); + echo "

\n"; + echo "

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


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

\n"; +print "

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

\n"; -print "
\n"; -print "\n"; -print "

\n"; +print "

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

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

\n"; + print "

\n"; } } - print "
"; + print ""; 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'); ?> + \ No newline at end of file