|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* AVE.cms - Модуль Управление полями
|
|
|
|
*
|
|
|
|
* @package AVE.cms
|
|
|
|
* @subpackage module_FieldsEdit
|
|
|
|
* @since 1.0
|
|
|
|
* @filesource
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (!defined('BASE_DIR')) exit;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Администрирование
|
|
|
|
*/
|
|
|
|
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, 'module');
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|