100) { $_POST['Qhd'] = 100; $Errors['ErrorConfig'] = 'notice'; } if (!is_decimal($_POST['Qnormal']) OR $_POST['Qnormal'] > 100) { $_POST['Qnormal'] = 100; $Errors['ErrorConfig'] = 'notice'; } if (!is_decimal($_POST['Qthumbnail']) OR $_POST['Qthumbnail'] > 100) { $_POST['Qthumbnail'] = 100; $Errors['ErrorConfig'] = 'notice'; } if (!is_decimal($_POST['DIMhd'])) { $_POST['DIMhd'] = 2560; $Errors['ErrorConfig'] = 'notice'; } if (!is_decimal($_POST['DIMnormal']) OR $_POST['DIMnormal'] > $_POST['DIMhd']) { $_POST['DIMnormal'] = 800; $Errors['ErrorConfig'] = 'notice'; } if (!is_decimal($_POST['DIMthumbnail']) OR $_POST['DIMthumbnail'] > $_POST['DIMnormal']) { $_POST['DIMthumbnail'] = 120; $Errors['ErrorConfig'] = 'notice'; } if (!is_decimal($_POST['DPI'])) { $_POST['DPI'] = 72; $Errors['ErrorConfig'] = 'notice'; } // Plugins : supprime les plugins manquants & charge les actions de configuration $PLUGIN_ACTION = 'save_config'; foreach ($_POST['Plugins'] as $plugin_id => $plugin_config) { if (isset($plugin_config['delete'])) { unset($_POST['Plugins'][$plugin_id]); } else if (file_exists('plugins/'.$plugin_id.'/setup.php')) { include('plugins/'.$plugin_id.'/setup.php'); } } // Contenu du fichier $content = ''."\r\n".''."\r\n"; $content .= XMLcreate($_POST); $content .= ''; file_put_contents('config.xml', $content); if (isset($Errors['ErrorConfig'])) { header('Location:index.php?page=setup&ErrorConfig='.$Errors['ErrorConfig']); } else { header('Location:index.php'); } ?>