BUGIFX: output was displayed twice
authorArun Persaud <arun@nubati.net>
Thu, 3 Jan 2008 13:06:16 +0000 (14:06 +0100)
committerArun Persaud <arun@nubati.net>
Thu, 3 Jan 2008 17:12:52 +0000 (18:12 +0100)
the login information was displayed twice, also formatted the output a bit nicer in html

index.php
output.php

index fe674be6b6af6c05cbc87335490c7bf7ad233701..20fc5734688d49c42f5bb6407e32e319162e6be5 100644 (file)
--- a/index.php
+++ b/index.php
@@ -313,8 +313,6 @@ else if(myisset("me"))
        exit();
       }
 
-    output_status();
-
     if(isset($_SESSION["name"]))
       output_status($_SESSION["name"]);
 
index e3a14d0bf8c4744bf641f4d4f81d4125f6247cef..1adc1a77b74b29a28accd55185ed9e4a8b1b6726 100644 (file)
@@ -372,10 +372,10 @@ function output_status()
        $name = $_SESSION["name"];
 
        /* logout info */
-       echo "<div class=\"status\">\n";
+       echo "\n<div class=\"status\">";
        echo $name;
-       echo " <a href=\"index.php?logout=1\">logout</a>\n";
-       echo "</div>";
+       echo " <a href=\"index.php?logout=1\">logout</a>";
+       echo "</div>\n";
 
        /* last logon time */
        $myid  = DB_get_userid_by_name($name);
@@ -386,7 +386,7 @@ function output_status()
        $unixtime = strtotime($time);
        date_default_timezone_set($zone);
 
-       echo "<div class=\"lastlogin\">last login: ".date("r",$unixtime)."</div>";
+       echo "<div class=\"lastlogin\">last login: ".date("r",$unixtime)."</div>\n";
      };
   return;
 }