Revision 1460
Added by Luisehahne over 14 years ago
| tool.php | ||
|---|---|---|
| 29 | 29 |
$tool = $array[0]; |
| 30 | 30 |
} |
| 31 | 31 |
|
| 32 |
$list = array(); |
|
| 32 |
$ModulesList = array(); |
|
| 33 |
$admin_header = true; |
|
| 33 | 34 |
if(isset($_POST['save_settings'])) {
|
| 34 | 35 |
$ModulesUsingFTAN = ADMIN_PATH.'/admintools/modules.inc'; |
| 35 | 36 |
if(file_exists($ModulesUsingFTAN)){
|
| 36 |
if(($list = file($ModulesUsingFTAN, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES)) !== false)
|
|
| 37 |
if(($ModulesList = file($ModulesUsingFTAN, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES)) !== false)
|
|
| 37 | 38 |
{
|
| 38 | 39 |
// remove remark-lines |
| 39 |
$list = preg_grep('/^\s*?[^#;]/', $list);
|
|
| 40 |
$ModulesList = preg_grep('/^\s*?[^#;]/', $ModulesList);
|
|
| 40 | 41 |
} |
| 41 | 42 |
} |
| 42 | 43 |
} |
| 43 | 44 |
|
| 44 |
$admin_header = (in_array($tool, $list) ? false : true);
|
|
| 45 |
$admin = new admin('admintools', 'admintools',$admin_header );
|
|
| 46 |
unset($list);
|
|
| 45 |
$admin_header = (!in_array($tool, $ModulesList));
|
|
| 46 |
$admin = new admin('admintools', 'admintools', $admin_header );
|
|
| 47 |
unset($ModulesList);
|
|
| 47 | 48 |
|
| 48 | 49 |
// Check if tool is installed |
| 49 | 50 |
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'tool' AND directory = '".preg_replace("/\W/", "", $tool)."'");
|
| ... | ... | |
| 51 | 52 |
header("Location: index.php");
|
| 52 | 53 |
exit(0); |
| 53 | 54 |
} |
| 54 |
$tool = $result->fetchRow(); |
|
| 55 |
$tools = $result->fetchRow();
|
|
| 55 | 56 |
if(!isset($_POST['save_settings'])) {
|
| 56 | 57 |
|
| 57 | 58 |
?> |
| 58 | 59 |
<h4> |
| 59 | 60 |
<a href="<?php echo ADMIN_URL; ?>/admintools/index.php"><?php echo $HEADING['ADMINISTRATION_TOOLS']; ?></a> |
| 60 | 61 |
» |
| 61 |
<?php echo $tool['name']; ?> |
|
| 62 |
<?php echo $tools['name']; ?>
|
|
| 62 | 63 |
</h4> |
| 63 | 64 |
<?php |
| 64 | 65 |
} |
| 65 |
require(WB_PATH.'/modules/'.$tool['directory'].'/tool.php'); |
|
| 66 |
require(WB_PATH.'/modules/'.$tools['directory'].'/tool.php');
|
|
| 66 | 67 |
|
| 67 | 68 |
$admin->print_footer(); |
Also available in: Unified diff
Ticket 1101, phtml|php5|php4|php|cgi|pl|exe|com|bat|src| will be hardcoded
additional you can set more extension in settings extended in field rename_file_types
rename_file_types now is a blacklist and will no longer be renamed to .txt
update admintools modules to work with SecureForm Patch from NorHei