Skip to content

Commit 6612255

Browse files
committed
Merge remote-tracking branch 'remotes/Newcomer1989/master' into feature_update
# Conflicts: # jobs/calc_user.php # jobs/check_db.php # languages/core_ar.php # languages/core_cz.php # languages/core_de.php # languages/core_en.php # languages/core_fr.php # languages/core_it.php # languages/core_nl.php # languages/core_pt.php # languages/core_ro.php # languages/core_ru.php # other/config.php # stats/list_rankup.php # webinterface/core.php
2 parents 38affe8 + ce3c88d commit 6612255

File tree

116 files changed

+13355
-12179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+13355
-12179
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
The TSN Ranksystem is an easy to handle Level System to automatically grant ranks (servergroups) to users on a TeamSpeaks3 Server for online time or online activity. You can create your own servergroups, with permissions, icons etc. of your choice, and define these for the Ranksystem. Its open source and so its free to use under the GNU license with version 3.
66

7-
#### Official website: [TS-N.NET](http://ts-n.net/ranksystem.php)
7+
#### Official website: [TS-N.NET](https://ts-n.net/ranksystem.php)

index.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<?PHP
2-
$target = $_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\').'/stats/';
3-
if(isset($_SERVER['HTTPS'])) {
4-
header('Location: https://'.$target);
5-
} else {
6-
header('Location: http://'.$target);
7-
}
1+
<?PHP
2+
$target = $_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\').'/stats/';
3+
if(isset($_SERVER['HTTPS'])) {
4+
header('Location: https://'.$target);
5+
} else {
6+
header('Location: http://'.$target);
7+
}
88
?>

install.php

Lines changed: 690 additions & 650 deletions
Large diffs are not rendered by default.

jobs/addon_assign_groups.php

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
<?PHP
2-
function addon_assign_groups($addons_config,$ts3,$dbname,$slowmode,$timezone,$logpath,$allclients,$select_arr) {
3-
$sqlexec = '';
4-
5-
if(isset($select_arr['addon_assign_groups']) && count($select_arr['addon_assign_groups']) != 0) {
6-
foreach($select_arr['addon_assign_groups'] as $uuid => $value) {
7-
$cld_groups = explode(',', $value['grpids']);
8-
foreach($cld_groups as $group) {
9-
foreach ($allclients as $client) {
10-
if($client['client_unique_identifier'] == $uuid) {
11-
$cldbid = $client['client_database_id'];
12-
$nickname = htmlspecialchars($client['client_nickname'], ENT_QUOTES);
13-
break;
14-
}
15-
}
16-
if(isset($cldbid)) {
17-
if(strstr($group, '-')) {
18-
$group = str_replace('-','',$group);
19-
usleep($slowmode);
20-
try {
21-
$ts3->serverGroupClientDel($group, $cldbid);
22-
}
23-
catch (Exception $e) {
24-
enter_logfile($logpath,$timezone,2,"addon_assign_groups:".$e->getCode().': '."Error while removing group: ".$e->getMessage());
25-
}
26-
} else {
27-
usleep($slowmode);
28-
try {
29-
$ts3->serverGroupClientAdd($group, $cldbid);
30-
}
31-
catch (Exception $e) {
32-
enter_logfile($logpath,$timezone,2,"addon_assign_groups:".$e->getCode().': '."Error while adding group: ".$e->getMessage());
33-
}
34-
}
35-
}
36-
}
37-
}
38-
39-
$sqlexec .= "DELETE FROM $dbname.addon_assign_groups; ";
40-
}
41-
return($sqlexec);
42-
}
1+
<?PHP
2+
function addon_assign_groups($addons_config,$ts3,$dbname,$slowmode,$timezone,$logpath,$allclients,$select_arr) {
3+
$sqlexec = '';
4+
5+
if(isset($select_arr['addon_assign_groups']) && count($select_arr['addon_assign_groups']) != 0) {
6+
foreach($select_arr['addon_assign_groups'] as $uuid => $value) {
7+
$cld_groups = explode(',', $value['grpids']);
8+
foreach($cld_groups as $group) {
9+
foreach ($allclients as $client) {
10+
if($client['client_unique_identifier'] == $uuid) {
11+
$cldbid = $client['client_database_id'];
12+
$nickname = htmlspecialchars($client['client_nickname'], ENT_QUOTES);
13+
break;
14+
}
15+
}
16+
if(isset($cldbid)) {
17+
if(strstr($group, '-')) {
18+
$group = str_replace('-','',$group);
19+
usleep($slowmode);
20+
try {
21+
$ts3->serverGroupClientDel($group, $cldbid);
22+
}
23+
catch (Exception $e) {
24+
enter_logfile($logpath,$timezone,2,"addon_assign_groups:".$e->getCode().': '."Error while removing group: ".$e->getMessage());
25+
}
26+
} else {
27+
usleep($slowmode);
28+
try {
29+
$ts3->serverGroupClientAdd($group, $cldbid);
30+
}
31+
catch (Exception $e) {
32+
enter_logfile($logpath,$timezone,2,"addon_assign_groups:".$e->getCode().': '."Error while adding group: ".$e->getMessage());
33+
}
34+
}
35+
}
36+
}
37+
}
38+
39+
$sqlexec .= "DELETE FROM `$dbname`.`addon_assign_groups`; ";
40+
}
41+
return($sqlexec);
42+
}
4343
?>

0 commit comments

Comments
 (0)