Plugin may be invisible when JS is not detected
[squirrelmail.git] / plugins / newmail / newmail.php
index 8a93b11a8890749fccacc9aeab5eba29f41cc46a..3c1d65ec5f31629f8e278e758146896760665835 100644 (file)
@@ -1,14 +1,13 @@
 <?php
-
 /**
- * newmail.php
+ * newmail.php - popup page
  *
- * Copyright (c) 1999-2003 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.        
+ * Copyright (c) 1999-2005 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Displays all options relating to new mail sounds
  *
- * $Id$
+ * @version $Id$
  * @package plugins
  * @subpackage newmail
  */
@@ -18,14 +17,12 @@ define('SM_PATH','../../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
-require_once(SM_PATH . 'include/load_prefs.php');
-require_once(SM_PATH . 'functions/page_header.php');
 
 sqGetGlobalVar('numnew', $numnew, SQ_GET);
 
    displayHtmlHeader( _("New Mail"), '', FALSE );
 
-   echo "<body bgcolor=\"$color[4]\" topmargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>\n".
+   echo '<body bgcolor="'.$color[4].'" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">'."\n".
         '<center>'. "\n" .
         html_tag( 'table', "\n" .
             html_tag( 'tr', "\n" .
@@ -33,24 +30,21 @@ sqGetGlobalVar('numnew', $numnew, SQ_GET);
             ) .
             html_tag( 'tr', "\n" .
                 html_tag( 'td',
-                    '<br><big><font color="' . $color[2] . '">' . _("You have").' '.
-                   sprintf( ( $numnew == 1 ?
-                       _("%s new message") :
-                       _("%s new messages") ), $numnew ) .
-                    '</font><br></big><br>' . "\n" .
-                    '<form name="nm">' . "\n".
-                    '<input type=button name=bt value="' . _("Close Window") .
-                    '" onClick="javascript:window.close();">'."\n".
-                    '</form>',
-                'center' )
-            ) ,
-        '', '', 'width="100%" cellpadding="2" cellspacing="2" border="0"' ) .
-        '</center>' .
-        "<script language=javascript>\n".
-        "<!--\n".
-            "document.nm.bt.focus();\n".
-        "-->\n".
-        "</script>\n".
-        "</body></html>\n";
-
-?>
+                          '<br /><big><font color="' . $color[2] . '">'.
+                          sprintf(ngettext("You have %s new message","You have %s new messages",$numnew), $numnew ) .
+                          '</font><br /></big><br />' . "\n" .
+                          '<form name="nm">' . "\n".
+                          '<input type="button" name="bt" value="' . _("Close Window") .
+                          '" onclick="javascript:window.close();" />'."\n".
+                          '</form>',
+                          'center' )
+                      ) ,
+                  '', '', 'width="100%" cellpadding="2" cellspacing="2" border="0"' ) .
+   '</center>' .
+   "<script language=javascript>\n".
+   "<!--\n".
+   "document.nm.bt.focus();\n".
+   "-->\n".
+   "</script>\n".
+   "</body></html>\n";
+?>
\ No newline at end of file