release 1.3.8

This commit is contained in:
Newcomer1989
2020-07-03 21:04:58 +02:00
parent b3b06b4707
commit 2336177eca
35 changed files with 857 additions and 733 deletions

View File

@@ -62,14 +62,6 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
if(($groupslist = $mysqlcon->query("SELECT * FROM `$dbname`.`groups` ORDER BY `sortid`,`sgidname` ASC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
$err_msg = print_r($mysqlcon->errorInfo(), true);
$err_lvl = 3;
} else {
foreach($groupslist as $sgid => $servergroup) {
if(file_exists('../tsicons/'.$sgid.'.png')) {
$groupslist[$sgid]['iconfile'] = 1;
} else {
$groupslist[$sgid]['iconfile'] = 0;
}
}
}
$assign_groups_active = 0;
@@ -148,12 +140,12 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']]) && isset($_
$assign_groups_groupids = explode(',', $addons_config['assign_groups_groupids']['value']);
foreach ($groupslist as $groupID => $groupParam) {
if (in_array($groupID, $assign_groups_groupids)) $selected=" selected"; else $selected="";
if ($groupParam['iconfile'] == 1) $iconfile=$groupID; else $iconfile="placeholder";
if (isset($groupParam['iconid']) && $groupParam['iconid'] != 0) $iconid=$groupParam['iconid']; else $iconid="placeholder";
if ($groupParam['type'] == 0 || $groupParam['type'] == 2) $disabled=" disabled"; else $disabled="";
if ($groupParam['type'] == 0) $grouptype=" [TEMPLATE GROUP]"; else $grouptype="";
if ($groupParam['type'] == 2) $grouptype=" [QUERY GROUP]";
if ($groupID != 0) {
echo '<option data-content="&nbsp;&nbsp;<img src=\'../tsicons/',$iconfile,'.png\' width=\'16\' height=\'16\'>&nbsp;&nbsp;',$groupParam['sgidname'],'&nbsp;<span class=\'text-muted small\'>SGID:&nbsp;',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
echo '<option data-content="&nbsp;&nbsp;<img src=\'../tsicons/',$iconid,'.',$groupParam['ext'],'\' width=\'16\' height=\'16\'>&nbsp;&nbsp;',$groupParam['sgidname'],'&nbsp;<span class=\'text-muted small\'>SGID:&nbsp;',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
}
}
?>

View File

@@ -58,14 +58,6 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
if(($groupslist = $mysqlcon->query("SELECT * FROM `$dbname`.`groups` ORDER BY `sortid`,`sgidname` ASC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
$err_msg = print_r($mysqlcon->errorInfo(), true);
$err_lvl = 3;
} else {
foreach($groupslist as $sgid => $servergroup) {
if(file_exists('../tsicons/'.$sgid.'.png')) {
$groupslist[$sgid]['iconfile'] = 1;
} else {
$groupslist[$sgid]['iconfile'] = 0;
}
}
}
if(!isset($groupslist) || $groupslist == NULL) {
@@ -231,12 +223,12 @@ if (isset($_POST['update_old']) && isset($db_csrf[$_POST['csrf_token']])) {
<select class="selectpicker show-tick form-control" data-live-search="true" name="tempboostgroup[]">
<?PHP
foreach ($groupslist as $groupID => $groupParam) {
if($groupParam['iconfile'] == 1) $iconfile=$groupID; else $iconfile="placeholder";
if (isset($groupParam['iconid']) && $groupParam['iconid'] != 0) $iconid=$groupParam['iconid']; else $iconid="placeholder";
if($groupParam['type'] == 0 || $groupParam['type'] == 2) $disabled=" disabled"; else $disabled="";
if($groupParam['type'] == 0) $grouptype=" [TEMPLATE GROUP]"; else $grouptype="";
if($groupParam['type'] == 2) $grouptype=" [QUERY GROUP]";
if ($groupID != 0) {
echo '<option data-content="<img src=\'../tsicons/',$iconfile,'.png\' width=\'16\' height=\'16\'>&nbsp;&nbsp;',$groupParam['sgidname'],'&nbsp;<span class=\'text-muted small\'>SGID:&nbsp;',$groupID,$grouptype,'</span>" value="',$groupID,'"',$disabled,'></option>';
echo '<option data-content="<img src=\'../tsicons/',$iconid,'.',$groupParam['ext'],'\' width=\'16\' height=\'16\'>&nbsp;&nbsp;',$groupParam['sgidname'],'&nbsp;<span class=\'text-muted small\'>SGID:&nbsp;',$groupID,$grouptype,'</span>" value="',$groupID,'"',$disabled,'></option>';
}
}
?>
@@ -262,12 +254,12 @@ if (isset($_POST['update_old']) && isset($db_csrf[$_POST['csrf_token']])) {
<?PHP
foreach ($groupslist as $groupID => $groupParam) {
if ($groupID == $boost['group']) $selected=" selected"; else $selected="";
if ($groupParam['iconfile'] == 1) $iconfile=$groupID; else $iconfile="placeholder";
if (isset($groupParam['iconid']) && $groupParam['iconid'] != 0) $iconid=$groupParam['iconid']; else $iconid="placeholder";
if ($groupParam['type'] == 0 || $groupParam['type'] == 2) $disabled=" disabled"; else $disabled="";
if ($groupParam['type'] == 0) $grouptype=" [TEMPLATE GROUP]"; else $grouptype="";
if ($groupParam['type'] == 2) $grouptype=" [QUERY GROUP]";
if ($groupID != 0) {
echo '<option data-content="<img src=\'../tsicons/',$iconfile,'.png\' width=\'16\' height=\'16\'>&nbsp;&nbsp;',$groupParam['sgidname'],'&nbsp;<span class=\'text-muted small\'>SGID:&nbsp;',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
echo '<option data-content="<img src=\'../tsicons/',$iconid,'.',$groupParam['ext'],'\' width=\'16\' height=\'16\'>&nbsp;&nbsp;',$groupParam['sgidname'],'&nbsp;<span class=\'text-muted small\'>SGID:&nbsp;',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
}
}
?>

View File

@@ -58,14 +58,6 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
if(($groupslist = $mysqlcon->query("SELECT * FROM `$dbname`.`groups` ORDER BY `sortid`,`sgidname` ASC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
$err_msg = print_r($mysqlcon->errorInfo(), true);
$err_lvl = 3;
} else {
foreach($groupslist as $sgid => $servergroup) {
if(file_exists('../tsicons/'.$sgid.'.png')) {
$groupslist[$sgid]['iconfile'] = 1;
} else {
$groupslist[$sgid]['iconfile'] = 0;
}
}
}
if(($user_arr = $mysqlcon->query("SELECT `uuid`,`cldbid`,`name` FROM `$dbname`.`user` ORDER BY `name` ASC")->fetchAll(PDO::FETCH_ASSOC)) === false) {
@@ -158,12 +150,12 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
<?PHP
foreach ($groupslist as $groupID => $groupParam) {
if ($cfg['rankup_excepted_group_id_list'] != NULL && array_key_exists($groupID, $cfg['rankup_excepted_group_id_list'])) $selected=" selected"; else $selected="";
if ($groupParam['iconfile'] == 1) $iconfile=$groupID; else $iconfile="placeholder";
if (isset($groupParam['iconid']) && $groupParam['iconid'] != 0) $iconid=$groupParam['iconid']; else $iconid="placeholder";
if ($groupParam['type'] == 0) $disabled=" disabled"; else $disabled="";
if ($groupParam['type'] == 0) $grouptype=" [TEMPLATE GROUP]"; else $grouptype="";
if ($groupParam['type'] == 2) $grouptype=" [QUERY GROUP]";
if ($groupID != 0) {
echo '<option data-content="&nbsp;&nbsp;<img src=\'../tsicons/',$iconfile,'.png\' width=\'16\' height=\'16\'>&nbsp;&nbsp;',$groupParam['sgidname'],'&nbsp;<span class=\'text-muted small\'>SGID:&nbsp;',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
echo '<option data-content="&nbsp;&nbsp;<img src=\'../tsicons/',$iconid,'.',$groupParam['ext'],'\' width=\'16\' height=\'16\'>&nbsp;&nbsp;',$groupParam['sgidname'],'&nbsp;<span class=\'text-muted small\'>SGID:&nbsp;',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
}
}
?>

View File

@@ -80,7 +80,12 @@ if(isset($_POST['switchexpert']) && isset($_SESSION[$rspathhex.'username']) && $
};
</script>
<body>
<div id="wrapper">
<?PHP
if (basename($_SERVER['SCRIPT_NAME']) != "index.php") {
echo '<div id="wrapper">';
} else {
echo '<div>';
} ?>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-header">
<a class="navbar-brand" href="index.php">TSN Ranksystem - Webinterface <?PHP echo $cfg['version_current_using'];?></a>
@@ -156,6 +161,8 @@ if(isset($_POST['switchexpert']) && isset($_SESSION[$rspathhex.'username']) && $
</ul>
</li>
</ul>
<?PHP
if (basename($_SERVER['SCRIPT_NAME']) != "index.php") { ?>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav side-nav">
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "ts.php" ? ' class="active">' : '>'); ?>
@@ -238,6 +245,7 @@ if(isset($_POST['switchexpert']) && isset($_SESSION[$rspathhex.'username']) && $
?>
</ul>
</div>
<?PHP } ?>
</nav>
<?PHP
if($cfg['webinterface_admin_client_unique_id_list'] == NULL && isset($_SESSION[$rspathhex.'username']) && $_SESSION[$rspathhex.'username'] == $cfg['webinterface_user'] && !isset($err_msg) && $cfg['webinterface_fresh_installation'] != 1) {

View File

@@ -58,14 +58,6 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
if(($groupslist = $mysqlcon->query("SELECT * FROM `$dbname`.`groups` ORDER BY `sortid`,`sgidname` ASC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
$err_msg = print_r($mysqlcon->errorInfo(), true);
$err_lvl = 3;
} else {
foreach($groupslist as $sgid => $servergroup) {
if(file_exists('../tsicons/'.$sgid.'.png')) {
$groupslist[$sgid]['iconfile'] = 1;
} else {
$groupslist[$sgid]['iconfile'] = 0;
}
}
}
if(!isset($groupslist) || $groupslist == NULL) {
@@ -231,12 +223,12 @@ if (isset($_POST['update_old']) && isset($db_csrf[$_POST['csrf_token']])) {
<?PHP
foreach ($groupslist as $groupID => $groupParam) {
if ($groupID == $sgroup) $selected=" selected"; else $selected="";
if ($groupParam['iconfile'] == 1) $iconfile=$groupID; else $iconfile="placeholder";
if (isset($groupParam['iconid']) && $groupParam['iconid'] != 0) $iconid=$groupParam['iconid']; else $iconid="placeholder";
if ($groupParam['type'] == 0 || $groupParam['type'] == 2) $disabled=" disabled"; else $disabled="";
if ($groupParam['type'] == 0) $grouptype=" [TEMPLATE GROUP]"; else $grouptype="";
if ($groupParam['type'] == 2) $grouptype=" [QUERY GROUP]";
if ($groupID != 0) {
echo '<option data-content="<img src=\'../tsicons/',$iconfile,'.png\' width=\'16\' height=\'16\'>&nbsp;&nbsp;',$groupParam['sgidname'],'&nbsp;<span class=\'text-muted small\'>SGID:&nbsp;',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
echo '<option data-content="<img src=\'../tsicons/',$iconid,'.',$groupParam['ext'],'\' width=\'16\' height=\'16\'>&nbsp;&nbsp;',$groupParam['sgidname'],'&nbsp;<span class=\'text-muted small\'>SGID:&nbsp;',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
}
}
?>