Пример #1
0
# 2010-2015 Timo Van Neerden <*****@*****.**>
#
# BlogoText is free software.
# You can redistribute it under the terms of the MIT / X11 Licence.
#
# *** LICENSE ***
$begin = microtime(TRUE);
$GLOBALS['BT_ROOT_PATH'] = '../';
require_once '../inc/inc.php';
error_reporting($GLOBALS['show_errors']);
operate_session();
if (isset($_POST['_verif_envoi'])) {
    if ($erreurs_form = valider_form_preferences()) {
        afficher_form_prefs($erreurs_form);
    } else {
        if (fichier_user() === TRUE and fichier_prefs() === TRUE) {
            redirection(basename($_SERVER['PHP_SELF']) . '?msg=confirm_prefs_maj');
            exit;
        }
    }
} else {
    if (isset($_GET['test_captcha'])) {
        afficher_form_captcha();
    } else {
        afficher_form_prefs();
    }
}
/*
	FORMULAIRE NORMAL DES PRÉFÉRENCES
*/
function afficher_form_prefs($erreurs = '')
Пример #2
0
    if (isset($_POST['verif_envoi_2'])) {
        if ($err_2 = valid_install_2()) {
            afficher_form_2($err_2);
        } else {
            $config_dir = '../config';
            creer_dossier($config_dir, 1);
            creer_dossier('../' . $GLOBALS['dossier_images'], 0);
            creer_dossier('../' . $GLOBALS['dossier_fichiers'], 0);
            creer_dossier('../' . $GLOBALS['dossier_db'], 1);
            fichier_adv_conf();
            // include it because it contains salt, for passwd
            $adv_options = parse_ini_file($config_dir . '/config-advanced.ini');
            foreach ($adv_options as $option => $value) {
                $GLOBALS[$option] = $value;
            }
            fichier_user();
            include_once $config_dir . '/user.php';
            traiter_install_2();
            redirection('install.php?s=3&l=' . $_POST['langue']);
        }
    } else {
        afficher_form_2();
    }
} elseif ($GLOBALS['step'] == '3') {
    // CHOIX DB
    if (isset($_POST['verif_envoi_3'])) {
        if ($err_3 = valid_install_3()) {
            afficher_form_3($err_3);
        } else {
            if (isset($_POST['sgdb']) and $_POST['sgdb'] == 'mysql') {
                fichier_mysql('mysql');