release 1.2.12
This commit is contained in:
@@ -37,7 +37,7 @@ if (isset($_POST['logout'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_SESSION[$rspathhex.'username']) || $_SESSION[$rspathhex.'username'] != $webuser || $_SESSION[$rspathhex.'password'] != $webpass || $_SESSION[$rspathhex.'clientip'] != getclientip()) {
|
||||
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;
|
||||
}
|
||||
@@ -56,26 +56,19 @@ 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['iphash'])) {
|
||||
if($iphash != 1) {
|
||||
$err_msg2 = $lang['wisvinfo1'];
|
||||
$err_lvl2 = 2;
|
||||
}
|
||||
$iphash = 1;
|
||||
} else {
|
||||
if($iphash == 1) {
|
||||
$err_msg2 = $lang['wisvinfo1'];
|
||||
$err_lvl2 = 2;
|
||||
}
|
||||
$iphash = 0;
|
||||
if ($_POST['rankup_hash_ip_addresses_mode'] != $cfg['rankup_hash_ip_addresses_mode']) {
|
||||
$err_msg2 = $lang['wisvinfo1'];
|
||||
$err_lvl2 = 2;
|
||||
}
|
||||
$timezone = $_POST['timezone'];
|
||||
$timeformat = $_POST['dateformat'];
|
||||
$logpath = addslashes($_POST['logpath']);
|
||||
$language = $_POST['languagedb'];
|
||||
$_SESSION[$rspathhex.'language'] = $_POST['languagedb'];
|
||||
$adminuuid = $_POST['adminuuid'];
|
||||
if ($mysqlcon->exec("UPDATE `$dbname`.`config` SET `timezone`='$timezone',`dateformat`='$timeformat',`logpath`='$logpath',`language`='$language',`adminuuid`='$adminuuid',`iphash`='$iphash'") === false) {
|
||||
$cfg['rankup_hash_ip_addresses_mode'] = $_POST['rankup_hash_ip_addresses_mode'];
|
||||
$cfg['logs_timezone'] = $_POST['logs_timezone'];
|
||||
$cfg['default_date_format'] = $_POST['default_date_format'];
|
||||
$cfg['logs_path'] = addslashes($_POST['logs_path']);
|
||||
$cfg['default_language'] = $_SESSION[$rspathhex.'language'] = $_POST['default_language'];
|
||||
unset($lang); $lang = set_language($cfg['default_language']);
|
||||
$cfg['webinterface_admin_client_unique_id_list'] = $_POST['webinterface_admin_client_unique_id_list'];
|
||||
|
||||
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']}'),('default_language','{$cfg['default_language']}'),('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) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
@@ -83,29 +76,31 @@ if (isset($_POST['update']) && isset($db_csrf[$_POST['csrf_token']])) {
|
||||
type="submit" class="btn btn-primary" name="restart"><i class="fa fa-fw fa-refresh"></i> '.$lang['wibot7'].'</button></form>');
|
||||
$err_lvl = NULL;
|
||||
}
|
||||
$logpath = $_POST['logpath'];
|
||||
$config['adminuuid'] = $_POST['adminuuid'];
|
||||
if(!isset($language) || $language == "en") {
|
||||
$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']) || $cfg['default_language'] == "en") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_en.php');
|
||||
} elseif($language == "ar") {
|
||||
} elseif($cfg['default_language'] == "ar") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_ar.php');
|
||||
} elseif($language == "cz") {
|
||||
} elseif($cfg['default_language'] == "cz") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_cz.php');
|
||||
} elseif($language == "de") {
|
||||
} elseif($cfg['default_language'] == "de") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_de.php');
|
||||
} elseif($language == "fr") {
|
||||
} elseif($cfg['default_language'] == "es") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_es.php');
|
||||
} elseif($cfg['default_language'] == "fr") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_fr.php');
|
||||
} elseif($language == "it") {
|
||||
} elseif($cfg['default_language'] == "it") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_it.php');
|
||||
} elseif($language == "nl") {
|
||||
} elseif($cfg['default_language'] == "nl") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_nl.php');
|
||||
} elseif($language == "pl") {
|
||||
} elseif($cfg['default_language'] == "pl") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_pl.php');
|
||||
} elseif($language == "ro") {
|
||||
} elseif($cfg['default_language'] == "ro") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_ro.php');
|
||||
} elseif($language == "ru") {
|
||||
} elseif($cfg['default_language'] == "ru") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_ru.php');
|
||||
} elseif($language == "pt") {
|
||||
} elseif($cfg['default_language'] == "pt") {
|
||||
require_once(substr(dirname(__FILE__),0,-12).'languages/core_pt.php');
|
||||
}
|
||||
} elseif(isset($_POST['update'])) {
|
||||
@@ -132,12 +127,12 @@ 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="#witimedesc"><?php echo $lang['witime']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" data-live-search="true" name="timezone">
|
||||
<select class="selectpicker show-tick form-control" data-live-search="true" name="logs_timezone">
|
||||
<?PHP
|
||||
$timezonearr = DateTimeZone::listIdentifiers();
|
||||
foreach ($timezonearr as $timez) {
|
||||
if ($timez == $timezone) {
|
||||
echo '<option value="'.$timezone,'" selected=selected>',$timezone,'</option>';
|
||||
if ($timez == $cfg['logs_timezone']) {
|
||||
echo '<option value="'.$cfg['logs_timezone'],'" selected=selected>',$cfg['logs_timezone'],'</option>';
|
||||
} else {
|
||||
echo '<option value="',$timez,'">',$timez,'</option>';
|
||||
}
|
||||
@@ -149,13 +144,13 @@ 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="#widaformdesc"><?php echo $lang['widaform']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="dateformat" value="<?php echo $timeformat; ?>">
|
||||
<input type="text" class="form-control" name="default_date_format" value="<?php echo $cfg['default_date_format']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wilogdesc"><?php echo $lang['wilog']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8 required-field-block">
|
||||
<input type="text" class="form-control" data-pattern=".*(\/|\\)$" data-error="The Logpath must end with / or \" name="logpath" value="<?php echo $logpath; ?>" required>
|
||||
<input type="text" class="form-control" data-pattern=".*(\/|\\)$" data-error="The Logpath must end with / or \" name="logs_path" value="<?php echo $cfg['logs_path']; ?>" required>
|
||||
<div class="help-block with-errors"></div>
|
||||
<div class="required-icon"><div class="text">*</div></div>
|
||||
</div>
|
||||
@@ -163,19 +158,20 @@ 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="#wivlangdesc"><?php echo $lang['wivlang']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<select class="selectpicker show-tick form-control" name="languagedb">
|
||||
<select class="selectpicker show-tick form-control" name="default_language">
|
||||
<?PHP
|
||||
echo '<option data-subtext="العربية" value="ar"'.($language === 'ar' ? ' selected="selected"' : '').'>AR</option>';
|
||||
echo '<option data-subtext="čeština" value="cz"'.($language === 'cz' ? ' selected="selected"' : '').'>CZ</option>';
|
||||
echo '<option data-subtext="Deutsch" value="de"'.($language === 'de' ? ' selected="selected"' : '').'>DE</option>';
|
||||
echo '<option data-subtext="English" value="en"'.($language === 'en' ? ' selected="selected"' : '').'>EN</option>';
|
||||
echo '<option data-subtext="français" value="fr"'.($language === 'fr' ? ' selected="selected"' : '').'>FR</option>';
|
||||
echo '<option data-subtext="Italiano" value="it"'.($language === 'it' ? ' selected="selected"' : '').'>IT</option>';
|
||||
echo '<option data-subtext="Nederlands" value="nl"'.($language === 'nl' ? ' selected="selected"' : '').'>NL</option>';
|
||||
echo '<option data-subtext="polski" value="pl"'.($language === 'pl' ? ' selected="selected"' : '').'>PL</option>';
|
||||
echo '<option data-subtext="Română" value="ro"'.($language === 'ro' ? ' selected="selected"' : '').'>RO</option>';
|
||||
echo '<option data-subtext="Pусский" value="ru"'.($language === 'ru' ? ' selected="selected"' : '').'>RU</option>';
|
||||
echo '<option data-subtext="Português" value="pt"'.($language === 'pt' ? ' selected="selected"' : '').'>PT</option>';
|
||||
echo '<option data-subtext="العربية" value="ar"'.($cfg['default_language'] === 'ar' ? ' selected="selected"' : '').'>AR</option>';
|
||||
echo '<option data-subtext="čeština" value="cz"'.($cfg['default_language'] === 'cz' ? ' selected="selected"' : '').'>CZ</option>';
|
||||
echo '<option data-subtext="Deutsch" value="de"'.($cfg['default_language'] === 'de' ? ' selected="selected"' : '').'>DE</option>';
|
||||
echo '<option data-subtext="English" value="en"'.($cfg['default_language'] === 'en' ? ' selected="selected"' : '').'>EN</option>';
|
||||
echo '<option data-subtext="español" value="es"'.($cfg['default_language'] === 'es' ? ' selected="selected"' : '').'>ES</option>';
|
||||
echo '<option data-subtext="français" value="fr"'.($cfg['default_language'] === 'fr' ? ' selected="selected"' : '').'>FR</option>';
|
||||
echo '<option data-subtext="Italiano" value="it"'.($cfg['default_language'] === 'it' ? ' selected="selected"' : '').'>IT</option>';
|
||||
echo '<option data-subtext="Nederlands" value="nl"'.($cfg['default_language'] === 'nl' ? ' selected="selected"' : '').'>NL</option>';
|
||||
echo '<option data-subtext="polski" value="pl"'.($cfg['default_language'] === 'pl' ? ' selected="selected"' : '').'>PL</option>';
|
||||
echo '<option data-subtext="Română" value="ro"'.($cfg['default_language'] === 'ro' ? ' selected="selected"' : '').'>RO</option>';
|
||||
echo '<option data-subtext="Pусский" value="ru"'.($cfg['default_language'] === 'ru' ? ' selected="selected"' : '').'>RU</option>';
|
||||
echo '<option data-subtext="Português" value="pt"'.($cfg['default_language'] === 'pt' ? ' selected="selected"' : '').'>PT</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -185,8 +181,8 @@ 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="#wiadmuuiddesc"><?php echo $lang['wiadmuuid']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8 required-field-block">
|
||||
<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="adminuuid" maxlength="500"><?php echo $config['adminuuid']; ?></textarea>
|
||||
<div class="help-block with-errors"></div>
|
||||
<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="webinterface_admin_client_unique_id_list" maxlength="500"><?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 class="required-icon"><div class="text">*</div></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -194,11 +190,14 @@ 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="#wishcolhadesc"><?php echo $lang['wishcolha']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($iphash == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="iphash" value="',$iphash,'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="iphash" value="',$iphash,'">';
|
||||
} ?>
|
||||
<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-divider="true"> </option>';
|
||||
echo '<option value="0"'; if($cfg['rankup_hash_ip_addresses_mode']=="0") echo " selected=selected"; echo '>',$lang['wishcolha0'],'</option>';
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user