install/index.php
author Dan
Tue, 22 Jan 2008 01:08:15 -0500
changeset 370 b251818286b1
parent 354 979d99a0b00e
child 411 d1a95497b68f
permissions -rw-r--r--
Localized registration errors and activation/COPPA e-mails
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     1
<?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     2
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     3
/*
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     4
 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     5
 * Version 1.1.1
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     6
 * Copyright (C) 2006-2007 Dan Fuhry
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     7
 * Installation package
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     8
 * welcome.php - Portal to upgrade, readme, and install pages
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     9
 *
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    10
 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    11
 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    12
 *
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    13
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    14
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    15
 */
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    16
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    17
require_once('includes/common.php');
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    18
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    19
$ui = new Enano_Installer_UI('Enano installation', true);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    20
if ( version_compare(PHP_VERSION, '5.0.0', '<') )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    21
{
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    22
  $ui->__construct('Enano installation', true);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    23
}
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    24
$ui->add_stage('Welcome', true);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    25
$ui->add_stage('Installation', true);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    26
$ui->add_stage('Upgrade', true);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    27
$ui->add_stage('Readme', true);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    28
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    29
$ui->show_header();
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    30
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    31
if ( defined('ENANO_INSTALLED') )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    32
{
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    33
  // Is Enano installed? If so, load the config and check version info
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    34
  define('IN_ENANO_UPGRADE', 'true');
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    35
  // common.php above calls chdir() to the ENANO_ROOT, so this loads the full Enano API.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    36
  require('includes/common.php');
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    37
}
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    38
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    39
?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    40
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    41
          <div id="installnotice">
354
979d99a0b00e A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents: 348
diff changeset
    42
          <?php
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    43
            if ( !defined('ENANO_INSTALLED') ):
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    44
            ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    45
            <div class="info-box-mini">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    46
              <b>Enano hasn't been installed yet!</b><br />
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    47
              You'll need to install the Enano database before you can use your site. To get started, click the Install button below.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    48
            </div>
354
979d99a0b00e A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents: 348
diff changeset
    49
          <?php
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    50
            if ( file_exists('./config.php') )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    51
            {
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    52
            ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    53
            <div class="warning-box-mini">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    54
              <b>A configuration file (config.php) exists but doesn't set the ENANO_INSTALLED constant.</b><br />
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    55
              <p>Didn't expect to see this message?
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    56
              It's possible that your configuration file has become corrupted and no longer sets information that Enano needs to connect
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    57
              to the database. You should have a look at your config.php by downloading it with FTP or viewing it over SSH.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    58
              If the file appears to have been tampered with, please <a href="http://forum.enanocms.org/">contact the Enano team</a>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    59
              for support immediately.</p>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    60
              <p><b>Most importantly, if you suspect a security breach, you should contact the Enano team
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    61
                 <a href="http://enanocms.org/Contact_us">via e-mail</a>. If you have the capability to use PGP encryption, you should do
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    62
                 so; our public key is available <a href="http://enanocms.org/bin/enanocms-signkey.asc">here</a>.</b></p>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    63
            </div>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    64
            <?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    65
            }
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    66
            endif;
354
979d99a0b00e A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents: 348
diff changeset
    67
            ?></div>
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    68
          <table border="0" cellspacing="10" cellpadding="0" width="100%" id="installmenu">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    69
            <tr>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    70
              <td style="text-align: right; width: 50%;">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    71
                <!-- Enano logo -->
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    72
                <img alt="Enano CMS" src="images/enano-artwork/installer-greeting.png" />
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    73
              </td>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    74
              <td class="balancer">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    75
              </td>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    76
              <td>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    77
                <ul class="icons">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    78
                  <li><a href="readme.php" class="readme icon">Readme</a></li>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    79
                  <?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    80
                  if ( !defined('ENANO_INSTALLED') ):
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    81
                  ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    82
                  <li><a href="install.php" class="install icon">Install</a></li>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    83
                  <li>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    84
                    <a class="upgrade-disabled icon icon-disabled" title="You need to install Enano before you can do this.">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    85
                      Upgrade
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    86
                      <small>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    87
                        Enano isn't installed yet. You can use this option when you want to upgrade to a newer release of Enano.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    88
                      </small>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    89
                    </a>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    90
                  </li>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    91
                  <?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    92
                  else:
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    93
                  ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    94
                  <li>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    95
                    <a class="install-disabled icon icon-disabled" title="Enano is already installed.">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    96
                      Install
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    97
                      <small>Enano is already installed.</small> <!-- CSS takes care of making this position properly -->
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    98
                    </a>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    99
                  </li>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   100
                  <?php
354
979d99a0b00e A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents: 348
diff changeset
   101
                  if ( installer_enano_version() == enano_version(true) )
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   102
                  {
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   103
                    echo '<li>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   104
                    <a class="upgrade-disabled icon icon-disabled">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   105
                      Upgrade
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   106
                      <small>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   107
                        You\'re already running the version of Enano included in this installer. Use the administration panel to check
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   108
                        for updates.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   109
                      </small> <!-- CSS takes care of making this position properly -->
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   110
                    </a>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   111
                  </li>';
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   112
                  }
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   113
                  else
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   114
                  {
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   115
                    echo '<li><a href="upgrade.php" class="upgrade icon">Upgrade</a></li>';
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   116
                  }
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   117
                  endif;
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   118
                  ?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   119
                </ul>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   120
              </td>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   121
            </tr>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   122
          </table>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   123
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   124
<?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   125
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   126
$ui->show_footer();
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   127
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   128
?>