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
801
eb8b23f11744
Two big commits in one day I know, but redid password storage to use HMAC-SHA1. Consolidated much AES processing to three core methods in session that should handle everything automagically. Installation works; upgrades should. Rebranded as 1.1.6.
Dan
diff
changeset
+ − 5
* Version 1.1.6 (Caoineag beta 1)
536
+ − 6
* Copyright (C) 2006-2008 Dan Fuhry
348
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
568
+ − 39
// are we in PHP5?
+ − 40
define('HAVE_PHP5', version_compare(PHP_VERSION, '5.0.0', '>='));
+ − 41
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 42
?>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 43
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 44
<div id="installnotice">
354
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
diff
changeset
+ − 45
<?php
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 46
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
+ − 47
?>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 48
<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
+ − 49
<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
+ − 50
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
+ − 51
</div>
354
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
diff
changeset
+ − 52
<?php
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 53
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
+ − 54
{
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 55
?>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 56
<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
+ − 57
<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
+ − 58
<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
+ − 59
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
+ − 60
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
+ − 61
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
+ − 62
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
+ − 63
<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
+ − 64
<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
+ − 65
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
+ − 66
</div>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 67
<?php
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 68
}
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 69
endif;
354
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
diff
changeset
+ − 70
?></div>
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 71
<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
+ − 72
<tr>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 73
<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
+ − 74
<!-- Enano logo -->
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 75
<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
+ − 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
<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
+ − 78
</td>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 79
<td>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 80
<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
+ − 81
<li><a href="readme.php" class="readme icon">Readme</a></li>
589
+ − 82
<?php
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 83
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
+ − 84
?>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 85
<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
+ − 86
<li>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 87
<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
+ − 88
Upgrade
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 89
<small>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 90
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
+ − 91
</small>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 92
</a>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 93
</li>
589
+ − 94
<?php
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 95
else:
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 96
?>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 97
<li>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 98
<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
+ − 99
Install
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 100
<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
+ − 101
</a>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 102
</li>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 103
<?php
354
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
diff
changeset
+ − 104
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
+ − 105
{
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 106
echo '<li>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 107
<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
+ − 108
Upgrade
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 109
<small>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 110
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
+ − 111
for updates.
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 112
</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
+ − 113
</a>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 114
</li>';
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 115
}
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 116
else
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 117
{
568
+ − 118
if ( HAVE_PHP5 && !isset($_GET['debug_warn_php4']) )
+ − 119
echo '<li><a href="upgrade.php" class="upgrade icon">Upgrade</a></li>';
+ − 120
else
+ − 121
echo '<li>
+ − 122
<span class="upgrade-disabled icon icon-disabled">
+ − 123
Upgrade
+ − 124
<small>
+ − 125
Your server doesn\'t have PHP 5 or later installed. Enano 1.2 does not have support for PHP 4.
+ − 126
<a href="install.php?debug_warn_php4">Learn more »</a>
+ − 127
</small> <!-- CSS takes care of making this position properly -->
+ − 128
</span>
+ − 129
</li>';
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 130
}
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 131
endif;
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 132
?>
589
+ − 133
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 134
</ul>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 135
</td>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 136
</tr>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 137
</table>
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 138
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 139
<?php
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 140
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 141
$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
+ − 142
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff
changeset
+ − 143
?>