CAdvBanner :: GetRedirectURL: Bitrix method

      
<?php 
//  CAdvBanner :: GetRedirectURL()
//  /dist/bitrix/modules/advertising/classes/general/advertising.php:4012

    
public static function GetRedirectURL($url$arBanner)
    {
        global 
$strClickURL;

        if (
$arBanner["FIX_CLICK"]=="Y")
        {
            
$arUrlParams = array(
                
"id=".$arBanner["ID"]
            );

            if (
defined('SITE_ID'))
                
$arUrlParams[] = 'site_id=' SITE_ID;

            
$event1 CAdvBanner::PrepareHTML($arBanner["STAT_EVENT_1"], $arBanner);
            
$event2 CAdvBanner::PrepareHTML($arBanner["STAT_EVENT_2"], $arBanner);
            
$event3 CAdvBanner::PrepareHTML($arBanner["STAT_EVENT_3"], $arBanner);

            if (
strlen($event1)>0$arUrlParams[] = "event1=".urlencode($event1);
            if (
strlen($event2)>0$arUrlParams[] = "event2=".urlencode($event2);
            if (
strlen($event3)>0$arUrlParams[] = "event3=".urlencode($event3);

            
$arUrlParams[] = "goto=".urlencode($url);

            
$url $strClickURL."?".implode("&amp;"$arUrlParams);
        }
        return 
$url;
    }