* Fixed MOTD, added new 'motd' hook to easily make your own motd plugin
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 May 2001 14:37:20 +0000 (14:37 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 May 2001 14:37:20 +0000 (14:37 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1389 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/right_main.php

index b8bf19a..d0f3807 100644 (file)
 
    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)) {