release 1.3.21

This commit is contained in:
Newcomer1989
2022-12-18 13:13:44 +01:00
parent d2cb86e323
commit b96e32b713
35 changed files with 359 additions and 122 deletions

View File

@@ -19,12 +19,17 @@ try {
$err_lvl = 3;
}
if(($channellist = $mysqlcon->query("SELECT * FROM `$dbname`.`channel` ORDER BY `pid`,`channel_order`,`channel_name` ASC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
$err_msg = print_r($mysqlcon->errorInfo(), true);
$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']])) {
$err_msg = $cfg['rankup_excepted_group_id_list'] = $cfg['rankup_excepted_unique_client_id_list'] = '';
$err_msg = $cfg['rankup_excepted_group_id_list'] = $cfg['rankup_excepted_unique_client_id_list'] = $cfg['rankup_excepted_channel_id_list'] = '';
$errcnf = 0;
$cfg['rankup_excepted_mode'] = $_POST['rankup_excepted_mode'];
@@ -34,7 +39,9 @@ try {
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 (isset($_POST['channelid']) && $_POST['channelid'] != NULL) {
$cfg['rankup_excepted_channel_id_list'] = implode(',',$_POST['channelid']);
}
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) {
@@ -54,7 +61,9 @@ try {
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']));
if (isset($_POST['channelid']) && $_POST['channelid'] != NULL) {
$cfg['rankup_excepted_channel_id_list'] = array_flip($_POST['channelid']);
}
} elseif(isset($_POST['update'])) {
echo '<div class="alert alert-danger alert-dismissible">',$lang['errcsrf'],'</div>';
rem_session_ts3();
@@ -127,9 +136,11 @@ try {
<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>
<?PHP
echo select_channel($channellist, $cfg['rankup_excepted_channel_id_list'], 1);
?>
</div>
</div>
</div>
<div class="col-md-3"></div>

View File

@@ -149,6 +149,7 @@ try {
if ('.' === $file || '..' === $file) continue;
if (is_dir($cfg['logs_path'].$file)) continue;
if(substr($file, 0, 10) != 'db_export_') continue;
if(substr($file, -4, 4) != '.zip' && substr($file, -4, 4) != '.sql') continue;
?>
<div class="col-sm-6">
<?PHP echo $cfg['logs_path'].$file; ?>

View File

@@ -27,7 +27,7 @@ try {
$err_msg = print_r($mysqlcon->errorInfo(), true);
$err_lvl = 3;
} else {
$err_msg = $lang['wisvsuc']." ".sprintf($lang['wisvres']);
$err_msg = $lang['wisvsuc'];
$err_lvl = NULL;
}
$cfg['stats_imprint_address'] = $_POST['stats_imprint_address'];

View File

@@ -14,8 +14,10 @@ try {
$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;
$monthago = time() - 2592000;
if(($user_arr = $mysqlcon->query("SELECT `uuid`,`cldbid`,`name` FROM `$dbname`.`user` WHERE `lastseen`>'{$monthago}' ORDER BY `name` ASC")->fetchAll(PDO::FETCH_ASSOC)) === false) {
$err_msg = print_r($mysqlcon->errorInfo(), true);
$err_lvl = 3;
}
if(($channellist = $mysqlcon->query("SELECT * FROM `$dbname`.`channel` ORDER BY `pid`,`channel_order`,`channel_name` ASC")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) {
@@ -30,7 +32,8 @@ try {
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_host_address'] = preg_replace('/\s/', '', $_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;
$cfg['teamspeak_voice_port'] = $_POST['teamspeak_voice_port'];
@@ -79,7 +82,7 @@ try {
<div class="form-group required-field-block">
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3hostdesc"><?php echo $lang['wits3host']; ?><i class="help-hover fas fa-question-circle"></i></label>
<div class="col-sm-8">
<input type="text" class="form-control required" data-pattern="^[^.]+[^:]*$" data-error="Do not enter the port inside this field. You should enter the port (e.g. 9987) inside the TS3-Voice-Port!" name="teamspeak_host_address" value="<?php echo $cfg['teamspeak_host_address']; ?>" maxlength="65535" required>
<input type="text" class="form-control required" data-pattern="^[^.]+[^:]*$" data-error="Do not enter the port here. Please enter the port (e.g. 9987) inside the TS3 Voice-Port!" name="teamspeak_host_address" value="<?php echo $cfg['teamspeak_host_address']; ?>" maxlength="65535" required>
<div class="help-block with-errors"></div>
</div>
</div>