2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
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 /************************************************************************/
15 define('AT_INCLUDE_PATH', '../../../include/');
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
17 admin_authenticate(AT_ADMIN_PRIV_MODULES);
19 if (isset($_GET["mod"])) $mod = $_GET["mod"];
20 else if (isset($_POST["mod"])) $mod = $_POST["mod"];
22 if (isset($_GET["args"])) $args = $_GET["args"];
23 else if (isset($_POST["args"])) $args = $_POST["args"];
25 $mods_folder = '../../../mods/';
27 if (isset($_POST['submit_no'])) {
28 $msg->addFeedback('CANCELLED');
29 header('Location: '.AT_BASE_HREF.'mods/_core/modules/index.php?'.urlencode($_POST['args']));
32 else if (is_writable($mods_folder) || (is_writable($mods_folder) && isset($_POST['submit_yes'])))
34 header('Location: '.AT_BASE_HREF.'mods/_core/modules/module_uninstall_step_2.php?mod='.$mod.SEP.'args='.urlencode($args).SEP.'permission_granted='.$_POST["permission_granted"]);
38 if (!is_writable($mods_folder))
41 $hidden_vars['mod'] = $mod;
42 $hidden_vars['args'] = $args;
43 $hidden_vars['permission_granted'] = 1;
45 require(AT_INCLUDE_PATH.'header.inc.php');
47 $msg->addConfirm(array('GRANT_WRITE_PERMISSION', realpath($mods_folder)), $hidden_vars, _AT("continue"), _AT("cancel"));
50 require(AT_INCLUDE_PATH.'footer.inc.php');