advertising :: InstallEvents: Bitrix method

      
<?php 
//  advertising :: InstallEvents()
//  /dist/bitrix/modules/advertising/install/index.php:140

    
function InstallEvents()
    {
        global 
$DB;
        
$sIn "'ADV_BANNER_STATUS_CHANGE', 'ADV_CONTRACT_INFO'";
        
$rs $DB->Query("SELECT count(*) C FROM b_event_type WHERE EVENT_NAME IN (".$sIn.") "false"File: ".__FILE__."<br>Line: ".__LINE__);
        
$ar $rs->Fetch();
        if(
$ar["C"] <= 0)
        {
            include(
$_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/advertising/install/events/set_events.php");
        }
        return 
true;
    }