@@ -555,7 +559,7 @@ require_once('nav.php');
} elseif ($usage == 'year') {
$server_usage = $mysqlcon->query("SELECT u1.timestamp, u1.clients, u1.channel FROM (SELECT @a:=@a+1,mod(@a,64) AS test,timestamp,clients,channel FROM $dbname.server_usage) AS u2, $dbname.server_usage AS u1 WHERE u1.timestamp=u2.timestamp AND u2.test='1' ORDER BY u2.timestamp DESC LIMIT 548");
} else {
- $server_usage = $mysqlcon->query("SELECT u1.timestamp, u1.clients, u1.channel FROM (SELECT timestamp,clients,channel FROM $dbname.server_usage) AS u2, $dbname.server_usage AS u1 WHERE u1.timestamp=u2.timestamp ORDER BY u2.timestamp DESC LIMIT 96");
+ $server_usage = $mysqlcon->query("SELECT timestamp, clients, channel FROM $dbname.server_usage ORDER BY timestamp DESC LIMIT 96");
}
$server_usage = $server_usage->fetchAll(PDO::FETCH_ASSOC);
foreach($server_usage as $chart_value) {
@@ -572,7 +576,7 @@ require_once('nav.php');
hideHover: 'auto',
hoverCallback:
function (index, options, content, row) {
- return "" + row.y + "
Clients: " + row.a + "
Channel: " + (row.b + row.a) + "
";
+ return "" + row.y + "
Clients: " + row.a + "
Channel: " + (row.b + row.a) + "
";
} ,
labels: ['Clients', 'Channel']
});
diff --git a/stats/info.php b/stats/info.php
index be63562..16a865a 100644
--- a/stats/info.php
+++ b/stats/info.php
@@ -77,6 +77,7 @@ require_once('nav.php');
+
diff --git a/stats/list_rankup.php b/stats/list_rankup.php
index 1fb8d4d..b401a94 100644
--- a/stats/list_rankup.php
+++ b/stats/list_rankup.php
@@ -78,17 +78,19 @@ if(isset($getstring) && strstr($getstring, 'filter:country:')) {
if(isset($getstring) && strstr($getstring, 'filter:lastseen:')) {
preg_match('/filter\:lastseen\:(.*)\:(.*)\:/',$searchstring,$seenvalue);
$searchstring = preg_replace('/filter\:lastseen\:(.*)\:(.*)\:/','',$searchstring);
- if(is_numeric($seenvalue[2])) {
+ if(isset($seenvalue[2]) && is_numeric($seenvalue[2])) {
$lastseen = $seenvalue[2];
- } else {
+ } elseif(isset($seenvalue[2])) {
$r = date_parse_from_format("Y-m-d H-i",$seenvalue[2]);
$lastseen = mktime($r['hour'], $r['minute'], $r['second'], $r['month'], $r['day'], $r['year']);
+ } else {
+ $lastseen = 0;
}
- if($seenvalue[1] == '<' || $seenvalue[1] == '<') {
+ if(isset($seenvalue[1]) && ($seenvalue[1] == '<' || $seenvalue[1] == '<')) {
$operator = '<';
- } elseif($seenvalue[1] == '>' || $seenvalue[1] == '>') {
+ } elseif(isset($seenvalue[1]) && ($seenvalue[1] == '>' || $seenvalue[1] == '>')) {
$operator = '>';
- } elseif($seenvalue[1] == '!=') {
+ } elseif(isset($seenvalue[1]) && $seenvalue[1] == '!=') {
$operator = '!=';
} else {
$operator = '=';
@@ -116,7 +118,7 @@ $keyorder = '';
if (isset($_GET['sort'])) {
$keysort = strip_tags(htmlspecialchars($_GET['sort']));
}
-if ($keysort != 'name' && $keysort != 'uuid' && $keysort != 'cldbid' && $keysort != 'rank' && $keysort != 'lastseen' && $keysort != 'count' && $keysort != 'idle' && $keysort != 'active' && $keysort != 'grpsince') {
+if ($keysort != 'name' && $keysort != 'uuid' && $keysort != 'cldbid' && $keysort != 'rank' && $keysort != 'lastseen' && $keysort != 'count' && $keysort != 'idle' && $keysort != 'active' && $keysort != 'grpid' && $keysort != 'grpsince') {
$keysort = 'nextup';
}
if (isset($_GET['order'])) {
@@ -232,7 +234,7 @@ $dbgroups = $mysqlcon->query("SELECT * FROM $dbname.groups");
$servergroups = $dbgroups->fetchAll(PDO::FETCH_ASSOC);
foreach($servergroups as $servergroup) {
$sqlhisgroup[$servergroup['sgid']] = $servergroup['sgidname'];
- if(file_exists('../icons/'.$servergroup['sgid'].'.png')) {
+ if(file_exists('../tsicons/'.$servergroup['sgid'].'.png')) {
$sqlhisgroup_file[$servergroup['sgid']] = true;
} else {
$sqlhisgroup_file[$servergroup['sgid']] = false;
@@ -384,7 +386,7 @@ if($adminlogin == 1) {
if ($sqlhis[$uid]['grpid'] == 0) {
echo ' | ';
} elseif ($sqlhisgroup_file[$sqlhis[$uid]['grpid']]===true) {
- echo ' ' , $sqlhisgroup[$usergroupid] , ' | ';
+ echo ' ' , $sqlhisgroup[$usergroupid] , ' | ';
} else {
echo '' , $sqlhisgroup[$usergroupid] , ' | ';
}
@@ -418,7 +420,7 @@ if($adminlogin == 1) {
} elseif ($except == 2 || $except == 3) {
echo '',$lang['listexcept'],' | ';
} elseif (isset($sqlhisgroup_file[$groupid]) && $sqlhisgroup_file[$groupid]===true) {
- echo ' ' , $sqlhisgroup[$groupid] , ' | ';
+ echo ' ' , $sqlhisgroup[$groupid] , ' | ';
} elseif (isset($sqlhisgroup[$groupid])) {
echo '' , $sqlhisgroup[$groupid] , ' | ';
} else {
diff --git a/stats/my_stats.php b/stats/my_stats.php
index 3605863..3bcc25c 100644
--- a/stats/my_stats.php
+++ b/stats/my_stats.php
@@ -10,91 +10,99 @@ if(!isset($_SESSION['tsuid']) || isset($_SESSION['uuid_verified'])) {
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
}
-$getstring = $_SESSION['tsuid'];
-$searchmysql = 'WHERE uuid LIKE \'%'.$getstring.'%\'';
+$multiple_uuid = explode(',', substr($_SESSION['multiple'], 0, -1));
-$dbdata = $mysqlcon->query("SELECT * FROM $dbname.user $searchmysql");
-$dbdata_fetched = $dbdata->fetchAll();
-$count_hours = round($dbdata_fetched[0]['count']/3600);
-$idle_hours = round($dbdata_fetched[0]['idle']/3600);
-$except = $dbdata_fetched[0]['except'];
-
-if ($substridle == 1) {
- $activetime = $dbdata_fetched[0]['count'] - $dbdata_fetched[0]['idle'];
+if(count($multiple_uuid) > 1 and !isset($_SESSION['uuid_verified'])) {
+ $err_msg = sprintf($lang['stag0006'], '', ''); $err_lvl = 3;
+
} else {
- $activetime = $dbdata_fetched[0]['count'];
-}
-$active_count = $dbdata_fetched[0]['count'] - $dbdata_fetched[0]['idle'];
-krsort($grouptime);
-$grpcount = 0;
-$nextgrp = '';
+ $getstring = $_SESSION['tsuid'];
+ $searchmysql = 'WHERE uuid LIKE \'%'.$getstring.'%\'';
-foreach ($grouptime as $time => $groupid) {
- $grpcount++;
- $actualgrp = $time;
- if ($activetime > $time) {
- break;
+ $dbdata = $mysqlcon->query("SELECT * FROM $dbname.user $searchmysql");
+ $dbdata_fetched = $dbdata->fetchAll();
+ $count_hours = round($dbdata_fetched[0]['count']/3600);
+ $idle_hours = round($dbdata_fetched[0]['idle']/3600);
+ $except = $dbdata_fetched[0]['except'];
+
+ if ($substridle == 1) {
+ $activetime = $dbdata_fetched[0]['count'] - $dbdata_fetched[0]['idle'];
} else {
- $nextup = $time - $activetime;
- $nextgrp = $time;
+ $activetime = $dbdata_fetched[0]['count'];
}
-}
-if($actualgrp==$nextgrp) {
- $actualgrp = 0;
-}
-if($activetime>$nextgrp) {
- $percentage_rankup = 100;
-} else {
- $takedtime = $activetime - $actualgrp;
- $neededtime = $nextgrp - $actualgrp;
- $percentage_rankup = round($takedtime/$neededtime*100);
-}
+ $active_count = $dbdata_fetched[0]['count'] - $dbdata_fetched[0]['idle'];
-$stats_user = $mysqlcon->query("SELECT * FROM $dbname.stats_user WHERE uuid='$getstring'");
-$stats_user = $stats_user->fetchAll();
+ krsort($grouptime);
+ $grpcount = 0;
+ $nextgrp = '';
-if (isset($stats_user[0]['count_week'])) $count_week = $stats_user[0]['count_week']; else $count_week = 0;
-$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_week"); $count_week = $dtF->diff($dtT)->format($timeformat);
-if (isset($stats_user[0]['active_week'])) $active_week = $stats_user[0]['active_week']; else $active_week = 0;
-$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_week"); $active_week = $dtF->diff($dtT)->format($timeformat);
-if (isset($stats_user[0]['count_month'])) $count_month = $stats_user[0]['count_month']; else $count_month = 0;
-$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_month"); $count_month = $dtF->diff($dtT)->format($timeformat);
-if (isset($stats_user[0]['active_month'])) $active_month = $stats_user[0]['active_month']; else $active_month = 0;
-$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_month"); $active_month = $dtF->diff($dtT)->format($timeformat);
-if (isset($dbdata_fetched[0]['count'])) $count_total = $dbdata_fetched[0]['count']; else $count_total = 0;
-$dtF = new DateTime("@0"); $dtT = new DateTime("@$count_total"); $count_total = $dtF->diff($dtT)->format($timeformat);
-$dtF = new DateTime("@0"); $dtT = new DateTime("@$active_count"); $active_count = $dtF->diff($dtT)->format($timeformat);
+ foreach ($grouptime as $time => $groupid) {
+ $grpcount++;
+ $actualgrp = $time;
+ if ($activetime > $time) {
+ break;
+ } else {
+ $nextup = $time - $activetime;
+ $nextgrp = $time;
+ }
+ }
+ if($actualgrp==$nextgrp) {
+ $actualgrp = 0;
+ }
+ if($activetime>$nextgrp) {
+ $percentage_rankup = 100;
+ } else {
+ $takedtime = $activetime - $actualgrp;
+ $neededtime = $nextgrp - $actualgrp;
+ $percentage_rankup = round($takedtime/$neededtime*100);
+ }
-$time_for_bronze = 50;
-$time_for_silver = 100;
-$time_for_gold = 250;
-$time_for_legendary = 500;
+ $stats_user = $mysqlcon->query("SELECT * FROM $dbname.stats_user WHERE uuid='$getstring'");
+ $stats_user = $stats_user->fetchAll();
-$connects_for_bronze = 50;
-$connects_for_silver = 100;
-$connects_for_gold = 250;
-$connects_for_legendary = 500;
+ if (isset($stats_user[0]['count_week'])) $count_week = $stats_user[0]['count_week']; else $count_week = 0;
+ $dtF = new DateTime("@0"); $dtT = new DateTime("@$count_week"); $count_week = $dtF->diff($dtT)->format($timeformat);
+ if (isset($stats_user[0]['active_week'])) $active_week = $stats_user[0]['active_week']; else $active_week = 0;
+ $dtF = new DateTime("@0"); $dtT = new DateTime("@$active_week"); $active_week = $dtF->diff($dtT)->format($timeformat);
+ if (isset($stats_user[0]['count_month'])) $count_month = $stats_user[0]['count_month']; else $count_month = 0;
+ $dtF = new DateTime("@0"); $dtT = new DateTime("@$count_month"); $count_month = $dtF->diff($dtT)->format($timeformat);
+ if (isset($stats_user[0]['active_month'])) $active_month = $stats_user[0]['active_month']; else $active_month = 0;
+ $dtF = new DateTime("@0"); $dtT = new DateTime("@$active_month"); $active_month = $dtF->diff($dtT)->format($timeformat);
+ if (isset($dbdata_fetched[0]['count'])) $count_total = $dbdata_fetched[0]['count']; else $count_total = 0;
+ $dtF = new DateTime("@0"); $dtT = new DateTime("@$count_total"); $count_total = $dtF->diff($dtT)->format($timeformat);
+ $dtF = new DateTime("@0"); $dtT = new DateTime("@$active_count"); $active_count = $dtF->diff($dtT)->format($timeformat);
-$achievements_done = 0;
+ $time_for_bronze = 50;
+ $time_for_silver = 100;
+ $time_for_gold = 250;
+ $time_for_legendary = 500;
-if($count_hours >= $time_for_legendary) {
- $achievements_done = $achievements_done + 4;
-} elseif($count_hours >= $time_for_gold) {
- $achievements_done = $achievements_done + 3;
-} elseif($count_hours >= $time_for_silver) {
- $achievements_done = $achievements_done + 2;
-} else {
- $achievements_done = $achievements_done + 1;
-}
-if($_SESSION['tsconnections'] >= $connects_for_legendary) {
- $achievements_done = $achievements_done + 4;
-} elseif($_SESSION['tsconnections'] >= $connects_for_gold) {
- $achievements_done = $achievements_done + 3;
-} elseif($_SESSION['tsconnections'] >= $connects_for_silver) {
- $achievements_done = $achievements_done + 2;
-} else {
- $achievements_done = $achievements_done + 1;
+ $connects_for_bronze = 50;
+ $connects_for_silver = 100;
+ $connects_for_gold = 250;
+ $connects_for_legendary = 500;
+
+ $achievements_done = 0;
+
+ if($count_hours >= $time_for_legendary) {
+ $achievements_done = $achievements_done + 4;
+ } elseif($count_hours >= $time_for_gold) {
+ $achievements_done = $achievements_done + 3;
+ } elseif($count_hours >= $time_for_silver) {
+ $achievements_done = $achievements_done + 2;
+ } else {
+ $achievements_done = $achievements_done + 1;
+ }
+ if($_SESSION['tsconnections'] >= $connects_for_legendary) {
+ $achievements_done = $achievements_done + 4;
+ } elseif($_SESSION['tsconnections'] >= $connects_for_gold) {
+ $achievements_done = $achievements_done + 3;
+ } elseif($_SESSION['tsconnections'] >= $connects_for_silver) {
+ $achievements_done = $achievements_done + 2;
+ } else {
+ $achievements_done = $achievements_done + 1;
+ }
}
function get_percentage($max_value, $value) {
@@ -103,7 +111,8 @@ function get_percentage($max_value, $value) {
require_once('nav.php');
?>
-
+ 1) { echo "