summaryrefslogtreecommitdiff
path: root/smartyplugins/function.banner.php
blob: c80d73c85929a6f842263c9da0e60fa8306d3c84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */

/**
* smarty_function_banner
*/
function smarty_function_banner($params, &$gBitSmarty)
{
    global $gBitSystem;
    include_once( BANNERS_PKG_PATH.'banner_lib.php' );
    if(!isset($bannerlib)) {
      $bannerlib = new BannerLib();
    }

    extract($params);
    // Param = zone

    if (empty($zone)) {
        $gBitSmarty->trigger_error("assign: missing 'zone' parameter");
        return;
    }
    $banner = $bannerlib->select_banner($zone);
    print($banner);
}

/* vim: set expandtab: */

?>