fixed the bugs with "details button"... even if it's not working yet.

This commit is contained in:
2018-12-01 21:34:54 -05:00
parent e872c017ff
commit d4079fccb6
2 changed files with 22 additions and 3 deletions

View File

@@ -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'];
?>
<strong>Last Updated : </strong> <?php echo date(DATE_RFC2822) ?><br/><br/>
Order by (<?php echo $orderby; ?>) : Total Time <a href="index.php?orderby=totaltime_asc">ASC</a> <a href="index.php?orderby=totaltime_desc">DESC</a> - First Played <a href="index.php?orderby=firstplayed_asc">ASC</a> <a href="index.php?orderby=firstplayed_desc">DESC</a> - Last Played <a href="index.php?orderby=lastplayed_asc">ASC</a> <a href="index.php?orderby=lastplayed_desc">DESC</a>
Order by (<?php echo $orderby; ?>) : Total Time <a href="<?php echo $rootpage ?>?orderby=totaltime_asc">ASC</a> <a href="<?php echo $rootpage ?>?orderby=totaltime_desc">DESC</a> - First Played <a href="<?php echo $rootpage ?>?orderby=firstplayed_asc">ASC</a> <a href="<?php echo $rootpage ?>?orderby=firstplayed_desc">DESC</a> - Last Played <a href="<?php echo $rootpage ?>?orderby=lastplayed_asc">ASC</a> <a href="<?php echo $rootpage ?>?orderby=lastplayed_desc">DESC</a>
<br/><br/>
<?php
@@ -56,7 +58,11 @@ foreach ($games as $key => $value) {
echo "<div class=\"info\">";
echo "<strong>". $games[$key]["game_name"] ."</strong> (". $games[$key]["game_id"] .")";
echo "<br/>";
echo "Total Time Played : <a href=\"".$_SERVER['PHP_SELF']."?details=".$games[$key]["game_id"]."\">". $ps4->playtime($games[$key]["game_total_time"],true) ."</a>";
echo "Total Time Played : <a href=\"".$rootpage."?orderby=".$orderby."&details=";
if ($details != $games[$key]["game_id"]) {
echo $games[$key]["game_id"];
}
echo "\">". $ps4->playtime($games[$key]["game_total_time"],true) ."</a>";
echo "<br/>First Played on : ". $ps4->secondsToDate($games[$key]["game_played_first"]);
echo "<br/>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 "<br/><br/>Soon, we show details.";
}
echo "</div>"; // info
echo "</div>"; // game
}