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