Fix a bunch of plugins to cope with moved load_prefs/validate files.
[squirrelmail.git] / plugins / newmail / newmail.php
index 02eb6437eec3aa44ca02754aa9d483cc9183e986..da04ec4fa1e8a46ac703e05d1c6a9db531518c04 100644 (file)
     **  $Id$
     **    
     **/
-    
-   chdir ('../');
-   require_once('../src/validate.php');
-   require_once('../src/load_prefs.php');
-   require_once('../functions/page_header.php');
+   chdir('..');
+   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');
 
    displayHtmlHeader( _("New Mail"), '', FALSE );
 
-   echo "<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><br></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".
+   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] . '">' .
+                    _("You have new mail!") . '</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";
+        "</body></html>\n";
 
 ?>