00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 ?>
00022 <?php
00023 $__setup_dir = realpath(dirname(__FILE__)."/../");
00024 require_once "$__setup_dir/helper/setup.php";
00025 require_once "$__setup_dir/setup/classes/SetupDocument.php";
00026 require_once "$__setup_dir/classes/ProgressBar.php";
00027
00028
00029 session_start();
00030
00031
00032 if (isset($_REQUEST['finish']))
00033 {
00034 header("Location: ../");
00035 }
00036
00037
00038 if ((file_exists("$__setup_dir/conf/settings") || file_exists("$__setup_dir/conf/settings.bz2")) && !file_exists("$__dir/conf/allow.cfg"))
00039 {
00040 header("Location: ../");
00041 }
00042 if (file_exists("$__setup_dir/conf/allow.cfg"))
00043 {
00044
00045 $ips = file("$__setup_dir/conf/allow.cfg");
00046 foreach ($ips as $ln => $line)
00047 {
00048 list ($ip, $key) = explode(":", $line);
00049 if ($_SERVER['REMOTE_ADDR'] != $ip || $_SESSION['config_key'] != $key)
00050 {
00051 header("Location: ../");
00052 }
00053 }
00054 }
00055
00056 if (!is_writable("$__setup_dir/conf"))
00057 {
00058 $cfg = realpath("$__setup_dir/conf");
00059 die("Sorry but there is a fatal error. $cfg is not writable and so on ImaComm setup cannot continue. Please fix access rights!");
00060 }
00061
00062 $document = new SetupDocument();
00063
00064
00065 $_numofpages = 7;
00066 if (is_null($_REQUEST['page']))
00067 {
00068 $_page = 1;
00069 }
00070 else
00071 {
00072 $_page = $_REQUEST['page'];
00073 }
00074 if (isset($_REQUEST['next']))
00075 {
00076 $_page++;
00077 }
00078 if (isset($_REQUEST['prev']))
00079 {
00080 $_page--;
00081 }
00082
00083
00084 theme("default");
00085
00086
00087 showPage();
00088 ?>