( ! ) Notice: Undefined variable: tmsp in /var/www/html/pages/wiki.php(45) : eval()'d code on line 294 |
Call Stack |
# | Time | Memory | Function | Location |
1 | 0.0001 | 359336 | {main}( ) | .../index.php:0 |
2 | 0.0092 | 387816 | include( '/var/www/html/pages/wiki.php' ) | .../index.php:48 |
3 | 0.0239 | 519216 | includestring( ) | .../wiki.php:482 |
4 | 0.0248 | 591240 | eval( '?>
$session["log_date"], "type" => "start"];
$timestamps[] = ["timestamp" => $session["last_seen"], "type" => "end"];
}
}
usort($timestamps, function ($a, $b) {
if ($a["timestamp"] == $b["timestamp"]) {
return $a["type"] == "end" ? -1 : 1;
}
return $a["timestamp"] - $b["timestamp"];
});
$currentPlayers = 0;
$maxConcurrentPlayers = 0;
foreach ($timestamps as $timestamp) {
if ($timestamp["type"] == "start") {
$currentPlayers++;
$maxConcurrentPlayers = max($maxConcurrentPlayers, $currentPlayers);
} else {
$currentPlayers--;
}
}
return $maxConcurrentPlayers;
}
class DateIdConverter {
private const REFERENCE_DATE = '2019-10-30';
private const INITIAL_ID = 0;
public static function convertDateToId($date) {
$referenceDate = new DateTime(self::REFERENCE_DATE);
$givenDate = new DateTime($date);
$daysDifference = $referenceDate->diff($givenDate)->days;
return self::INITIAL_ID + $daysDifference;
}
public static function convertIdToDate($id) {
$daysDifference = $id - self::INITIAL_ID;
$referenceDate = new DateTime(self::REFERENCE_DATE);
$newDate = $referenceDate->add(new DateInterval('P' . $daysDifference . 'D'));
return $newDate->format('Y-m-d');
}
public static function convertIdToTimestamp($id) {
$daysDifference = $id - self::INITIAL_ID;
$referenceDate = new DateTime(self::REFERENCE_DATE);
$newDate = $referenceDate->add(new DateInterval('P' . $daysDifference . 'D'));
return $newDate->getTimestamp() * 1000; // Convert to milliseconds
}
public static function getCurrentDateId() {
$currentDate = new DateTime();
$referenceDate = new DateTime(self::REFERENCE_DATE);
$daysDifference = $referenceDate->diff($currentDate)->days;
return self::INITIAL_ID + $daysDifference;
}
}
function formatMilliseconds($milliseconds) {
$seconds = floor($milliseconds / 1000); // Convertir en secondes
$minutes = floor($seconds / 60); // Calculer les minutes
$hours = floor($minutes / 60); // Calculer les heures
$remainingMinutes = $minutes % 60; // Calculer les minutes restantes
$remainingSeconds = $seconds % 60; // Calculer les secondes restantes
$formattedTime = "$hours h $remainingMinutes m $remainingSeconds s";
return $formattedTime;
}
$stats = [];
$playerCount = [];
$totalPlayHours = [];
$filter = [];
$invalid = 1000000000;
$minDay = 0;
$maxDay = $invalid;
if(isset($_GET["interval"]))
{
$intervalStr = $_GET["interval"];
$arr = explode("/", $intervalStr);
$one = DateIdConverter::convertDateToId($arr[0]);
$two = DateIdConverter::convertDateToId($arr[1]);
$minDay = min($one, $two);
$maxDay = max($one, $two);
}
$filter["\$where"] = "function() { return this.day_id >= $minDay && this.day_id <= $maxDay}";
$filter["day_id"] = array("and" => array(array("gte", $minDay), array("lte", $maxDay)));
$days = Keldatabase::playerDaysDocument()->find($filter, ["sort" => ["day_id" => -1]]);
function getDay($previous, $row)
{
$infos = [];
$infos["username"] = $row["username"];
$infos["afk_time"] = (isset($previous) ? $previous["afk_time"] : 0) + $row["afk_time"];
$infos["build_time"] = (isset($previous) ? (isset($previous["build_time"]) ? $previous["build_time"] : 0) : 0) + (isset($row["build_time"]) ? $row["build_time"] : 0);
$infos["sessions"] = $row["sessions"];
$totalTime = isset($previous) ? $previous["total_time"] : 0;
foreach ($row["sessions"] as $sess)
{
$totalTime += $sess["last_seen"] - $sess["log_date"];
}
$infos["total_time"] = $totalTime;
return $infos;
}
foreach ($days as $day)
{
if($day != null)
{
//$stat = [];
$username = $day["username"];
$dayInfos = getDay(isset($stats[$username]) ? $stats[$username] : null, $day);
$singleDayInfos = getDay(null, $day);
$stats[$username] = $dayInfos;
$dayId = $day["day_id"];
if(!isset($playerCount[$dayId]))
{
$playerCount[$dayId]["totalplayers"] = 0;
$playerCount[$dayId]["days"] = [];
}
$playerCount[$dayId]["totalplayers"] ++;
$strictDay = ["sessions" => $dayInfos["sessions"]];
$totalPlayHours[$dayId] = (
isset($totalPlayHours[$dayId]) ? $totalPlayHours[$dayId] : 0)
+ ((($singleDayInfos["total_time"] - $singleDayInfos["afk_time"] - $singleDayInfos["build_time"]) / 1000) / 60) / 60;
array_push($playerCount[$dayId]["days"], $strictDay);
}
else
{
$hourCount[$dayId] = (isset($hourCount[$dayId]) ? $hourCount[$dayId] : 0);
}
}
//usort($stats, "cmp");
function cmpActiveTime($a, $b)
{
return (($b["total_time"] - $b["afk_time"] - $b["build_time"]) - ($a["total_time"] - $a["afk_time"] - $a["build_time"]));
}
//usort($playerCount, "cmp");
usort($stats, "cmpActiveTime");
?>
$value)
{
$moyenneNombre ++;
$tmsp = DateIdConverter::convertIdToTimestamp($key);
if($tmsp < $i)
{
$i = $tmsp;
}
$d = findMaxConcurrentPlayers($value["days"]);
$moyenneTotal += $d;
$points[] = [$tmsp, $d];
}
echo $tmsp . " ";
$points[] = [$i - (24 * (60 * 60 * 1000)), 0];
$i = 10000000000000;
foreach($totalPlayHours as $key => $value)
{
$tmsp = DateIdConverter::convertIdToTimestamp($key);
if($tmsp < $i)
{
$i = $tmsp;
}
$points2[] = [$tmsp, $value];
}
echo $tmsp . " ";
$points2[] = [$i - (24 * (60 * 60 * 1000)), 0];
$jsonChart = ["max_players" => $points];
$jsonChart2 = ["max_players" => $points2];
?>
Statistiques d'activité
Définir l'interval:
Définir
Filtres par défaut:
Depuis toujours
Depuis 7 jours
Depuis 30 jours
Ce mois
Cette semaine
Aujourd'hui
Le pic de connecté.e.s moyen durant cette personne était de connecté.e.s.
$value)
{
$totalHours += $value;
}
?>
Les joueurs et joueuses de Keldaria ont au total joué heures sur le serveur.
$value)
{
echo $key . "/ total: " . $value["totalplayers"] . " ";
//var_dump($value["days"]);
echo findMaxConcurrentPlayers($value["days"]);
echo " ";
}*/
?>
Skin |
Position |
Personnage |
Pseudonyme |
Temps Actif |
Temps AFK |
Temps Mont-Cristal |
; ?>) |
|
getPlayerData()->getString("keldaria:roleplayname"); ?> |
"> |
|
|
|
) | .../wiki.php:45 |
( ! ) Notice: Undefined variable: tmsp in /var/www/html/pages/wiki.php(45) : eval()'d code on line 312 |
Call Stack |
# | Time | Memory | Function | Location |
1 | 0.0001 | 359336 | {main}( ) | .../index.php:0 |
2 | 0.0092 | 387816 | include( '/var/www/html/pages/wiki.php' ) | .../index.php:48 |
3 | 0.0239 | 519216 | includestring( ) | .../wiki.php:482 |
4 | 0.0248 | 591240 | eval( '?>
$session["log_date"], "type" => "start"];
$timestamps[] = ["timestamp" => $session["last_seen"], "type" => "end"];
}
}
usort($timestamps, function ($a, $b) {
if ($a["timestamp"] == $b["timestamp"]) {
return $a["type"] == "end" ? -1 : 1;
}
return $a["timestamp"] - $b["timestamp"];
});
$currentPlayers = 0;
$maxConcurrentPlayers = 0;
foreach ($timestamps as $timestamp) {
if ($timestamp["type"] == "start") {
$currentPlayers++;
$maxConcurrentPlayers = max($maxConcurrentPlayers, $currentPlayers);
} else {
$currentPlayers--;
}
}
return $maxConcurrentPlayers;
}
class DateIdConverter {
private const REFERENCE_DATE = '2019-10-30';
private const INITIAL_ID = 0;
public static function convertDateToId($date) {
$referenceDate = new DateTime(self::REFERENCE_DATE);
$givenDate = new DateTime($date);
$daysDifference = $referenceDate->diff($givenDate)->days;
return self::INITIAL_ID + $daysDifference;
}
public static function convertIdToDate($id) {
$daysDifference = $id - self::INITIAL_ID;
$referenceDate = new DateTime(self::REFERENCE_DATE);
$newDate = $referenceDate->add(new DateInterval('P' . $daysDifference . 'D'));
return $newDate->format('Y-m-d');
}
public static function convertIdToTimestamp($id) {
$daysDifference = $id - self::INITIAL_ID;
$referenceDate = new DateTime(self::REFERENCE_DATE);
$newDate = $referenceDate->add(new DateInterval('P' . $daysDifference . 'D'));
return $newDate->getTimestamp() * 1000; // Convert to milliseconds
}
public static function getCurrentDateId() {
$currentDate = new DateTime();
$referenceDate = new DateTime(self::REFERENCE_DATE);
$daysDifference = $referenceDate->diff($currentDate)->days;
return self::INITIAL_ID + $daysDifference;
}
}
function formatMilliseconds($milliseconds) {
$seconds = floor($milliseconds / 1000); // Convertir en secondes
$minutes = floor($seconds / 60); // Calculer les minutes
$hours = floor($minutes / 60); // Calculer les heures
$remainingMinutes = $minutes % 60; // Calculer les minutes restantes
$remainingSeconds = $seconds % 60; // Calculer les secondes restantes
$formattedTime = "$hours h $remainingMinutes m $remainingSeconds s";
return $formattedTime;
}
$stats = [];
$playerCount = [];
$totalPlayHours = [];
$filter = [];
$invalid = 1000000000;
$minDay = 0;
$maxDay = $invalid;
if(isset($_GET["interval"]))
{
$intervalStr = $_GET["interval"];
$arr = explode("/", $intervalStr);
$one = DateIdConverter::convertDateToId($arr[0]);
$two = DateIdConverter::convertDateToId($arr[1]);
$minDay = min($one, $two);
$maxDay = max($one, $two);
}
$filter["\$where"] = "function() { return this.day_id >= $minDay && this.day_id <= $maxDay}";
$filter["day_id"] = array("and" => array(array("gte", $minDay), array("lte", $maxDay)));
$days = Keldatabase::playerDaysDocument()->find($filter, ["sort" => ["day_id" => -1]]);
function getDay($previous, $row)
{
$infos = [];
$infos["username"] = $row["username"];
$infos["afk_time"] = (isset($previous) ? $previous["afk_time"] : 0) + $row["afk_time"];
$infos["build_time"] = (isset($previous) ? (isset($previous["build_time"]) ? $previous["build_time"] : 0) : 0) + (isset($row["build_time"]) ? $row["build_time"] : 0);
$infos["sessions"] = $row["sessions"];
$totalTime = isset($previous) ? $previous["total_time"] : 0;
foreach ($row["sessions"] as $sess)
{
$totalTime += $sess["last_seen"] - $sess["log_date"];
}
$infos["total_time"] = $totalTime;
return $infos;
}
foreach ($days as $day)
{
if($day != null)
{
//$stat = [];
$username = $day["username"];
$dayInfos = getDay(isset($stats[$username]) ? $stats[$username] : null, $day);
$singleDayInfos = getDay(null, $day);
$stats[$username] = $dayInfos;
$dayId = $day["day_id"];
if(!isset($playerCount[$dayId]))
{
$playerCount[$dayId]["totalplayers"] = 0;
$playerCount[$dayId]["days"] = [];
}
$playerCount[$dayId]["totalplayers"] ++;
$strictDay = ["sessions" => $dayInfos["sessions"]];
$totalPlayHours[$dayId] = (
isset($totalPlayHours[$dayId]) ? $totalPlayHours[$dayId] : 0)
+ ((($singleDayInfos["total_time"] - $singleDayInfos["afk_time"] - $singleDayInfos["build_time"]) / 1000) / 60) / 60;
array_push($playerCount[$dayId]["days"], $strictDay);
}
else
{
$hourCount[$dayId] = (isset($hourCount[$dayId]) ? $hourCount[$dayId] : 0);
}
}
//usort($stats, "cmp");
function cmpActiveTime($a, $b)
{
return (($b["total_time"] - $b["afk_time"] - $b["build_time"]) - ($a["total_time"] - $a["afk_time"] - $a["build_time"]));
}
//usort($playerCount, "cmp");
usort($stats, "cmpActiveTime");
?>
$value)
{
$moyenneNombre ++;
$tmsp = DateIdConverter::convertIdToTimestamp($key);
if($tmsp < $i)
{
$i = $tmsp;
}
$d = findMaxConcurrentPlayers($value["days"]);
$moyenneTotal += $d;
$points[] = [$tmsp, $d];
}
echo $tmsp . " ";
$points[] = [$i - (24 * (60 * 60 * 1000)), 0];
$i = 10000000000000;
foreach($totalPlayHours as $key => $value)
{
$tmsp = DateIdConverter::convertIdToTimestamp($key);
if($tmsp < $i)
{
$i = $tmsp;
}
$points2[] = [$tmsp, $value];
}
echo $tmsp . " ";
$points2[] = [$i - (24 * (60 * 60 * 1000)), 0];
$jsonChart = ["max_players" => $points];
$jsonChart2 = ["max_players" => $points2];
?>
Statistiques d'activité
Définir l'interval:
Définir
Filtres par défaut:
Depuis toujours
Depuis 7 jours
Depuis 30 jours
Ce mois
Cette semaine
Aujourd'hui
Le pic de connecté.e.s moyen durant cette personne était de connecté.e.s.
$value)
{
$totalHours += $value;
}
?>
Les joueurs et joueuses de Keldaria ont au total joué heures sur le serveur.
$value)
{
echo $key . "/ total: " . $value["totalplayers"] . " ";
//var_dump($value["days"]);
echo findMaxConcurrentPlayers($value["days"]);
echo " ";
}*/
?>
Skin |
Position |
Personnage |
Pseudonyme |
Temps Actif |
Temps AFK |
Temps Mont-Cristal |
; ?>) |
|
getPlayerData()->getString("keldaria:roleplayname"); ?> |
"> |
|
|
|
) | .../wiki.php:45 |
Statistiques d'activité
Définir l'interval:
Définir
Filtres par défaut:
Depuis toujours
Depuis 7 jours
Depuis 30 jours
Ce mois
Cette semaine
Aujourd'hui
Le pic de connecté.e.s moyen durant cette personne était de
( ! ) Warning: Division by zero in /var/www/html/pages/wiki.php(45) : eval()'d code on line 566 |
Call Stack |
# | Time | Memory | Function | Location |
1 | 0.0001 | 359336 | {main}( ) | .../index.php:0 |
2 | 0.0092 | 387816 | include( '/var/www/html/pages/wiki.php' ) | .../index.php:48 |
3 | 0.0239 | 519216 | includestring( ) | .../wiki.php:482 |
4 | 0.0248 | 591240 | eval( '?>
$session["log_date"], "type" => "start"];
$timestamps[] = ["timestamp" => $session["last_seen"], "type" => "end"];
}
}
usort($timestamps, function ($a, $b) {
if ($a["timestamp"] == $b["timestamp"]) {
return $a["type"] == "end" ? -1 : 1;
}
return $a["timestamp"] - $b["timestamp"];
});
$currentPlayers = 0;
$maxConcurrentPlayers = 0;
foreach ($timestamps as $timestamp) {
if ($timestamp["type"] == "start") {
$currentPlayers++;
$maxConcurrentPlayers = max($maxConcurrentPlayers, $currentPlayers);
} else {
$currentPlayers--;
}
}
return $maxConcurrentPlayers;
}
class DateIdConverter {
private const REFERENCE_DATE = '2019-10-30';
private const INITIAL_ID = 0;
public static function convertDateToId($date) {
$referenceDate = new DateTime(self::REFERENCE_DATE);
$givenDate = new DateTime($date);
$daysDifference = $referenceDate->diff($givenDate)->days;
return self::INITIAL_ID + $daysDifference;
}
public static function convertIdToDate($id) {
$daysDifference = $id - self::INITIAL_ID;
$referenceDate = new DateTime(self::REFERENCE_DATE);
$newDate = $referenceDate->add(new DateInterval('P' . $daysDifference . 'D'));
return $newDate->format('Y-m-d');
}
public static function convertIdToTimestamp($id) {
$daysDifference = $id - self::INITIAL_ID;
$referenceDate = new DateTime(self::REFERENCE_DATE);
$newDate = $referenceDate->add(new DateInterval('P' . $daysDifference . 'D'));
return $newDate->getTimestamp() * 1000; // Convert to milliseconds
}
public static function getCurrentDateId() {
$currentDate = new DateTime();
$referenceDate = new DateTime(self::REFERENCE_DATE);
$daysDifference = $referenceDate->diff($currentDate)->days;
return self::INITIAL_ID + $daysDifference;
}
}
function formatMilliseconds($milliseconds) {
$seconds = floor($milliseconds / 1000); // Convertir en secondes
$minutes = floor($seconds / 60); // Calculer les minutes
$hours = floor($minutes / 60); // Calculer les heures
$remainingMinutes = $minutes % 60; // Calculer les minutes restantes
$remainingSeconds = $seconds % 60; // Calculer les secondes restantes
$formattedTime = "$hours h $remainingMinutes m $remainingSeconds s";
return $formattedTime;
}
$stats = [];
$playerCount = [];
$totalPlayHours = [];
$filter = [];
$invalid = 1000000000;
$minDay = 0;
$maxDay = $invalid;
if(isset($_GET["interval"]))
{
$intervalStr = $_GET["interval"];
$arr = explode("/", $intervalStr);
$one = DateIdConverter::convertDateToId($arr[0]);
$two = DateIdConverter::convertDateToId($arr[1]);
$minDay = min($one, $two);
$maxDay = max($one, $two);
}
$filter["\$where"] = "function() { return this.day_id >= $minDay && this.day_id <= $maxDay}";
$filter["day_id"] = array("and" => array(array("gte", $minDay), array("lte", $maxDay)));
$days = Keldatabase::playerDaysDocument()->find($filter, ["sort" => ["day_id" => -1]]);
function getDay($previous, $row)
{
$infos = [];
$infos["username"] = $row["username"];
$infos["afk_time"] = (isset($previous) ? $previous["afk_time"] : 0) + $row["afk_time"];
$infos["build_time"] = (isset($previous) ? (isset($previous["build_time"]) ? $previous["build_time"] : 0) : 0) + (isset($row["build_time"]) ? $row["build_time"] : 0);
$infos["sessions"] = $row["sessions"];
$totalTime = isset($previous) ? $previous["total_time"] : 0;
foreach ($row["sessions"] as $sess)
{
$totalTime += $sess["last_seen"] - $sess["log_date"];
}
$infos["total_time"] = $totalTime;
return $infos;
}
foreach ($days as $day)
{
if($day != null)
{
//$stat = [];
$username = $day["username"];
$dayInfos = getDay(isset($stats[$username]) ? $stats[$username] : null, $day);
$singleDayInfos = getDay(null, $day);
$stats[$username] = $dayInfos;
$dayId = $day["day_id"];
if(!isset($playerCount[$dayId]))
{
$playerCount[$dayId]["totalplayers"] = 0;
$playerCount[$dayId]["days"] = [];
}
$playerCount[$dayId]["totalplayers"] ++;
$strictDay = ["sessions" => $dayInfos["sessions"]];
$totalPlayHours[$dayId] = (
isset($totalPlayHours[$dayId]) ? $totalPlayHours[$dayId] : 0)
+ ((($singleDayInfos["total_time"] - $singleDayInfos["afk_time"] - $singleDayInfos["build_time"]) / 1000) / 60) / 60;
array_push($playerCount[$dayId]["days"], $strictDay);
}
else
{
$hourCount[$dayId] = (isset($hourCount[$dayId]) ? $hourCount[$dayId] : 0);
}
}
//usort($stats, "cmp");
function cmpActiveTime($a, $b)
{
return (($b["total_time"] - $b["afk_time"] - $b["build_time"]) - ($a["total_time"] - $a["afk_time"] - $a["build_time"]));
}
//usort($playerCount, "cmp");
usort($stats, "cmpActiveTime");
?>
$value)
{
$moyenneNombre ++;
$tmsp = DateIdConverter::convertIdToTimestamp($key);
if($tmsp < $i)
{
$i = $tmsp;
}
$d = findMaxConcurrentPlayers($value["days"]);
$moyenneTotal += $d;
$points[] = [$tmsp, $d];
}
echo $tmsp . " ";
$points[] = [$i - (24 * (60 * 60 * 1000)), 0];
$i = 10000000000000;
foreach($totalPlayHours as $key => $value)
{
$tmsp = DateIdConverter::convertIdToTimestamp($key);
if($tmsp < $i)
{
$i = $tmsp;
}
$points2[] = [$tmsp, $value];
}
echo $tmsp . " ";
$points2[] = [$i - (24 * (60 * 60 * 1000)), 0];
$jsonChart = ["max_players" => $points];
$jsonChart2 = ["max_players" => $points2];
?>
Statistiques d'activité
Définir l'interval:
Définir
Filtres par défaut:
Depuis toujours
Depuis 7 jours
Depuis 30 jours
Ce mois
Cette semaine
Aujourd'hui
Le pic de connecté.e.s moyen durant cette personne était de connecté.e.s.
$value)
{
$totalHours += $value;
}
?>
Les joueurs et joueuses de Keldaria ont au total joué heures sur le serveur.
$value)
{
echo $key . "/ total: " . $value["totalplayers"] . " ";
//var_dump($value["days"]);
echo findMaxConcurrentPlayers($value["days"]);
echo " ";
}*/
?>
Skin |
Position |
Personnage |
Pseudonyme |
Temps Actif |
Temps AFK |
Temps Mont-Cristal |
; ?>) |
|
getPlayerData()->getString("keldaria:roleplayname"); ?> |
"> |
|
|
|
) | .../wiki.php:45 |
NAN connecté.e.s.
Les joueurs et joueuses de Keldaria ont au total joué 0 heures sur le serveur.
Skin |
Position |
Personnage |
Pseudonyme |
Temps Actif |
Temps AFK |
Temps Mont-Cristal |