Ejemplo n.º 1
0
function install_step2()
{
    check_installed();
    global $twig;
    $error = null;
    $post = array();
    if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {
        $post = $_POST;
        $replace = empty($_POST['database_replace']) ? false : true;
        $error = _create_database($_POST, $replace);
        if (empty($error)) {
            $error = _create_config($_POST);
        }
        if (empty($error)) {
            header("Location: start-install.php?step=3");
            exit;
        }
    }
    echo $twig->render('step-2.html.twig', array('step' => 2, 'error' => $error, 'post' => $post));
}
Ejemplo n.º 2
0
function install_step2($init_data = 0)
{
    check_installed();
    global $twig;
    $error = null;
    $post = array();
    if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {
        $post = $_POST;
        $post['index'] = empty($_GET['index']) ? 0 : $_GET['index'];
        $replace = empty($post['database_replace']) ? false : true;
        $result = _create_database($post, $replace);
        echo json_encode($result);
        exit;
    }
    echo $twig->render('step-2.html.twig', array('step' => 2, 'error' => $error, 'post' => $post));
}