Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms
if($mysqlcon->exec("CREATE TABLE `$dbname`.`user_iphash` (
`uuid` char(28) CHARACTER SET utf8 COLLATE utf8_unicode_ci PRIMARY KEY,
`iphash` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`ip` varchar(39) CHARACTER SET utf8 COLLATE utf8_unicode_ci
`ip` varchar(39) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`is_ipv4` tinyint(1) NOT NULL
);") === false) {
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
$count++;
Expand Down Expand Up @@ -1072,4 +1073,4 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms
});
</script>
</body>
</html>
</html>
8 changes: 7 additions & 1 deletion jobs/check_db.php
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,16 @@ function check_writable($cfg,$mysqlcon) {
$updatedone = TRUE;
}

if(version_compare($cfg['version_current_using'], '1.3.24', '<')) {
if($mysqlcon->exec("ALTER TABLE `$dbname`.`user_iphash` ADD COLUMN `is_ipv4` tinyint(1) NOT NULL;") === false) { } else {
enter_logfile(4," [1.3.24] Successfully added the new `is_ipv4` column to the table `user_iphash`.");
}
}

$cfg = set_new_version($mysqlcon,$cfg,$dbname);
}
enter_logfile(5,"Check Ranksystem database for updates [done]");
if(isset($updatedone) && $updatedone === TRUE) return TRUE;
return FALSE;
}
?>
?>
13 changes: 8 additions & 5 deletions jobs/event_userenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ function event_userenter(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
if($client['client_database_id'] == $event['client_database_id']) {
if(strstr($client['connection_client_ip'], '[')) {
$ip = str_replace(array('[',']'),'',$client['connection_client_ip']);
$is_ipv4 = false; // IPv6
} else {
$ip = $client['connection_client_ip'];
$is_ipv4 = true; // IPv4
}
break;
}
Expand Down Expand Up @@ -46,12 +48,13 @@ function event_userenter(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
}

$uuid = htmlspecialchars($event['client_unique_identifier'], ENT_QUOTES);
$is_ipv4 = (isset($is_ipv4)) ? $is_ipv4 : true; // default IPv4, if it couldn't be detected
if(isset($sqlhashs[$uuid])) {
$sqlexec3 .= "UPDATE `$dbname`.`user_iphash` SET `iphash`='$hash',`ip`='$ip' WHERE `uuid`='{$event['client_unique_identifier']}'; ";
enter_logfile(6,"Userenter: UPDATE `$dbname`.`user_iphash` SET `iphash`='$hash',`ip`='$ip' WHERE `uuid`='{$event['client_unique_identifier']}'; ");
$sqlexec3 .= "UPDATE `$dbname`.`user_iphash` SET `iphash`='$hash',`ip`='$ip',`is_ipv4`=$is_ipv4 WHERE `uuid`='{$event['client_unique_identifier']}'; ";
enter_logfile(6,"Userenter: UPDATE `$dbname`.`user_iphash` SET `iphash`='$hash',`ip`='$ip',`is_ipv4`=$is_ipv4 WHERE `uuid`='{$event['client_unique_identifier']}'; ");
} else {
$sqlexec3 .= "INSERT INTO `$dbname`.`user_iphash` (`uuid`,`iphash`,`ip`) VALUES ('{$event['client_unique_identifier']}','$hash','$ip'); ";
enter_logfile(6,"Userenter: INSERT INTO `$dbname`.`user_iphash` (`uuid`,`iphash`,`ip`) VALUES ('{$event['client_unique_identifier']}','$hash','$ip'); ");
$sqlexec3 .= "INSERT INTO `$dbname`.`user_iphash` (`uuid`,`iphash`,`ip`,`is_ipv4`) VALUES ('{$event['client_unique_identifier']}','$hash','$ip',$is_ipv4); ";
enter_logfile(6,"Userenter: INSERT INTO `$dbname`.`user_iphash` (`uuid`,`iphash`,`ip`,`is_ipv4`) VALUES ('{$event['client_unique_identifier']}','$hash','$ip',$is_ipv4); ");
}
if($mysqlcon->exec($sqlexec3) === false) {
enter_logfile(2,"event_userenter 3:".print_r($mysqlcon->errorInfo(), true));
Expand All @@ -62,4 +65,4 @@ function event_userenter(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3
}
}
}
?>
?>
3 changes: 2 additions & 1 deletion languages/core_ar_العربية_arab.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "View all nations";
$lang['stix0063'] = "View all platforms";
$lang['stix0064'] = "Last 3 months";
$lang['stix0065'] = "(لكل المستخدمين) IP Versions";
$lang['stmy0001'] = "العضوية";
$lang['stmy0002'] = "رتبة";
$lang['stmy0003'] = "Database ID:";
Expand Down Expand Up @@ -705,4 +706,4 @@
$lang['wiverifydesc'] = "Enter here the channel-ID of the verification channel.<br><br>This channel need to be set up <u>manual</u> on your TeamSpeak server. Name, permissions and other properties could be defined for your choice; only user should be possible to join this channel!<br><br>The verification is done by the respective user himself on the statistics-page (/stats/). This is only necessary if the website visitor can't automatically be matched/related with the TeamSpeak user.<br><br>To verify the TeamSpeak user, he has to be in the verification channel. There he is able to receive a token with which he can verify himself for the statistics page.";
$lang['wivlang'] = "Language";
$lang['wivlangdesc'] = "Choose a default language for the Ranksystem.<br><br>The language is also selectable on the websites for the users and will be stored for the session.";
?>
?>
3 changes: 2 additions & 1 deletion languages/core_az_Azərbaycan_az.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "Bütün millətlərə bax";
$lang['stix0063'] = "Bütün platformlara baxın";
$lang['stix0064'] = "Son 3 ay";
$lang['stix0065'] = "IP Versions (bütün istifadəçilərin)";
$lang['stmy0001'] = "Mənim statistikalarım";
$lang['stmy0002'] = "Dərəcə";
$lang['stmy0003'] = "Database ID:";
Expand Down Expand Up @@ -705,4 +706,4 @@
$lang['wiverifydesc'] = "Burada doğrulama kanalının kanal ID daxil edin.<br><br>Bu kanalın qurulması lazımdır. <u>Əl ilə</u> qurmalısız. Ad, icazələr və digər xüsusiyyətlər sizin seçiminizlə müəyyənləşdirilə bilər; yalnız istifadəçi bu kanala qoşulmalıdır!<br><br>Verifikasiya statistik məlumat səhifəsində müvafiq istifadəçi tərəfindən həyata keçirilir (/stats/). Bu, yalnız veb interfeysin istifadəçisinin, TeamSpeak istifadəçisiyle avtomatik olaraq eşleşmemesi / uyğunlaşmaması lazımdır.<br><br>TeamSpeak istifadəçisini yoxlamaq üçün yoxlama kanalında olmalıdır. O, özü statistika səhifəsi üçün özünü təsdiqləyə biləcək bir möcüzə ala bilir.";
$lang['wivlang'] = "Dil";
$lang['wivlangdesc'] = "Rank Sistemi üçün standart bir dil seçin.<br><br>Dil, həmçinin istifadəçilər üçün saytlarda seçilə bilər və sessiya üçün saxlanacaq.";
?>
?>
3 changes: 2 additions & 1 deletion languages/core_cz_Čeština_cz.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "Ukaž všechny národnosti";
$lang['stix0063'] = "Ukaž všechny platformy";
$lang['stix0064'] = "Za poslední čtvrtletí";
$lang['stix0065'] = "IP Versions (všech Uživatelů)";
$lang['stmy0001'] = "Mé statistiky";
$lang['stmy0002'] = "Moje pořadí";
$lang['stmy0003'] = "Pořadí v databázi (ID):";
Expand Down Expand Up @@ -706,4 +707,4 @@
$lang['wiverifydesc'] = "Enter here the channel-ID of the verification channel.<br><br>This channel need to be set up <u>manual</u> on your TeamSpeak server. Name, permissions and other properties could be defined for your choice; only user should be possible to join this channel!<br><br>The verification is done by the respective user himself on the statistics-page (/stats/). This is only necessary if the website visitor can't automatically be matched/related with the TeamSpeak user.<br><br>To verify the TeamSpeak user, he has to be in the verification channel. There he is able to receive a token with which he can verify himself for the statistics page.";
$lang['wivlang'] = "Jazyk";
$lang['wivlangdesc'] = "Nastavte hlavní jazyk pro Ranksystem<br><br>Jazyk můžete kdykoliv změnit.";
?>
?>
3 changes: 2 additions & 1 deletion languages/core_de_Deutsch_de.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "zeige alle Nationen";
$lang['stix0063'] = "zeige alle Plattformen";
$lang['stix0064'] = "letzten 3 Monate";
$lang['stix0065'] = "IP Versionen (aller User)";
$lang['stmy0001'] = "Meine Statistiken";
$lang['stmy0002'] = "Rank";
$lang['stmy0003'] = "Datenbank-ID:";
Expand Down Expand Up @@ -705,4 +706,4 @@
$lang['wiverifydesc'] = "Hier ist die Channel Datenbank-ID des Verifizierungs-Channels zu hinterlegen.<br><br>Dieser Channel ist <u>manuell</u> auf dem TeamSpeak Server anzulegen. Name, Berechtigungen und sonstige Eigenschaften können nach Belieben gesetzt werden; lediglich sollten User ihn betreten können! ;-)<br><br>Die Verifizierung erfolgt durch den jeweiligen Benutzer selbst auf der Ranksystem Statistik-Seite (/stats/). Sie ist nur dann erforderlich, wenn eine Zuordnung des Webseitenbesuchers mit dem TeamSpeak-User nicht automatisch erfolgen kann.<br><br>Für die Verifizierung muss sich der User auf dem TeamSpeak Server in den Verifizierungs-Channel begeben. Dort kann er den Token empfangen, mit welchem er sich für die Statistik-Seite verifiziert.";
$lang['wivlang'] = "Sprache";
$lang['wivlangdesc'] = "Wähle die Standard-Sprache des Ranksystems.<br>Sie ist relevant für das Webinterface, die Statistik-Seite und insbesondere für die Ranksystem-Log.<br><br>Die Sprache kann über die Webseite durch jeden Besucher übersteuert werden und wird dann für die laufende Sitzung gespeichert (Session-Cookie).";
?>
?>
3 changes: 2 additions & 1 deletion languages/core_en_english_gb.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "View all nations";
$lang['stix0063'] = "View all platforms";
$lang['stix0064'] = "Last 3 months";
$lang['stix0065'] = "IP Versions (all users)";
$lang['stmy0001'] = "My statistics";
$lang['stmy0002'] = "Rank";
$lang['stmy0003'] = "Database ID:";
Expand Down Expand Up @@ -705,4 +706,4 @@
$lang['wiverifydesc'] = "Enter here the channel-ID of the verification channel.<br><br>This channel needs to be set up <u>manually</u> on your TeamSpeak server. Name, permissions and other properties could be defined of your choice; only the user should be possible to join this channel!<br><br>The verification is done by the respective user himself on the statistics-page (/stats/). This is only necessary if the website visitor can't automatically be matched/related to the TeamSpeak user.<br><br>To verify the TeamSpeak user, he has to be in the verification channel. There he is able to receive a token with which he can verify himself for the statistics page.";
$lang['wivlang'] = "Language";
$lang['wivlangdesc'] = "Choose a default language for the Ranksystem.<br><br>The language is also selectable on the websites for the users and will be stored for the session.";
?>
?>
3 changes: 2 additions & 1 deletion languages/core_es_español_es.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "Ver todas las naciones";
$lang['stix0063'] = "Ver todas las plataformas";
$lang['stix0064'] = "Últimos 3 meses";
$lang['stix0065'] = "IP Versions (de todos los clientes)";
$lang['stmy0001'] = "Mis estadísticas";
$lang['stmy0002'] = "Rango";
$lang['stmy0003'] = "ID de la base de datos:";
Expand Down Expand Up @@ -704,4 +705,4 @@
$lang['wiverifydesc'] = "Ingrese aquí el ID de canal del canal de verificación.<br><br>Este canal debe ser configurado <u>manualmente</u> en tu servidor TeamSpeak. Nombre, permisos y otras propiedades podrían definirse para su elección; solo el usuario debería ser posible unirse a este canal!<br><br>La verificación la realiza el propio usuario en la página de estadísticas.(/stats/). Esto solo es necesario si el visitante del sitio web no puede ser emparejado / relacionado automáticamente con el usuario de TeamSpeak.<br><br>To verify the TeamSpeak user, he has to be in the verification channel. Allí puede recibir un token con el que puede verificarse a sí mismo para la página de estadísticas.";
$lang['wivlang'] = "Idioma";
$lang['wivlangdesc'] = "Elija un idioma predeterminado para el Ranksystem.<br><br>El idioma también se puede seleccionar en los sitios web para los usuarios y se almacenará para la sesión.";
?>
?>
3 changes: 2 additions & 1 deletion languages/core_fr_français_fr.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "Voir toutes les nations";
$lang['stix0063'] = "Voir toutes les plateformes";
$lang['stix0064'] = "Last 3 months";
$lang['stix0065'] = "IP Versions (de tous les clients)";
$lang['stmy0001'] = "Mes statistiques";
$lang['stmy0002'] = "Rang";
$lang['stmy0003'] = "ID dans la base de donnée:";
Expand Down Expand Up @@ -703,4 +704,4 @@
$lang['wiverifydesc'] = "Enter here the channel-ID of the verification channel.<br><br>This channel need to be set up <u>manual</u> on your TeamSpeak server. Name, permissions and other properties could be defined for your choice; only user should be possible to join this channel!<br><br>The verification is done by the respective user himself on the statistics-page (/stats/). This is only necessary if the website visitor can't automatically be matched/related with the TeamSpeak user.<br><br>To verify the TeamSpeak user, he has to be in the verification channel. There he is able to receive a token with which he can verify himself for the statistics page.";
$lang['wivlang'] = "Langue";
$lang['wivlangdesc'] = "Choisissez une langue par défaut pour le Ranksystem.<br><br>La langue est également sélectionnable sur le site web pour les utilisateurs et sera stockée pour sa session.";
?>
?>
3 changes: 2 additions & 1 deletion languages/core_hu_Hungary_hu.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "Minden nemzetiség megtekintése";
$lang['stix0063'] = "Minden platform megtekintése";
$lang['stix0064'] = "Az utolsó 90 napban";
$lang['stix0065'] = "IP Versions (összesítve)";
$lang['stmy0001'] = "Saját statisztikám";
$lang['stmy0002'] = "Helyezés";
$lang['stmy0003'] = "Adatbázis ID:";
Expand Down Expand Up @@ -705,4 +706,4 @@
$lang['wiverifydesc'] = "Írja ide az ellenőrző csatorna csatorna-azonosítóját.<br><br>Ezt a szobát <u>manuálisan</u> kell beállítani a TeamSpeak szerveren. A nevet, az engedélyeket és az egyéb tulajdonságokat ön választhatja; csak a felhasználónak kell csatlakoznia ehhez a szobához!!<br><br>Az ellenőrzést a megfelelő felhasználó maga végzi a statisztikai oldalon (/ stats /). Ez csak akkor szükséges, ha a webhely látogatóját nem lehet automatikusan egyeztetni / kapcsolatba hozni a TeamSpeak felhasználóval.<br><br>A TeamSpeak felhasználó igazolásához a hitelesítési csatornán kell lennie. Ott képes egy tokent kapni, amellyel ellenőrizheti magát a statisztikai oldalon.";
$lang['wivlang'] = "Nyelv";
$lang['wivlangdesc'] = "Válasszon alapértelmezett nyelvet a Ranksystem számára.<br><br>A nyelv a felhasználók számára a weboldalakon is kiválasztható, és a munkamenet során tárolódik.";
?>
?>
3 changes: 2 additions & 1 deletion languages/core_it_Italiano_it.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "Viaualizza tutte le nazionalità";
$lang['stix0063'] = "Visualizza tutte le piattaforme";
$lang['stix0064'] = "Last 3 months";
$lang['stix0065'] = "IP Versions (di tutti gli utenti)";
$lang['stmy0001'] = "Le mie statistiche";
$lang['stmy0002'] = "Rank";
$lang['stmy0003'] = "Database ID:";
Expand Down Expand Up @@ -705,4 +706,4 @@
$lang['wiverifydesc'] = "Inserisci l'ID del canale di verifica.<br><br>Questo canale va impostato <u>manualmente</u> nel tuo server Teamspeak. Nome, permessi e altre proprietà possono essere impostati a tua scelta; Solo gli utenti potranno entrare in questo canale!<br><br>La verifica va fatta dall'utente nella sua pagina delle informazioni (/stats/). Questo è necessario solo se i visitatori della pagina web non possono essere direttamente associati al profilo del server Teamspeak.<br><br>Per essere verificato l'utente deve essere all'interno del canale di verifica sul server Teamspeak. Qui riceverà un token per la sua pagina delle statistiche.";
$lang['wivlang'] = "Lingua";
$lang['wivlangdesc'] = "Scegli la lingua di default del Ranksystem.<br><br>La lingua è inoltre selezionabile dal sito e viene salvata per tutta la sessione.";
?>
?>
3 changes: 2 additions & 1 deletion languages/core_nl_Nederlands_nl.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "View all nations";
$lang['stix0063'] = "View all platforms";
$lang['stix0064'] = "Last 3 months";
$lang['stix0065'] = "IP Versions (van alle clients)";
$lang['stmy0001'] = "Mijn statistieken";
$lang['stmy0002'] = "Rang";
$lang['stmy0003'] = "Database ID:";
Expand Down Expand Up @@ -705,4 +706,4 @@
$lang['wiverifydesc'] = "Enter here the channel-ID of the verification channel.<br><br>This channel need to be set up <u>manual</u> on your TeamSpeak server. Name, permissions and other properties could be defined for your choice; only user should be possible to join this channel!<br><br>The verification is done by the respective user himself on the statistics-page (/stats/). This is only necessary if the website visitor can't automatically be matched/related with the TeamSpeak user.<br><br>To verify the TeamSpeak user, he has to be in the verification channel. There he is able to receive a token with which he can verify himself for the statistics page.";
$lang['wivlang'] = "Language";
$lang['wivlangdesc'] = "Choose a default language for the Ranksystem.<br><br>The language is also selectable on the websites for the users and will be stored for the session.";
?>
?>
1 change: 1 addition & 0 deletions languages/core_pl_polski_pl.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "Zobacz wszystkie narody";
$lang['stix0063'] = "Wyświetl wszystkie platformy";
$lang['stix0064'] = "Ostatnie 3 miesiące";
$lang['stix0065'] = "IP Versions (wszystkich klientów)";
$lang['stmy0001'] = "Moje statystyki";
$lang['stmy0002'] = "Ranga";
$lang['stmy0003'] = "Database ID:";
Expand Down
3 changes: 2 additions & 1 deletion languages/core_pt_Português_pt.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "Veja todas as nações";
$lang['stix0063'] = "Ver todas as plataformas";
$lang['stix0064'] = "Last 3 months";
$lang['stix0065'] = "IP Versions (de todos os clientes)";
$lang['stmy0001'] = "Minhas estatísticas";
$lang['stmy0002'] = "Rank";
$lang['stmy0003'] = "ID da data base:";
Expand Down Expand Up @@ -705,4 +706,4 @@
$lang['wiverifydesc'] = "Digite aqui a ID do canal de verificação.<br><br>Este canal precisa ser configurado <u>manualmente</u> no seu servidor TeamSpeak. Nome, permissões e outras propriedades podem ser definidos por sua escolha; o usuário deve apenas se juntar a este canal!<br><br>A verificação é feita pelo próprio usuário na página de estatísticas (/stats/). Isso só é necessário se o visitante do site não puder ser automaticamente encontrado / relacionado com o usuário do TeamSpeak.<br><br>Para verificar-se o usuário do TeamSpeak deve estar dentro do canal de verificação. Lá, ele pode receber o token com o qual ele se verifica para na página de estatísticas.";
$lang['wivlang'] = "Tradução";
$lang['wivlangdesc'] = "Escolha um idioma padrão para o Sistema de ranking.<br><br>O idioma também é selecionável nos sites para os usuários e será armazenado para as próximas sessões.";
?>
?>
3 changes: 2 additions & 1 deletion languages/core_ro_Română_ro.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
$lang['stix0062'] = "Vezi natiuni";
$lang['stix0063'] = "Vezi platforme";
$lang['stix0064'] = "Last 3 months";
$lang['stix0065'] = "IP Versions (tuturor clien?ilor)";
$lang['stmy0001'] = "Statisticile mele";
$lang['stmy0002'] = "Grad";
$lang['stmy0003'] = "ID baza de date:";
Expand Down Expand Up @@ -705,4 +706,4 @@
$lang['wiverifydesc'] = "Scrie aici ID-ul canalului pentru verificare.<br><br>Acest canal trebuie setat <u>manual</u> pe serverul TeamSpeak. Numele, permisiunile ?i alte proprieta?i ar putea fi definite pentru alegerea dvs.; doar utilizatorul ar trebui sa fie posibil sa se alature acestui canal!<br><br> Verificarea se face de catre utilizatorul respectiv ?u?i pe pagina de statistici (/stats/). Acest lucru este necesar doar daca vizitatorul site-ului nu poate fi asociat automat cu utilizatorul TeamSpeak. <br> <br> Pentru a verifica daca utilizatorul TeamSpeak trebuie sa fie pe canalul de verificare. Acolo el poate primi token-ul cu care se verifica pentru pagina de statistici.";
$lang['wivlang'] = "Limba";
$lang['wivlangdesc'] = "Alege limba default pentru web.<br><br>Limba se poate schimba din web de fiecare user.";
?>
?>
Loading