From d4079fccb6f932e6f55646acfb8e2d94b269a369 Mon Sep 17 00:00:00 2001 From: Sebastien Plante Date: Sat, 1 Dec 2018 21:34:54 -0500 Subject: [PATCH] fixed the bugs with "details button"... even if it's not working yet. --- index.php | 11 ++++++++++- page.php | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 2ca51a7..72f9ce7 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,10 @@ ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); +$rootpage = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : "index.php"; $orderby = isset($_GET['orderby']) ? $_GET['orderby'] : "lastplayed_desc"; +$details = isset($_GET['details']) ? $_GET['details'] : ""; + ?> @@ -16,8 +19,14 @@ $orderby = isset($_GET['orderby']) ? $_GET['orderby'] : "lastplayed_desc"; diff --git a/page.php b/page.php index 140c085..e53fd11 100644 --- a/page.php +++ b/page.php @@ -6,13 +6,15 @@ $ps4 = new ps4(); $sql = "SELECT * FROM game_time"; $result = $ps4->mysql_conn($sql); +$rootpage = $_GET['rootpage']; $orderby = $_GET['orderby']; +$details = $_GET['details']; ?> Last Updated :

-Order by () : Total Time ASC DESC - First Played ASC DESC - Last Played ASC DESC +Order by () : Total Time ASC DESC - First Played ASC DESC - Last Played ASC DESC

$value) { echo "
"; echo "". $games[$key]["game_name"] ." (". $games[$key]["game_id"] .")"; echo "
"; - echo "Total Time Played : ". $ps4->playtime($games[$key]["game_total_time"],true) .""; + echo "Total Time Played : ". $ps4->playtime($games[$key]["game_total_time"],true) .""; echo "
First Played on : ". $ps4->secondsToDate($games[$key]["game_played_first"]); echo "
Last Played on : "; @@ -65,6 +71,10 @@ foreach ($games as $key => $value) { } else { echo $ps4->secondsToDate($games[$key]["game_played_last"]); } + + if ($details == $games[$key]["game_id"]) { + echo "

Soon, we show details."; + } echo "
"; // info echo ""; // game }