CAdvBanner :: Show: Bitrix method

      
<?php 
//  CAdvBanner :: Show()
//  /dist/bitrix/modules/advertising/classes/general/advertising.php:4549

    
public static function Show($TYPE_SID$HTML_BEFORE=""$HTML_AFTER="")
    {
        global 
$APPLICATION$USER;

        
$debug null;
        if(
$_SESSION["SESS_SHOW_INCLUDE_TIME_EXEC"]=="Y" && $USER->IsAdmin())
        {
            
$debug = new CDebugInfo();
            
$debug->Start();
        }

        
$arBanner CAdvBanner::GetRandom($TYPE_SID);
        
$strReturn CAdvBanner::GetHTML($arBanner);
        if(
strlen($strReturn)>0)
        {
            
CAdvBanner::FixShow($arBanner);

            if((
$arIcons CAdvBanner::GetEditIcons($arBanner$TYPE_SID)) !== false)
                
$strReturn $APPLICATION->IncludeString($strReturn$arIcons);

            
$strReturn $HTML_BEFORE.$strReturn.$HTML_AFTER;

            if(
$debug)
                
$strReturn .= $debug->Output();

            return 
$strReturn;
        }

        if(
$debug)
            echo 
$debug->Output();

        return 
false;
    }