forked from atutor/ATutor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.php
74 lines (59 loc) · 2.02 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/************************************************************************/
/* ATutor */
/************************************************************************/
/* Copyright (c) 2002-2010 */
/* http://atutor.ca */
/* This program is free software. You can redistribute it and/or */
/* modify it under the terms of the GNU General Public License */
/* as published by the Free Software Foundation. */
/************************************************************************/
// $Id$
// Be careful at modifying AT_INSTALLER_INCLUDE_PATH constant which is used by
// get_atutor_installation_path() @ common.inc.php. Must make sure the
// function doesn't get broken at its modification.
define('AT_INSTALLER_INCLUDE_PATH', 'include/');
define('AT_INCLUDE_PATH', '../include/');
require(AT_INSTALLER_INCLUDE_PATH.'common.inc.php');
require_once(AT_INCLUDE_PATH.'lib/mysql_connect.inc.php');
if (!$new_version = $_POST['new_version']) {
$new_version = $_POST['step2']['new_version'];
}
$step = intval($_POST['step']);
if ($step == 0) {
$step = 1;
}
if ($_POST['submit'] == 'I Disagree'){
Header ("Location: index.php");
}
require(AT_INSTALLER_INCLUDE_PATH.'header.php');
/* agree to terms of use */
if ($step == 1) {
require(AT_INSTALLER_INCLUDE_PATH.'step1.php');
}
/* db */
if ($step == 2) {
require(AT_INSTALLER_INCLUDE_PATH.'step2.php');
}
/* preferences */
if ($step == 3) {
require(AT_INSTALLER_INCLUDE_PATH.'step3.php');
}
/* content directory */
if ($step == 4) {
require(AT_INSTALLER_INCLUDE_PATH.'step4.php');
}
/* directory permissions and generating the config.inc.php file */
if ($step == 5) {
require(AT_INSTALLER_INCLUDE_PATH.'step5.php');
}
/* anonymous data collection */
if ($step == 6) {
require(AT_INSTALLER_INCLUDE_PATH.'step6.php');
}
/* done! */
if ($step == 7) {
require(AT_INSTALLER_INCLUDE_PATH.'step7.php');
}
require(AT_INSTALLER_INCLUDE_PATH.'footer.php');
?>