CLEANUP: some small code cleanup
authorArun Persaud <arun@nubati.net>
Wed, 31 Oct 2007 20:18:18 +0000 (21:18 +0100)
committerArun Persaud <arun@nubati.net>
Wed, 31 Oct 2007 20:18:18 +0000 (21:18 +0100)
moved some css from inline to the style sheet, some linebreaks, etc.

css/standard.css
index.php
output.php

index bea5189fc31a9f8c764de2eca14c0055d50c325d..1938472506c7cdda4fdda47d1dc3a70eec323501 100644 (file)
@@ -5,6 +5,13 @@
   border-bottom:    3px solid gray;
 }
 
+.lastlogin {
+  position:absolute;
+  font-size:smaller;
+  top:0;
+  left:0;
+}
+
 .main {
   min-height: 40em;
 }
index 7ca77d6947428efa631e6c73ca23cb7a60529a5c..74b4fc129824e849c79db4e92e262fa58b902144 100644 (file)
--- a/index.php
+++ b/index.php
@@ -214,7 +214,8 @@ else if(myisset("cancle","me"))
     if(time()-strtotime($r[0]) > 60*60*24*30) /* = 1 month */
       {
        $message = "Hello, \n\n".
-         "Game ".DB_format_gameid($gameid)." has been cancled since nothing happend for a while and $myname requested it.\n";
+         "Game ".DB_format_gameid($gameid).
+         " has been cancled since nothing happend for a while and $myname requested it.\n";
        
        $userids = DB_get_all_userid_by_gameid($gameid);
        foreach($userids as $user)
@@ -226,7 +227,8 @@ else if(myisset("cancle","me"))
        /* delete everything from the dB */
        DB_cancel_game($me);
        
-       echo "<p style=\"background-color:red\";>Game ".DB_format_gameid($gameid)." has been cancled.<br /><br /></p>";
+       echo "<p style=\"background-color:red\";>Game ".DB_format_gameid($gameid).
+         " has been cancled.<br /><br /></p>";
       }
     else
       echo "<p>You need to wait longer before you can cancle a game...</p>\n";
@@ -277,7 +279,8 @@ else if(myisset("remind","me"))
            DB_set_reminder($r[1],$gameid);
            mymail($To,$EmailName."Reminder: game ".DB_format_gameid($gameid)." it's your turn",$message);
            
-           echo "<p style=\"background-color:red\";>Game ".DB_format_gameid($gameid).": an email has been sent out.<br /><br /></p>";
+           echo "<p style=\"background-color:red\";>Game ".DB_format_gameid($gameid).
+             ": an email has been sent out.<br /><br /></p>";
          }
       }
     else
@@ -1117,7 +1120,8 @@ else if(myisset("me"))
                            "       Hand.position as position,".
                            "       Play.sequence as sequence, ".
                            "       Trick.id, ".
-                           "       GROUP_CONCAT(CONCAT('<span>',User.fullname,': ',Comment.comment,'</span>') SEPARATOR '\n' ), ".
+                           "       GROUP_CONCAT(CONCAT('<span>',User.fullname,': ',Comment.comment,'</span>')".
+                           "                    SEPARATOR '\n' ), ".
                            "       Play.create_date, ".
                            "       Hand.user_id ".
                            "FROM Trick ".
@@ -1792,9 +1796,9 @@ else if( myisset("email","password") || isset($_SESSION["name"]) )
                 output_status($_SESSION["name"]);
               
               /* display links to settings */
-              output_user_settings($email,$password);
+              output_user_settings();
               
-              echo "<div style=\"position:absolute; font-size:smaller; top:0; left:0; \">last login: ".date("r",$unixtime)."</div>";
+              echo "<div class=\"lastlogin\">last login: ".date("r",$unixtime)."</div>";
               
               DB_update_user_timestamp($myid);
             
index 5c5e0aa8388b12443810384b587aa8b2d6e08bc7..a8d6bf14ee266fce394a61717619219d18531d60 100644 (file)
@@ -2,7 +2,7 @@
 
 /* functions which only ouput html  */
 
-function output_user_settings($email,$password)
+function output_user_settings()
 {
   global $PREF;