Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/letme.watchman/install/install/ |
Upload File : |
<?php $langs = CLanguage::GetList(); while($lang = $langs->Fetch()) { $lid = $lang["LID"]; $et = new CEventType; $et->Add([ "LID" => $lid, "EVENT_NAME" => "WATCHMAN_SEND_ERROR_REPORT", "NAME" => GetMessage('LETME_WATCHMAN_RU_EVENT_TYPE_NAME'), "DESCRIPTION" => GetMessage('LETME_WATCHMAN_RU_EVENT_TYPE_DESCRIPTION'), ]); $arSites = []; $sites = CSite::GetList('', '', ["LANGUAGE_ID"=>$lid]); while ($site = $sites->Fetch()) { $arSites[] = $site["LID"]; } if(count($arSites) > 0) { $emess = new CEventMessage; $emess->Add([ "ACTIVE" => "Y", "EVENT_NAME" => "WATCHMAN_SEND_ERROR_REPORT", "LID" => $arSites, "EMAIL_FROM" => "#DEFAULT_EMAIL_FROM#", "EMAIL_TO" => "#EMAIL_TO#", "SUBJECT" => GetMessage('LETME_WATCHMAN_RU_EVENT_SUBJECT'), "MESSAGE" => GetMessage('LETME_WATCHMAN_RU_EVENT_MESSAGE'), "BODY_TYPE" => "text", ]); } }