'') { $tmpConfigfilename = utf8_decode(trim($_POST['new_configurationfile'])); if (!preg_match("/^[a-z.-_]+$/i", $tmpConfigfilename, $matches)) { $msg = sprintf( $lang['L_ERROR_CONFIGFILE_NAME'], $_POST['new_configurationfile'] ); $msg = Html::getErrorMsg($msg); } else { $config['config_file'] = $_POST['new_configurationfile']; $config['cron_configurationfile'] = $_POST['new_configurationfile'] . ".conf.php"; $saveConfig = true; } if ($saveConfig) { if (saveConfig() == true) { $saveConfig = false; $msg = sprintf( $lang['L_SUCCESS_CONFIGFILE_CREATED'], $_POST['new_configurationfile'] ); $msg = Html::getOkMsg($msg); } else { $msg = Html::getErrorMsg($lang['L_SAVE_ERROR']); $saveConfig = false; } } } else { $msg = Html::getErrorMsg($lang['L_NO_NAME_GIVEN']); } } if ($saveConfig) { // validation was fine, we can write the values to the actual config file if (saveConfig() == true) { getConfig($config['config_file']); if ($config['logcompression'] != $oldlogcompression) { deleteLog(); } $msg = sprintf($lang['L_SAVE_SUCCESS'], $config['config_file']); $msg = Html::getOkMsg($msg); } else { $msg = Html::getErrorMsg($lang['L_SAVE_ERROR']); } } include ('./inc/configuration/config_files.php'); include ('./inc/configuration/config_menu.php'); include ('./inc/configuration/footer.php');