Модуль Баннер v2.26.0
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.

84 lines
1.8 KiB

9 years ago
<?php
/**
* AVE.cms - Модуль Баннеры
*
* @package AVE.cms
* @subpackage module_Banner
* @filesource
*/
if(!defined('BASE_DIR')) exit;
if(!defined('BANNER_DIR')) define('BANNER_DIR', 'media');
echo BANNER_DIR;
9 years ago
/**
* Обработка тэга модуля
*
* @param int $banner_id - идентификатор категории баннеров
*/
function mod_banner($banner_id)
{
require_once(BASE_DIR . '/modules/' . BANNER_DIR . '/class/banner.php');
9 years ago
$banner = new ModulBanner;
$banner->displayBanner(stripslashes($banner_id));
}
if (isset($_REQUEST['module']) && $_REQUEST['module'] == BANNER_DIR)
{
if (is_numeric($_REQUEST['id']))
{
require_once(BASE_DIR . '/modules/' . BANNER_DIR . '/class/banner.php');
9 years ago
$banner = new ModulBanner;
$banner->fetch_addclick($_REQUEST['id']);
}
}
if (defined('ACP') && !empty($_REQUEST['moduleaction']))
{
global $AVE_Template;
require_once(BASE_DIR . '/modules/' . BANNER_DIR . '/class/banner.php');
9 years ago
$tpl_dir = BASE_DIR . '/modules/' . BANNER_DIR . '/templates/';
$lang_file = BASE_DIR . '/modules/' . BANNER_DIR . '/lang/' . $_SESSION['user_language'] . '.txt';
$AVE_Template->config_load($lang_file, 'module');
9 years ago
$banner = new ModulBanner;
$AVE_Template->config_load($lang_file, 'module');
9 years ago
$config_vars = $AVE_Template->get_config_vars();
$AVE_Template->assign('config_vars', $config_vars);
switch($_REQUEST['moduleaction'])
{
case '1':
$banner->showBanner($tpl_dir);
break;
case 'quicksave':
$banner->quickSave($_REQUEST['id']);
break;
case 'kategs':
$banner->bannerKategs($tpl_dir);
break;
case 'editbanner':
$banner->editBanner($tpl_dir, $_REQUEST['id']);
break;
case 'new':
case 'newbanner':
$banner->newBanner($tpl_dir);
break;
case 'delbanner':
$banner->deleteBanner($_REQUEST['id']);
break;
}
}
?>