1<?
namespace Bitrix\Main;
$GLOBALS[
'____1690880296']=
array(base64_decode(
'ZmlsZV9l'.
'eGlz'.
'dHM='),base64_decode(
'c3RydG91cHBl'.
'cg=='),base64_decode(
'bWQ1'),base64_decode(
''.
'bW'.
'Q'.
'1'),base64_decode(
'aW5fY'.
'XJyYXk='),base64_decode(
''.
'aW5'.
'fYXJy'.
'YXk='),base64_decode(
''.
'ZGV'.
'maW5lZA='.
'='),base64_decode(
'Z'.
'G'.
'V'.
'maW'.
'5lZA'.
'='.
'='),base64_decode(
'ZGV'.
'maW5lZA=='),base64_decode(
'ZmlsZV9leGlzdHM='),base64_decode(
'Z'.
'mlsZ'.
'V9'.
'leGlzdHM'.
'='),base64_decode(
'ZmlsZV9le'.
'GlzdHM'.
'='),base64_decode(
'Z'.
'm'.
'lsZV'.
'9leGl'.
'zd'.
'HM='),base64_decode(
''.
'ZXhwbG9kZQ=='));
if(!function_exists(__NAMESPACE__.
'\\___972068685')){
function ___972068685($_1404092485){
static $_1499280696=
false;
if($_1499280696 ==
false) $_1499280696=
array(
'L2JpdHJp'.
'eC9saWN'.
'lbnN'.
'lX2tleS'.
'5waHA=',
'',
'',
'R'.
'EVNTw==',
'R'.
'E'.
'VNTw==',
'Qk'.
'lUUkl'.
'Y',
'TElDRU5DRQ'.
'==',
'RE'.
'VNT'.
'w'.
'==',
'L2'.
'tleV91cGR'.
'h'.
'd'.
'GUucGhwP2x'.
'pY'.
'2'.
'Vu'.
'c2Vfa2'.
'V'.
'5PQ==',
'JnRvYmFz'.
'a2V0PXkmbGFuZz0=',
'a'.
'H'.
'R'.
'0cHM'.
'6Ly9kZXYu'.
'MWMtYml0'.
'cml4LnJ1L2xl'.
'Y'.
'XJu'.
'a'.
'W5nL2NvdXJzZS9p'.
'bm'.
'Rle'.
'C5wa'.
'H'.
'A/Q09VUlNFX0lEPT'.
'EzNSZMRVNTT05fSUQ9'.
'M'.
'jU3MjA=',
''.
'aH'.
'R0cH'.
'M6'.
'Ly90c'.
'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'uZy9'.
'1'.
'YQ==',
''.
'dWE'.
'=',
'L2J'.
'p'.
'dHJp'.
'eC9'.
'tb2R1b'.
'GVzL21'.
'haW4vbG'.
'FuZy9ieQ==',
'Ynk'.
'=',
'L2J'.
'pdHJ'.
'p'.
'e'.
'C9t'.
'b2R1b'.
'GVzL2'.
'1haW'.
'4vb'.
'G'.
'FuZy'.
'9reg='.
'=',
''.
'a3o=',
'L2J'.
'pdH'.
'JpeC9'.
't'.
'b'.
'2R1b'.
'GVzL21h'.
'aW'.
'4vbGFuZ'.
'y9ydQ==',
'cnU=',
'bWF'.
'pb'.
'g==',
'flBBUkFNX1B'.
'BU'.
'lROR'.
'VJ'.
'fSUQ=',
'bW'.
'Fpb'.
'g='.
'=',
'UE'.
'FSQU1'.
'fTUFYX1VT'.
'RVJT',
'b'.
'WFpbg='.
'=',
'f'.
'kNPV'.
'U5UX'.
'0VYV'.
'FJB',
'Tg'.
'==',
'WQ==',
'Z'.
'Xh0cmFuZXQ=',
'QU5EIFUu'.
'TEF'.
'TVF9MT0'.
'd'.
'JTiA+I'.
'A'.
'==',
'QU5E'.
'IFUuTEFTVF9MT0dJTiBJU'.
'yBOT1QgTlVM'.
'TA==',
'aW50cmFuZX'.
'Q=',
'ZXh0cm'.
'Fu'.
'ZX'.
'Q'.
'=',
'Z'.
'Xh0cmFuZXRfZ3JvdXA'.
'=',
'b'.
'W'.
'Fp'.
'bg==',
'f'.
'mxpY2V'.
'uc2VfbmFtZQ==',
''.
'bWFp'.
'bg==',
'fmxp'.
'Y2'.
'Vu'.
'c2VfY29kZXM=',
'',
'LA'.
'='.
'=');
return base64_decode($_1499280696[$_1404092485]);}}; use
Bitrix\Main\Config\Option; use
Bitrix\Main\Type\Date;
final class License{
private?
string $_2093721202=
null;
private?
string $_2091343313=
null;
private const DOMAINS_STORE_LICENSE=[
'ru' =>
'https://util.1c-bitrix.ru',
'en' =>
'https://util.bitrixsoft.com',
'kz' =>
'https://util.1c-bitrix.kz',
'by' =>
'https://util.1c-bitrix.by',];
public const URL_BUS_EULA=[
'ru' =>
'https://www.1c-bitrix.ru/download/law/eula_bus.pdf',
'by' =>
'https://www.1c-bitrix.by/download/law/eula_bus.pdf',
'kz' =>
'https://www.1c-bitrix.kz/download/law/eula_bus.pdf',];
public const URL_CP_EULA=[
'ru' =>
'https://www.1c-bitrix.ru/download/law/eula_cp.pdf',
'by' =>
'https://www.1c-bitrix.by/download/law/eula_cp.pdf',
'kz' =>
'https://www.1c-bitrix.kz/download/law/eula_cp.pdf',
'en' =>
'https://www.bitrix24.com/eula/',
'br' =>
'https://www.bitrix24.com.br/eula/',
'fr' =>
'https://www.bitrix24.fr/eula/',
'pl' =>
'https://www.bitrix24.pl/eula/',
'it' =>
'https://www.bitrix24.it/eula/',
'la' =>
'https://www.bitrix24.es/eula/',];
public const URL_RENEWAL_LICENSE=[
'com' =>
'https://store.bitrix24.com/profile/license-keys.php',
'eu' =>
'https://store.bitrix24.eu/profile/license-keys.php',
'de' =>
'https://store.bitrix24.de/profile/license-keys.php',
'ru' =>
'https://www.1c-bitrix.ru/buy/products/b24.php#tab-section-2',
'by' =>
'https://www.1c-bitrix.by/buy/products/b24.php#tab-section-2',
'kz' =>
'https://www.1c-bitrix.kz/buy/products/b24.php#tab-section-2',];
private const CIS=[
'ru' => 1,
'by' => 1,
'kz' => 1,
'uz' => 1,
'kg' => 1,
'am' => 1,
'az' => 1,
'ge' => 1];
public function getKey(): string{ if($this->_2093721202 === null){ $_1944628363=
Loader::getDocumentRoot(). ___972068685(0); $LICENSE_KEY= ___972068685(1);
if(
$GLOBALS[
'____1690880296'][0]($_1944628363)){ include($_1944628363);} $this->_2093721202=($LICENSE_KEY == ___972068685(2) ||
$GLOBALS[
'____1690880296'][1]($LICENSE_KEY) == ___972068685(3)? ___972068685(4): $LICENSE_KEY);}
return $this->_2093721202;}
public function getHashLicenseKey(): string{
return $GLOBALS[
'____1690880296'][2]($this->getKey());}
public function getPublicHashKey(): string{ return
$GLOBALS[
'____1690880296'][3](___972068685(5). $this->getKey(). ___972068685(6));}
public function isDemoKey(): bool{ return $this->getKey() == ___972068685(7);}
public function getBuyLink(): string{ return $this->getDomainStoreLicense(). ___972068685(8). $this->getHashLicenseKey(). ___972068685(9). LANGUAGE_ID;}
public function getDocumentationLink(): string{ if($this->isCis()){
return ___972068685(10);}
return ___972068685(11);}
public function getRenewalLink(): string{ $_2091343313= $this->getRegion();
if(
$GLOBALS[
'____1690880296'][4]($_2091343313,[___972068685(12), ___972068685(13), ___972068685(14), ___972068685(15)])){
return self::URL_RENEWAL_LICENSE[$_2091343313];}
if(
$GLOBALS[
'____1690880296'][5]($_2091343313,[___972068685(16), ___972068685(17), ___972068685(18), ___972068685(19), ___972068685(20)])){
return self::URL_RENEWAL_LICENSE[___972068685(21)];}
return self::URL_RENEWAL_LICENSE[___972068685(22)];}
public function getDomainStoreLicense(): string{ return self::DOMAINS_STORE_LICENSE[$this->getRegion()] ?? self::DOMAINS_STORE_LICENSE[___972068685(23)];}
public function isDemo(): bool{ return
$GLOBALS[
'____1690880296'][6](___972068685(24)) && DEMO === ___972068685(25);}
public function isTimeBound(): bool{ return
$GLOBALS[
'____1690880296'][7](___972068685(26)) && TIMELIMIT_EDITION === ___972068685(27);}
public function isEncoded(): bool{ return
$GLOBALS[
'____1690880296'][8](___972068685(28)) && ENCODE === ___972068685(29);}
public function getExpireDate():?Date{ $_879971070= (int)(
$GLOBALS[___972068685(30)] ??(1068/2-534));
if($_879971070>(968-2*484)){
return Date::createFromTimestamp($_879971070);}
return null;}
public function getSupportExpireDate():?Date{ $_879971070= Option::
get(___972068685(31), ___972068685(32));
if(Date::isCorrect($_879971070, ___972068685(33))){
return new Date($_879971070, ___972068685(34));}
return null;}
public function isCis(): bool{ return isset(self::CIS[$this->getRegion()]);}
public function getRegion():?string{ if($this->_2091343313 === null){
if(Loader::includeModule(___972068685(35))){ $this->_2091343313= \CBitrix24::getPortalZone();}
else{ $_2091343313= Option::get(___972068685(36), ___972068685(37));
if(empty($_2091343313)){ $_2091343313= $this->__1231713937();
if(empty($_2091343313)){ $_2091343313= $this->__1028258769();}} $this->_2091343313= $_2091343313 ?? ___972068685(38);}}
return $this->_2091343313?:
null;}
public function getEulaLink(): string{ if(ModuleManager::isModuleInstalled(___972068685(39))){
return self::URL_CP_EULA[$this->getRegion()] ?? self::URL_CP_EULA[___972068685(40)];}
return self::URL_BUS_EULA[$this->getRegion()] ?? self::URL_BUS_EULA[___972068685(41)];}
private function __1231713937():?string{ $_1960306552= Option::
get(___972068685(42), ___972068685(43));
if($_1960306552 === ___972068685(44) || $_1960306552 === ___972068685(45)){
return ___972068685(46);}
if($_1960306552 === ___972068685(47) || $_1960306552 === ___972068685(48)){
return ___972068685(49);}
return null;}
private function __1028258769():?string{ $_1068358637= Application::getDocumentRoot();
if(
$GLOBALS[
'____1690880296'][9]($_1068358637. ___972068685(50))){
return ___972068685(51);}
if(
$GLOBALS[
'____1690880296'][10]($_1068358637. ___972068685(52))){
return ___972068685(53);}
if(
$GLOBALS[
'____1690880296'][11]($_1068358637. ___972068685(54))){
return ___972068685(55);}
if(
$GLOBALS[
'____1690880296'][12]($_1068358637. ___972068685(56))){
return ___972068685(57);}
return null;}
public function getPartnerId(): int{ return (int)Option::
get(___972068685(58), ___972068685(59),(178*2-356));}
public function getMaxUsers(): int{ return (int)Option::
get(___972068685(60), ___972068685(61),(201*2-402));}
public function isExtraCountable(): bool{ return Option::
get(___972068685(62), ___972068685(63), ___972068685(64)) === ___972068685(65) && ModuleManager::isModuleInstalled(___972068685(66));}
public function getActiveUsersCount(Date $_2134939022=
null): int{ $_251272186= Application::getConnection(); $_782229341=(132*2-264);
if($_2134939022 !==
null){ $_601674815= ___972068685(67).$_251272186->getSqlHelper()->convertToDbDate($_2134939022);}
else{ $_601674815= ___972068685(68);}
if(ModuleManager::isModuleInstalled(___972068685(69))){ $_1832248737=
"