commit | author | age
|
8b8bcc
|
1 |
<?php |
T |
2 |
ini_set('error_reporting', E_ALL&~E_NOTICE); |
|
3 |
ini_set('display_errors', 1); |
|
4 |
|
47124c
|
5 |
define('INSTALL_PATH', realpath(dirname(__FILE__) . '/../').'/'); |
afe50a
|
6 |
$include_path = INSTALL_PATH . 'program/lib' . PATH_SEPARATOR; |
T |
7 |
$include_path .= INSTALL_PATH . 'program' . PATH_SEPARATOR; |
|
8 |
$include_path .= INSTALL_PATH . 'program/include' . PATH_SEPARATOR; |
|
9 |
$include_path .= ini_get('include_path'); |
|
10 |
|
47124c
|
11 |
set_include_path($include_path); |
T |
12 |
|
8b8bcc
|
13 |
session_start(); |
47124c
|
14 |
|
T |
15 |
/** |
|
16 |
* Use PHP5 autoload for dynamic class loading |
|
17 |
* (copy from program/incllude/iniset.php) |
|
18 |
*/ |
|
19 |
function __autoload($classname) |
|
20 |
{ |
|
21 |
$filename = preg_replace( |
|
22 |
array('/MDB2_(.+)/', '/Mail_(.+)/', '/^html_.+/', '/^utf8$/'), |
|
23 |
array('MDB2/\\1', 'Mail/\\1', 'html', 'utf8.class'), |
|
24 |
$classname |
|
25 |
); |
|
26 |
include_once $filename. '.php'; |
|
27 |
} |
c06067
|
28 |
|
S |
29 |
$RCI = rcube_install::get_instance(); |
|
30 |
$RCI->load_config(); |
|
31 |
|
|
32 |
if (isset($_GET['_getfile']) && in_array($_GET['_getfile'], array('main', 'db'))) |
|
33 |
{ |
|
34 |
header('Content-type: text/plain'); |
|
35 |
header('Content-Disposition: attachment; filename="'.$_GET['_getfile'].'.inc.php"'); |
|
36 |
echo $RCI->create_config($_GET['_getfile']); |
|
37 |
exit; |
|
38 |
} |
|
39 |
|
8b8bcc
|
40 |
?> |
354978
|
41 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
T |
42 |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
43 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
|
44 |
<head> |
|
45 |
<title>RoundCube Webmail Installer</title> |
|
46 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
|
47 |
<link rel="stylesheet" type="text/css" href="styles.css" /> |
c5042d
|
48 |
<script type="text/javascript" src="client.js"></script> |
354978
|
49 |
</head> |
T |
50 |
|
|
51 |
<body> |
|
52 |
|
|
53 |
<div id="banner"> |
|
54 |
<div id="header"> |
|
55 |
<div class="banner-logo"><a href="http://www.roundcube.net"><img src="images/banner_logo.gif" width="200" height="56" border="0" alt="RoundCube Webmal Project" /></a></div> |
|
56 |
<div class="banner-right"><img src="images/banner_right.gif" width="10" height="56" alt="" /></div> |
|
57 |
</div> |
|
58 |
<div id="topnav"> |
|
59 |
<a href="http://trac.roundcube.net/wiki/Howto_Install">How-to Wiki</a> |
|
60 |
</div> |
|
61 |
</div> |
|
62 |
|
|
63 |
<div id="content"> |
|
64 |
|
|
65 |
<?php |
967b34
|
66 |
|
T |
67 |
// exit if installation is complete |
|
68 |
if ($RCI->configured && !$RCI->getprop('enable_installer') && !$_SESSION['allowinstaller']) { |
e01084
|
69 |
// header("HTTP/1.0 404 Not Found"); |
967b34
|
70 |
echo '<h2 class="error">The installer is disabled!</h2>'; |
T |
71 |
echo '<p>To enable it again, set <tt>$rcmail_config[\'enable_installer\'] = true;</tt> in config/main.inc.php</p>'; |
|
72 |
echo '</div></body></html>'; |
|
73 |
exit; |
|
74 |
} |
b3f9df
|
75 |
|
354978
|
76 |
?> |
T |
77 |
|
967b34
|
78 |
<h1>RoundCube Webmail Installer</h1> |
T |
79 |
|
354978
|
80 |
<ol id="progress"> |
T |
81 |
<?php |
|
82 |
|
|
83 |
foreach (array('Check environment', 'Create config', 'Test config') as $i => $item) { |
|
84 |
$j = $i + 1; |
b3f9df
|
85 |
$link = ($RCI->step >= $j || $RCI->configured) ? '<a href="./index.php?_step='.$j.'">' . Q($item) . '</a>' : Q($item); |
354978
|
86 |
printf('<li class="step%d%s">%s</li>', $j+1, $RCI->step > $j ? ' passed' : ($RCI->step == $j ? ' current' : ''), $link); |
T |
87 |
} |
|
88 |
?> |
|
89 |
</ol> |
|
90 |
|
|
91 |
<?php |
|
92 |
$include_steps = array('welcome.html', 'check.php', 'config.php', 'test.php'); |
|
93 |
|
|
94 |
if ($include_steps[$RCI->step]) { |
|
95 |
include $include_steps[$RCI->step]; |
|
96 |
} |
|
97 |
else { |
|
98 |
header("HTTP/1.0 404 Not Found"); |
|
99 |
echo '<h2 class="error">Invalid step</h2>'; |
|
100 |
} |
|
101 |
|
|
102 |
?> |
|
103 |
</div> |
|
104 |
|
|
105 |
<div id="footer"> |
ad43e6
|
106 |
Installer by the RoundCube Dev Team. Copyright © 2008 - Published under the GNU Public License; |
T |
107 |
Icons by <a href="http://famfamfam.com">famfamfam</a> |
354978
|
108 |
</div> |
T |
109 |
</body> |
|
110 |
</html> |