Exemplo n.º 1
0
function displayFields()
{
    global $data, $doit;
    okPrint(_('<i class="icon-ok"></i> Your server meets all the upgrade requirements.'));
    if ($doit == false) {
        warningPrint('<i class="icon-warning-sign"></i> Upgrade is in developer mode, set $doit = true.');
    }
    ?>
	<form action="upgrade.php?stage=2" method="post" class="validate">
		<h2>Configuration Information</h2>
        <p class="text-warning">
            The following information <strong>should match</strong> the data found in the
            <strong>configuration file</strong> before the upgrade can start:
        </p>
		<div class="row">
			<div class="span4">
				<fieldset>
					<legend>Configuration File</legend>
					<?php 
    displayField('Configuration File', 'config_file');
    ?>
				</fieldset>
			</div>
			<div class="span4">
				<fieldset>
					<legend>Database Information</legend>
					<?php 
    displayField('Database Name', 'db_name');
    displayField('Database User Name', 'db_username');
    displayField('Database User Password', 'db_password');
    displayField('Database Server', 'db_server');
    displayField('Database Prefix', 'db_prefix');
    ?>
				</fieldset>
			</div>
			<div class="span4">
				<fieldset>
					<legend>Upgrade</legend>
					<p>
						<button type="submit" name="step1" value="step1" class="btn btn-primary">Continue Upgrade</button>
					</p>
				</fieldset>
			</div>
		</div>
	</form>
	<?php 
}
Exemplo n.º 2
0
function displayFields()
{
    okPrint(_('Your server meets all the upgrade requirements'));
    warningPrint(_('<strong>Please remeber to update your .htaccess file to the latest version else you will see a blank screen when trying to access your site.</strong>'));
    global $data;
    ?>
	<form action="upgrade.php?stage=2" method="post" class="validate">
		<h1>Configuration Information</h1>
		<p>The following information should match the data found in the configuration file before the upgrade can start:</p>
		<div class="row">
			<div class="column grid_4">
				<fieldset>
					<legend>Configuration File</legend>
					<?php 
    displayField('Configuration File', 'config_file');
    ?>
				</fieldset>
			</div>
			<div class="column grid_4">
				<fieldset>
					<legend>Database Information</legend>
					<?php 
    displayField('Database Name', 'db_name');
    displayField('Database User Name', 'db_username');
    displayField('Database User Password', 'db_password');
    displayField('Database Server', 'db_server');
    displayField('Database Prefix', 'db_prefix');
    ?>
				</fieldset>
			</div>
			<div class="column grid_4 last">
				<fieldset>
					<legend>Upgrade</legend>
					<p>
						<button type="submit" name="step1" value="step1"><span class="save"></span><span>Continue Upgrade...</span></button>
						<button type="reset"><span class="reset"></span><span>Reset</span></button>
					</p>
				</fieldset>
			</div>
		</div>
	</form>
	<?php 
}
Exemplo n.º 3
0
function displayWarnings()
{
    global $warnings;
    $count = count($warnings);
    if ($count) {
        $count > 1 ? $m = "{$count} warnings occured;" : ($m = "There is a warning;");
        infoHeadPrint($m);
        foreach ($warnings as $code => $description) {
            warningPrint(_($description));
        }
    }
}
Exemplo n.º 4
0
function displayFields()
{
    global $data, $doit;
    okPrint(_('<i class="icon-ok"></i> Your server meets all the installation requirements.'));
    if ($doit == false) {
        warningPrint('<i class="icon-warning-sign"></i> Installer is in developer mode, set $doit = true.');
    }
    ?>
	<form action="install.php?stage=2" method="post" class="validate">
		<h2>Configuration Information</h2>
		<p class="text-warning">
            The following information <strong>should match</strong> the data found in the
            <strong>configuration file</strong> before the installation can start:
        </p>
		<div class="row">
			<div class="span4">
				<fieldset>
					<legend>Configuration File</legend>
					<?php 
    displayField('Configuration File', 'config_file');
    ?>
				</fieldset>
				<fieldset>
					<legend>Database Information</legend>
					<?php 
    displayField('Database Name', 'db_name');
    displayField('Database User Name', 'db_username');
    displayField('Database User Password', 'db_password');
    displayField('Database Server', 'db_server');
    displayField('Database Prefix', 'db_prefix');
    ?>
				</fieldset>
			</div>
			<div class="span4">
				<fieldset>
					<legend>Application Information</legend>
					<?php 
    displayField('Application Name', 'application_name');
    ?>
				</fieldset>
				<fieldset>
					<legend>Admin User Information</legend>
					<?php 
    displayField('Admin User Name', 'admin_username');
    displayField('Admin password', 'admin_password');
    displayField('Admin Email', 'admin_email');
    ?>
				</fieldset>
			</div>
			<div class="span4">
				<fieldset>
					<legend>Action</legend>
					<p>
                        <label for="sample-data" class="checkbox">
                        <input id="sample-data" type="checkbox" name="sample-data"> Install sample data
                        </label><br>
						<button type="submit" name="step1" value="step1" class="btn btn-primary">Continue Install</button>
					</p>
				</fieldset>
			</div>
		</div>
	</form>
	<?php 
}
Exemplo n.º 5
0
$HTMl = '';
// Store everything in cache...
preparations();
$errors = array();
$warnings = array();
$stage = intval(empty($_GET['stage']) ? 0 : $_GET['stage']);
if ($stage == 2 && empty($_POST)) {
    $stage = 1;
}
/// main switch
headHTML();
// stage 0: display intro
// stage 1: check system & display fields
// stage 2 : check system & check fields & check config file, then install.
if ($doit == false) {
    warningPrint('Installer is in developer mode, set $doit = true.');
}
switch ($stage) {
    case 2:
        headingPrint($package . " Installer Stage 2");
        doStage2();
        break;
    default:
        headingPrint($package . " Installer Stage 1");
        doStage1();
        break;
}
// end html
footHTML();
function displayIntro()
{