/*************************************************************************** * Dolphin Smart Community Builder * ----------------- * begin : Mon Mar 23 2006 * copyright : (C) 2006 BoonEx Group * website : http://www.boonex.com/ * This file is part of Dolphin - Smart Community Builder * * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. * http://creativecommons.org/licenses/by/3.0/ * * Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the Creative Commons Attribution 3.0 License for more details. * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, * see license.txt file; if not, write to marketing@boonex.com ***************************************************************************/ $bann_click_url = $site['url'] . "click.php"; function banner_put_nv($Position, $Track = 1) { global $bann_click_url; $out = ""; $query = "SELECT * FROM `Banners` WHERE `Active` <> 0 AND `campaign_start` <= NOW() AND `campaign_end` >= NOW() "; switch($Position) { case 1: case 2: case 3: case 4: $query .= " AND `Position` LIKE '%{$Position}%' "; break; default: return $out; } $query .= "ORDER BY RAND() LIMIT 1"; $arr = db_arr( $query ); if ( !$arr[0] ) return $out; switch ($Position) { case 2: $hshift = $arr['lhshift']; $vshift = $arr['lvshift']; break; case 3: $hshift = $arr['rhshift']; $vshift = $arr['rvshift']; break; } if( $Position == 2 || $Position == 3 ) { $out .= "
\n";
$out .= " {$arr['Text']} "; $out .= " | \n";
$out .= "