Beispiel #1
0
 public function GetOneTimeKey($key)
 {
     $ViAccount = new CVoxImplantAccount();
     $accountName = $ViAccount->GetAccountName();
     if (!$accountName) {
         $this->error = new CVoxImplantError(__METHOD__, $ViAccount->GetError()->code, GetMessage('VI_GET_ACCOUNT_INFO', array('#CODE#' => $ViAccount->GetError()->code)));
         return false;
     }
     $ViUser = new CVoxImplantUser();
     $userInfo = $ViUser->GetUserInfo($this->userId);
     if (!$userInfo) {
         $this->error = new CVoxImplantError(__METHOD__, $ViUser->GetError()->code, GetMessage('VI_GET_USER_INFO', array('#CODE#' => $ViUser->GetError()->code)));
         return false;
     }
     return md5($key . "|" . md5($userInfo['user_login'] . ":voximplant.com:" . $userInfo['user_password']));
 }
Beispiel #2
0
}
$arResult['LINK_TO_BUY'] = '';
if (IsModuleInstalled('bitrix24')) {
    if (LANGUAGE_ID != 'kz') {
        $arResult['LINK_TO_BUY'] = '/settings/license_phone_sip.php';
    }
} 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';
                }
            }
        }
    }
}
$viAccount = new CVoxImplantAccount();
$arResult['ACCOUNT_NAME'] = $viAccount->GetAccountName();
$arResult['SIP_NOTICE_OLD_CONFIG_OFFICE_PBX'] = CVoxImplantConfig::GetNoticeOldConfigOfficePbx();
if (!(isset($arParams['TEMPLATE_HIDE']) && $arParams['TEMPLATE_HIDE'] == 'Y')) {
    $this->IncludeComponentTemplate();
}
return $arResult;
Beispiel #3
0
IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/modules/voximplant/options.php');
CModule::IncludeModule('voximplant');
$aTabs = array(array("DIV" => "edit1", "TAB" => GetMessage("VI_TAB_SETTINGS"), "ICON" => "voximplant_config", "TITLE" => GetMessage("VI_TAB_TITLE_SETTINGS_2")));
$tabControl = new CAdminTabControl("tabControl", $aTabs);
$ViAccount = new CVoxImplantAccount();
$ViAccount->UpdateAccountInfo();
if ($ViAccount->GetError()->error) {
    $accountName = '-';
    $accountBalance = '-';
    if ($ViAccount->GetError()->code == 'LICENCE_ERROR') {
        $errorMessage = GetMessage('VI_ACCOUNT_ERROR_LICENSE');
    } else {
        $errorMessage = GetMessage('VI_ACCOUNT_ERROR');
    }
} else {
    $accountName = $ViAccount->GetAccountName();
    $accountBalance = $ViAccount->GetAccountBalance() . ' ' . $ViAccount->GetAccountCurrency();
    $errorMessage = '';
}
if (strlen($_POST['Update']) > 0 && check_bitrix_sessid()) {
    if (strlen($_POST['PUBLIC_URL']) > 0 && strlen($_POST['PUBLIC_URL']) < 12) {
        $errorMessage = GetMessage('VI_ACCOUNT_ERROR_PUBLIC');
    } else {
        if (strlen($_POST['Update']) > 0) {
            COption::SetOptionString("voximplant", "portal_url", $_POST['PUBLIC_URL']);
            COption::SetOptionString("voximplant", "debug", isset($_POST['DEBUG_MODE']));
            if (strlen($Update) > 0 && strlen($_REQUEST["back_url_settings"]) > 0) {
                LocalRedirect($_REQUEST["back_url_settings"]);
            } else {
                LocalRedirect($APPLICATION->GetCurPage() . "?mid=" . urlencode($mid) . "&lang=" . urlencode(LANGUAGE_ID) . "&back_url_settings=" . urlencode($_REQUEST["back_url_settings"]) . "&" . $tabControl->ActiveTabParam());
            }