forked from tuaris/multifaucet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.php
59 lines (49 loc) · 1.52 KB
/
install.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
error_reporting(E_ALL);
ini_set("display_errors", 0);
?>
<?php @include_once("system/multisite.inc.php"); //Enables Multisite Capabilites ?>
<?php include("system/app.conf.php"); ?>
<?php include('modules/install/install.lib.php'); ?>
<?php
//Default page
$step = isset($_GET['step']) ? $_GET['step'] : '';
//For templating
$vars = array();
//Check if already installed
if(is_file(APPLICATION_CONFDIR . '.install_complete')) {
//Prevents distructive behavors if already installed
$vars['clean_install'] = false;
}
//Process any GET requests
if(!empty($_GET)) {
$redirect = install_process_get_request($step, $vars);
//Redirect to new page if needed
if(!empty($redirect)){
header("Location: $redirect");
exit;
}
}
//Process any POST requests
if(!empty($_POST)) {
$redirect = install_process_post_request($step, $vars);
//Redirect to new page if needed
if(!empty($redirect)){
header("Location: $redirect");
exit;
}
}
//Genorate Page Title and heading based on insallation step
$vars['title'] = install_get_page_title($step);
$vars['heading'] = install_get_page_heading($step);
$vars['copyright'] = APPLICATION_NAME . " Install" . ' ©' . date("Y");
$vars['step'] = $step;
//Load License
$vars['LICENCE'] = getLicense();
//Load Template Engine
include("libraries/template.lib.php");
//Build and Display Page
$vars['breadcrumb'] = render_template(install_get_breadcrumb($step), $vars);
$vars['content'] = render_template(install_get_content($step), $vars);
print render_template(template_file("page.tpl.php"), $vars);
?>