holy shit

寺夺喜从天降

基于single sidebox的广告显示模块

文件:
banner_02.php
tpl_banner_box2.php
功能:
显示SHOW_BANNERS_GROUP_SET2的广告组内容,具体内容在后台设置.
引用:
<?php include(DIR_WS_MODULES . 'sideboxes/' . $template_dir .'/banner_02.php'); ?>

<?php
/**
 * sidebox - sidebox/banner_02.php
 * display banner of SHOW_BANNERS_GROUP_SET2
 * include(DIR_WS_MODULES . 'sideboxes/' . $template_dir .'/banner_02.php');
 */

$banner_box_status = $db->Execute("select layout_box_name from " . TABLE_LAYOUT_BOXES . " where ( layout_box_status_single=1) and layout_template ='" . $template_dir . "' and layout_box_name='banner_02.php'");

if($banner_box_status->RecordCount() != 0){
	if(SHOW_BANNERS_GROUP_SET2 !== ''){
		$banner_box_group = SHOW_BANNERS_GROUP_SET2;
		$content = '';
		if($banner = zen_banner_exists('dynamic', $banner_box_group)){
			$content = zen_display_banner('static', $banner);
		}
		
		if($banner->RecordCount() > 0){
			$title = BOX_HEADING_BANNER_BOX;
			//$title_link = zen_href_link('');
			require ($template->get_template_dir('tpl_banner_box2.php', DIR_WS_TEMPLATE, $current_page_base, 'sideboxes') . '/tpl_banner_box2.php');
		}
	}
}
?>
posted @ 2011-07-18 10:37  潜水鱼  阅读(350)  评论(0编辑  收藏  举报

holy shit on foot