예제 #1
0
     $_POST['FM'] = CUtil::JsObjectToPhp($_POST['FM']);
     if (is_array($_POST['FM'])) {
         foreach ($_POST['FM'] as $userId => $data) {
             foreach ($data as $key => $value) {
                 $_SESSION['IM_FLASHED_MESSAGE'][] = $key;
             }
         }
     }
 }
 $bOpenMessenger = isset($_POST['OPEN_MESSENGER']) && intval($_POST['OPEN_MESSENGER']) == 1 ? true : false;
 $bOpenContactList = isset($_POST['OPEN_CONTACT_LIST']) && intval($_POST['OPEN_CONTACT_LIST']) == 1 ? true : false;
 // Online
 $arOnline = array();
 if ($bOpenMessenger || $bOpenContactList) {
     $CIMContactList = new CIMContactList();
     $arOnline = $CIMContactList->GetStatus();
 }
 // Counters
 $arResult["COUNTERS"] = CUserCounter::GetValues($USER->GetID(), $_POST['SITE_ID']);
 // Exchange
 $arResult["MAIL_COUNTER"] = 0;
 if (CModule::IncludeModule("dav")) {
     $ar = CDavExchangeMail::GetTicker($GLOBALS["USER"]);
     if ($ar !== null) {
         $arResult["MAIL_COUNTER"] = intval($ar["numberOfUnreadMessages"]);
     }
 }
 $arSend = array('REVISION' => IM_REVISION, 'USER_ID' => $USER->GetId(), 'ONLINE' => !empty($arOnline) ? $arOnline['users'] : array(), 'COUNTERS' => $arResult["COUNTERS"], 'MAIL_COUNTER' => $arResult["MAIL_COUNTER"], 'SERVER_TIME' => time(), 'ERROR' => "");
 if (CModule::IncludeModule('pull')) {
     $arChannel = CPullChannel::Get($USER->GetId());
     if (is_array($arChannel)) {