remove old readme
[atutor.git] / mods / _core / modules / module_install_step_3.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002-2010                                              */
6 /* Inclusive Design Institute                                           */
7 /* http://atutor.ca                                                     */
8 /*                                                                      */
9 /* This program is free software. You can redistribute it and/or        */
10 /* modify it under the terms of the GNU General Public License          */
11 /* as published by the Free Software Foundation.                        */
12 /************************************************************************/
13 // $Id: 
14
15 define('AT_INCLUDE_PATH', '../../../include/');
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
17 admin_authenticate(AT_ADMIN_PRIV_MODULES);
18
19 $module_folder = '../../../mods/';
20
21 if (isset($_REQUEST['cancelled']))
22         $cancelled = $_REQUEST['cancelled'];
23 else if (isset($_POST['cancelled']))
24         $cancelled = $_POST['cancelled'];
25
26 if (isset($_REQUEST['installed']))
27         $installed = $_REQUEST['installed'];
28 else if (isset($_POST['installed']))
29         $installed = $_POST['installed'];
30
31 if (!is_writable($module_folder) && isset($_POST['submit_yes'])) 
32 {
33         if ($cancelled == 1) 
34         {
35                 $msg->addFeedback('CANCELLED');
36                 header('Location: '.AT_BASE_HREF.'mods/_core/modules/install_modules.php');
37         }
38         if ($installed == 1) 
39         {
40                 $msg->addFeedback('MOD_INSTALLED');
41                 header('Location: '.AT_BASE_HREF.'mods/_core/modules/index.php');
42         }
43         
44         exit;
45 }
46
47 require(AT_INCLUDE_PATH.'header.inc.php'); 
48
49 unset($hidden_vars);
50 $hidden_vars['cancelled'] = $cancelled;
51 $hidden_vars['installed'] = $installed;
52
53 $msg->addConfirm(array('REMOVE_WRITE_PERMISSION', realpath($module_folder)), $hidden_vars, _AT("continue"), '', true);
54 $msg->printConfirm();
55
56 require(AT_INCLUDE_PATH.'footer.inc.php'); 
57
58
59
60 ?>