diff --git a/class.php b/class.php
index 8f3bc3d..72203cd 100644
--- a/class.php
+++ b/class.php
@@ -32,6 +32,24 @@ class ps4 {
}
}
+ function gameTimeDetails($gameid) {
+ $result = $this->mysql_conn("SELECT * FROM game_time WHERE game_id = '". $gameid ."';");
+ if ($result->num_rows > 0) {
+ $i=0;
+ while ($row = $result->fetch_assoc()) {
+ $i++;
+ echo "
";
+ echo $row["id"] ." : ";
+ echo $this->secondsToDate($row["game_start"]);
+ echo " / ";
+ echo $this->secondsToDate($row["game_end"]);
+ echo " = ";
+ echo $this->playtime((($row["game_end"]-$row["game_start"])/1000),true);
+ echo "
";
+ }
+ }
+ }
+
function playtime($seconds, $text=false) {
$playtime = null;
$label = null;
diff --git a/page.php b/page.php
index ec19e7e..ecc097d 100644
--- a/page.php
+++ b/page.php
@@ -93,7 +93,7 @@ foreach ($games as $key => $value) {
echo "";
if ($details == $games[$key]["game_id"]) {
- echo "
Soon, we show details.";
+ $ps4->gameTimeDetails($games[$key]["game_id"]);
}
echo ""; // info
echo ""; // game