CLEANUP: moved more statistics into the sortable table
[e-DoKo.git] / include / output.php
index 57b3152c035ea29efc511af39670308606951e23..018372b37c7542b75dafd8fa1f33f47a893c82b3 100644 (file)
@@ -1,4 +1,23 @@
 <?php
+/* Copyright 2006, 2007, 2008, 2009, 2010 Arun Persaud <arun@nubati.net>
+ *
+ *   This file is part of e-DoKo.
+ *
+ *   e-DoKo is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   e-DoKo is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with e-DoKo.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
 /* make sure that we are not called from outside the scripts,
  * use a variable defined in config.php to check this
  */
@@ -12,7 +31,7 @@ function output_ask_for_new_game($playerA,$playerB,$playerC,$playerD,$oldgameid)
   global $RULES;
 
   echo "<div class=\"message\">\n<form action=\"index.php?action=new\" method=\"post\">\n";
-  echo "Do you want to continue playing?(This will start a new game, with $playerD as dealer.)\n";
+  echo "Do you want to continue playing?(This will start a new game, with $playerA starting the game.)\n";
   echo "  <input type=\"hidden\" name=\"PlayerA\" value=\"$playerA\" />\n";
   echo "  <input type=\"hidden\" name=\"PlayerB\" value=\"$playerB\" />\n";
   echo "  <input type=\"hidden\" name=\"PlayerC\" value=\"$playerC\" />\n";
@@ -359,7 +378,7 @@ function output_footer()
 
   echo "</div>\n\n";
   echo "<div class=\"footer\">\n";
-  echo "  <p class=\"left\"> copyright 2006-2009 Arun Persaud, Lance Thornton(graphics), Jeff Zerger(database support) <br />\n".
+  echo "  <p class=\"left\"> copyright 2006,2007,2008,2009,2010 Arun Persaud, Lance Thornton(graphics),  Jeff Zerger(database support) <br />\n".
     "  Verwendung der [deutschen] Kartenbilder mit Genehmigung <br />der Spielkartenfabrik Altenburg GmbH,(c) ASS Altenburger <br />\n".
     "  - ASS Altenburger Spielkarten - Spielkartenfabrik Altenburg GmbH <br />\n".
     "  a Carta Mundi Company Email: info@spielkarten.com Internet: www.spielkarten.com</p>\n";
@@ -380,39 +399,44 @@ function output_footer()
 
 function output_status()
 {
-  global $defaulttimezone,$INDEX,$WIKI;
-   if(isset($_SESSION["name"]))
-     {
-       $name = $_SESSION["name"];
-
-       /* logout info */
-       echo "\n<div class=\"status\">\n";
-       echo $name,"\n";
-       echo " | <a href=\"".$INDEX."\"> mypage </a>\n";
-       echo " | <a href=\"".$INDEX."?action=prefs\">settings</a>\n";
-       echo " | <a href=\"".$INDEX."?action=new\">new game</a>\n";
-       echo " | <a href=\"".$INDEX."?action=stats\">statistics</a>\n";
-       echo " | <a href=\"".$WIKI."\">wiki</a>\n";
-       echo " |&nbsp;&nbsp;&nbsp; <a href=\"".$INDEX."?action=logout\">logout</a>\n";
-       echo "</div>\n";
-
-       /* last logon time */
-       $myid  = DB_get_userid("name",$name);
-       $zone  = DB_get_user_timezone($myid);
-
-       $time     = DB_get_user_timestamp($myid);
-       date_default_timezone_set($defaulttimezone);
-       $unixtime = strtotime($time);
-       date_default_timezone_set($zone);
-
-       echo "<div class=\"lastlogin\"><span>last login: ".date("r",$unixtime)."</span></div>\n";
-     }
-   else
-     {
-       echo "\n<div class=\"status\">\n";
-       echo "<a href=\"".$INDEX."\">login</a>\n";
-       echo "</div>\n";
-     }
+  global $defaulttimezone, $INDEX, $WIKI, $RSS;
+
+  if(isset($_SESSION["name"]))
+    {
+      $name = $_SESSION["name"];
+
+      /* last logon time */
+      $myid  = DB_get_userid("name",$name);
+      $zone  = DB_get_user_timezone($myid);
+
+      $time     = DB_get_user_timestamp($myid);
+      date_default_timezone_set($defaulttimezone);
+      $unixtime = strtotime($time);
+      date_default_timezone_set($zone);
+
+      /* rss token */
+      $token = get_user_token($myid);
+
+      /* logout info */
+      echo "\n<div class=\"status\">\n";
+      echo $name,"\n";
+      echo " | <a href=\"".$INDEX."\"> mypage </a>\n";
+      echo " | <a href=\"".$INDEX."?action=prefs\">settings</a>\n";
+      echo " | <a href=\"".$INDEX."?action=new\">new game</a>\n";
+      echo " | <a href=\"".$INDEX."?action=stats\">statistics</a>\n";
+      echo " | <a href=\"".$WIKI."\">wiki</a>\n";
+      echo " | <a href=\"".$RSS."?uid=".$myid."&amp;token=".$token."\">rss</a>\n";
+      echo " |&nbsp;&nbsp;&nbsp; <a href=\"".$INDEX."?action=logout\">logout</a>\n";
+      echo "</div>\n";
+
+      echo "<div class=\"lastlogin\"><span>last login: ".date("r",$unixtime)."</span></div>\n";
+    }
+  else
+    {
+      echo "\n<div class=\"status\">\n";
+      echo "<a href=\"".$INDEX."\">login</a>\n";
+      echo "</div>\n";
+    }
   return;
 }