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.
80 lines
2.0 KiB
80 lines
2.0 KiB
<?php |
|
|
|
/** |
|
* AVE.cms - Модуль Управление полями |
|
* |
|
* @package AVE.cms |
|
* @subpackage module_FieldsEdit |
|
* @since 1.0 |
|
* @filesource |
|
*/ |
|
|
|
if (!defined('BASE_DIR')) exit; |
|
|
|
if (defined('ACP')) |
|
{ |
|
$modul['ModuleName'] = 'Управление полями'; |
|
$modul['ModuleSysName'] = 'fieldsmanager'; |
|
$modul['ModuleVersion'] = '0.2'; |
|
$modul['ModuleDescription'] = 'Модуль для управления полями рубрик.'; |
|
$modul['ModuleAutor'] = 'M@d D3n'; |
|
$modul['ModuleCopyright'] = '© 2007-' . date('Y'); |
|
$modul['ModuleStatus'] = 1; |
|
$modul['ModuleIsFunction'] = null; |
|
$modul['ModuleAdminEdit'] = 1; |
|
$modul['ModuleFunction'] = 'mod_fieldsmanager'; |
|
$modul['ModuleTag'] = null; |
|
$modul['ModuleTagLink'] = null; |
|
$modul['ModuleAveTag'] = null; |
|
$modul['ModulePHPTag'] = null; |
|
} |
|
|
|
/** |
|
* Администрирование |
|
*/ |
|
if (defined('ACP') && !empty($_REQUEST['moduleaction'])) |
|
{ |
|
|
|
$_dir = basename(dirname(__FILE__).'/'); |
|
$_fm_dir = BASE_DIR . '/' . 'modules' . '/' . $_dir . '/'; |
|
|
|
$lang_file = $_fm_dir . 'lang' . '/' . $_SESSION['admin_language'] . '.txt'; |
|
$AVE_Template->config_load($lang_file); |
|
|
|
require_once($_fm_dir . 'class.fieldsmanager.php'); |
|
$FieldsManager = new FieldsManager; |
|
|
|
switch ($_REQUEST['moduleaction']) |
|
{ |
|
case '1': |
|
$FieldsManager::ShowFields(); |
|
break; |
|
|
|
case 'showfield': |
|
$FieldsManager::ShowField($_REQUEST['type']); |
|
break; |
|
|
|
case 'create': |
|
$FieldsManager::EditTpl((int)$_REQUEST['id'], $_REQUEST['fld'], $_REQUEST['type']); |
|
break; |
|
|
|
case 'edit': |
|
$FieldsManager::EditTpl((int)$_REQUEST['id'], $_REQUEST['fld'], $_REQUEST['type']); |
|
break; |
|
|
|
case 'save': |
|
$FieldsManager::SaveTpl((int)$_REQUEST['field_id'], $_REQUEST['field_name'], $_REQUEST['field_type'], $_REQUEST['func']); |
|
break; |
|
|
|
case 'delete': |
|
$FieldsManager::DeleteTpl((int)$_REQUEST['id'], $_REQUEST['fld'], $_REQUEST['type'], $_REQUEST['func']); |
|
break; |
|
|
|
case 'unlink': |
|
$FieldsManager::UnlinkField($_REQUEST['type']); |
|
header('Location:' . get_referer_link()); |
|
exit; |
|
} |
|
} |
|
|
|
?>
|
|
|