Replacing tabs with spaces, trimming white space at EOL and newline at EOF
[squirrelmail.git] / plugins / newmail / newmail.php
index ce3a9247507b88733fb0ab47015e7b4328b323f9..3bc009043541d07704501d5bb11f19ecaf1c229a 100644 (file)
@@ -1,40 +1,50 @@
 <?php
+/**
+ * newmail.php - popup page
+ *
+ * Copyright (c) 1999-2004 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Displays all options relating to new mail sounds
+ *
+ * @version $Id$
+ * @package plugins
+ * @subpackage newmail
+ */
 
-   /**
-    **  newmail.php
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.        
-    **
-    **  Displays all options relating to new mail sounds
-    **
-    **  $Id$
-    **    
-    **/
-    
-   chdir ('../');
-   require_once('../src/validate.php');
-   require_once('../src/load_prefs.php');
-   
-   echo "<HTML>\n".
-        '<TITLE>' . _("New Mail") . "</TITLE>\n".
-        "<BODY bgcolor=\"$color[4]\" topmargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>\n".
-        '<CENTER>'.
-        "<table width=100% cellpadding=2 cellspacing=2 border=0>\n".
-        "<tr>\n".
-        "<td bgcolor=\"$color[0]\">\n".
-        '<b><center>' . _("SquirrelMail Notice:") . "</center></b>\n".
-        "</td>\n".
-        "</tr><tr>\n".
-        "<td><center><br><big><font color=\"$color[2]\">" . 
-        _("You have new mail!") . "</font></big><br>\n".
-        "<form name=nm>\n".
-            '<input type=button name=bt value="Close Window" onClick="javascript:window.close();">'.
-        "</form></center></td></tr></table></CENTER>\n".
-        "<script language=javascript>\n".
-        "<!--\n".
-            "document.nm.bt.focus();\n".
-        "-->\n".
-        "</script>\n".
-        "</BODY></HTML>\n";
-        
+/** @ignore */
+define('SM_PATH','../../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'include/validate.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".
+        '<center>'. "\n" .
+        html_tag( 'table', "\n" .
+            html_tag( 'tr', "\n" .
+                html_tag( 'td', '<b>' . _("SquirrelMail Notice:") . '</b>', 'center', $color[0] )
+            ) .
+            html_tag( 'tr', "\n" .
+                html_tag( 'td',
+                          '<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