AVE.CMS v3.28
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
1.8 KiB

7 years ago
<?php
7 years ago
/**
* AVE.cms
*
* @package AVE.cms
* @version 3.x
* @filesource
* @copyright © 2007-2014 AVE.cms, http://www.ave-cms.ru
*
* @license GPL v.2
*/
7 years ago
7 years ago
if (! defined('ACP'))
7 years ago
{
7 years ago
header('Location:index.php');
7 years ago
exit;
}
7 years ago
$AVE_Template->config_load(BASE_DIR . '/admin/lang/' . $_SESSION['admin_language'] . '/modules.txt', 'modules');
7 years ago
7 years ago
if (! empty($_REQUEST['moduleaction']))
{
if (! check_permission('mod_' . $_REQUEST['mod']))
7 years ago
{
7 years ago
echo $AVE_Template->get_config_vars('MAIN_NO_PERM_MODULES');
exit;
7 years ago
}
7 years ago
}
7 years ago
7 years ago
if (! empty($_REQUEST['module']))
{
$module_path = preg_replace('/[^\w]/', '', $_REQUEST['module']);
7 years ago
7 years ago
if (! empty($module_path))
define('MODULE_PATH', $module_path);
}
7 years ago
7 years ago
switch($_REQUEST['action'])
{
case '':
if (check_permission_acp('modules_view'))
{
$AVE_Module->moduleList();
}
break;
7 years ago
7 years ago
case 'quicksave':
if (check_permission_acp('modules_system'))
{
$AVE_Module->moduleOptionsSave();
}
break;
7 years ago
7 years ago
case 'install':
case 'reinstall':
if (check_permission_acp('modules_system'))
{
$AVE_Module->moduleInstall();
}
break;
7 years ago
7 years ago
case 'update':
if (check_permission_acp('modules_system'))
{
$AVE_Module->moduleUpdate();
}
break;
7 years ago
7 years ago
case 'delete':
if (check_permission_acp('modules_system'))
{
$AVE_Module->moduleDelete();
}
break;
case 'onoff':
if (check_permission_acp('modules_system'))
{
$AVE_Module->moduleStatusChange();
}
break;
7 years ago
7 years ago
case 'modedit':
if (check_permission_acp('modules_admin'))
{
$mod_path = preg_replace('/[^\w]/', '', $_REQUEST['mod']);
$mod_path = BASE_DIR . '/modules/' . $mod_path . '/module.php';
if (is_file($mod_path))
include($mod_path);
}
break;
case 'remove':
if (check_permission_acp('modules_system'))
{
$AVE_Module->moduleRemove($_REQUEST['module']);
}
break;
}
7 years ago
?>