I think i might need to write a function in banner.php that will return the expiry date.
function zen_expire_date_banners($identifier) {
$banner = $identifier;
global $db;
$banners_query = "select b.banners_id, b.expires_date, b.expires_impressions,
sum(bh.banners_shown) as banners_shown
from " . TABLE_BANNERS . " b, " . TABLE_BANNERS_HISTORY . " bh
where b.status = 1
and b.banners_id = bh.banners_id
group by b.banners_id, b.expires_date, b.expires_impressions";
$banners = $db->Execute($banners_query);
return $banners->fields['expires_date']
}
I think it will look something similar to the above.
And then i will call the function:
<div id="bannerSix" class="banners"><?php echo zen_expire_date_banners($banner); ?></div>
Any one care to share his thought?