release 1.3.7
This commit is contained in:
@@ -59,20 +59,41 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
$assign_groups_active = 0;
|
||||
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($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$assign_groups_limit = $_POST['assign_groups_limit'];
|
||||
$assign_groups_groupids = $_POST['assign_groups_groupids'];
|
||||
$assign_groups_active = 0;
|
||||
if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']]) && isset($_POST['assign_groups_active']) && !isset($_POST['assign_groups_groupids'])) {
|
||||
$err_msg = $lang['stag0010'];
|
||||
$err_lvl = 3;
|
||||
} elseif (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$assign_groups_limit = $_POST['assign_groups_limit'];
|
||||
$assign_groups_groupids = '';
|
||||
if (isset($_POST['assign_groups_groupids']) && $_POST['assign_groups_groupids'] != NULL) {
|
||||
foreach ($_POST['assign_groups_groupids'] as $group) {
|
||||
$assign_groups_groupids .= $group.',';
|
||||
}
|
||||
}
|
||||
$assign_groups_groupids = substr($assign_groups_groupids, 0, -1);
|
||||
if (isset($_POST['assign_groups_active'])) $assign_groups_active = 1;
|
||||
if ($mysqlcon->exec("UPDATE `$dbname`.`addons_config` SET `value` = CASE `param` WHEN 'assign_groups_active' THEN '$assign_groups_active' WHEN 'assign_groups_limit' THEN '$assign_groups_limit' WHEN 'assign_groups_groupids' THEN '$assign_groups_groupids' END WHERE `param` IN ('assign_groups_active','assign_groups_groupids','assign_groups_limit')") === false) {
|
||||
if ($mysqlcon->exec("UPDATE `$dbname`.`addons_config` SET `value` = CASE `param` WHEN 'assign_groups_active' THEN '{$assign_groups_active}' WHEN 'assign_groups_limit' THEN '{$assign_groups_limit}' WHEN 'assign_groups_groupids' THEN '{$assign_groups_groupids}' END WHERE `param` IN ('assign_groups_active','assign_groups_groupids','assign_groups_limit')") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
$err_msg = $lang['wisvsuc'];
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
$addons_config['assign_groups_groupids']['value'] = $_POST['assign_groups_groupids'];
|
||||
$addons_config['assign_groups_groupids']['value'] = $assign_groups_groupids;
|
||||
$addons_config['assign_groups_limit']['value'] = $_POST['assign_groups_limit'];
|
||||
$addons_config['assign_groups_active']['value'] = $assign_groups_active;
|
||||
} elseif(isset($_POST['update'])) {
|
||||
@@ -91,10 +112,17 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal" data-toggle="validator" name="update" method="POST">
|
||||
<form class="form-horizontal" name="update" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $csrf_token; ?>">
|
||||
<div class="form-horizontal">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-12 pointer" data-toggle="modal" data-target="#stag0001desc"><?php echo $lang['wihladm0']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="panel-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -112,12 +140,24 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group required-field-block">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#stag0003"><?php echo $lang['stag0002']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" data-pattern="^([0-9]+,)*[0-9]+$" data-error="Wrong definition, please look at description for more details. No comma at ending!" rows="5" name="assign_groups_groupids" maxlength="5000" required><?php echo $addons_config['assign_groups_groupids']['value']; ?></textarea>
|
||||
<div class="required-icon"><div class="text">*</div></div>
|
||||
<div class="help-block with-errors"></div>
|
||||
<select class="selectpicker form-control" data-live-search="true" data-actions-box="true" multiple name="assign_groups_groupids[]">
|
||||
<?PHP
|
||||
$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 ($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\'> ',$groupParam['sgidname'],' <span class=\'text-muted small\'>SGID: ',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -141,7 +181,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" name="update"><?php echo $lang['wisvconf']; ?></button>
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
@@ -150,6 +190,22 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="stag0001desc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['stag0001']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['stag0001desc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="stag0003" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@@ -198,19 +254,5 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('form[data-toggle="validator"]').validator({
|
||||
custom: {
|
||||
pattern: function ($el) {
|
||||
var pattern = new RegExp($el.data('pattern'));
|
||||
return pattern.test($el.val());
|
||||
}
|
||||
},
|
||||
delay: 100,
|
||||
errors: {
|
||||
pattern: "There should be an error in your value, please check all could be right!"
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -113,6 +113,13 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $csrf_token; ?>">
|
||||
<div class="form-horizontal">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-12 pointer" data-toggle="modal" data-target="#setontimedesc"><?php echo $lang['wihladm0']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="panel-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -123,8 +130,8 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="col-sm-8 pull-right">
|
||||
<select class="selectpicker show-tick form-control" id="number" name="number" onchange="this.form.submit();">
|
||||
<?PHP
|
||||
echo '<option value="yes"'; if(!isset($_SESSION[$rspathhex.'showexcepted']) || $_SESSION[$rspathhex.'showexcepted'] == "yes") echo " selected=selected"; echo '>hide</option>';
|
||||
echo '<option value="no"'; if(isset($_SESSION[$rspathhex.'showexcepted']) && $_SESSION[$rspathhex.'showexcepted'] == "no") echo " selected=selected"; echo '>show</option>';
|
||||
echo '<option data-icon="fas fa-eye-slash" value="yes"'; if(!isset($_SESSION[$rspathhex.'showexcepted']) || $_SESSION[$rspathhex.'showexcepted'] == "yes") echo " selected=selected"; echo '> hide</option>';
|
||||
echo '<option data-icon="fas fa-eye" value="no"'; if(isset($_SESSION[$rspathhex.'showexcepted']) && $_SESSION[$rspathhex.'showexcepted'] == "no") echo " selected=selected"; echo '> show</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -132,7 +139,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiselclddesc"><?php echo $lang['wiselcld']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" data-live-search="true" multiple name="user[]">
|
||||
<select class="selectpicker show-tick form-control" data-actions-box="true" data-live-search="true" multiple name="user[]">
|
||||
<?PHP
|
||||
foreach ($user_arr as $user) {
|
||||
echo '<option value="',$user['uuid'],'" data-subtext="UUID: ',$user['uuid'],'; DBID: ',$user['cldbid'],'">',htmlspecialchars($user['name']),'</option>';
|
||||
@@ -148,7 +155,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<script>
|
||||
$("input[name='setontime_day']").TouchSpin({
|
||||
min: 0,
|
||||
max: 24855,
|
||||
max: 11574,
|
||||
verticalbuttons: true,
|
||||
prefix: '<?PHP echo $lang['time_day']; ?>'
|
||||
});
|
||||
@@ -162,7 +169,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<script>
|
||||
$("input[name='setontime_hour']").TouchSpin({
|
||||
min: 0,
|
||||
max: 23,
|
||||
max: 277777,
|
||||
verticalbuttons: true,
|
||||
prefix: '<?PHP echo $lang['time_hour']; ?>'
|
||||
});
|
||||
@@ -176,7 +183,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<script>
|
||||
$("input[name='setontime_min']").TouchSpin({
|
||||
min: 0,
|
||||
max: 59,
|
||||
max: 16666666,
|
||||
verticalbuttons: true,
|
||||
prefix: '<?PHP echo $lang['time_min']; ?>'
|
||||
});
|
||||
@@ -190,7 +197,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<script>
|
||||
$("input[name='setontime_sec']").TouchSpin({
|
||||
min: 0,
|
||||
max: 59,
|
||||
max: 999999999,
|
||||
verticalbuttons: true,
|
||||
prefix: '<?PHP echo $lang['time_sec']; ?>'
|
||||
});
|
||||
@@ -204,7 +211,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" name="update"><?php echo $lang['wisvconf']; ?></button>
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
|
||||
@@ -82,8 +82,8 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$allinsertdata = '';
|
||||
$succmsg = '';
|
||||
$nowtime = time();
|
||||
$setontime = $setontime * -1;
|
||||
foreach($_POST['user'] as $uuid) {
|
||||
$setontime = $setontime * -1;
|
||||
$allinsertdata .= "('".$uuid."', ".$nowtime.", ".$setontime."),";
|
||||
$succmsg .= sprintf($lang['sccupcount'],$setontime,$uuid)."<br>";
|
||||
}
|
||||
@@ -114,6 +114,13 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $csrf_token; ?>">
|
||||
<div class="form-horizontal">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-12 pointer" data-toggle="modal" data-target="#setontimedesc2"><?php echo $lang['wihladm0']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="panel-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -124,8 +131,8 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="col-sm-8 pull-right">
|
||||
<select class="selectpicker show-tick form-control" id="number" name="number" onchange="this.form.submit();">
|
||||
<?PHP
|
||||
echo '<option value="yes"'; if(!isset($_SESSION[$rspathhex.'showexcepted']) || $_SESSION[$rspathhex.'showexcepted'] == "yes") echo " selected=selected"; echo '>hide</option>';
|
||||
echo '<option value="no"'; if(isset($_SESSION[$rspathhex.'showexcepted']) && $_SESSION[$rspathhex.'showexcepted'] == "no") echo " selected=selected"; echo '>show</option>';
|
||||
echo '<option data-icon="fas fa-eye-slash" value="yes"'; if(!isset($_SESSION[$rspathhex.'showexcepted']) || $_SESSION[$rspathhex.'showexcepted'] == "yes") echo " selected=selected"; echo '> hide</option>';
|
||||
echo '<option data-icon="fas fa-eye" value="no"'; if(isset($_SESSION[$rspathhex.'showexcepted']) && $_SESSION[$rspathhex.'showexcepted'] == "no") echo " selected=selected"; echo '> show</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -133,7 +140,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiselclddesc"><?php echo $lang['wiselcld']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" data-live-search="true" multiple name="user[]">
|
||||
<select class="selectpicker show-tick form-control" data-actions-box="true" data-live-search="true" multiple name="user[]">
|
||||
<?PHP
|
||||
foreach ($user_arr as $user) {
|
||||
echo '<option value="',$user['uuid'],'" data-subtext="UUID: ',$user['uuid'],'; DBID: ',$user['cldbid'],'">',htmlspecialchars($user['name']),'</option>';
|
||||
@@ -149,7 +156,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<script>
|
||||
$("input[name='setontime_day']").TouchSpin({
|
||||
min: 0,
|
||||
max: 24855,
|
||||
max: 11574,
|
||||
verticalbuttons: true,
|
||||
prefix: '<?PHP echo $lang['time_day']; ?>'
|
||||
});
|
||||
@@ -163,7 +170,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<script>
|
||||
$("input[name='setontime_hour']").TouchSpin({
|
||||
min: 0,
|
||||
max: 23,
|
||||
max: 277777,
|
||||
verticalbuttons: true,
|
||||
prefix: '<?PHP echo $lang['time_hour']; ?>'
|
||||
});
|
||||
@@ -177,7 +184,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<script>
|
||||
$("input[name='setontime_min']").TouchSpin({
|
||||
min: 0,
|
||||
max: 59,
|
||||
max: 16666666,
|
||||
verticalbuttons: true,
|
||||
prefix: '<?PHP echo $lang['time_min']; ?>'
|
||||
});
|
||||
@@ -191,7 +198,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<script>
|
||||
$("input[name='setontime_sec']").TouchSpin({
|
||||
min: 0,
|
||||
max: 59,
|
||||
max: 999999999,
|
||||
verticalbuttons: true,
|
||||
prefix: '<?PHP echo $lang['time_sec']; ?>'
|
||||
});
|
||||
@@ -205,7 +212,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" name="update"><?php echo $lang['wisvconf']; ?></button>
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
|
||||
460
webinterface/boost.php
Normal file
460
webinterface/boost.php
Normal file
@@ -0,0 +1,460 @@
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
if(!headers_sent()) {
|
||||
header("Strict-Transport-Security: max-age=31536000; includeSubDomains; preload;");
|
||||
}
|
||||
}
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
|
||||
function getclientip() {
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP']))
|
||||
return $_SERVER['HTTP_CLIENT_IP'];
|
||||
elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
elseif(!empty($_SERVER['HTTP_X_FORWARDED']))
|
||||
return $_SERVER['HTTP_X_FORWARDED'];
|
||||
elseif(!empty($_SERVER['HTTP_FORWARDED_FOR']))
|
||||
return $_SERVER['HTTP_FORWARDED_FOR'];
|
||||
elseif(!empty($_SERVER['HTTP_FORWARDED']))
|
||||
return $_SERVER['HTTP_FORWARDED'];
|
||||
elseif(!empty($_SERVER['REMOTE_ADDR']))
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isset($_POST['logout'])) {
|
||||
rem_session_ts3($rspathhex);
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once('nav.php');
|
||||
$csrf_token = bin2hex(openssl_random_pseudo_bytes(32));
|
||||
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`csrf_token` (`token`,`timestamp`,`sessionid`) VALUES ('$csrf_token','".time()."','".session_id()."')") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `sessionid`='".session_id()."'")->fetchALL(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
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) {
|
||||
$err_msg = '<b>No servergroups found inside the Ranksystem cache!</b><br><br>Please connect the Ranksystem Bot to the TS server. The Ranksystem will download the servergroups when it is connected to the server.<br>Give it a few minutes and reload this page. The dropdown field should contain your groups after.';
|
||||
$err_lvl = 1;
|
||||
}
|
||||
|
||||
if (isset($_POST['update_old']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
if(empty($_POST['rankup_boost_definition'])) {
|
||||
$grouparr_old = null;
|
||||
} else {
|
||||
foreach (explode(',', $_POST['rankup_boost_definition']) as $entry) {
|
||||
list($key, $value1, $value2) = explode('=>', $entry);
|
||||
$grouparr_old[$key] = array("group"=>$key,"factor"=>$value1,"time"=>$value2);
|
||||
$cfg['rankup_boost_definition'] = $grouparr_old;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($cfg['rankup_boost_definition']) && $cfg['rankup_boost_definition'] != NULL) {
|
||||
foreach($cfg['rankup_boost_definition'] as $groupid => $value) {
|
||||
if(!isset($groupslist[$groupid]) && $groupid != NULL) {
|
||||
$err_msg .= sprintf($lang['upgrp0001'], $groupid, $lang['wiboost']).'<br>';
|
||||
$err_lvl = 3;
|
||||
$errcnf++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$cfg['rankup_boost_definition'] = $_POST['rankup_boost_definition'];
|
||||
|
||||
if($errcnf == 0) {
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('rankup_boost_definition','{$cfg['rankup_boost_definition']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
$err_msg = $lang['wisvsuc']." ".sprintf($lang['wisvres'], ' <form class="btn-group" name="restart" action="bot.php" method="POST"><input type="hidden" name="csrf_token" value="'.$csrf_token.'"><button type="submit" class="btn btn-primary" name="restart"><i class="fas fa-sync"></i> '.$lang['wibot7'].'</button></form>');
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
} else {
|
||||
$err_msg .= "<br>".$lang['errgrpid'];
|
||||
}
|
||||
|
||||
if(empty($_POST['rankup_boost_definition'])) {
|
||||
$cfg['rankup_boost_definition'] = NULL;
|
||||
} else {
|
||||
foreach (explode(',', $_POST['rankup_boost_definition']) as $entry) {
|
||||
list($key, $value1, $value2) = explode('=>', $entry);
|
||||
$addnewvalue2[$key] = array("group"=>$key,"factor"=>$value1,"time"=>$value2);
|
||||
$cfg['rankup_boost_definition'] = $addnewvalue2;
|
||||
}
|
||||
}
|
||||
|
||||
} elseif (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$rankup_boost_definition = $err_msg = "";
|
||||
$errcnf = 0;
|
||||
|
||||
if (isset($_POST['boostduration']) && !isset($_POST['boostgroup']) && isset($_POST['boostfactor'])) {
|
||||
$errcnf++;
|
||||
$err_msg = "<b>Missing servergroup in your defintion!</b><br>";
|
||||
$err_lvl = 3;
|
||||
$cfg['rankup_boost_definition'] = null;
|
||||
} elseif (isset($_POST['boostduration']) && isset($_POST['boostgroup']) && isset($_POST['boostfactor'])) {
|
||||
$boostdefinition = [];
|
||||
foreach($_POST['boostgroup'] as $rowid => $groupid) {
|
||||
$factor = isset($_POST["boostfactor"][$rowid]) ? floatval($_POST["boostfactor"][$rowid]) : 1;
|
||||
$duration = isset($_POST["boostduration"][$rowid]) ? intval($_POST["boostduration"][$rowid]) : 1;
|
||||
$boostdefinition[] = "$groupid=>$factor=>$duration";
|
||||
}
|
||||
|
||||
$rankup_boost_definition = implode(",", $boostdefinition);
|
||||
|
||||
$grouparr = [];
|
||||
foreach(explode(',', $rankup_boost_definition) as $entry) {
|
||||
list($groupid, $factor, $duration) = explode('=>', $entry);
|
||||
$grouparr[$groupid] = $factor;
|
||||
}
|
||||
|
||||
if(isset($groupslist) && $groupslist != NULL) {
|
||||
foreach($grouparr as $groupid => $time) {
|
||||
if((!isset($groupslist[$groupid]) && $groupid != NULL) || $groupid == 0) {
|
||||
$err_msg .= sprintf($lang['upgrp0001'], $groupid, $lang['wigrptime']).'<br>';
|
||||
$err_lvl = 3;
|
||||
$errcnf++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$cfg['rankup_boost_definition'] = $rankup_boost_definition;
|
||||
} else {
|
||||
$cfg['rankup_boost_definition'] = null;
|
||||
if ($mysqlcon->exec("UPDATE `$dbname`.`user` SET `boosttime`=0;") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
}
|
||||
}
|
||||
|
||||
if($errcnf == 0) {
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('rankup_boost_definition','{$cfg['rankup_boost_definition']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
$err_msg = $lang['wisvsuc']." ".sprintf($lang['wisvres'], ' <form class="btn-group" name="restart" action="bot.php" method="POST"><input type="hidden" name="csrf_token" value="'.$csrf_token.'"><button type="submit" class="btn btn-primary" name="restart"><i class="fas fa-sync"></i> '.$lang['wibot7'].'</button></form>');
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
} else {
|
||||
$err_msg .= "<br>".$lang['errgrpid'];
|
||||
}
|
||||
|
||||
if(empty($rankup_boost_definition)) {
|
||||
$cfg['rankup_boost_definition'] = NULL;
|
||||
} else {
|
||||
$boostexp = explode(',', $rankup_boost_definition);
|
||||
foreach ($boostexp as $entry) {
|
||||
list($key, $value1, $value2) = explode('=>', $entry);
|
||||
$addnewvalue2[$key] = array("group"=>$key,"factor"=>$value1,"time"=>$value2);
|
||||
$cfg['rankup_boost_definition'] = $addnewvalue2;
|
||||
}
|
||||
}
|
||||
|
||||
} elseif(isset($_POST['update']) || isset($_POST['update_old'])) {
|
||||
echo '<div class="alert alert-danger alert-dismissible">',$lang['errcsrf'],'</div>';
|
||||
rem_session_ts3($rspathhex);
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
|
||||
<form class="form-horizontal" data-toggle="validator" name="update" method="POST" id="new">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<span><?php echo $lang['wiboost'],' ',$lang['wihlset']; ?></span>
|
||||
<div class="btn pull-right expertelement">
|
||||
<input id="switchexpert1" class="switch-animate" type="checkbox" data-size="mini" value="switchexpert1" data-label-text="<?php echo $lang['wigrpimp'] ?>" data-off-text="OFF">
|
||||
</div>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $csrf_token; ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-12 pointer" data-toggle="modal" data-target="#wihladm0desc"><?php echo $lang['wihladm0']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="panel-body">
|
||||
<div class="row"> </div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-5">
|
||||
<b><?php echo $lang['wigrpt2'] ?></b>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<b><?php echo $lang['wiboost'],' ', $lang['factor']; ?></b>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<b><?php echo $lang['duration'],' ',$lang['insec'] ?></b>
|
||||
</div>
|
||||
<div class="col-sm-1"></div>
|
||||
</div>
|
||||
<div class="form-group hidden" name="template">
|
||||
<div class="col-sm-5">
|
||||
<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($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\'> ',$groupParam['sgidname'],' <span class=\'text-muted small\'>SGID: ',$groupID,$grouptype,'</span>" value="',$groupID,'"',$disabled,'></option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" data-pattern="^[0-9]{0,9}\.?[0-9]+$" data-error="Only decimal numbers are allowed. As seperator use a dot!" class="form-control boostfactor" name="tempboostfactor[]" value="1.25">
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control boostduration" name="tempboostduration[]" value="600">
|
||||
</div>
|
||||
<div class="col-sm-1 text-center delete" name="delete"><i class="fas fa-trash" style="margin-top:10px;cursor:pointer;"></i></div>
|
||||
<div class="col-sm-2"></div>
|
||||
</div>
|
||||
<?PHP
|
||||
if(isset($cfg['rankup_boost_definition'])) {
|
||||
foreach($cfg['rankup_boost_definition'] as $boost) {
|
||||
?>
|
||||
<div class="form-group" name="boostgroup">
|
||||
<div class="col-sm-5">
|
||||
<select class="selectpicker show-tick form-control" data-live-search="true" name="boostgroup[]">
|
||||
<?PHP
|
||||
foreach ($groupslist as $groupID => $groupParam) {
|
||||
if ($groupID == $boost['group']) $selected=" selected"; else $selected="";
|
||||
if ($groupParam['iconfile'] == 1) $iconfile=$groupID; else $iconfile="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\'> ',$groupParam['sgidname'],' <span class=\'text-muted small\'>SGID: ',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" data-pattern="^[0-9]{0,9}\.?[0-9]+$" data-error="Only decimal numbers are allowed. As seperator use a dot!" class="form-control boostfactor" name="boostfactor[]" value="<?PHP echo $boost['factor']; ?>">
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control boostduration" name="boostduration[]" value="<?PHP echo $boost['time']; ?>">
|
||||
</div>
|
||||
<div class="col-sm-1 text-center delete" name="delete"><i class="fas fa-trash" style="margin-top:10px;cursor:pointer;"></i></div>
|
||||
<div class="col-sm-2"></div>
|
||||
</div>
|
||||
<?PHP
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="form-group" id="addboostgroup">
|
||||
<?PHP
|
||||
if(!isset($cfg['rankup_boost_definition'])) {
|
||||
echo '<div class="col-sm-11"><div id="noentry"><i>',$lang['wiboostempty'],'</i></div></div>';
|
||||
} else {
|
||||
echo '<div class="col-sm-11"></div>';
|
||||
}?>
|
||||
<div class="col-sm-1 text-center">
|
||||
<span class="d-inline-block" ata-toggle="tooltip" title="Add new line">
|
||||
<button class="btn btn-primary" style="margin-top: 5px;" type="button"><i class="fas fa-plus"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-sm-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal hidden" data-toggle="validator" name="update_old" method="POST" id="old">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<span><?php echo $lang['wiboost'],' ',$lang['wihlset']; ?></span>
|
||||
<div class="btn pull-right">
|
||||
<input id="switchexpert2" class="switch-animate" type="checkbox" checked data-size="mini" alue="switchexpert2" data-label-text="<?php echo $lang['wigrpimp'] ?>" data-on-text="ON">
|
||||
</div>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $csrf_token; ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-12" data-toggle="modal" data-target="#wiboostdesc"><?php echo $lang['wihladm0']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="panel-body">
|
||||
<div class="row"> </div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><?php echo $lang['wiboost']; ?></label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" data-pattern="^([1-9][0-9]{0,9}=>[0-9]{0,9}\.?[0-9]+=>[1-9][0-9]{0,9},)*[1-9][0-9]{0,9}=>[0-9]{0,9}\.?[0-9]+=>[1-9][0-9]{0,9}$" data-error="Wrong definition, please look at description for more details. No comma at ending!" rows="15" name="rankup_boost_definition" maxlength="21588"><?php
|
||||
$implode_boost = '';
|
||||
if(isset($cfg['rankup_boost_definition']) && $cfg['rankup_boost_definition'] != NULL) {
|
||||
foreach ($cfg['rankup_boost_definition'] as $r) {
|
||||
$implode_boost .= $r['group']."=>".$r['factor']."=>".$r['time'].",";
|
||||
}
|
||||
$implode_boost = substr($implode_boost, 0, -1);
|
||||
}
|
||||
echo $implode_boost;
|
||||
?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" name="update_old"><?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="wihladm0desc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiboost']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiboost2desc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiboostdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiboost']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiboostdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('form[data-toggle="validator"]').validator({
|
||||
custom: {
|
||||
pattern: function ($el) {
|
||||
var pattern = new RegExp($el.data('pattern'));
|
||||
return pattern.test($el.val());
|
||||
}
|
||||
},
|
||||
delay: 100,
|
||||
errors: {
|
||||
pattern: "There should be an error in your value, please check all could be right!"
|
||||
}
|
||||
});
|
||||
|
||||
$(".boostduration").TouchSpin({
|
||||
min: 1,
|
||||
max: 999999999,
|
||||
verticalbuttons: true,
|
||||
prefix: 'Sec.:'
|
||||
});
|
||||
$(".boostfactor").TouchSpin({
|
||||
min: 0,
|
||||
max: 999999999,
|
||||
decimals: 9,
|
||||
step: 0.000000001,
|
||||
verticalbuttons: true,
|
||||
prefix: '<i class="fas fa-times"></i>:'
|
||||
});
|
||||
$("#addboostgroup").click(function(){
|
||||
var $clone = $("div[name='template']").last().clone();
|
||||
$clone.removeClass("hidden");
|
||||
$clone.attr('name','boostgroup');
|
||||
$clone.insertBefore("#addboostgroup");
|
||||
$clone.find('.bootstrap-select').replaceWith(function() { return $('select', this); });
|
||||
$clone.find('select').selectpicker('val', '');
|
||||
$("select[name='tempboostgroup[]']").last().attr('name', 'boostgroup[]');
|
||||
$("input[name='tempboostfactor[]']").last().attr('name', 'boostfactor[]');
|
||||
$("input[name='tempboostduration[]']").last().attr('name', 'boostduration[]');
|
||||
$('.delete').removeClass("hidden");
|
||||
if (document.contains(document.getElementById("noentry"))) {
|
||||
document.getElementById("noentry").remove();
|
||||
}
|
||||
$clone.find('.bootstrap-touchspin').replaceWith(function() { return $('input', this); });;
|
||||
$clone.find('.boostfactor').TouchSpin({min: 0,max: 999999999,decimals: 9,step: 0.000000001,verticalbuttons: true,prefix: '×:'});
|
||||
$clone.find('.boostduration').TouchSpin({min: 1,max: 999999999,verticalbuttons: true,prefix: 'Sec.:'});
|
||||
});
|
||||
$(document).on("click", ".delete", function(){
|
||||
$(this).parent().remove();
|
||||
});
|
||||
$('#switchexpert1').on('switchChange.bootstrapSwitch', function() {
|
||||
document.getElementById("new").classList.add("hidden");
|
||||
document.getElementById("old").classList.remove("hidden");
|
||||
$('#switchexpert2').bootstrapSwitch('state', true, false);
|
||||
});
|
||||
$('#switchexpert2').on('switchChange.bootstrapSwitch', function() {
|
||||
document.getElementById("new").classList.remove("hidden");
|
||||
document.getElementById("old").classList.add("hidden");
|
||||
$('#switchexpert1').bootstrapSwitch('state', false, false);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -142,7 +142,7 @@ if (isset($_POST['changepw']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
<br>
|
||||
<p>
|
||||
<button type="submit" class="btn btn-success btn-block" name="changepw"><?PHP echo $lang['wichpw4']; ?></button>
|
||||
<button type="submit" class="btn btn-success btn-block" name="changepw"><i class="fas fa-save"></i> <?PHP echo $lang['wichpw4']; ?></button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -56,108 +56,16 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
}
|
||||
|
||||
if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
if(($groupslist = $mysqlcon->query("SELECT * FROM `$dbname`.`groups`")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
if(empty($_POST['rankup_boost_definition'])) {
|
||||
$cfg['rankup_boost_definition'] = NULL;
|
||||
} else {
|
||||
foreach (explode(',', $_POST['rankup_boost_definition']) as $entry) {
|
||||
list($key, $value1, $value2) = explode('=>', $entry);
|
||||
$addnewvalue2[$key] = array("group"=>$key,"factor"=>$value1,"time"=>$value2);
|
||||
$cfg['rankup_boost_definition'] = $addnewvalue2;
|
||||
}
|
||||
}
|
||||
if(empty($_POST['rankup_definition'])) {
|
||||
$grouparr = null;
|
||||
} else {
|
||||
foreach (explode(',', $_POST['rankup_definition']) as $entry) {
|
||||
list($time, $groupid) = explode('=>', $entry);
|
||||
$grouparr[$groupid] = $time;
|
||||
}
|
||||
}
|
||||
|
||||
$err_msg = '';
|
||||
$errcnf = 0;
|
||||
if(isset($groupslist) && $groupslist != NULL) {
|
||||
foreach($grouparr as $groupid => $time) {
|
||||
if(!isset($groupslist[$groupid]) && $groupid != NULL) {
|
||||
$err_msg .= sprintf($lang['upgrp0001'], $groupid, $lang['wigrptime']).'<br>';
|
||||
$err_lvl = 3;
|
||||
$errcnf++;
|
||||
}
|
||||
}
|
||||
if(isset($cfg['rankup_boost_definition']) && $cfg['rankup_boost_definition'] != NULL) {
|
||||
foreach($cfg['rankup_boost_definition'] as $groupid => $value) {
|
||||
if(!isset($groupslist[$groupid]) && $groupid != NULL) {
|
||||
$err_msg .= sprintf($lang['upgrp0001'], $groupid, $lang['wiboost']).'<br>';
|
||||
$err_lvl = 3;
|
||||
$errcnf++;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach(array_flip(explode(',', $_POST['rankup_excepted_group_id_list'])) as $groupid => $value) {
|
||||
if(!isset($groupslist[$groupid]) && $groupid != NULL) {
|
||||
$err_msg .= sprintf($lang['upgrp0001'], $groupid, $lang['wiexgrp']).'<br>';
|
||||
$err_lvl = 3;
|
||||
$errcnf++;
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($groupslist);
|
||||
|
||||
$cfg['rankup_time_assess_mode'] = $_POST['rankup_time_assess_mode'];
|
||||
$cfg['rankup_excepted_mode'] = $_POST['rankup_excepted_mode'];
|
||||
$cfg['rankup_excepted_unique_client_id_list'] = $_POST['rankup_excepted_unique_client_id_list'];
|
||||
$cfg['rankup_excepted_group_id_list'] = $_POST['rankup_excepted_group_id_list'];
|
||||
$cfg['rankup_excepted_channel_id_list'] = $_POST['rankup_excepted_channel_id_list'];
|
||||
$cfg['rankup_definition'] = $_POST['rankup_definition'];
|
||||
$cfg['rankup_boost_definition'] = $_POST['rankup_boost_definition'];
|
||||
$cfg['rankup_ignore_idle_time'] = $_POST['rankup_ignore_idle_time'];
|
||||
|
||||
if (isset($_POST['rankup_client_database_id_change_switch'])) $cfg['rankup_client_database_id_change_switch'] = 1; else $cfg['rankup_client_database_id_change_switch'] = 0;
|
||||
if (isset($_POST['rankup_clean_clients_switch'])) $cfg['rankup_clean_clients_switch'] = 1; else $cfg['rankup_clean_clients_switch'] = 0;
|
||||
$cfg['rankup_clean_clients_period'] = $_POST['rankup_clean_clients_period'];
|
||||
if($_POST['teamspeak_verification_channel_id'] == NULL) {
|
||||
$cfg['teamspeak_verification_channel_id'] = 0;
|
||||
} else {
|
||||
$cfg['teamspeak_verification_channel_id'] = $_POST['teamspeak_verification_channel_id'];
|
||||
}
|
||||
if($errcnf == 0) {
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('rankup_time_assess_mode','{$cfg['rankup_time_assess_mode']}'),('rankup_excepted_mode','{$cfg['rankup_excepted_mode']}'),('rankup_excepted_unique_client_id_list','{$cfg['rankup_excepted_unique_client_id_list']}'),('rankup_excepted_group_id_list','{$cfg['rankup_excepted_group_id_list']}'),('rankup_excepted_channel_id_list','{$cfg['rankup_excepted_channel_id_list']}'),('rankup_definition','{$cfg['rankup_definition']}'),('rankup_ignore_idle_time','{$cfg['rankup_ignore_idle_time']}'),('rankup_client_database_id_change_switch','{$cfg['rankup_client_database_id_change_switch']}'),('rankup_clean_clients_switch','{$cfg['rankup_clean_clients_switch']}'),('rankup_clean_clients_period','{$cfg['rankup_clean_clients_period']}'),('teamspeak_verification_channel_id','{$cfg['teamspeak_verification_channel_id']}'),('rankup_boost_definition','{$cfg['rankup_boost_definition']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
$err_msg = $lang['wisvsuc']." ".sprintf($lang['wisvres'], ' <form class="btn-group" name="restart" action="bot.php" method="POST"><input type="hidden" name="csrf_token" value="'.$csrf_token.'"><button type="submit" class="btn btn-primary" name="restart"><i class="fas fa-sync"></i> '.$lang['wibot7'].'</button></form>');
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
} else {
|
||||
$err_msg .= "<br>".$lang['errgrpid'];
|
||||
}
|
||||
$cfg['rankup_excepted_unique_client_id_list'] = array_flip(explode(',', $cfg['rankup_excepted_unique_client_id_list']));
|
||||
$cfg['rankup_excepted_group_id_list'] = array_flip(explode(',', $cfg['rankup_excepted_group_id_list']));
|
||||
$cfg['rankup_excepted_channel_id_list'] = array_flip(explode(',', $cfg['rankup_excepted_channel_id_list']));
|
||||
if(empty($_POST['rankup_definition'])) {
|
||||
$cfg['rankup_definition'] = NULL;
|
||||
} else {
|
||||
$grouptimearr = explode(',', $_POST['rankup_definition']);
|
||||
foreach ($grouptimearr as $entry) {
|
||||
list($key, $value) = explode('=>', $entry);
|
||||
$addnewvalue1[$key] = $value;
|
||||
$cfg['rankup_definition'] = $addnewvalue1;
|
||||
}
|
||||
}
|
||||
if(empty($_POST['rankup_boost_definition'])) {
|
||||
$cfg['rankup_boost_definition'] = NULL;
|
||||
} else {
|
||||
foreach (explode(',', $_POST['rankup_boost_definition']) as $entry) {
|
||||
list($key, $value1, $value2) = explode('=>', $entry);
|
||||
$addnewvalue2[$key] = array("group"=>$key,"factor"=>$value1,"time"=>$value2);
|
||||
$cfg['rankup_boost_definition'] = $addnewvalue2;
|
||||
}
|
||||
}
|
||||
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('rankup_time_assess_mode','{$cfg['rankup_time_assess_mode']}'),('rankup_ignore_idle_time','{$cfg['rankup_ignore_idle_time']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
$err_msg = $lang['wisvsuc'];
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
} elseif(isset($_POST['update'])) {
|
||||
echo '<div class="alert alert-danger alert-dismissible">',$lang['errcsrf'],'</div>';
|
||||
rem_session_ts3($rspathhex);
|
||||
@@ -169,63 +77,29 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header"><?php echo $lang['winav3'],' ',$lang['wihlset']; ?></h1>
|
||||
<h1 class="page-header">
|
||||
<?php echo $lang['winav3'],' ',$lang['wihlset']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal" data-toggle="validator" name="update" method="POST">
|
||||
<form class="form-horizontal" name="update" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $csrf_token; ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6">
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wisupidledesc"><?php echo $lang['wisupidle']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="rankup_time_assess_mode">
|
||||
<?PHP
|
||||
echo '<option value="0"'; if($cfg['rankup_time_assess_mode']=="0") echo " selected=selected"; echo '>',$lang['wishcolot'],'</option>';
|
||||
echo '<option value="1"'; if($cfg['rankup_time_assess_mode']=="1") echo " selected=selected"; echo '>',$lang['wishcolat'],'</option>';
|
||||
echo '<option data-icon="fas fa-microphone-slash" value="0"'; if($cfg['rankup_time_assess_mode']=="0") echo " selected=selected"; echo '> ',$lang['wishcolot'],'</option>';
|
||||
echo '<option data-icon="fas fa-microphone" value="1"'; if($cfg['rankup_time_assess_mode']=="1") echo " selected=selected"; echo '> ',$lang['wishcolat'],'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexresdesc"><?php echo $lang['wiexres']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="rankup_excepted_mode">
|
||||
<?PHP
|
||||
echo '<option value="0"'; if($cfg['rankup_excepted_mode']=="0") echo " selected=selected"; echo '>',$lang['wiexres1'],'</option>';
|
||||
echo '<option value="1"'; if($cfg['rankup_excepted_mode']=="1") echo " selected=selected"; echo '>',$lang['wiexres2'],'</option>';
|
||||
echo '<option value="2"'; if($cfg['rankup_excepted_mode']=="2") echo " selected=selected"; echo '>',$lang['wiexres3'],'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexuiddesc"><?php echo $lang['wiexuid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" data-pattern="^([A-Za-z0-9\\\/\+]{27}=,)*([A-Za-z0-9\\\/\+]{27}=)$" data-error="Check all unique IDs are correct and your list do not ends with a comma!" rows="1" name="rankup_excepted_unique_client_id_list" maxlength="21588"><?php if(!empty($cfg['rankup_excepted_unique_client_id_list'])) echo implode(',',array_flip($cfg['rankup_excepted_unique_client_id_list'])); ?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexgrpdesc"><?php echo $lang['wiexgrp']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" data-pattern="^([0-9]{1,9},)*[0-9]{1,9}$" data-error="Only use digits separated with a comma! Also must the first and last value be digit!" rows="1" name="rankup_excepted_group_id_list" maxlength="21588"><?php if(!empty($cfg['rankup_excepted_group_id_list'])) echo implode(',',array_flip($cfg['rankup_excepted_group_id_list'])); ?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexciddesc"><?php echo $lang['wiexcid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" data-pattern="^([0-9]{1,9},)*[0-9]{1,9}$" data-error="Only use digits separated with a comma! Also must the first and last value be digit!" rows="1" name="rankup_excepted_channel_id_list" maxlength="21588"><?php if(!empty($cfg['rankup_excepted_channel_id_list'])) echo implode(',',array_flip($cfg['rankup_excepted_channel_id_list'])); ?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiignidledesc"><?php echo $lang['wiignidle']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
@@ -240,86 +114,13 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wichdbiddesc"><?php echo $lang['wichdbid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-lg-8">
|
||||
<?PHP if ($cfg['rankup_client_database_id_change_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="rankup_client_database_id_change_switch" value="',$cfg['rankup_client_database_id_change_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="rankup_client_database_id_change_switch" value="',$cfg['rankup_client_database_id_change_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#cleancdesc"><?php echo $lang['cleanc']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['rankup_clean_clients_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="rankup_clean_clients_switch" value="',$cfg['rankup_clean_clients_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="rankup_clean_clients_switch" value="',$cfg['rankup_clean_clients_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#cleanpdesc"><?php echo $lang['cleanp']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="rankup_clean_clients_period" value="<?php echo $cfg['rankup_clean_clients_period']; ?>">
|
||||
<script>
|
||||
$("input[name='rankup_clean_clients_period']").TouchSpin({
|
||||
min: 1800,
|
||||
max: 9223372036854775807,
|
||||
verticalbuttons: true,
|
||||
prefix: 'Sec.:'
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiverifydesc"><?php echo $lang['wiverify']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="teamspeak_verification_channel_id" value="<?php echo $cfg['teamspeak_verification_channel_id']; ?>">
|
||||
<script>
|
||||
$("input[name='teamspeak_verification_channel_id']").TouchSpin({
|
||||
min: 0,
|
||||
max: 16777215,
|
||||
verticalbuttons: true,
|
||||
prefix: 'ID:'
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiboostdesc"><?php echo $lang['wiboost']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" data-pattern="^([1-9][0-9]{0,9}=>[0-9]{0,9}\.?[0-9]+=>[1-9][0-9]{0,9},)*[1-9][0-9]{0,9}=>[0-9]{0,9}\.?[0-9]+=>[1-9][0-9]{0,9}$" data-error="Wrong definition, please look at description for more details. No comma at ending!" rows="5" name="rankup_boost_definition" maxlength="21588"><?php
|
||||
$implode_boost = '';
|
||||
if(isset($cfg['rankup_boost_definition']) && $cfg['rankup_boost_definition'] != NULL) {
|
||||
foreach ($cfg['rankup_boost_definition'] as $r) {
|
||||
$implode_boost .= $r['group']."=>".$r['factor']."=>".$r['time'].",";
|
||||
}
|
||||
$implode_boost = substr($implode_boost, 0, -1);
|
||||
}
|
||||
echo $implode_boost;
|
||||
?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" name="update"><?php echo $lang['wisvconf']; ?></button>
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
@@ -344,70 +145,6 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiexresdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiexres']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiexresdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiexuiddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiexuid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiexuiddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiexgrpdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiexgrp']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiexgrpdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiexciddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiexcid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiexciddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiignidledesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@@ -424,99 +161,5 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wichdbiddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wichdbid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wichdbiddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="cleancdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['cleanc']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo sprintf($lang['cleancdesc'], '<a href="https://ts-n.net/clientcleaner.php" target="_blank">https://ts-n.net/clientcleaner.php</a>'); ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="cleanpdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['cleanp']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['cleanpdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiverifydesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiverify']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiverifydesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiboostdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiboost']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiboostdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('form[data-toggle="validator"]').validator({
|
||||
custom: {
|
||||
pattern: function ($el) {
|
||||
var pattern = new RegExp($el.data('pattern'));
|
||||
return pattern.test($el.val());
|
||||
}
|
||||
},
|
||||
delay: 100,
|
||||
errors: {
|
||||
pattern: "There should be an error in your value, please check all could be right!"
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -178,7 +178,7 @@ $db[\'dbname\']=\''.$_POST['dbname'].'\';
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" name="update"><?php echo $lang['wisvconf']; ?></button>
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
|
||||
277
webinterface/except.php
Normal file
277
webinterface/except.php
Normal file
@@ -0,0 +1,277 @@
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
if(!headers_sent()) {
|
||||
header("Strict-Transport-Security: max-age=31536000; includeSubDomains; preload;");
|
||||
}
|
||||
}
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
|
||||
function getclientip() {
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP']))
|
||||
return $_SERVER['HTTP_CLIENT_IP'];
|
||||
elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
elseif(!empty($_SERVER['HTTP_X_FORWARDED']))
|
||||
return $_SERVER['HTTP_X_FORWARDED'];
|
||||
elseif(!empty($_SERVER['HTTP_FORWARDED_FOR']))
|
||||
return $_SERVER['HTTP_FORWARDED_FOR'];
|
||||
elseif(!empty($_SERVER['HTTP_FORWARDED']))
|
||||
return $_SERVER['HTTP_FORWARDED'];
|
||||
elseif(!empty($_SERVER['REMOTE_ADDR']))
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isset($_POST['logout'])) {
|
||||
rem_session_ts3($rspathhex);
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once('nav.php');
|
||||
$csrf_token = bin2hex(openssl_random_pseudo_bytes(32));
|
||||
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`csrf_token` (`token`,`timestamp`,`sessionid`) VALUES ('$csrf_token','".time()."','".session_id()."')") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `sessionid`='".session_id()."'")->fetchALL(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
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) {
|
||||
$err_msg = "DB Error1: ".print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
}
|
||||
|
||||
if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$err_msg = $cfg['rankup_excepted_group_id_list'] = $cfg['rankup_excepted_unique_client_id_list'] = '';
|
||||
$errcnf = 0;
|
||||
$cfg['rankup_excepted_mode'] = $_POST['rankup_excepted_mode'];
|
||||
|
||||
if (isset($_POST['rankup_excepted_unique_client_id_list']) && $_POST['rankup_excepted_unique_client_id_list'] != NULL) {
|
||||
$cfg['rankup_excepted_unique_client_id_list'] = implode(',',$_POST['rankup_excepted_unique_client_id_list']);
|
||||
}
|
||||
if (isset($_POST['rankup_excepted_group_id_list']) && $_POST['rankup_excepted_group_id_list'] != NULL) {
|
||||
$cfg['rankup_excepted_group_id_list'] = implode(',',$_POST['rankup_excepted_group_id_list']);
|
||||
}
|
||||
$cfg['rankup_excepted_channel_id_list'] = $_POST['rankup_excepted_channel_id_list'];
|
||||
|
||||
if($errcnf == 0) {
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('rankup_excepted_mode','{$cfg['rankup_excepted_mode']}'),('rankup_excepted_unique_client_id_list','{$cfg['rankup_excepted_unique_client_id_list']}'),('rankup_excepted_group_id_list','{$cfg['rankup_excepted_group_id_list']}'),('rankup_excepted_channel_id_list','{$cfg['rankup_excepted_channel_id_list']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
$err_msg = $lang['wisvsuc']." ".sprintf($lang['wisvres'], ' <form class="btn-group" name="restart" action="bot.php" method="POST"><input type="hidden" name="csrf_token" value="'.$csrf_token.'"><button type="submit" class="btn btn-primary" name="restart"><i class="fas fa-sync"></i> '.$lang['wibot7'].'</button></form>');
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
} else {
|
||||
$err_msg .= "<br>".$lang['errgrpid'];
|
||||
}
|
||||
|
||||
if (isset($_POST['rankup_excepted_unique_client_id_list']) && $_POST['rankup_excepted_unique_client_id_list'] != NULL) {
|
||||
$cfg['rankup_excepted_unique_client_id_list'] = array_flip($_POST['rankup_excepted_unique_client_id_list']);
|
||||
}
|
||||
if (isset($_POST['rankup_excepted_group_id_list']) && $_POST['rankup_excepted_group_id_list'] != NULL) {
|
||||
$cfg['rankup_excepted_group_id_list'] = array_flip($_POST['rankup_excepted_group_id_list']);
|
||||
}
|
||||
$cfg['rankup_excepted_channel_id_list'] = array_flip(explode(',', $cfg['rankup_excepted_channel_id_list']));
|
||||
} elseif(isset($_POST['update'])) {
|
||||
echo '<div class="alert alert-danger alert-dismissible">',$lang['errcsrf'],'</div>';
|
||||
rem_session_ts3($rspathhex);
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header"><?php echo $lang['wiexcept'],' ',$lang['wihlset']; ?></h1>
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal" data-toggle="validator" name="update" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $csrf_token; ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="form-group expertelement">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexresdesc"><?php echo $lang['wiexres']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="rankup_excepted_mode">
|
||||
<?PHP
|
||||
echo '<option data-icon="fas fa-stopwatch" value="0"'; if($cfg['rankup_excepted_mode']=="0") echo " selected=selected"; echo '> ',$lang['wiexres1'],'</option>';
|
||||
echo '<option data-icon="fas fa-pause" value="1"'; if($cfg['rankup_excepted_mode']=="1") echo " selected=selected"; echo '> ',$lang['wiexres2'],'</option>';
|
||||
echo '<option data-icon="fas fa-sync" value="2"'; if($cfg['rankup_excepted_mode']=="2") echo " selected=selected"; echo '> ',$lang['wiexres3'],'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexuiddesc"><?php echo $lang['wiexuid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" data-actions-box="true" data-live-search="true" multiple name="rankup_excepted_unique_client_id_list[]">
|
||||
<?PHP
|
||||
foreach ($user_arr as $user) {
|
||||
if ($cfg['rankup_excepted_unique_client_id_list'] != NULL && array_key_exists($user['uuid'], $cfg['rankup_excepted_unique_client_id_list'])) $selected=" selected"; else $selected="";
|
||||
echo '<option value="',$user['uuid'],'" data-subtext="UUID: ',$user['uuid'],'; DBID: ',$user['cldbid'],'" ',$selected,'>',htmlspecialchars($user['name']),'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexgrpdesc"><?php echo $lang['wiexgrp']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker form-control" data-live-search="true" data-actions-box="true" multiple name="rankup_excepted_group_id_list[]">
|
||||
<?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 ($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=" <img src=\'../tsicons/',$iconfile,'.png\' width=\'16\' height=\'16\'> ',$groupParam['sgidname'],' <span class=\'text-muted small\'>SGID: ',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexciddesc"><?php echo $lang['wiexcid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<textarea class="form-control" data-pattern="^([0-9]{1,9},)*[0-9]{1,9}$" data-error="Only use digits separated with a comma! Also must the first and last value be digit!" rows="1" name="rankup_excepted_channel_id_list" maxlength="21588"><?php if(!empty($cfg['rankup_excepted_channel_id_list'])) echo implode(',',array_flip($cfg['rankup_excepted_channel_id_list'])); ?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="wiexresdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiexres']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiexresdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiexuiddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiexuid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiexuiddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiexgrpdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiexgrp']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiexgrpdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiexciddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiexcid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiexciddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('form[data-toggle="validator"]').validator({
|
||||
custom: {
|
||||
pattern: function ($el) {
|
||||
var pattern = new RegExp($el.data('pattern'));
|
||||
return pattern.test($el.val());
|
||||
}
|
||||
},
|
||||
delay: 100,
|
||||
errors: {
|
||||
pattern: "There should be an error in your value, please check all could be right!"
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -133,9 +133,9 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" id="basic" name="rankup_next_message_mode">
|
||||
<?PHP
|
||||
echo '<option value="0"'; if($cfg['rankup_next_message_mode']=="0") echo " selected=selected"; echo '>',$lang['winxmode1'],'</option>';
|
||||
echo '<option value="1"'; if($cfg['rankup_next_message_mode']=="1") echo " selected=selected"; echo '>',$lang['winxmode2'],'</option>';
|
||||
echo '<option value="2"'; if($cfg['rankup_next_message_mode']=="2") echo " selected=selected"; echo '>',$lang['winxmode3'],'</option>';
|
||||
echo '<option data-icon="fas fa-ban" value="0"'; if($cfg['rankup_next_message_mode']=="0") echo " selected=selected"; echo '> ',$lang['winxmode1'],'</option>';
|
||||
echo '<option data-icon="fas fa-clipboard-check" value="1"'; if($cfg['rankup_next_message_mode']=="1") echo " selected=selected"; echo '> ',$lang['winxmode2'],'</option>';
|
||||
echo '<option data-icon="fas fa-clipboard-list" value="2"'; if($cfg['rankup_next_message_mode']=="2") echo " selected=selected"; echo '> ',$lang['winxmode3'],'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -165,7 +165,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" name="update" class="btn btn-primary"><?php echo $lang['wisvconf']; ?></button>
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
|
||||
@@ -34,6 +34,16 @@ if(!isset($_POST['start']) && !isset($_POST['stop']) && !isset($_POST['restart']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST['switchexpert']) && isset($_SESSION[$rspathhex.'username']) && $_SESSION[$rspathhex.'username'] == $cfg['webinterface_user'] && $_SESSION[$rspathhex.'password'] == $cfg['webinterface_pass']) {
|
||||
if ($_POST['switchexpert'] == "check") $cfg['webinterface_advanced_mode'] = 1; else $cfg['webinterface_advanced_mode'] = 0;
|
||||
|
||||
if (($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('webinterface_advanced_mode','{$cfg['webinterface_advanced_mode']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`);")) === false) {
|
||||
print_r($mysqlcon->errorInfo(), true);
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?PHP echo $cfg['default_language']; ?>">
|
||||
@@ -48,10 +58,26 @@ if(!isset($_POST['start']) && !isset($_POST['stop']) && !isset($_POST['restart']
|
||||
<script src="../libs/combined_wi.js?v=<?PHP echo $cfg['version_current_using']; ?>"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
var timerid;
|
||||
$("ul.dropdown-menu").on("click", "[data-keepOpenOnClick]", function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
$('#switchexpert').on('switchChange.bootstrapSwitch', function() {
|
||||
$('.expertelement').each(function(i, obj) {
|
||||
$(this).toggleClass("hidden");
|
||||
});
|
||||
clearTimeout(timerid);
|
||||
timerid = setTimeout(function() { $('#autosubmit').submit(); }, 250);
|
||||
});
|
||||
});
|
||||
window.onload = function() {
|
||||
var expert = '<?PHP echo $cfg['webinterface_advanced_mode']; ?>';
|
||||
if(expert == 0) {
|
||||
$('.expertelement').each(function(i, obj) {
|
||||
$(this).toggleClass("hidden");
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
@@ -72,26 +98,49 @@ if(!isset($_POST['start']) && !isset($_POST['stop']) && !isset($_POST['restart']
|
||||
</ul>
|
||||
<?PHP } ?>
|
||||
<ul class="nav navbar-right top-nav">
|
||||
<?PHP
|
||||
if($_SERVER['SERVER_PORT'] == 443 || $_SERVER['SERVER_PORT'] == 80) {
|
||||
<?PHP
|
||||
if(isset($_SESSION[$rspathhex.'username']) && $_SESSION[$rspathhex.'username'] == $cfg['webinterface_user'] && $_SESSION[$rspathhex.'password'] == $cfg['webinterface_pass']) { ?>
|
||||
<li class="dropdown">
|
||||
<a href="" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <?PHP echo $_SESSION[$rspathhex.'username']; ?> <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="navbar-form">
|
||||
<form method="post" id="autosubmit">
|
||||
<?PHP
|
||||
if($cfg['webinterface_advanced_mode'] == 1) {
|
||||
echo '<input name="switchexpert" value="0" type="hidden">';
|
||||
echo '<input class="switch-animate" id="switchexpert" name="switchexpert" value="checked" type="checkbox" data-size="mini" data-label-text="Expert Mode" checked>';
|
||||
} else {
|
||||
echo '<input class="switch-animate" id="switchexpert" name="switchexpert" value="check" type="checkbox" data-size="mini" data-label-text="Expert Mode">';
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<?PHP if($_SERVER['SERVER_PORT'] == 443 || $_SERVER['SERVER_PORT'] == 80) {
|
||||
echo '<li><a href="//',$_SERVER['SERVER_NAME'],substr(dirname($_SERVER['SCRIPT_NAME']),0,-12),'stats/"><i class="fas fa-chart-bar"></i> ',$lang['winav6'],'</a></li>';
|
||||
} else {
|
||||
echo '<li><a href="//',$_SERVER['SERVER_NAME'],':',$_SERVER['SERVER_PORT'],substr(dirname($_SERVER['SCRIPT_NAME']),0,-12),'stats/"><i class="fas fa-chart-bar"></i> ',$lang['winav6'],'</a></li>';
|
||||
} ?>
|
||||
<li>
|
||||
<a href="changepassword.php"><i class="fas fa-key"></i> <?PHP echo $lang['pass2']; ?></a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<form method="post" id="logout">
|
||||
<div class="form-group">
|
||||
<button type="submit" name="logout" class="btn btn-primary btn-sm btn-block"><span class="fas fa-sign-out-alt" aria-hidden="true"></span> <?PHP echo $lang['wilogout']; ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<?PHP } elseif($_SERVER['SERVER_PORT'] == 443 || $_SERVER['SERVER_PORT'] == 80) {
|
||||
echo '<li><a href="//',$_SERVER['SERVER_NAME'],substr(dirname($_SERVER['SCRIPT_NAME']),0,-12),'stats/"><i class="fas fa-chart-bar"></i> ',$lang['winav6'],'</a></li>';
|
||||
} else {
|
||||
echo '<li><a href="//',$_SERVER['SERVER_NAME'],':',$_SERVER['SERVER_PORT'],substr(dirname($_SERVER['SCRIPT_NAME']),0,-12),'stats/"><i class="fas fa-chart-bar"></i> ',$lang['winav6'],'</a></li>';
|
||||
}
|
||||
if(isset($_SESSION[$rspathhex.'username']) && $_SESSION[$rspathhex.'username'] == $cfg['webinterface_user'] && $_SESSION[$rspathhex.'password'] == $cfg['webinterface_pass']) { ?>
|
||||
<li>
|
||||
<a href="changepassword.php"><i class="fas fa-lock"></i> <?PHP echo $lang['pass2']; ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<form class="navbar-form navbar-center" method="post">
|
||||
<div class="form-group">
|
||||
<button type="submit" name="logout" class="btn btn-primary"><?PHP echo $lang['wilogout']; ?> <span class="fas fa-sign-out-alt" aria-hidden="true"></span></button>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
<?PHP } ?>
|
||||
} ?>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-globe-europe"></i> <b class="caret"></b></a>
|
||||
<a href="" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-globe-europe"></i> <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<?PHP
|
||||
if(is_dir(substr(__DIR__,0,-12).'languages/')) {
|
||||
@@ -110,53 +159,72 @@ if(!isset($_POST['start']) && !isset($_POST['stop']) && !isset($_POST['restart']
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav side-nav">
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "ts.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="ts.php"><i class="fas fa-headset"></i> <?PHP echo $lang['winav1']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "db.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="db.php"><i class="fas fa-database"></i> <?PHP echo $lang['winav2']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "core.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="core.php"><i class="fas fa-cogs"></i> <?PHP echo $lang['winav3']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "rank.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="rank.php"><i class="fas fa-list"></i> <?PHP echo $lang['stmy0002']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "other.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="other.php"><i class="fas fa-wrench"></i> <?PHP echo $lang['winav4']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "msg.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="msg.php"><i class="fas fa-envelope"></i> <?PHP echo $lang['winav5']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "stats.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="stats.php"><i class="fas fa-chart-bar"></i> <?PHP echo $lang['winav6']; ?></a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#addons"><i class="fas fa-puzzle-piece"></i> <?PHP echo $lang['winav12']; ?> <i class="fas fa-caret-down"></i></a>
|
||||
<?PHP echo '<ul id="addons" class="'.(basename($_SERVER['SCRIPT_NAME']) == "addon_assign_groups.php" ? 'in collapse">' : 'collapse">'); ?>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "addon_assign_groups.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="addon_assign_groups.php" class="active"><i class="fas fa-user-plus"></i> <?PHP echo $lang['stag0001']; ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#admin"><i class="fas fa-users"></i> <?PHP echo $lang['winav7']; ?> <i class="fas fa-caret-down"></i></a>
|
||||
<?PHP echo '<ul id="admin" class="'.(basename($_SERVER['SCRIPT_NAME']) == "admin_addtime.php" || basename($_SERVER['SCRIPT_NAME']) == "admin_remtime.php" ? 'in collapse">' : 'collapse">'); ?>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "admin_addtime.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="admin_addtime.php"><i class="fas fa-plus"></i> <?PHP echo $lang['wihladm1']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "admin_remtime.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="admin_remtime.php"><i class="fas fa-minus"></i> <?PHP echo $lang['wihladm2']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "reset.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="reset.php"><i class="fas fa-trash"></i> <?PHP echo $lang['wihladm3']; ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="ts.php"><i class="fas fa-headset"></i> <?PHP echo $lang['winav1']; ?></a>
|
||||
</li>
|
||||
<?PHP
|
||||
if ((array_key_exists('webinterface_fresh_installation', $cfg) && $cfg['webinterface_fresh_installation'] != 1) || !array_key_exists('webinterface_fresh_installation', $cfg)) {
|
||||
echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "db.php" ? ' class="active expertelement">' : ' class="expertelement">'); ?>
|
||||
<a href="db.php"><i class="fas fa-database"></i> <?PHP echo $lang['winav2']; ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#rank"><i class="fas fa-hourglass-half"></i> <?PHP echo $lang['stmy0002']; ?> <i class="fas fa-caret-down"></i></a>
|
||||
<?PHP echo '<ul id="rank" class="'.(basename($_SERVER['SCRIPT_NAME']) == "core.php" || basename($_SERVER['SCRIPT_NAME']) == "rank.php" || basename($_SERVER['SCRIPT_NAME']) == "boost.php" || basename($_SERVER['SCRIPT_NAME']) == "except.php" ? 'in collapse">' : 'collapse">'); ?>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "core.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="core.php" class="active"><i class="fas fa-cogs"></i> <?PHP echo $lang['winav3']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "rank.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="rank.php" class="active"><i class="fas fa-list-ol"></i> <?PHP echo $lang['stmy0002']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "except.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="except.php" class="active"><i class="fas fa-ban"></i> <?PHP echo $lang['wiexcept']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "boost.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="boost.php"><i class="fas fa-rocket"></i> <?PHP echo $lang['wiboost']; ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "other.php" ? ' class="active expertelement">' : ' class="expertelement">'); ?>
|
||||
<a href="other.php"><i class="fas fa-wrench"></i> <?PHP echo $lang['winav4']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "msg.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="msg.php"><i class="fas fa-envelope"></i> <?PHP echo $lang['winav5']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "stats.php" ? ' class="active expertelement">' : ' class="expertelement">'); ?>
|
||||
<a href="stats.php"><i class="fas fa-chart-bar"></i> <?PHP echo $lang['winav6']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "ranklist.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="ranklist.php"><i class="fas fa-list"></i> <?PHP echo $lang['stnv0029']; ?></a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#addons"><i class="fas fa-puzzle-piece"></i> <?PHP echo $lang['winav12']; ?> <i class="fas fa-caret-down"></i></a>
|
||||
<?PHP echo '<ul id="addons" class="'.(basename($_SERVER['SCRIPT_NAME']) == "addon_assign_groups.php" ? 'in collapse">' : 'collapse">'); ?>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "addon_assign_groups.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="addon_assign_groups.php" class="active"><i class="fas fa-user-plus"></i> <?PHP echo $lang['stag0001']; ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="javascript:;" data-toggle="collapse" data-target="#admin"><i class="fas fa-users"></i> <?PHP echo $lang['winav7']; ?> <i class="fas fa-caret-down"></i></a>
|
||||
<?PHP echo '<ul id="admin" class="'.(basename($_SERVER['SCRIPT_NAME']) == "admin_addtime.php" || basename($_SERVER['SCRIPT_NAME']) == "admin_remtime.php" || basename($_SERVER['SCRIPT_NAME']) == "reset.php" ? 'in collapse">' : 'collapse">'); ?>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "admin_addtime.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="admin_addtime.php"><i class="fas fa-plus"></i> <?PHP echo $lang['wihladm1']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "admin_remtime.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="admin_remtime.php"><i class="fas fa-minus"></i> <?PHP echo $lang['wihladm2']; ?></a>
|
||||
</li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "reset.php" ? ' class="active expertelement">' : ' class="expertelement">'); ?>
|
||||
<a href="reset.php"><i class="fas fa-sync"></i> <?PHP echo $lang['wihladm3']; ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<?PHP
|
||||
} ?>
|
||||
<li class="divider"></li>
|
||||
<?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "bot.php" ? ' class="active">' : '>'); ?>
|
||||
<a href="bot.php"><i class="fas fa-power-off"></i> <?PHP echo $lang['winav8']; ?></a>
|
||||
<a href="bot.php"><i class="fas fa-power-off"></i> <?PHP echo $lang['winav8']; ?></a>
|
||||
</li>
|
||||
<?PHP
|
||||
if(isset($botstatus)) {
|
||||
@@ -172,8 +240,8 @@ if(!isset($_POST['start']) && !isset($_POST['stop']) && !isset($_POST['restart']
|
||||
</div>
|
||||
</nav>
|
||||
<?PHP
|
||||
if($cfg['webinterface_admin_client_unique_id_list'] == NULL && isset($_SESSION[$rspathhex.'username']) && $_SESSION[$rspathhex.'username'] == $cfg['webinterface_user'] && !isset($err_msg)) {
|
||||
$err_msg = $lang['winav11']; $err_lvl = 3;
|
||||
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) {
|
||||
$err_msg = $lang['winav11']; $err_lvl = 2;
|
||||
}
|
||||
|
||||
if(!isset($_SERVER['HTTPS']) && !isset($err_msg) || isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "on" && !isset($err_msg)) {
|
||||
|
||||
@@ -69,9 +69,11 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$cfg['default_language'] = $_SESSION[$rspathhex.'language'] = $_POST['default_language'];
|
||||
unset($lang); $lang = set_language($cfg['default_language']);
|
||||
$cfg['version_update_channel'] = $_POST['version_update_channel'];
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = $_POST['webinterface_admin_client_unique_id_list'];
|
||||
if (isset($_POST['rankup_client_database_id_change_switch'])) $cfg['rankup_client_database_id_change_switch'] = 1; else $cfg['rankup_client_database_id_change_switch'] = 0;
|
||||
if (isset($_POST['rankup_clean_clients_switch'])) $cfg['rankup_clean_clients_switch'] = 1; else $cfg['rankup_clean_clients_switch'] = 0;
|
||||
$cfg['rankup_clean_clients_period'] = $_POST['rankup_clean_clients_period'];
|
||||
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('logs_timezone','{$cfg['logs_timezone']}'),('default_date_format','{$cfg['default_date_format']}'),('logs_path','{$cfg['logs_path']}'),('logs_debug_level','{$cfg['logs_debug_level']}'),('logs_rotation_size','{$cfg['logs_rotation_size']}'),('default_language','{$cfg['default_language']}'),('version_update_channel','{$cfg['version_update_channel']}'),('webinterface_admin_client_unique_id_list','{$cfg['webinterface_admin_client_unique_id_list']}'),('rankup_hash_ip_addresses_mode','{$cfg['rankup_hash_ip_addresses_mode']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('logs_timezone','{$cfg['logs_timezone']}'),('default_date_format','{$cfg['default_date_format']}'),('logs_path','{$cfg['logs_path']}'),('logs_debug_level','{$cfg['logs_debug_level']}'),('logs_rotation_size','{$cfg['logs_rotation_size']}'),('default_language','{$cfg['default_language']}'),('version_update_channel','{$cfg['version_update_channel']}'),('rankup_hash_ip_addresses_mode','{$cfg['rankup_hash_ip_addresses_mode']}'),('rankup_client_database_id_change_switch','{$cfg['rankup_client_database_id_change_switch']}'),('rankup_clean_clients_switch','{$cfg['rankup_clean_clients_switch']}'),('rankup_clean_clients_period','{$cfg['rankup_clean_clients_period']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
@@ -79,7 +81,6 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
type="submit" class="btn btn-primary" name="restart"><i class="fas fa-sync"></i> '.$lang['wibot7'].'</button></form>');
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = array_flip(explode(',', $cfg['webinterface_admin_client_unique_id_list']));
|
||||
$cfg['logs_path'] = $_POST['logs_path'];
|
||||
|
||||
if(isset($cfg['default_language']) && is_dir(substr(__DIR__,0,-12).'languages/')) {
|
||||
@@ -129,7 +130,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
if ('.' === $file || '..' === $file || is_dir($file)) continue;
|
||||
$sep_lang = preg_split("/[._]/", $file);
|
||||
if(isset($sep_lang[0]) && $sep_lang[0] == 'core' && isset($sep_lang[1]) && strlen($sep_lang[1]) == 2 && isset($sep_lang[4]) && strtolower($sep_lang[4]) == 'php') {
|
||||
echo '<option data-subtext="'.$sep_lang[2].'" value="'.$sep_lang[1].'"'.($cfg['default_language'] === $sep_lang[1] ? ' selected="selected"' : '').'>'.strtoupper($sep_lang[1]).'</option>';
|
||||
echo '<option data-icon="flag-icon flag-icon-'.$sep_lang[3].'" data-subtext="'.$sep_lang[2].'" value="'.$sep_lang[1].'"'.($cfg['default_language'] === $sep_lang[1] ? ' selected="selected"' : '').'> '.strtoupper($sep_lang[1]).'</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -204,21 +205,13 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiadmuuiddesc"><?php echo $lang['wiadmuuid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8 required-field-block">
|
||||
<textarea class="form-control required" data-pattern="^([A-Za-z0-9\\\/\+]{27}=,)*([A-Za-z0-9\\\/\+]{27}=)$" data-error="Check all unique IDs are correct and your list do not ends with a comma!" rows="1" name="webinterface_admin_client_unique_id_list" maxlength="21588"><?php if(!empty($cfg['webinterface_admin_client_unique_id_list'])) echo implode(',',array_flip($cfg['webinterface_admin_client_unique_id_list'])); ?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiupchdesc"><?php echo $lang['wiupch']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="version_update_channel">
|
||||
<?PHP
|
||||
echo '<option data-subtext="[recommended]" value="stable"'; if($cfg['version_update_channel']=="stable") echo " selected=selected"; echo '>',$lang['wiupch0'],'</option>';
|
||||
echo '<option value="beta"'; if($cfg['version_update_channel']=="beta") echo " selected=selected"; echo '>',$lang['wiupch1'],'</option>';
|
||||
echo '<option data-icon="fas fa-parachute-box" ata-subtext="[recommended]" value="stable"'; if($cfg['version_update_channel']=="stable") echo " selected=selected"; echo '> ',$lang['wiupch0'],'</option>';
|
||||
echo '<option data-icon="fas fa-flask" value="beta"'; if($cfg['version_update_channel']=="beta") echo " selected=selected"; echo '> ',$lang['wiupch1'],'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -229,20 +222,61 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="rankup_hash_ip_addresses_mode">
|
||||
<?PHP
|
||||
echo '<option data-subtext="[recommended]" value="2"'; if($cfg['rankup_hash_ip_addresses_mode']=="2") echo " selected=selected"; echo '>',$lang['wishcolha2'],'</option>';
|
||||
echo '<option value="1"'; if($cfg['rankup_hash_ip_addresses_mode']=="1") echo " selected=selected"; echo '>',$lang['wishcolha1'],'</option>';
|
||||
echo '<option data-icon="fas fa-lock" data-subtext="[recommended]" value="2"'; if($cfg['rankup_hash_ip_addresses_mode']=="2") echo " selected=selected"; echo '> ',$lang['wishcolha2'],'</option>';
|
||||
echo '<option data-icon="fas fa-shield-alt" value="1"'; if($cfg['rankup_hash_ip_addresses_mode']=="1") echo " selected=selected"; echo '> ',$lang['wishcolha1'],'</option>';
|
||||
echo '<option data-divider="true"> </option>';
|
||||
echo '<option value="0"'; if($cfg['rankup_hash_ip_addresses_mode']=="0") echo " selected=selected"; echo '>',$lang['wishcolha0'],'</option>';
|
||||
echo '<option data-icon="fas fa-ban" value="0"'; if($cfg['rankup_hash_ip_addresses_mode']=="0") echo " selected=selected"; echo '> ',$lang['wishcolha0'],'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wichdbiddesc"><?php echo $lang['wichdbid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-lg-8">
|
||||
<?PHP if ($cfg['rankup_client_database_id_change_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="rankup_client_database_id_change_switch" value="',$cfg['rankup_client_database_id_change_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="rankup_client_database_id_change_switch" value="',$cfg['rankup_client_database_id_change_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#cleancdesc"><?php echo $lang['cleanc']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['rankup_clean_clients_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="rankup_clean_clients_switch" value="',$cfg['rankup_clean_clients_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="rankup_clean_clients_switch" value="',$cfg['rankup_clean_clients_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#cleanpdesc"><?php echo $lang['cleanp']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="rankup_clean_clients_period" value="<?php echo $cfg['rankup_clean_clients_period']; ?>">
|
||||
<script>
|
||||
$("input[name='rankup_clean_clients_period']").TouchSpin({
|
||||
min: 1800,
|
||||
max: 9223372036854775807,
|
||||
verticalbuttons: true,
|
||||
prefix: 'Sec.:'
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" name="update" class="btn btn-primary"><?php echo $lang['wisvconf']; ?></button>
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
@@ -347,22 +381,6 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiadmuuiddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiadmuuid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiadmuuiddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiupchdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@@ -395,6 +413,54 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wichdbiddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wichdbid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wichdbiddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="cleancdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['cleanc']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo sprintf($lang['cleancdesc'], '<a href="https://ts-n.net/clientcleaner.php" target="_blank">https://ts-n.net/clientcleaner.php</a>'); ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="cleanpdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['cleanp']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['cleanpdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('form[data-toggle="validator"]').validator({
|
||||
custom: {
|
||||
|
||||
@@ -55,7 +55,7 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
if(($groupslist = $mysqlcon->query("SELECT * FROM `$dbname`.`groups`")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
|
||||
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 {
|
||||
@@ -155,8 +155,6 @@ if (isset($_POST['update_old']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$cfg['rankup_definition'] = $rankup_definition;
|
||||
|
||||
if($errcnf == 0) {
|
||||
$err_msg = $cfg['rankup_definition'];
|
||||
$err_lvl = NULL;
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('rankup_definition','{$cfg['rankup_definition']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
@@ -197,8 +195,8 @@ if (isset($_POST['update_old']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<span><?php echo $lang['stmy0002'],' ',$lang['wihlset']; ?></span>
|
||||
<div class="btn pull-right">
|
||||
<input id="switchexpert1" class="switch-animate" type="checkbox" data-size="mini" name="rankup_clean_clients_switch1" value="switchexpert1" data-label-text="<?php echo $lang['wigrpimp'] ?>" data-off-text="OFF">
|
||||
<div class="btn pull-right expertelement">
|
||||
<input id="switchexpert1" class="switch-animate" type="checkbox" data-size="mini" value="switchexpert1" data-label-text="<?php echo $lang['wigrpimp'] ?>" data-off-text="OFF">
|
||||
</div>
|
||||
</h1>
|
||||
</div>
|
||||
@@ -207,13 +205,13 @@ if (isset($_POST['update_old']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-12" data-toggle="modal" data-target="#wihladm0desc"><?php echo $lang['wihladm0']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<label class="col-sm-12 pointer" data-toggle="modal" data-target="#wihladm0desc"><?php echo $lang['wihladm0']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="panel-body">
|
||||
<div class="row"> </div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-4">
|
||||
<b><?php echo $lang['wigrpt1'] ?></b>
|
||||
<b><?php echo $lang['wigrpt1'],' (',$lang['wigrptk'],')'; ?></b>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<b><?php echo $lang['wigrpt2'] ?></b>
|
||||
@@ -232,14 +230,13 @@ if (isset($_POST['update_old']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<select class="selectpicker show-tick form-control" data-live-search="true" name="rankupgroup[]">
|
||||
<?PHP
|
||||
foreach ($groupslist as $groupID => $groupParam) {
|
||||
if ($groupID != 0 && $groupID == $sgroup && $groupParam['iconfile']==1) {
|
||||
echo '<option data-content="<img src=\'../tsicons/'.$groupID.'.png\' width=\'16\' height=\'16\'> ',$groupParam['sgidname'],' <span class=\'text-muted small\'>SGID: ',$groupID,'</span>" value="'.$groupID,'" selected></option>';
|
||||
} elseif ($groupID != 0 && $groupParam['iconfile']==1) {
|
||||
echo '<option data-content="<img src=\'../tsicons/'.$groupID.'.png\' width=\'16\' height=\'16\'> ',$groupParam['sgidname'],' <span class=\'text-muted small\'>SGID: ',$groupID,'</span>" value="',$groupID,'"></option>';
|
||||
} elseif ($groupID != 0 && $groupID == $sgroup) {
|
||||
echo '<option data-content="<img src=\'../tsicons/placeholder.png\' width=\'16\' height=\'16\'> ',$groupParam['sgidname'],' <span class=\'text-muted small\'>SGID: ',$groupID,'</span>" value="',$groupID,'" selected></option>';
|
||||
} elseif ($groupID != 0) {
|
||||
echo '<option data-content="<img src=\'../tsicons/placeholder.png\' width=\'16\' height=\'16\'> ',$groupParam['sgidname'],' <span class=\'text-muted small\'>SGID: ',$groupID,'</span>" value="',$groupID,'"></option>';
|
||||
if ($groupID == $sgroup) $selected=" selected"; else $selected="";
|
||||
if ($groupParam['iconfile'] == 1) $iconfile=$groupID; else $iconfile="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\'> ',$groupParam['sgidname'],' <span class=\'text-muted small\'>SGID: ',$groupID,$grouptype,'</span>" value="',$groupID,'"',$selected,$disabled,'></option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -267,7 +264,7 @@ if (isset($_POST['update_old']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" name="update"><?php echo $lang['wisvconf']; ?></button>
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
@@ -279,7 +276,7 @@ if (isset($_POST['update_old']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<h1 class="page-header">
|
||||
<span><?php echo $lang['stmy0002'],' ',$lang['wihlset']; ?></span>
|
||||
<div class="btn pull-right">
|
||||
<input id="switchexpert2" class="switch-animate" type="checkbox" checked data-size="mini" name="rankup_clean_clients_switch2" value="switchexpert2" data-label-text="<?php echo $lang['wigrpimp'] ?>" data-on-text="ON">
|
||||
<input id="switchexpert2" class="switch-animate" type="checkbox" checked data-size="mini" value="switchexpert2" data-label-text="<?php echo $lang['wigrpimp'] ?>" data-on-text="ON">
|
||||
</div>
|
||||
</h1>
|
||||
</div>
|
||||
@@ -393,13 +390,13 @@ $(document).ready(function() {
|
||||
if($number == 1) {
|
||||
$('.delete').remove();
|
||||
}
|
||||
});
|
||||
$('#switchexpert1').on('switchChange.bootstrapSwitch', function(e) {
|
||||
});
|
||||
$('#switchexpert1').on('switchChange.bootstrapSwitch', function() {
|
||||
document.getElementById("new").classList.add("hidden");
|
||||
document.getElementById("old").classList.remove("hidden");
|
||||
$('#switchexpert2').bootstrapSwitch('state', true, false);
|
||||
});
|
||||
$('#switchexpert2').on('switchChange.bootstrapSwitch', function(e) {
|
||||
$('#switchexpert2').on('switchChange.bootstrapSwitch', function() {
|
||||
document.getElementById("new").classList.remove("hidden");
|
||||
document.getElementById("old").classList.add("hidden");
|
||||
$('#switchexpert1').bootstrapSwitch('state', false, false);
|
||||
|
||||
558
webinterface/ranklist.php
Normal file
558
webinterface/ranklist.php
Normal file
@@ -0,0 +1,558 @@
|
||||
<?PHP
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
ini_set('session.use_strict_mode', 1);
|
||||
if(in_array('sha512', hash_algos())) {
|
||||
ini_set('session.hash_function', 'sha512');
|
||||
}
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
if(!headers_sent()) {
|
||||
header("Strict-Transport-Security: max-age=31536000; includeSubDomains; preload;");
|
||||
}
|
||||
}
|
||||
session_start();
|
||||
|
||||
require_once('../other/config.php');
|
||||
|
||||
function getclientip() {
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP']))
|
||||
return $_SERVER['HTTP_CLIENT_IP'];
|
||||
elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
elseif(!empty($_SERVER['HTTP_X_FORWARDED']))
|
||||
return $_SERVER['HTTP_X_FORWARDED'];
|
||||
elseif(!empty($_SERVER['HTTP_FORWARDED_FOR']))
|
||||
return $_SERVER['HTTP_FORWARDED_FOR'];
|
||||
elseif(!empty($_SERVER['HTTP_FORWARDED']))
|
||||
return $_SERVER['HTTP_FORWARDED'];
|
||||
elseif(!empty($_SERVER['REMOTE_ADDR']))
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isset($_POST['logout'])) {
|
||||
rem_session_ts3($rspathhex);
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $cfg['webinterface_user'] || $_SESSION[$rspathhex.'password'] != $cfg['webinterface_pass'] || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\'));
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once('nav.php');
|
||||
$csrf_token = bin2hex(openssl_random_pseudo_bytes(32));
|
||||
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`csrf_token` (`token`,`timestamp`,`sessionid`) VALUES ('$csrf_token','".time()."','".session_id()."')") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `sessionid`='".session_id()."'")->fetchALL(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
if (isset($_POST['stats_column_rank_switch'])) $cfg['stats_column_rank_switch'] = 1; else $cfg['stats_column_rank_switch'] = 0;
|
||||
if (isset($_POST['stats_column_client_name_switch'])) $cfg['stats_column_client_name_switch'] = 1; else $cfg['stats_column_client_name_switch'] = 0;
|
||||
if (isset($_POST['stats_column_unique_id_switch'])) $cfg['stats_column_unique_id_switch'] = 1; else $cfg['stats_column_unique_id_switch'] = 0;
|
||||
if (isset($_POST['stats_column_client_db_id_switch'])) $cfg['stats_column_client_db_id_switch'] = 1; else $cfg['stats_column_client_db_id_switch'] = 0;
|
||||
if (isset($_POST['stats_column_last_seen_switch'])) $cfg['stats_column_last_seen_switch'] = 1; else $cfg['stats_column_last_seen_switch'] = 0;
|
||||
if (isset($_POST['stats_column_online_time_switch'])) $cfg['stats_column_online_time_switch'] = 1; else $cfg['stats_column_online_time_switch'] = 0;
|
||||
if (isset($_POST['stats_column_idle_time_switch'])) $cfg['stats_column_idle_time_switch'] = 1; else $cfg['stats_column_idle_time_switch'] = 0;
|
||||
if (isset($_POST['stats_column_active_time_switch'])) $cfg['stats_column_active_time_switch'] = 1; else $cfg['stats_column_active_time_switch'] = 0;
|
||||
if (isset($_POST['stats_column_current_server_group_switch'])) $cfg['stats_column_current_server_group_switch'] = 1; else $cfg['stats_column_current_server_group_switch'] = 0;
|
||||
if (isset($_POST['stats_column_next_rankup_switch'])) $cfg['stats_column_next_rankup_switch'] = 1; else $cfg['stats_column_next_rankup_switch'] = 0;
|
||||
if (isset($_POST['stats_column_next_server_group_switch'])) $cfg['stats_column_next_server_group_switch'] = 1; else $cfg['stats_column_next_server_group_switch'] = 0;
|
||||
if (isset($_POST['stats_column_current_group_since_switch'])) $cfg['stats_column_current_group_since_switch'] = 1; else $cfg['stats_column_current_group_since_switch'] = 0;
|
||||
if (isset($_POST['stats_show_excepted_clients_switch'])) $cfg['stats_show_excepted_clients_switch'] = 1; else $cfg['stats_show_excepted_clients_switch'] = 0;
|
||||
if (isset($_POST['stats_show_clients_in_highest_rank_switch'])) $cfg['stats_show_clients_in_highest_rank_switch'] = 1; else $cfg['stats_show_clients_in_highest_rank_switch'] = 0;
|
||||
$cfg['stats_column_default_order'] = $_POST['stats_column_default_order'];
|
||||
$cfg['stats_column_default_sort'] = $_POST['stats_column_default_sort'];
|
||||
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('stats_column_rank_switch','{$cfg['stats_column_rank_switch']}'),('stats_column_client_name_switch','{$cfg['stats_column_client_name_switch']}'),('stats_column_unique_id_switch','{$cfg['stats_column_unique_id_switch']}'),('stats_column_client_db_id_switch','{$cfg['stats_column_client_db_id_switch']}'),('stats_column_last_seen_switch','{$cfg['stats_column_last_seen_switch']}'),('stats_column_online_time_switch','{$cfg['stats_column_online_time_switch']}'),('stats_column_idle_time_switch','{$cfg['stats_column_idle_time_switch']}'),('stats_column_active_time_switch','{$cfg['stats_column_active_time_switch']}'),('stats_column_current_server_group_switch','{$cfg['stats_column_current_server_group_switch']}'),('stats_column_current_group_since_switch','{$cfg['stats_column_current_group_since_switch']}'),('stats_column_next_rankup_switch','{$cfg['stats_column_next_rankup_switch']}'),('stats_column_next_server_group_switch','{$cfg['stats_column_next_server_group_switch']}'),('stats_column_default_order','{$cfg['stats_column_default_order']}'),('stats_column_default_sort','{$cfg['stats_column_default_sort']}'),('stats_show_excepted_clients_switch','{$cfg['stats_show_excepted_clients_switch']}'),('stats_show_clients_in_highest_rank_switch','{$cfg['stats_show_clients_in_highest_rank_switch']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
$err_msg = $lang['wisvsuc'];
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
} elseif(isset($_POST['update'])) {
|
||||
echo '<div class="alert alert-danger alert-dismissible">',$lang['errcsrf'],'</div>';
|
||||
rem_session_ts3($rspathhex);
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
<?PHP if(isset($err_msg)) error_handling($err_msg, $err_lvl); ?>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">
|
||||
<?php echo $lang['stnv0029'],' ',$lang['wihlset']; ?>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal" name="update" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $csrf_token; ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolrgdesc"><?php echo $lang['wishcolrg']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_rank_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_rank_switch" value="',$cfg['stats_column_rank_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_rank_switch" value="',$cfg['stats_column_rank_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolclddesc"><?php echo $lang['wishcolcld']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_client_name_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_client_name_switch" value="',$cfg['stats_column_client_name_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_client_name_switch" value="',$cfg['stats_column_client_name_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcoluuiddesc"><?php echo $lang['wishcoluuid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_unique_id_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_unique_id_switch" value="',$cfg['stats_column_unique_id_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_unique_id_switch" value="',$cfg['stats_column_unique_id_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcoldbiddesc"><?php echo $lang['wishcoldbid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_client_db_id_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_client_db_id_switch" value="',$cfg['stats_column_client_db_id_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_client_db_id_switch" value="',$cfg['stats_column_client_db_id_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcollsdesc"><?php echo $lang['wishcolls']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_last_seen_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_last_seen_switch" value="',$cfg['stats_column_last_seen_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_last_seen_switch" value="',$cfg['stats_column_last_seen_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolotdesc"><?php echo $lang['wishcolot']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_online_time_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_online_time_switch" value="',$cfg['stats_column_online_time_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_online_time_switch" value="',$cfg['stats_column_online_time_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolitdesc"><?php echo $lang['wishcolit']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_idle_time_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_idle_time_switch" value="',$cfg['stats_column_idle_time_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_idle_time_switch" value="',$cfg['stats_column_idle_time_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolatdesc"><?php echo $lang['wishcolat']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_active_time_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_active_time_switch" value="',$cfg['stats_column_active_time_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_active_time_switch" value="',$cfg['stats_column_active_time_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolasdesc"><?php echo $lang['wishcolas']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_current_server_group_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_current_server_group_switch" value="',$cfg['stats_column_current_server_group_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_current_server_group_switch" value="',$cfg['stats_column_current_server_group_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolgsdesc"><?php echo $lang['wishcolgs']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_current_group_since_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_current_group_since_switch" value="',$cfg['stats_column_current_group_since_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_current_group_since_switch" value="',$cfg['stats_column_current_group_since_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolnxdesc"><?php echo $lang['wishcolnx']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_next_rankup_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_next_rankup_switch" value="',$cfg['stats_column_next_rankup_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_next_rankup_switch" value="',$cfg['stats_column_next_rankup_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolsgdesc"><?php echo $lang['wishcolsg']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_next_server_group_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_next_server_group_switch" value="',$cfg['stats_column_next_server_group_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_next_server_group_switch" value="',$cfg['stats_column_next_server_group_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishdefdesc"><?php echo $lang['wishdef']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="stats_column_default_sort">
|
||||
<?PHP
|
||||
echo '<option data-icon="fas fa-hashtag" data-subtext="[default]" value="rank"'.($cfg['stats_column_default_sort'] === '1' ? ' selected="selected"' : '').'> '.$lang['listrank'].'</option>';
|
||||
echo '<option data-icon="fas fa-user" value="name"'.($cfg['stats_column_default_sort'] === 'name' ? ' selected="selected"' : '').'> '.$lang['listnick'].'</option>';
|
||||
echo '<option data-icon="fas fa-id-card" value="uuid"'.($cfg['stats_column_default_sort'] === 'uuid' ? ' selected="selected"' : '').'> '.$lang['listuid'].'</option>';
|
||||
echo '<option data-icon="fas fa-database" value="cldbid"'.($cfg['stats_column_default_sort'] === 'cldbid' ? ' selected="selected"' : '').'> '.$lang['listcldbid'].'</option>';
|
||||
echo '<option data-icon="fas fa-user-clock" value="lastseen"'.($cfg['stats_column_default_sort'] === 'lastseen' ? ' selected="selected"' : '').'> '.$lang['listseen'].'</option>';
|
||||
echo '<option data-icon="fas fa-hourglass-start" value="count"'.($cfg['stats_column_default_sort'] === 'count' ? ' selected="selected"' : '').'> '.$lang['listsumo'].'</option>';
|
||||
echo '<option data-icon="fas fa-hourglass-end" value="idle"'.($cfg['stats_column_default_sort'] === 'idle' ? ' selected="selected"' : '').'> '.$lang['listsumi'].'</option>';
|
||||
echo '<option data-icon="fas fa-hourglass-half" value="active"'.($cfg['stats_column_default_sort'] === 'active' ? ' selected="selected"' : '').'> '.$lang['listsuma'].'</option>';
|
||||
echo '<option data-icon="fas fa-clipboard-check" value="grpid"'.($cfg['stats_column_default_sort'] === 'grpid' ? ' selected="selected"' : '').'> '.$lang['listacsg'].'</option>';
|
||||
echo '<option data-icon="fas fa-history" value="grpidsince"'.($cfg['stats_column_default_sort'] === 'grpidsince' ? ' selected="selected"' : '').'> '.$lang['listgrps'].'</option>';
|
||||
echo '<option data-icon="fas fa-clock" value="nextup"'.($cfg['stats_column_default_sort'] === 'nextup' ? ' selected="selected"' : '').'> '.$lang['listnxup'].'</option>';
|
||||
echo '<option data-icon="fas fa-clipboard-list" value="active"'.($cfg['stats_column_default_sort'] === 'active' ? ' selected="selected"' : '').'> '.$lang['listnxsg'].'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishsortdesc"><?php echo $lang['wishsort']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="stats_column_default_order">
|
||||
<?PHP
|
||||
echo '<option data-subtext="[ASC]" data-icon="fas fa-sort-asc" value="asc"'.($cfg['stats_column_default_order'] === 'asc' ? ' selected="selected"' : '').'> '.$lang['asc'].'</option>';
|
||||
echo '<option data-subtext="[DESC]" data-icon="fas fa-sort-desc" value="desc"'.($cfg['stats_column_default_order'] === 'desc' ? ' selected="selected"' : '').'> '.$lang['desc'].'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body expertelement">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishexclddesc"><?php echo $lang['wishexcld']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_show_excepted_clients_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_show_excepted_clients_switch" value="',$cfg['stats_show_excepted_clients_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_show_excepted_clients_switch" value="',$cfg['stats_show_excepted_clients_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishhiclddesc"><?php echo $lang['wishhicld']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_show_clients_in_highest_rank_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_show_clients_in_highest_rank_switch" value="',$cfg['stats_show_clients_in_highest_rank_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_show_clients_in_highest_rank_switch" value="',$cfg['stats_show_clients_in_highest_rank_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="wishcolrgdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolrg']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolrgdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolclddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolcld']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolclddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcoluuiddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcoluuid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcoluuiddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcoldbiddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcoldbid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcoldbiddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcollsdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolls']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcollsdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolotdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolot']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolotdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolitdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolit']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolitdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolatdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolat']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolatdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolasdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolas']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolasdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolgsdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolgs']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolgsdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolnxdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolnx']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolnxdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolsgdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolsg']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolsgdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishdefdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishdef']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishdefdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishsortdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishsort']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishsortdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishexclddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishexcld']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishexclddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishhiclddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishhicld']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishhiclddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -257,13 +257,13 @@ if (isset($_POST['confirm']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $csrf_token; ?>">
|
||||
<div class="form-horizontal">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-10 control-label" data-toggle="modal" data-target="#wihladm0desc"><?php echo $lang['wihladm0']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-12 pointer" data-toggle="modal" data-target="#wihladm0desc"><?php echo $lang['wihladm0']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="panel-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -273,10 +273,10 @@ if (isset($_POST['confirm']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wihladm31desc"><?php echo $lang['wihladm31']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="reset_user_time">
|
||||
<option selected="selected" value="0"><?PHP echo $lang['winxmode1']; ?></option>
|
||||
<option data-icon="fas fa-ban" selected="selected" value="0"> <?PHP echo $lang['winxmode1']; ?></option>
|
||||
<option data-divider="true"> </option>
|
||||
<option value="1"><?PHP echo $lang['wihladm311']; ?></option>
|
||||
<option value="2"><?PHP echo $lang['wihladm312']; ?></option>
|
||||
<option data-icon="fas fa-history" value="1"> <?PHP echo $lang['wihladm311']; ?></option>
|
||||
<option data-icon="fas fa-user-slash" value="2"> <?PHP echo $lang['wihladm312']; ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -109,24 +109,24 @@ if (($last_access['webinterface_access_last'] + 1) >= time()) {
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$allclients = $ts3->clientList();
|
||||
|
||||
$pwd = substr(str_shuffle('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#*+;:-_~?=%&<EFBFBD>!()'),0,12);
|
||||
$pwd = substr(str_shuffle('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#*+;:-_~?=%&!()'),0,12);
|
||||
$cfg['webinterface_pass'] = password_hash($pwd, PASSWORD_DEFAULT);
|
||||
|
||||
foreach($allclients as $client) {
|
||||
if(in_array(htmlspecialchars($client['client_unique_identifier'], ENT_QUOTES), $cfg['webinterface_admin_client_unique_id_list'])) {
|
||||
if(array_key_exists(htmlspecialchars($client['client_unique_identifier'], ENT_QUOTES), $cfg['webinterface_admin_client_unique_id_list'])) {
|
||||
$checkuuid = 1;
|
||||
if($client['connection_client_ip'] == getclientip()) {
|
||||
$checkip = 1;
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('webinterface_pass','{$cfg['webinterface_pass']}'),('webinterface_access_last','0') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)") === false) {
|
||||
$err_msg = $lang['isntwidbmsg'].print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
$err_msg .= $lang['isntwidbmsg'].print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
} else {
|
||||
try {
|
||||
usleep($cfg['teamspeak_query_command_delay']);
|
||||
$ts3->clientGetByUid($client['client_unique_identifier'])->message(sprintf($lang['wirtpw4'], $cfg['webinterface_user'], $pwd, '[URL=http'.(!empty($_SERVER['HTTPS'])?"s":"").'://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).']','[/URL]'));
|
||||
$err_msg = sprintf($lang['wirtpw5'],'<a href="http'.(!empty($_SERVER['HTTPS'])?"s":"").'://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).'/">','</a>'); $err_lvl = 1;
|
||||
$err_msg .= sprintf($lang['wirtpw5'],'<a href="http'.(!empty($_SERVER['HTTPS'])?"s":"").'://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']).'/">','</a>'); $err_lvl = 1;
|
||||
enter_logfile($cfg,3,sprintf($lang['wirtpw6'],getclientip()));
|
||||
} catch (Exception $e) {
|
||||
$err_msg = $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
$err_msg .= $lang['errorts3'].$e->getCode().': '.$e->getMessage(); $err_lvl = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,24 +56,9 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
}
|
||||
|
||||
if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
if (isset($_POST['stats_column_rank_switch'])) $cfg['stats_column_rank_switch'] = 1; else $cfg['stats_column_rank_switch'] = 0;
|
||||
if (isset($_POST['stats_column_client_name_switch'])) $cfg['stats_column_client_name_switch'] = 1; else $cfg['stats_column_client_name_switch'] = 0;
|
||||
if (isset($_POST['stats_column_unique_id_switch'])) $cfg['stats_column_unique_id_switch'] = 1; else $cfg['stats_column_unique_id_switch'] = 0;
|
||||
if (isset($_POST['stats_column_client_db_id_switch'])) $cfg['stats_column_client_db_id_switch'] = 1; else $cfg['stats_column_client_db_id_switch'] = 0;
|
||||
if (isset($_POST['stats_column_last_seen_switch'])) $cfg['stats_column_last_seen_switch'] = 1; else $cfg['stats_column_last_seen_switch'] = 0;
|
||||
if (isset($_POST['stats_column_online_time_switch'])) $cfg['stats_column_online_time_switch'] = 1; else $cfg['stats_column_online_time_switch'] = 0;
|
||||
if (isset($_POST['stats_column_idle_time_switch'])) $cfg['stats_column_idle_time_switch'] = 1; else $cfg['stats_column_idle_time_switch'] = 0;
|
||||
if (isset($_POST['stats_column_active_time_switch'])) $cfg['stats_column_active_time_switch'] = 1; else $cfg['stats_column_active_time_switch'] = 0;
|
||||
if (isset($_POST['stats_column_current_server_group_switch'])) $cfg['stats_column_current_server_group_switch'] = 1; else $cfg['stats_column_current_server_group_switch'] = 0;
|
||||
if (isset($_POST['stats_column_next_rankup_switch'])) $cfg['stats_column_next_rankup_switch'] = 1; else $cfg['stats_column_next_rankup_switch'] = 0;
|
||||
if (isset($_POST['stats_column_next_server_group_switch'])) $cfg['stats_column_next_server_group_switch'] = 1; else $cfg['stats_column_next_server_group_switch'] = 0;
|
||||
if (isset($_POST['stats_column_current_group_since_switch'])) $cfg['stats_column_current_group_since_switch'] = 1; else $cfg['stats_column_current_group_since_switch'] = 0;
|
||||
if (isset($_POST['stats_show_excepted_clients_switch'])) $cfg['stats_show_excepted_clients_switch'] = 1; else $cfg['stats_show_excepted_clients_switch'] = 0;
|
||||
if (isset($_POST['stats_show_clients_in_highest_rank_switch'])) $cfg['stats_show_clients_in_highest_rank_switch'] = 1; else $cfg['stats_show_clients_in_highest_rank_switch'] = 0;
|
||||
if (isset($_POST['stats_show_site_navigation_switch'])) $cfg['stats_show_site_navigation_switch'] = 1; else $cfg['stats_show_site_navigation_switch'] = 0;
|
||||
if (isset($_POST['stats_show_maxclientsline_switch'])) $cfg['stats_show_maxclientsline_switch'] = 1; else $cfg['stats_show_maxclientsline_switch'] = 0;
|
||||
$cfg['stats_column_default_order'] = $_POST['stats_column_default_order'];
|
||||
$cfg['stats_column_default_sort'] = $_POST['stats_column_default_sort'];
|
||||
if (isset($_POST['teamspeak_verification_channel_id'])) $cfg['teamspeak_verification_channel_id'] = $_POST['teamspeak_verification_channel_id']; else $cfg['teamspeak_verification_channel_id'] = 0;
|
||||
$cfg['stats_time_bronze'] = $_POST['stats_time_bronze'];
|
||||
$cfg['stats_time_silver'] = $_POST['stats_time_silver'];
|
||||
$cfg['stats_time_gold'] = $_POST['stats_time_gold'];
|
||||
@@ -83,7 +68,7 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$cfg['stats_connects_gold'] = $_POST['stats_connects_gold'];
|
||||
$cfg['stats_connects_legend'] = $_POST['stats_connects_legend'];
|
||||
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('stats_column_rank_switch','{$cfg['stats_column_rank_switch']}'),('stats_column_client_name_switch','{$cfg['stats_column_client_name_switch']}'),('stats_column_unique_id_switch','{$cfg['stats_column_unique_id_switch']}'),('stats_column_client_db_id_switch','{$cfg['stats_column_client_db_id_switch']}'),('stats_column_last_seen_switch','{$cfg['stats_column_last_seen_switch']}'),('stats_column_online_time_switch','{$cfg['stats_column_online_time_switch']}'),('stats_column_idle_time_switch','{$cfg['stats_column_idle_time_switch']}'),('stats_column_active_time_switch','{$cfg['stats_column_active_time_switch']}'),('stats_column_current_server_group_switch','{$cfg['stats_column_current_server_group_switch']}'),('stats_column_current_group_since_switch','{$cfg['stats_column_current_group_since_switch']}'),('stats_column_next_rankup_switch','{$cfg['stats_column_next_rankup_switch']}'),('stats_column_next_server_group_switch','{$cfg['stats_column_next_server_group_switch']}'),('stats_show_excepted_clients_switch','{$cfg['stats_show_excepted_clients_switch']}'),('stats_show_clients_in_highest_rank_switch','{$cfg['stats_show_clients_in_highest_rank_switch']}'),('stats_show_site_navigation_switch','{$cfg['stats_show_site_navigation_switch']}'),('stats_show_maxclientsline_switch','{$cfg['stats_show_maxclientsline_switch']}'),('stats_column_default_order','{$cfg['stats_column_default_order']}'),('stats_column_default_sort','{$cfg['stats_column_default_sort']}'),('stats_time_bronze','{$cfg['stats_time_bronze']}'),('stats_time_silver','{$cfg['stats_time_silver']}'),('stats_time_gold','{$cfg['stats_time_gold']}'),('stats_time_legend','{$cfg['stats_time_legend']}'),('stats_connects_bronze','{$cfg['stats_connects_bronze']}'),('stats_connects_silver','{$cfg['stats_connects_silver']}'),('stats_connects_gold','{$cfg['stats_connects_gold']}'),('stats_connects_legend','{$cfg['stats_connects_legend']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('stats_show_site_navigation_switch','{$cfg['stats_show_site_navigation_switch']}'),('stats_show_maxclientsline_switch','{$cfg['stats_show_maxclientsline_switch']}'),('stats_time_bronze','{$cfg['stats_time_bronze']}'),('stats_time_silver','{$cfg['stats_time_silver']}'),('stats_time_gold','{$cfg['stats_time_gold']}'),('stats_time_legend','{$cfg['stats_time_legend']}'),('stats_connects_bronze','{$cfg['stats_connects_bronze']}'),('stats_connects_silver','{$cfg['stats_connects_silver']}'),('stats_connects_gold','{$cfg['stats_connects_gold']}'),('stats_connects_legend','{$cfg['stats_connects_legend']}'),('teamspeak_verification_channel_id','{$cfg['teamspeak_verification_channel_id']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
@@ -110,211 +95,6 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $csrf_token; ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolrgdesc"><?php echo $lang['wishcolrg']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_rank_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_rank_switch" value="',$cfg['stats_column_rank_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_rank_switch" value="',$cfg['stats_column_rank_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolclddesc"><?php echo $lang['wishcolcld']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_client_name_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_client_name_switch" value="',$cfg['stats_column_client_name_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_client_name_switch" value="',$cfg['stats_column_client_name_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcoluuiddesc"><?php echo $lang['wishcoluuid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_unique_id_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_unique_id_switch" value="',$cfg['stats_column_unique_id_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_unique_id_switch" value="',$cfg['stats_column_unique_id_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcoldbiddesc"><?php echo $lang['wishcoldbid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_client_db_id_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_client_db_id_switch" value="',$cfg['stats_column_client_db_id_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_client_db_id_switch" value="',$cfg['stats_column_client_db_id_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcollsdesc"><?php echo $lang['wishcolls']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_last_seen_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_last_seen_switch" value="',$cfg['stats_column_last_seen_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_last_seen_switch" value="',$cfg['stats_column_last_seen_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolotdesc"><?php echo $lang['wishcolot']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_online_time_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_online_time_switch" value="',$cfg['stats_column_online_time_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_online_time_switch" value="',$cfg['stats_column_online_time_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolitdesc"><?php echo $lang['wishcolit']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_idle_time_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_idle_time_switch" value="',$cfg['stats_column_idle_time_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_idle_time_switch" value="',$cfg['stats_column_idle_time_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolatdesc"><?php echo $lang['wishcolat']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_active_time_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_active_time_switch" value="',$cfg['stats_column_active_time_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_active_time_switch" value="',$cfg['stats_column_active_time_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolasdesc"><?php echo $lang['wishcolas']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_current_server_group_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_current_server_group_switch" value="',$cfg['stats_column_current_server_group_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_current_server_group_switch" value="',$cfg['stats_column_current_server_group_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolgsdesc"><?php echo $lang['wishcolgs']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_current_group_since_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_current_group_since_switch" value="',$cfg['stats_column_current_group_since_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_current_group_since_switch" value="',$cfg['stats_column_current_group_since_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolnxdesc"><?php echo $lang['wishcolnx']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_next_rankup_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_next_rankup_switch" value="',$cfg['stats_column_next_rankup_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_next_rankup_switch" value="',$cfg['stats_column_next_rankup_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishcolsgdesc"><?php echo $lang['wishcolsg']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_column_next_server_group_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_column_next_server_group_switch" value="',$cfg['stats_column_next_server_group_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_column_next_server_group_switch" value="',$cfg['stats_column_next_server_group_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishdefdesc"><?php echo $lang['wishdef']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="stats_column_default_sort">
|
||||
<?PHP
|
||||
echo '<option data-subtext="[default]" value="rank"'.($cfg['stats_column_default_sort'] === '1' ? ' selected="selected"' : '').'>'.$lang['listrank'].'</option>';
|
||||
echo '<option value="name"'.($cfg['stats_column_default_sort'] === 'name' ? ' selected="selected"' : '').'>'.$lang['listnick'].'</option>';
|
||||
echo '<option value="uuid"'.($cfg['stats_column_default_sort'] === 'uuid' ? ' selected="selected"' : '').'>'.$lang['listuid'].'</option>';
|
||||
echo '<option value="cldbid"'.($cfg['stats_column_default_sort'] === 'cldbid' ? ' selected="selected"' : '').'>'.$lang['listcldbid'].'</option>';
|
||||
echo '<option value="lastseen"'.($cfg['stats_column_default_sort'] === 'lastseen' ? ' selected="selected"' : '').'>'.$lang['listseen'].'</option>';
|
||||
echo '<option value="count"'.($cfg['stats_column_default_sort'] === 'count' ? ' selected="selected"' : '').'>'.$lang['listsumo'].'</option>';
|
||||
echo '<option value="idle"'.($cfg['stats_column_default_sort'] === 'idle' ? ' selected="selected"' : '').'>'.$lang['listsumi'].'</option>';
|
||||
echo '<option value="active"'.($cfg['stats_column_default_sort'] === 'active' ? ' selected="selected"' : '').'>'.$lang['listsuma'].'</option>';
|
||||
echo '<option value="grpid"'.($cfg['stats_column_default_sort'] === 'grpid' ? ' selected="selected"' : '').'>'.$lang['listacsg'].'</option>';
|
||||
echo '<option value="grpidsince"'.($cfg['stats_column_default_sort'] === 'grpidsince' ? ' selected="selected"' : '').'>'.$lang['listgrps'].'</option>';
|
||||
echo '<option value="nextup"'.($cfg['stats_column_default_sort'] === 'nextup' ? ' selected="selected"' : '').'>'.$lang['listnxup'].'</option>';
|
||||
echo '<option value="active"'.($cfg['stats_column_default_sort'] === 'active' ? ' selected="selected"' : '').'>'.$lang['listnxsg'].'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishsortdesc"><?php echo $lang['wishsort']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control basic" name="stats_column_default_order">
|
||||
<?PHP
|
||||
echo '<option data-subtext="[ASC]" value="asc"'.($cfg['stats_column_default_order'] === 'asc' ? ' selected="selected"' : '').'>'.$lang['asc'].'</option>';
|
||||
echo '<option data-subtext="[DESC]" value="desc"'.($cfg['stats_column_default_order'] === 'desc' ? ' selected="selected"' : '').'>'.$lang['desc'].'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishexclddesc"><?php echo $lang['wishexcld']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_show_excepted_clients_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_show_excepted_clients_switch" value="',$cfg['stats_show_excepted_clients_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_show_excepted_clients_switch" value="',$cfg['stats_show_excepted_clients_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishhiclddesc"><?php echo $lang['wishhicld']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_show_clients_in_highest_rank_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_show_clients_in_highest_rank_switch" value="',$cfg['stats_show_clients_in_highest_rank_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_show_clients_in_highest_rank_switch" value="',$cfg['stats_show_clients_in_highest_rank_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishnavdesc"><?php echo $lang['wishnav']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_show_site_navigation_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_show_site_navigation_switch" value="',$cfg['stats_show_site_navigation_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_show_site_navigation_switch" value="',$cfg['stats_show_site_navigation_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishmaxdesc"><?php echo $lang['wishmax']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_show_maxclientsline_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_show_maxclientsline_switch" value="',$cfg['stats_show_maxclientsline_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_show_maxclientsline_switch" value="',$cfg['stats_show_maxclientsline_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
@@ -433,11 +213,49 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishnavdesc"><?php echo $lang['wishnav']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_show_site_navigation_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_show_site_navigation_switch" value="',$cfg['stats_show_site_navigation_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_show_site_navigation_switch" value="',$cfg['stats_show_site_navigation_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiverifydesc"><?php echo $lang['wiverify']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="teamspeak_verification_channel_id" value="<?php echo $cfg['teamspeak_verification_channel_id']; ?>">
|
||||
<script>
|
||||
$("input[name='teamspeak_verification_channel_id']").TouchSpin({
|
||||
min: 0,
|
||||
max: 16777215,
|
||||
verticalbuttons: true,
|
||||
prefix: 'ID:'
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wishmaxdesc"><?php echo $lang['wishmax']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['stats_show_maxclientsline_switch'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="stats_show_maxclientsline_switch" value="',$cfg['stats_show_maxclientsline_switch'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="stats_show_maxclientsline_switch" value="',$cfg['stats_show_maxclientsline_switch'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" name="update" class="btn btn-primary"><?php echo $lang['wisvconf']; ?></button>
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
@@ -446,230 +264,6 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="wishexclddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishexcld']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishexclddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolrgdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolrg']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolrgdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolclddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolcld']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolclddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcoluuiddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcoluuid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcoluuiddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcoldbiddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcoldbid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcoldbiddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcollsdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolls']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcollsdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolotdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolot']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolotdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolitdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolit']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolitdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolatdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolat']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolatdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolasdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolas']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolasdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolgsdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolgs']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolgsdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolnxdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolnx']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolnxdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishcolsgdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishcolsg']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishcolsgdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishhiclddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishhicld']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishhiclddesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishnavdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@@ -702,38 +296,6 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishdefdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishdef']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishdefdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wishsortdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wishsort']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wishsortdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wisttidesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@@ -766,5 +328,21 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiverifydesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiverify']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wiverifydesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -55,7 +55,16 @@ if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `se
|
||||
$err_lvl = 3;
|
||||
}
|
||||
|
||||
if(($user_arr = $mysqlcon->query("SELECT `uuid`,`cldbid`,`name` FROM `$dbname`.`user` ORDER BY `name` ASC")->fetchAll(PDO::FETCH_ASSOC)) === false) {
|
||||
$err_msg = "DB Error1: ".print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
}
|
||||
|
||||
if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = '';
|
||||
|
||||
if (isset($_POST['webinterface_admin_client_unique_id_list']) && $_POST['webinterface_admin_client_unique_id_list'] != NULL) {
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = implode(',',$_POST['webinterface_admin_client_unique_id_list']);
|
||||
}
|
||||
$cfg['teamspeak_host_address'] = $_POST['teamspeak_host_address'];
|
||||
$cfg['teamspeak_query_port'] = $_POST['teamspeak_query_port'];
|
||||
if (isset($_POST['teamspeak_query_encrypt_switch'])) $cfg['teamspeak_query_encrypt_switch'] = 1; else $cfg['teamspeak_query_encrypt_switch'] = 0;
|
||||
@@ -66,7 +75,8 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
$cfg['teamspeak_default_channel_id'] = $_POST['teamspeak_default_channel_id'];
|
||||
$cfg['teamspeak_query_command_delay'] = $_POST['teamspeak_query_command_delay'];
|
||||
$cfg['teamspeak_avatar_download_delay']= $_POST['teamspeak_avatar_download_delay'];
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('teamspeak_host_address','{$cfg['teamspeak_host_address']}'),('teamspeak_query_encrypt_switch','{$cfg['teamspeak_query_encrypt_switch']}'),('teamspeak_query_port','{$cfg['teamspeak_query_port']}'),('teamspeak_voice_port','{$cfg['teamspeak_voice_port']}'),('teamspeak_query_user','{$cfg['teamspeak_query_user']}'),('teamspeak_query_pass','{$cfg['teamspeak_query_pass']}'),('teamspeak_query_nickname','{$cfg['teamspeak_query_nickname']}'),('teamspeak_default_channel_id','{$cfg['teamspeak_default_channel_id']}'),('teamspeak_query_command_delay','{$cfg['teamspeak_query_command_delay']}'),('teamspeak_avatar_download_delay','{$cfg['teamspeak_avatar_download_delay']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
|
||||
if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('teamspeak_host_address','{$cfg['teamspeak_host_address']}'),('teamspeak_query_encrypt_switch','{$cfg['teamspeak_query_encrypt_switch']}'),('teamspeak_query_port','{$cfg['teamspeak_query_port']}'),('teamspeak_voice_port','{$cfg['teamspeak_voice_port']}'),('teamspeak_query_user','{$cfg['teamspeak_query_user']}'),('teamspeak_query_pass','{$cfg['teamspeak_query_pass']}'),('teamspeak_query_nickname','{$cfg['teamspeak_query_nickname']}'),('teamspeak_default_channel_id','{$cfg['teamspeak_default_channel_id']}'),('teamspeak_query_command_delay','{$cfg['teamspeak_query_command_delay']}'),('teamspeak_avatar_download_delay','{$cfg['teamspeak_avatar_download_delay']}'),('webinterface_admin_client_unique_id_list','{$cfg['webinterface_admin_client_unique_id_list']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
@@ -74,6 +84,11 @@ if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES
|
||||
type="submit" class="btn btn-primary" name="restart"><i class="fas fa-sync"></i> '.$lang['wibot7'].'</button></form>');
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
|
||||
if (isset($_POST['webinterface_admin_client_unique_id_list']) && $_POST['webinterface_admin_client_unique_id_list'] != NULL) {
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = array_flip($_POST['webinterface_admin_client_unique_id_list']);
|
||||
}
|
||||
|
||||
} elseif(isset($_POST['update'])) {
|
||||
echo '<div class="alert alert-danger alert-dismissible">',$lang['errcsrf'],'</div>';
|
||||
rem_session_ts3($rspathhex);
|
||||
@@ -103,7 +118,7 @@ if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group expertelement">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3encryptdesc"><?php echo $lang['wits3encrypt']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($cfg['teamspeak_query_encrypt_switch'] == 1) {
|
||||
@@ -169,7 +184,7 @@ if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 ">
|
||||
<div class="col-md-6">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3qnmdesc"><?php echo $lang['wits3qnm']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
@@ -178,59 +193,76 @@ if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3dchdesc"><?php echo $lang['wits3dch']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="teamspeak_default_channel_id" value="<?php echo $cfg['teamspeak_default_channel_id']; ?>">
|
||||
<script>
|
||||
$("input[name='teamspeak_default_channel_id']").TouchSpin({
|
||||
min: 0,
|
||||
max: 2147483647,
|
||||
verticalbuttons: true,
|
||||
prefix: 'ID:'
|
||||
});
|
||||
</script>
|
||||
<div class="form-group expertelement">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3dchdesc"><?php echo $lang['wits3dch']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="teamspeak_default_channel_id" value="<?php echo $cfg['teamspeak_default_channel_id']; ?>">
|
||||
<script>
|
||||
$("input[name='teamspeak_default_channel_id']").TouchSpin({
|
||||
min: 0,
|
||||
max: 2147483647,
|
||||
verticalbuttons: true,
|
||||
prefix: 'ID:'
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3smdesc"><?php echo $lang['wits3sm']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" id="basic" name="teamspeak_query_command_delay">
|
||||
<?PHP
|
||||
echo '<option data-subtext="[recommended]" value="0"'; if($cfg['teamspeak_query_command_delay']=="0") echo ' selected="selected"'; echo '>disabled (Realtime)</option>';
|
||||
echo '<option data-divider="true"> </option>';
|
||||
echo '<option data-subtext="(0,2 seconds)" value="200000"'; if($cfg['teamspeak_query_command_delay']=="200000") echo ' selected="selected"'; echo '>Low delay</option>';
|
||||
echo '<option data-subtext="(0,5 seconds)" value="500000"'; if($cfg['teamspeak_query_command_delay']=="500000") echo ' selected="selected"'; echo '>Middle delay</option>';
|
||||
echo '<option data-subtext="(1,0 seconds)" value="1000000"'; if($cfg['teamspeak_query_command_delay']=="1000000") echo ' selected="selected"'; echo '>High delay</option>';
|
||||
echo '<option data-subtext="(2,0 seconds)" value="2000000"'; if($cfg['teamspeak_query_command_delay']=="2000000") echo ' selected="selected"'; echo '>Huge delay</option>';
|
||||
echo '<option data-subtext="(5,0 seconds)" value="5000000"'; if($cfg['teamspeak_query_command_delay']=="5000000") echo ' selected="selected"'; echo '>Ultra delay</option>';
|
||||
?>
|
||||
</select>
|
||||
<div class="row expertelement"> </div>
|
||||
<div class="form-group expertelement">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3smdesc"><?php echo $lang['wits3sm']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" id="basic" name="teamspeak_query_command_delay">
|
||||
<?PHP
|
||||
echo '<option data-icon="fas fa-ban" data-subtext="[recommended]" value="0"'; if($cfg['teamspeak_query_command_delay']=="0") echo ' selected="selected"'; echo '> disabled (Realtime)</option>';
|
||||
echo '<option data-divider="true"> </option>';
|
||||
echo '<option data-subtext="(0,2 seconds)" value="200000"'; if($cfg['teamspeak_query_command_delay']=="200000") echo ' selected="selected"'; echo '>Low delay</option>';
|
||||
echo '<option data-subtext="(0,5 seconds)" value="500000"'; if($cfg['teamspeak_query_command_delay']=="500000") echo ' selected="selected"'; echo '>Middle delay</option>';
|
||||
echo '<option data-subtext="(1,0 seconds)" value="1000000"'; if($cfg['teamspeak_query_command_delay']=="1000000") echo ' selected="selected"'; echo '>High delay</option>';
|
||||
echo '<option data-subtext="(2,0 seconds)" value="2000000"'; if($cfg['teamspeak_query_command_delay']=="2000000") echo ' selected="selected"'; echo '>Huge delay</option>';
|
||||
echo '<option data-subtext="(5,0 seconds)" value="5000000"'; if($cfg['teamspeak_query_command_delay']=="5000000") echo ' selected="selected"'; echo '>Ultra delay</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3avatdesc"><?php echo $lang['wits3avat']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="teamspeak_avatar_download_delay" value="<?php echo $cfg['teamspeak_avatar_download_delay']; ?>">
|
||||
<script>
|
||||
$("input[name='teamspeak_avatar_download_delay']").TouchSpin({
|
||||
min: 0,
|
||||
max: 65535,
|
||||
verticalbuttons: true,
|
||||
prefix: 'Sec.:'
|
||||
});
|
||||
</script>
|
||||
<div class="row expertelement"> </div>
|
||||
<div class="form-group expertelement">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3avatdesc"><?php echo $lang['wits3avat']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="teamspeak_avatar_download_delay" value="<?php echo $cfg['teamspeak_avatar_download_delay']; ?>">
|
||||
<script>
|
||||
$("input[name='teamspeak_avatar_download_delay']").TouchSpin({
|
||||
min: 0,
|
||||
max: 65535,
|
||||
verticalbuttons: true,
|
||||
prefix: 'Sec.:'
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP
|
||||
if(!array_key_exists('webinterface_fresh_installation', $cfg) || $cfg['webinterface_fresh_installation'] != 1) { ?>
|
||||
<div class="row"> </div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiadmuuiddesc"><?php echo $lang['wiadmuuid']; ?><i class="help-hover fas fa-question-circle"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" data-actions-box="true" data-live-search="true" multiple name="webinterface_admin_client_unique_id_list[]">
|
||||
<?PHP
|
||||
foreach ($user_arr as $user) {
|
||||
if ($cfg['webinterface_admin_client_unique_id_list'] != NULL && array_key_exists($user['uuid'], $cfg['webinterface_admin_client_unique_id_list'])) $selected=" selected"; else $selected="";
|
||||
echo '<option value="',$user['uuid'],'" data-subtext="UUID: ',$user['uuid'],'; DBID: ',$user['cldbid'],'" ',$selected,'>',htmlspecialchars($user['name']),'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?PHP } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary" name="update"><?php echo $lang['wisvconf']; ?></button>
|
||||
<button type="submit" class="btn btn-primary" name="update"><i class="fas fa-save"></i> <?php echo $lang['wisvconf']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
@@ -398,6 +430,22 @@ if ($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wiadmuuiddesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wiadmuuid']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo sprintf($lang['wiadmuuiddesc'], '<a href="//ts-ranksystem.com/?commands" target="_blank">', '</a>'); ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('form[data-toggle="validator"]').validator({
|
||||
custom: {
|
||||
@@ -410,7 +458,7 @@ $('form[data-toggle="validator"]').validator({
|
||||
errors: {
|
||||
pattern: "There should be an error in your value, please check all could be right!"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user