2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
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 /************************************************************************/
14 define('AT_INCLUDE_PATH', '../../../include/');
15 require(AT_INCLUDE_PATH.'vitals.inc.php');
16 admin_authenticate(AT_ADMIN_PRIV_MODULES);
17 require(AT_INCLUDE_PATH.'../mods/_core/modules/classes/ModuleParser.class.php');
19 if (isset($_GET['mod'])) {
20 $dir_name = str_replace(array('.','..'), '', $_GET['mod']);
22 if (isset($_GET['install'])) {
23 header('Location: '.AT_BASE_HREF.'mods/_core/modules/details.php?mod='.urlencode($dir_name).SEP.'new=1');
27 } else if (isset($_GET['install'])) {
28 $msg->addError('NO_ITEM_SELECTED');
31 require(AT_INCLUDE_PATH.'header.inc.php');
32 $module_list = $moduleFactory->getModules(AT_MODULE_STATUS_UNINSTALLED | AT_MODULE_STATUS_MISSING | AT_MODULE_STATUS_PARTIALLY_UNINSTALLED, AT_MODULE_TYPE_EXTRA);
33 $keys = array_keys($module_list);
38 <div class="input-form">
40 <?php echo _AT('install_module_text', realpath('./../../../mods')); ?>
44 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get" name="installform">
45 <table class="data" summary="" rules="cols" style="width:80%;">
48 <th scope="col"> </th>
49 <th scope="col"><?php echo _AT('module_name'); ?></th>
50 <th scope="col"><?php echo _AT('directory_name'); ?></th>
51 <th scope="col"><?php echo _AT('description'); ?></th>
57 <input type="submit" name="install" value="<?php echo _AT('install'); ?>" />
62 <?php if (!empty($keys)): ?>
63 <?php foreach($keys as $dir_name) : $module =& $module_list[$dir_name]; ?>
64 <tr onmousedown="document.installform['m_<?php echo $dir_name; ?>'].checked = true; rowselect(this);" id="r_<?php echo $dir_name; ?>">
65 <td valign="top"><input type="radio" id="m_<?php echo $dir_name; ?>" name="mod" value="<?php echo $dir_name; ?>" /></td>
66 <td valign="top"><label for="m_<?php echo $row['dir_name']; ?>"><?php echo $module->getName(); ?></label></td>
67 <td valign="top"><code><?php echo $dir_name; ?>/</code></td>
68 <td valign="top"><?php echo $module->getDescription($_SESSION['lang']); ?></td>
73 <td colspan="4"><?php echo _AT('none_found'); ?></td>
80 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>