Пример #1
0
function SavePostParam()
{
    global $_REQUEST, $editpostparamid;
    $postprocessconfig = LoadPostProcessConfig($config);
    if (!isset($postprocessconfig)) {
        $upload_status = '<font color="red">Could not load configuration of post-processing script</font>';
        SetCookie("upload_status", $upload_status, time() + 30);
        // expire in 30 seconds
        Redirect('index.php');
        return;
    }
    MergeSettings($config, $_REQUEST);
    foreach ($config as $section) {
        if ($section->category == CATEGORY_PPPARAMETERS) {
            foreach ($section->options as $option) {
                $res = GetRequest('editqueue', array('GroupSetParameter', (int) 0, $option->name . '=' . $option->value, (int) $editpostparamid));
                if (!$res) {
                    $upload_status = '<font color="red">Could not change post-processing parameters</font>';
                    SetCookie("upload_status", $upload_status, time() + 30);
                    // expire in 30 seconds
                    Redirect('index.php');
                    return;
                }
            }
        }
    }
    Redirect('index.php');
}
Пример #2
0
</div>

<?php 
$OK = LoadWebConfig($config);
if ($ServerConfigFile != '') {
    LoadServerConfig($config, $skipsections);
}
if ($PostProcessConfigFile != '') {
    LoadPostProcessConfig($config);
}
if ($OK) {
    if (!$reqsection) {
        $reqsection = reset($config)->key;
    }
    if (isset($_REQUEST['save'])) {
        MergeSettings($config, $_REQUEST);
        $OK = SaveConfig($config);
        if ($OK) {
            Redirect('config.php?section=' . $_REQUEST['section']);
        }
    } else {
        if (isset($_REQUEST['delete'])) {
            DeleteMultiSet($config, $_REQUEST['section'], $_REQUEST['delete'], $_REQUEST['id']);
            $OK = SaveConfig($config);
            if ($OK) {
                Redirect('config.php?section=' . $_REQUEST['section']);
            }
        } else {
            if (isset($_REQUEST['add'])) {
                AddMultiSet($config, $_REQUEST['section'], $_REQUEST['add']);
                $OK = SaveConfig($config);