Ejemplo n.º 1
0
} else {
    if (LANGUAGE_ID == 'ru') {
        $arResult['LINK_TO_BUY'] = 'http://www.1c-bitrix.ru/buy/intranet.php#tab-call-link';
    } else {
        if (LANGUAGE_ID == 'ua') {
            //$arResult['LINK_TO_BUY'] = 'http://www.1c-bitrix.ua/buy/intranet.php#tab-call-link';
        } else {
            if (LANGUAGE_ID == 'kz') {
            } else {
                if (LANGUAGE_ID == 'de') {
                    $arResult['LINK_TO_BUY'] = 'https://www.bitrix24.de/prices/calls.php';
                } else {
                    $arResult['LINK_TO_BUY'] = 'https://www.bitrix24.com/prices/calls.php';
                }
            }
        }
    }
    $arResult['LINK_TO_DOC'] = in_array(LANGUAGE_ID, array("ru", "kz", "ua", "by")) ? 'https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=48&CHAPTER_ID=02699' : 'https://www.bitrixsoft.com/support/training/course/index.php?COURSE_ID=26&LESSON_ID=6734';
}
$res = Bitrix\Voximplant\ConfigTable::getList(array('filter' => array('=PORTAL_MODE' => CVoxImplantConfig::MODE_SIP)));
while ($row = $res->fetch()) {
    if (strlen($row['PHONE_NAME']) <= 0) {
        $row['PHONE_NAME'] = substr($row['SEARCH_ID'], 0, 3) == 'reg' ? GetMessage('VI_CONFIG_SIP_CLOUD_TITLE') : GetMessage('VI_CONFIG_SIP_OFFICE_TITLE');
        $row['PHONE_NAME'] = str_replace('#ID#', $row['ID'], $row['PHONE_NAME']);
    }
    $arResult['LIST_SIP_NUMBERS'][$row['ID']] = array('PHONE_NAME' => htmlspecialcharsbx($row['PHONE_NAME']));
}
if (!(isset($arParams['TEMPLATE_HIDE']) && $arParams['TEMPLATE_HIDE'] == 'Y')) {
    $this->IncludeComponentTemplate();
}
return $arResult;
Ejemplo n.º 2
0
 } else {
     if ($_POST['VI_GET_PHONE_NUMBERS'] == 'Y') {
         $arSend['ERROR'] = '';
         $result = CVoxImplantPhone::GetPhoneNumbers($_POST['COUNTRY_CODE'], $_POST['COUNTRY_REGION'], $_POST['COUNTRY_CATEGORY']);
         if ($result !== false) {
             $arSend['RESULT'] = $result;
         } else {
             $arSend['ERROR'] = 'ERROR';
         }
         echo CUtil::PhpToJsObject($arSend);
     } else {
         if ($_POST['VI_RENT_NUMBER'] == 'Y') {
             $arSend['ERROR'] = '';
             $ViAccount = new CVoxImplantAccount();
             $accountBalance = $ViAccount->GetAccountBalance(true);
             $orm = Bitrix\Voximplant\ConfigTable::getList(array('filter' => array('=SEARCH_ID' => $_POST['CURRENT_NUMBER'])));
             if ($orm->fetch()) {
                 $arSend['ERROR'] = 'ATTACHED';
             } else {
                 if (floatval($_POST['PRE_MONEY_CHECK']) <= $accountBalance) {
                     $result = CVoxImplantPhone::AttachPhoneNumber($_POST['COUNTRY_CODE'], $_POST['REGION_ID'], $_POST['CURRENT_NUMBER'], $_POST['COUNTRY_STATE'], $_POST['COUNTRY_CATEGORY']);
                     if (!empty($result)) {
                         $arSend['RESULT'] = $result[0];
                     } else {
                         $arSend['ERROR'] = 'ERROR';
                     }
                 } else {
                     $arSend['ERROR'] = 'NO_MONEY';
                 }
             }
             echo CUtil::PhpToJsObject($arSend);