Formatted the "sessions details".
This commit is contained in:
26
class.php
26
class.php
@@ -33,20 +33,26 @@ class ps4 {
|
||||
}
|
||||
|
||||
function gameTimeDetails($gameid) {
|
||||
$result = $this->mysql_conn("SELECT * FROM game_time WHERE game_id = '". $gameid ."';");
|
||||
$result = $this->mysql_conn("SELECT * FROM game_time WHERE game_id = '". $gameid ."' ORDER BY game_start DESC;");
|
||||
if ($result->num_rows > 0) {
|
||||
$i=0;
|
||||
echo '<div class="PlaytimeDetails FontSmaller">';
|
||||
echo '<div class="row"><div class="head PlaytimeStart">Start</div><div class="head PlaytimeEnd">End</div><div class="head PlaytimeTotal">Time Played</div></div>';
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$i++;
|
||||
echo "<br/>";
|
||||
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 "<br/>";
|
||||
echo '<div class="row">';
|
||||
$i++;
|
||||
echo '<div class="PlaytimeStart">'. $this->secondsToDate($row["game_start"]) .'</div>';
|
||||
echo '<div class="PlaytimeEnd">'. $this->secondsToDate($row["game_end"]) .'</div>';
|
||||
echo '<div class="PlaytimeTotal">';
|
||||
if ($row["game_end"] == "") {
|
||||
echo "<strong>now playing</strong>";
|
||||
} else {
|
||||
echo $this->playtime((($row["game_end"]-$row["game_start"])/1000),true);
|
||||
}
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user