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 $mod = isset($_REQUEST['mod']) ? $_REQUEST['mod'] : "";
20 $args = isset($_REQUEST['args']) ? $_REQUEST['args'] : "";
21 $permission_granted = isset($_REQUEST['permission_granted']) ? $_REQUEST['permission_granted'] : "";
23 if (isset($_POST['submit_no']))
25 // if write permission on the mods folder has been granted, re-direct to the page of removing permission,
26 // otherwise, back to start page.
27 if ($_POST['permission_granted']==1)
28 header('Location: '.AT_BASE_HREF.'mods/_core/modules/module_uninstall_step_3.php?mod='.$_POST['mod'].SEP.'cancelled=1'.SEP.'args='.urlencode($_POST['args']));
31 $msg->addFeedback('CANCELLED');
32 header('Location: '.AT_BASE_HREF.'mods/_core/modules/index.php?'.urlencode($_POST["args"]));
37 else if (isset($_POST['submit_yes'], $_POST['mod']))
39 $module = $moduleFactory->getModule($_POST['mod']);
40 $module->uninstall($_POST['del_data']);
42 if ($_POST['permission_granted']==1)
44 header('Location: '.AT_BASE_HREF.'mods/_core/modules/module_uninstall_step_3.php?uninstalled=1'.SEP.'args='.urlencode($_POST["args"]));
48 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
49 header('Location: '.AT_BASE_HREF.'mods/_core/modules/index.php?'.$_POST['args']);
55 require(AT_INCLUDE_PATH.'header.inc.php');
58 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form">
59 <input type="hidden" name="mod" value="<?php echo $mod; ?>" />
60 <input type="hidden" name="args" value="<?php echo $args; ?>" />
61 <input type="hidden" name="permission_granted" value="<?php echo $permission_granted; ?>" />
63 <div class="input-form">
65 <?php echo _AT('uninstall_module_info', $mod); ?><br />
66 <input type="checkbox" name="del_data" value="1" id="del_data" checked="checked" /><label for="del_data"><?php echo _AT('delete_module_data'); ?></label>
69 <div class="row buttons">
70 <input type="submit" name="submit_yes" value="<?php echo _AT('submit_yes'); ?>" />
71 <input type="submit" name="submit_no" value="<?php echo _AT('submit_no'); ?>" />
76 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>