using squirrelmail api for error message
[squirrelmail.git] / plugins / info / options.php
index 57528633192ee334071a809a17d12da4e20d8824..4f233ebf83a1a51c75f936624528467218e6df70 100644 (file)
@@ -4,7 +4,7 @@
  *
  * This is where it all happens :)
  *
- * @copyright (c) 1999-2004 The SquirrelMail Project Team
+ * @copyright (c) 1999-2005 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @author Jason Munro jason@stdbev.com
@@ -33,9 +33,8 @@ $mailbox = 'INBOX';
  * prevent use of plugin if it is not enabled
  */
 if (! is_plugin_enabled('info')) {
-    echo '<p align="center"><big>'.
-         _("Plugin is disabled.").
-         '</big></p></body></html>';
+    error_box(_("Plugin is disabled."),$color);
+    echo '</body></html>';
     exit;
 }
 
@@ -166,20 +165,21 @@ if ($submit == 'submit') {
         }
     }
     for ($i=0;$i<count($tests);$i++) {
-        $response = imap_test($imap_stream, $type[$tests[$i]]);
         echo '<center><table width="95%" 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><small><b><font color="'.$color[7].'">'.
+            _("Request:")."</font></b></small></td></tr>\n";
+        // imap_test function outputs imap command
+        $response = imap_test($imap_stream, $type[$tests[$i]]);
+        echo '<tr><td><small><b><font color="'.$color[7].'">'.
              _("Response:")."</font></b></small></td></tr>\n".
              '<tr><td>';
         print_response($response);
         echo "</td></tr></table></center><br />\n";
     }
 }
-    echo '</td></tr></table></center>';
-    sqimap_logout($imap_stream);
+echo '</td></tr></table></center>';
+sqimap_logout($imap_stream);
 
 /**
  * Optional hook in info plugin