projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The copyright symbol isn't really needed since the word "copyright" is there. Also...
[squirrelmail.git]
/
plugins
/
info
/
options.php
diff --git
a/plugins/info/options.php
b/plugins/info/options.php
index a1bf81d8ec02d2491179bdfd02fe553e71a5b026..6739ddb7b42c3c4231b2f01a923eff197d6f6dff 100644
(file)
--- a/
plugins/info/options.php
+++ b/
plugins/info/options.php
@@
-6,26
+6,27
@@
* This is where it all happens :)
*
* @author Jason Munro <jason at stdbev.com>
* This is where it all happens :)
*
* @author Jason Munro <jason at stdbev.com>
- * @copyright
© 1999-2006
The SquirrelMail Project Team
+ * @copyright
1999-2009
The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
* @subpackage info
*/
* @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. */
/* 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);
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';
/**
$mailbox = 'INBOX';
/**
@@
-34,16
+35,13
@@
$mailbox = 'INBOX';
* prevent use of plugin if it is not enabled
*/
if (! is_plugin_enabled('info')) {
* prevent use of plugin if it is not enabled
*/
if (! is_plugin_enabled('info')) {
- error_box(_("Plugin is disabled."),$color);
- echo '</body></html>';
+ error_box(_("Plugin is disabled."));
+ // display footer (closes html) and stop script execution
+ $oTemplate->display('footer.tpl');
exit;
}
/* GLOBALS */
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++){
sqgetGlobalVar('submit', $submit, SQ_POST);
for($i = 0; $i <= 9; $i++){
@@
-55,7
+53,7
@@
for($i = 0; $i <= 9; $i++){
/* END GLOBALS */
/* 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',
$caps_array = get_caps($imap_stream);
$list = array ('TEST_0',
'TEST_1',
@@
-68,10
+66,10
@@
$list = array ('TEST_0',
'TEST_8',
'TEST_9');
'TEST_8',
'TEST_9');
-echo '<br /><
center><b>'._("IMAP server information")."</b></center
><br />\n".
- '<
center><table bgcolor="'.$color[3].'" width="100%
" border="1" cellpadding="2">'.
+echo '<br /><
div style="text-align: center;"><b>'._("IMAP server information")."</b></div
><br />\n".
+ '<
table bgcolor="'.$color[3].'" width="100%" align="center
" border="1" cellpadding="2">'.
'<tr><td bgcolor="'.$color[3]."\"><br />\n".
'<tr><td bgcolor="'.$color[3]."\"><br />\n".
- '<
center><table width="95%
" border="1" bgcolor="'.$color[3]."\">\n".
+ '<
table width="95%" align="center
" border="1" bgcolor="'.$color[3]."\">\n".
'<tr><td bgcolor="'.$color[4].'"><b>'.
_("Server Capability response:").
"</b><br />\n";
'<tr><td bgcolor="'.$color[4].'"><b>'.
_("Server Capability response:").
"</b><br />\n";
@@
-98,7
+96,7
@@
else {
'default_charset = '.htmlspecialchars($default_charset)."\n";
}
'default_charset = '.htmlspecialchars($default_charset)."\n";
}
-echo "<br /></td></tr></table><
/center><
br />\n";
+echo "<br /></td></tr></table><br />\n";
if ($submit == 'submit') {
if ($submit == 'submit') {
@@
-129,7
+127,7
@@
elseif (!$submit || $submit == 'default') {
}
echo "<form action=\"options.php\" method=\"post\">\n".
}
echo "<form action=\"options.php\" method=\"post\">\n".
- "<
center><table border=\"1
\">\n".
+ "<
table border=\"1\" align=\"center
\">\n".
'<tr><th>'. _("Select").
'</th><th>'._("Test Name").
'</th><th>'._("IMAP command string")."</th></tr>\n".
'<tr><th>'. _("Select").
'</th><th>'._("Test Name").
'</th><th>'._("IMAP command string")."</th></tr>\n".
@@
-148,12
+146,12
@@
foreach($type as $index=>$value) {
addInput($index, $value, 60);
}
addInput($index, $value, 60);
}
-echo "</td></tr></table><
/center><
br />\n".
- '<
center
>'.
+echo "</td></tr></table><br />\n".
+ '<
div style="text-align: center;"
>'.
addSubmit('submit','submit').
addSubmit('submit','submit').
- addSubmit('clear','submit').
- addSubmit('default','submit').
- "</
center
><br /></form>\n";
+ addSubmit('clear','submit'
,array('id'=>'clear')
).
+ addSubmit('default','submit'
,array('id'=>'default')
).
+ "</
div
><br /></form>\n";
$tests = array();
$tests = array();
@@
-172,7
+170,7
@@
if ($submit == 'submit') {
$starttime = (float)$sec + (float)$usec;
}
$starttime = (float)$sec + (float)$usec;
}
- echo '<
center><table width="95%
" border="0" bgcolor="'.$color[4]."\">\n".
+ echo '<
table width="95%" align="center
" border="0" bgcolor="'.$color[4]."\">\n".
'<tr><td><b>'.$tests[$i]."</b></td></tr>\n".
'<tr><td><small><b><font color="'.$color[7].'">'.
_("Request:")."</font></b></small></td></tr>\n";
'<tr><td><b>'.$tests[$i]."</b></td></tr>\n".
'<tr><td><small><b><font color="'.$color[7].'">'.
_("Request:")."</font></b></small></td></tr>\n";
@@
-194,10
+192,10
@@
if ($submit == 'submit') {
'<tr><td>'.sprintf(_("%s ms"),round((($endtime - $starttime)*1000),3))."</td></tr>\n";
}
'<tr><td>'.sprintf(_("%s ms"),round((($endtime - $starttime)*1000),3))."</td></tr>\n";
}
- echo "</table><
/center><
br />\n";
+ echo "</table><br />\n";
}
}
}
}
-echo '</td></tr></table>
</center>
';
+echo '</td></tr></table>';
sqimap_logout($imap_stream);
/**
sqimap_logout($imap_stream);
/**
@@
-205,6
+203,6
@@
sqimap_logout($imap_stream);
*
* Hook allows attaching plugin to bottom of info plugin
*/
*
* Hook allows attaching plugin to bottom of info plugin
*/
-do_hook('info_bottom');
+do_hook('info_bottom'
, $null
);
?>
?>
-</body></html>
\ No newline at end of file
+</body></html>