Exemplo n.º 1
0
            }
        }
        if ($db_fail || PerchUtil::count($msgs)) {
            echo '<li class="failure icon">Creating database tables&hellip; <strong>Unable to create database tables.</strong></li>';
            echo '</ul>';
            echo '<p>The most likely cause is that your database access details aren\'t quite right. Please double check them. Note that some hosting control panel software (like cPanel) will prefix the database name with your account name. So if you created a new database called <code>' . PERCH_DB_DATABASE . '</code> the full name could be something like <code>accountname_' . PERCH_DB_DATABASE . '</code>.</p>';
            echo '<p>If you\'re still have trouble, it\'s possible that the MySQL user hasn\'t got enough access rights to create tables. Change this, if you can, <a href="index.php?install=1">then reload this page</a>.</p>';
            echo '<p>Still no success? <a href="https://grabaperch.com/support">Drop us a line</a> and we\'ll see if we can help.</p>';
        } else {
            echo '<li class="success icon">Creating database tables&hellip; done.</li>';
            $Users = new PerchUsers();
            $data = PerchSession::get('user');
            $data['userMasterAdmin'] = '1';
            $data['roleID'] = '2';
            $data['userCreated'] = date('Y-m-d H:i:s');
            if ($Users->no_master_admin_exists()) {
                $Users->create($data, false);
                echo '<li class="success icon">Setting up initial user account&hellip; done.</li>';
            } else {
                echo '<li class="success icon">Setting up initial user account&hellip; user already exists.</li>';
            }
            ?>
                <li class="success icon"><strong>Setup complete.</strong></li>
            </ul>

                <h2>Next steps</h2>

                <p>There's just three things left for you to do:</p>

                <ol class="importables">
                    <li>Make the folder <code><?php