fixed the bugs with "details button"... even if it's not working yet.
This commit is contained in:
14
page.php
14
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'];
|
||||
|
||||
?>
|
||||
|
||||
<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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user