-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinclude.php
More file actions
44 lines (39 loc) · 1.47 KB
/
include.php
File metadata and controls
44 lines (39 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/***********************************************
** @product OBX:SMS Bitrix Module **
** @authors **
** Maksim S. Makarov aka pr0n1x **
** Morozov P. Artem aka tashiro **
** @license Affero GPLv3 **
** @mailto rootfavell@gmail.com **
** @mailto tashiro@yandex.ru **
** @copyright 2013 DevTop **
***********************************************/
use OBX\Sms\Provider\Provider;
if (!CModule::IncludeModule("iblock")) {
return false;
}
global $DB, $APPLICATION, $MESS, $DBType;
IncludeModuleLangFile(__FILE__);
if (!IsModuleInstalled("obx.core")) {
$obx_core_path = $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/obx.core/install/index.php";
if (!file_exists($obx_core_path)) {
//$APPLICATION->ThrowException(GetMessage("OBX_SMS_OBX_CORE_NOT_INSTALLED"));
ShowError(GetMessage("OBX_SMS_OBX_CORE_NOT_INSTALLED"));
return false;
}
require_once($obx_core_path);
$obx_core = new obx_core();
$obx_core->DoInstall();
}
if (!CModule::IncludeModule("obx.core")) {
$APPLICATION->ThrowException(GetMessage("OBX_SMS_OBX_CORE_NOT_INSTALLED"));
return false;
}
CModule::IncludeModule('obx.core');
$arModuleClasses = require dirname(__FILE__).'/classes/.classes.php';
CModule::AddAutoloadClasses("obx.sms", $arModuleClasses);
/*
* Регистрация всех провайдеров в папке ./providers/
*/
Provider::includeProviders();