tagging as ATutor 1.5.4-release
[atutor.git] / install / install.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                                                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002-2006 by Greg Gay, Joel Kronenberg, Heidi Hazelton */
6 /* http://atutor.ca                                                                                                             */
7 /*                                                                                                                                              */
8 /* This program is free software. You can redistribute it and/or                */
9 /* modify it under the terms of the GNU General Public License                  */
10 /* as published by the Free Software Foundation.                                                */
11 /************************************************************************/
12 // $Id$
13
14 define('AT_INCLUDE_PATH', 'include/');
15 require(AT_INCLUDE_PATH.'common.inc.php');
16
17 if (!$new_version = $_POST['new_version']) {
18         $new_version = $_POST['step2']['new_version'];
19 }
20
21 $step = intval($_POST['step']);
22
23 if ($step == 0) {
24         $step = 1;
25 }
26
27 if ($_POST['submit'] == 'I Disagree'){
28         Header ("Location: index.php");
29 }
30
31 require(AT_INCLUDE_PATH.'header.php');
32
33 /* agree to terms of use */
34 if ($step == 1) {
35         require(AT_INCLUDE_PATH.'step1.php');
36 }
37
38 /* db */
39 if ($step == 2) {
40         require(AT_INCLUDE_PATH.'step2.php');
41 }
42
43 /* preferences */
44 if ($step == 3) {       
45         require(AT_INCLUDE_PATH.'step3.php');
46 }
47
48 /* personal account + welcome course */
49 //if ($step == 4) {     
50         //require(AT_INCLUDE_PATH.'step4.php');
51 //}
52
53 /* content directory */
54 if ($step == 4) {
55         require(AT_INCLUDE_PATH.'step5.php');
56 }
57
58 /* directory permissions and generating the config.inc.php file */
59 if ($step == 5) {       
60         require(AT_INCLUDE_PATH.'step6.php');
61 }
62
63 /* anonymous data collection */
64 if ($step == 6) {       
65         require(AT_INCLUDE_PATH.'step7.php');
66 }
67
68 /* done! */
69 if ($step == 7) {       
70         require(AT_INCLUDE_PATH.'step8.php');
71 }
72
73 require(AT_INCLUDE_PATH.'footer.php');
74 ?>