Changing link style
[squirrelmail.git] / plugins / newmail / newmail.php
index 5640779090ca8baed433472c3b4d8c49ec1e011a..3d343525aa095177ab559eb14ded379fad60ec0a 100644 (file)
@@ -1,21 +1,27 @@
 <?php
 
-   /**
-    **  newmail.php
-    **
-    **  Copyright (c) 1999-2002 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$
-    **    
-    **/
-    
-   chdir ('../');
-   require_once('../src/validate.php');
-   require_once('../src/load_prefs.php');
-   require_once('../functions/page_header.php');
+/**
+ * newmail.php
+ *
+ * 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
+ *
+ * $Id$
+ * @package plugins
+ * @subpackage newmail
+ */
+
+/** @ignore */
+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 );
 
             ) .
             html_tag( 'tr', "\n" .
                 html_tag( 'td',
-                    '<br><big><font color="' . $color[2] . '">' .
-                    _("You have new mail!") . '</font><br></big><br>' . "\n" .
+                    '<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".
+                    '<input type=button name=bt value="' . _("Close Window") .
+                    '" onClick="javascript:window.close();">'."\n".
                     '</form>',
                 'center' )
             ) ,