dbInitialise() public method

public dbInitialise ( )
Example #1
0
	  <?php 
            } else {
                if ($step === "database") {
                    ?>
          <div class="row page-header">
            <h3>Database initialisation</h3>
            <hr class="small-margin">
            <p>The installer is now attempting to create the necessary tables in the database.</p>
          </div>
	  <?php 
                    if (!isset($queries)) {
                        $queries = new Queries();
                        // Initialise queries
                    }
                    $prefix = Config::get('mysql/prefix');
                    if ($queries->dbInitialise($prefix)) {
                        ?>
           <div class="alert alert-success">The database was initialised successfully, and you may now progress with the installation.</div>
           <button type='button' onclick="location.href='./install.php?step=settings'" class='btn btn-primary'>Continue &raquo;</button>
                    <?php 
                    } else {
                        echo '<div class="alert alert-danger">Database initialisation failed.</div>';
                    }
                } else {
                    if ($step === "settings") {
                        if (Input::exists()) {
                            $validate = new Validate();
                            $validation = $validate->check($_POST, array('site_name' => array('required' => true, 'min' => 2, 'max' => 1024), 'outgoing_email' => array('required' => true, 'min' => 2, 'max' => 1024), 'incoming_email' => array('required' => true, 'min' => 2, 'max' => 1024)));
                            if ($validation->passed()) {
                                if (!isset($queries)) {
                                    $queries = new Queries();