Removed fourth parameter from the NEVER option. That parameter doesn't exist.
[squirrelmail.git] / src / right_main.php
index 7c33892933e3d76d7134b94b801cde83b298c33f..d0f380798e1f66a635ab08eb4ed5f856d1003011 100644 (file)
     **/
 
    include('../src/validate.php');
-   include('../functions/i18n.php');
-   include('../functions/strings.php');
-   include('../config/config.php');
    include('../functions/imap.php');
    include('../functions/date.php');
-   include('../functions/page_header.php');
    include('../functions/array.php');
    include('../functions/mime.php');
    include('../functions/mailbox_display.php');
    include('../functions/display_messages.php');
 
-?>
-<?php
    /////////////////////////////////////////////////////////////////////////////////
    //
    // incoming variables from URL:
@@ -43,9 +37,6 @@
    // open a connection on the imap port (143)
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 
-   /** If it was a successful login, lets load their preferences **/
-   include('../src/load_prefs.php');
-
    if (isset($newsort) && $newsort != $sort) {
       setPref($data_dir, $username, 'sort', $newsort);
    }
 
    do_hook('right_main_after_header');
    
-   if (isset($just_logged_in) && $just_logged_in == 1 && 
-       strlen(trim($motd)) > 0) {
-      echo "<center><br>\n";
-      echo "<table width=70% cellpadding=0 cellspacing=0 border=0><tr><td bgcolor=\"$color[9]\">\n";
-      echo "<table width=100% cellpadding=5 cellspacing=1 border=0><tr><td bgcolor=\"$color[4]\">\n";
-      echo "$motd\n";
-      echo "</td></tr></table>\n";
-      echo "</td></tr></table>\n";
-      echo "</center><br>\n";
+   if ($just_logged_in == true) {
+      $just_logged_in = false;
+      
+      if (strlen(trim($motd)) > 0) {
+?><br>
+<table align=center width=70% cellpadding=0 cellspacing=3 border=0
+bgcolor="<?PHP echo $color[9] ?>">
+<tr><td>
+  <table width=100% cellpadding=5 cellspacing=1 border=0 bgcolor="<?PHP
+    echo $color[4] ?>">
+    <tr><td align=center><?PHP 
+       echo $motd;
+       do_hook('motd');
+    ?></td></tr>
+  </table>
+</td></tr></table>
+<?PHP
+      }
    }
 
        if (isset($newsort)) {