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
84 lines
1.8 KiB
<?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; |
|
|
|
/** |
|
* Обработка тэга модуля |
|
* |
|
* @param int $banner_id - идентификатор категории баннеров |
|
*/ |
|
function mod_banner($banner_id) |
|
{ |
|
require_once(BASE_DIR . '/modules/' . BANNER_DIR . '/class/banner.php'); |
|
$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'); |
|
$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'); |
|
|
|
$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'); |
|
|
|
$banner = new ModulBanner; |
|
|
|
$AVE_Template->config_load($lang_file, 'module'); |
|
$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; |
|
} |
|
} |
|
|
|
?>
|