Add preview pane to advanced default template. This serves as an example of how...
[squirrelmail.git] / plugins / newmail / newmail.php
index 4a9ab308e6c9d3da4764ba5d828e14a846499f40..7262d5f5b6ff81d830fa7b7ba59e851d72f0c7b0 100644 (file)
@@ -1,36 +1,52 @@
 <?php
-   chdir ('../');
-   require_once('../src/validate.php');
-   require_once('../src/load_prefs.php');
-?>
-<HTML>
-<TITLE>New Mail</TITLE>
-<BODY bgcolor=<?php echo $color[4] ?> topmargin=0 leftmargin=0
-rightmargin=0 marginwidth=0 marginheight=0>
-<CENTER>
-<table width=100% cellpadding=2 cellspacing=2 border=0>
-<tr>
-   <td bgcolor=<?php echo $color[0] ?>>
-      <b><center>SquirrelMail Notice:</center></b>
-   </td>
-</tr><tr>   
-   <td>
-      <center>
-      <br>
-      <big><font color=<?php echo $color[2] ?>>You have new
-mail!</font></big><br>
-      <form name=nm>
-         <input type=button name=bt value="Close Window"
-onClick="javascript:window.close();">
-      </form>
-      </center>
-   </td>
-</tr>
-</table>
-</CENTER>
-<script language=javascript>
-<!--
-   document.nm.bt.focus();
--->
-</script>
-</BODY></HTML>
+
+/**
+ * newmail.php - popup page
+ *
+ * Displays all options relating to new mail sounds
+ *
+ * @copyright &copy; 1999-2007 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package plugins
+ * @subpackage newmail
+ */
+
+/**
+ * Path for SquirrelMail required files.
+ * @ignore
+ */
+require('../../include/init.php');
+
+sqGetGlobalVar('numnew', $numnew, SQ_GET);
+$numnew = (int)$numnew;
+
+   displayHtmlHeader( _("New Mail"), '', FALSE );
+
+   echo '<body bgcolor="'.$color[4].'" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">'."\n".
+        '<div style="text-align: center;">'. "\n" .
+        html_tag( 'table', "\n" .
+            html_tag( 'tr', "\n" .
+                // i18n: %s inserts the organisation name (typically SquirrelMail)
+                html_tag( 'td', '<b>' . sprintf(_("%s notice:"), $org_name) . '</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"' ) .
+   '</div>' .
+   "<script type=\"text/javascript\">\n".
+   "<!--\n".
+   "document.nm.bt.focus();\n".
+   "-->\n".
+   "</script>\n".
+   "</body></html>\n";
+?>
\ No newline at end of file