CAdvBanner :: PrepareHTML: Bitrix method

      
<?php 
//  CAdvBanner :: PrepareHTML()
//  /dist/bitrix/modules/advertising/classes/general/advertising.php:3994

    
public static function PrepareHTML($text$arBanner)
    {
        global 
$nRandom1$nRandom2$nRandom3$nRandom4$nRandom5;
        static 
$search = array("#RANDOM1#""#RANDOM2#""#RANDOM3#""#RANDOM4#""#RANDOM5#""#BANNER_NAME#""#BANNER_ID#""#CONTRACT_ID#""#TYPE_SID#");
        if (
strlen(trim($text))>0)
        {
            
$text str_replace($search, array($nRandom1$nRandom2$nRandom3$nRandom4$nRandom5$arBanner["NAME"], $arBanner["ID"], $arBanner["CONTRACT_ID"], $arBanner["TYPE_SID"]), $text);
            if (
strpos($text"#EVENT_GID#")!==false)
            {
                if (
CModule::IncludeModule("statistic"))
                {
                    
$text str_replace("#EVENT_GID#"CStatEvent::GetGID(), $text);
                }
            }
        }
        return 
$text;
    }