added beta version of time details.
This commit is contained in:
18
class.php
18
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 "<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/>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function playtime($seconds, $text=false) {
|
||||
$playtime = null;
|
||||
$label = null;
|
||||
|
||||
Reference in New Issue
Block a user