Example #1
0
        $update = TRUE;
    }
}
if (!isset($CONF['date'])) {
    $CONF['date'] = "%x %X";
    $update = TRUE;
}
if (!isset($CONF['del_time'])) {
    $CONF['del_time'] = "7";
    $update = TRUE;
}
if (!isset($CONF['del_number'])) {
    $CONF['del_number'] = "5";
    $update = TRUE;
}
if (!isset($CONF['timelimit'])) {
    $CONF['timelimit'] = "60";
    $update = TRUE;
}
if (!isset($CONF['confirm'])) {
    $CONF['confirm'] = "1";
    $update = TRUE;
}
if (!isset($CONF['stylesheet'])) {
    $CONF['stylesheet'] = "standard";
    $update = TRUE;
}
// save global_conf.php
if ($update) {
    PMBP_save_global_conf();
}
Example #2
0
function PMBP_config_disable($item)
{
    global $CONF;
    global $PMBP_SYS_VAR;
    global $PMBP_MU_CONF;
    // availability check for some functions
    $disable = array('ftp_use' => "!function_exists(\"ftp_connect\")", 'ftp_server' => "!function_exists(\"ftp_connect\")", 'ftp_user' => "!function_exists(\"ftp_connect\")", 'ftp_passwd' => "!function_exists(\"ftp_connect\")", 'ftp_path' => "!function_exists(\"ftp_connect\")", 'ftp_pasv' => "!function_exists(\"ftp_connect\")", 'ftp_port' => "!function_exists(\"ftp_connect\")", 'email_use' => "!function_exists(\"mail\")", 'email' => "!function_exists(\"mail\")", 'no_login' => $_SESSION['multi_user_mode'] || $CONF['login'] ? 1 : 0, 'timelimit' => "DONT_CARE");
    // disable selected items due to system restrictions
    $out = "";
    if (isset($disable[$item])) {
        // special case 'timelimit'
        if ($item == "timelimit") {
            $res = set_time_limit($CONF['timelimit']);
            if ($res === FALSE) {
                $timelimit = ini_get("max_execution_time");
                if ($CONF['timelimit'] != $timelimit) {
                    $CONF['timelimit'] = $timelimit;
                    PMBP_save_global_conf();
                }
                $out = " disabled";
            }
        } else {
            if (eval("return(" . $disable[$item] . ");")) {
                $out = " disabled";
            }
        }
    }
    return $out;
}
Example #3
0
function PMBP_save_export_settings()
{
    global $PMBP_SYS_VAR;
    // check if any settings have changed
    if ($PMBP_SYS_VAR['F_data'] != $_POST['data'] or $PMBP_SYS_VAR['F_tables'] != $_POST['tables'] or $PMBP_SYS_VAR['F_compression'] != $_POST['zip'] or $PMBP_SYS_VAR['F_drop'] != $_POST['drop'] or $PMBP_SYS_VAR['F_packed'] != $_POST['packed']) {
        $PMBP_SYS_VAR['F_data'] = $_POST['data'];
        $PMBP_SYS_VAR['F_tables'] = $_POST['tables'];
        $PMBP_SYS_VAR['F_compression'] = $_POST['zip'];
        $PMBP_SYS_VAR['F_drop'] = $_POST['drop'];
        $PMBP_SYS_VAR['F_packed'] = $_POST['packed'];
    }
    if (isset($_POST['db'])) {
        if (is_array($_POST['db'])) {
            if ($PMBP_SYS_VAR['F_dbs'] != implode("|", $_POST['db'])) {
                $PMBP_SYS_VAR['F_dbs'] = implode("|", $_POST['db']);
            }
        } else {
            $PMBP_SYS_VAR['F_dbs'] = "";
        }
    } else {
        $PMBP_SYS_VAR['F_dbs'] = "";
    }
    if ($PMBP_SYS_VAR['F_comment'] != $_POST['comments']) {
        $PMBP_SYS_VAR['F_comment'] = $_POST['comments'];
    }
    if (isset($_POST['dirs'])) {
        if ($PMBP_SYS_VAR['F_ftp_dirs'] != implode("|", $_POST['dirs'])) {
            $PMBP_SYS_VAR['F_ftp_dirs'] = implode("|", $_POST['dirs']);
        }
    } else {
        $PMBP_SYS_VAR['F_ftp_dirs'] = "";
    }
    if ($PMBP_SYS_VAR['F_ftp_dirs_2'] != $_POST['man_dirs']) {
        $PMBP_SYS_VAR['F_ftp_dirs_2'] = $_POST['man_dirs'];
    }
    // update global_conf.php
    PMBP_save_global_conf();
}