Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once(dirname(__FILE__) . '/admin-page-header.php');
- $step = isset($_GET['step']) ? (int)$_GET['step'] : 0;
- /* Start: Front end */
- function display_header($title) { ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <meta charset="utf-8" />
- <meta name="robots" content="noindex,nofollow" />
- <title>Website Installation</title>
- <link rel="stylesheet" type="text/css" href="install/styles.css" />
- <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
- </head>
- <body>
- <div class="wrapper">
- <h1 class="step-title"><?php echo $title; ?></h1>
- <?php }
- function display_footer() { ?>
- </div>
- </body>
- </html>
- <?php }
- switch($step) {
- case 0:
- display_header('Introduction'); ?>
- <div class="container">
- <p>Welcome!</p>
- <p>We're glad you have chosen to join us! Before your own website website is ready, you must setup the basic
- settings of the website. The following information is what you will need to setup the website, so ensure you have
- the information to hand.</p>
- <p>If you are unsure on how to obtain this information, you can usually find it in your webhost cPanel, otherwise
- contact your webhost support for further information.</p>
- <p>Once you're ready, click the button below to start the installation process.</p>
- <p style="font-size: 12px;">(For everyones advantage, the installation process is only a few steps!)</p>
- <a href="?step=1">Continue</a>
- </div>
- <?php display_footer();
- break;
- case 1:
- display_header('Database Setup'); ?>
- <div class="container">
- <p>Please put the correct information in the below form so a connection can be made to your database server.</p>
- <form id="database-setup" method="post" action="?step=2">
- <div>
- <label for="db-host">Database host:</label>
- <input type="text" id="db-host" name="db-host" />
- <span class="field-desc">This will be an address, such as mysql.webhost.co.uk</span>
- </div>
- <div>
- <label for="db-user">Datbase username:</label>
- <input type="text" id="db-user" name="db-user" />
- <span class="field-desc">This is a database user's username.</span>
- </div>
- <div>
- <label for="db-pass">Database password:</label>
- <input type="password" id="db-pass" name="db-pass" />
- <span class="field-desc">This is a database users's password.</span>
- </div>
- <div>
- <label for="db-name">Database name:</label>
- <input type="text" id="db-name" name="db-name" />
- <span class="field-desc">The unique name of the database</span>
- </div>
- <div>
- <label for="table-prefix">Table prefix:</label>
- <input type="text" id="table-prefix" name="table-prefix" value="web_" />
- <span class="field-desc">A unique prefix for each table, this allows multiple installations in the same database.</span>
- </div>
- <div>
- <input type="submit" id="db-submit" name="db-submit" value="Continue" />
- </div>
- </form>
- </div>
- <?php display_footer();
- break;
- case 2:
- display_header('Admin Setup'); ?>
- <div class="container">
- <p>This is where you create your first administrator account</p>
- <form id="admin-setup" method="post" action="?step=3">
- <div>
- <label for="admin-user">Admin username:</label>
- <input type="text" id="admin-user" name="admin-user" />
- </div>
- <div>
- <label for="admin-email">Admin email:</label>
- <input type="email" id="admin-email" name="admin-email" />
- </div>
- <div>
- <label for="admin-pass">Admin password:</label>
- <input type="password" id="admin-pass" name="admin-pass" />
- </div>
- <div>
- <label for="admin-pass-confirm">Confirm admin password:</label>
- <input type="password" id="admin-pass-confirm" name="admin-pass-confirm" />
- </div>
- <div>
- <label for="admin-display">Admin display name:</label>
- <input type="text" id="admin-display" name="admin-display" />
- </div>
- <div>
- <input type="submit" id="admin-submit" name="admin-submit" value="Continue" />
- </div>
- </form>
- </div>
- <?php display_footer();
- break;
- case 3:
- display_header('Website Settings'); ?>
- <div class="container">
- <p>This is where you can configure a few of the core settings of the website</p>
- <form id="website-settings" method="post" action="?step=4">
- <div>
- <label for="website-title">Website title:</label>
- <input type="text" id="website-title" name="website-title" />
- </div>
- <div>
- <label for="website-lang">Website language:</label>
- <select id="website-lang" name="wesite-lang" form="website-settings">
- <option value="english">English</option>
- </select>
- </div>
- <div>
- <label for="website-admin-email">Admin email address:</label>
- <input type="email" id="website-admin-email" name="website-admin-email" value="<?php echo $_POST['admin-email']; ?>" />
- <span class="field-desc">The global administrator email address. May be visible to the public</span>
- </div>
- <div>
- <input type="submit" id="website-submit" name="website-submit" value="Finish" />
- </div>
- </form>
- </div>
- <?php display_footer();
- break;
- case 4:
- display_header('Website Installed'); ?>
- <div class="container">
- <p>Congratulations! Your website is now installed, and is ready to be accessed!</p>
- <p>Click the below button to go to your admin panel.</p>
- <a href="http://<?php echo $_SERVER['HTTP_HOST']?>/admin/">Continue</a>
- </div>
- <?php display_footer();
- break;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement