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