This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Cmodule::IncludeModule('extanet'); | |
| // Константы | |
| define('EXTRANET_GROUP_ID', 17); // ID группы экстранет куда приглашаем пользователя | |
| define('EXTRANET_INVITOR_ID', 481); // ID пользователя от которого будет выполнено приглашение в группу | |
| // Получим SITE ID нужен в дальнейшем | |
| $siteId = CSite::GetDefSite(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Assuming we have the following xml structure: | |
| //<redords> | |
| // <record> | |
| // <field1>Lorem ipsum</field1> | |
| // <field2>Doler</field2> | |
| // <field3>Sit amet</field3> | |
| // </record> | |
| // ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * This script can help to add grat to user | |
| * @author Andrei Nikolaev <[email protected]> | |
| */ | |
| use \Bitrix\Main; | |
| use \Bitrix\Iblock; | |
| use \Bitrix\Socialnetwork; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use \Bitrix\Main; | |
| use \Bitrix\Sale; | |
| use \Bitrix\Crm\Invoice; | |
| try | |
| { | |
| if ( ! Main\Loader::IncludeModule('crm') ) | |
| { | |
| throw new \Exception("CRM module not inluded"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function translit($string) { | |
| $trans = \CUtil::translit($string,"ru", [ | |
| 'max_len' => strlen($string) | |
| ]); | |
| return $trans; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| define('EXTRANET_NO_REDIRECT', true); | |
| define('LDAP_NO_PORT_REDIRECTION', true); | |
| define("NO_KEEP_STATISTIC", true); | |
| define("NOT_CHECK_PERMISSIONS", true); | |
| define("SM_SAFE_MODE", true); | |
| define("NO_AGENT_CHECK", true); | |
| define("NO_AGENT_STATISTIC", true); | |
| define("STOP_STATISTICS", true); | |
| include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); |