1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
call.ajax.php
См. документацию.
1
<?
2
if
(!defined(
'CALL_AJAX_INIT'
))
3
{
4
define(
"CALL_AJAX_INIT"
,
true
);
5
define(
"PUBLIC_AJAX_MODE"
,
true
);
6
define(
"NO_KEEP_STATISTIC"
,
"Y"
);
7
define(
"NO_AGENT_STATISTIC"
,
"Y"
);
8
define(
"NO_AGENT_CHECK"
,
true
);
9
define(
"DisableEventsCheck"
,
true
);
10
require_once(
$_SERVER
[
"DOCUMENT_ROOT"
].
"/bitrix/modules/main/include/prolog_before.php"
);
11
}
12
13
if
(!CModule::IncludeModule(
"pull"
))
14
{
15
echo CUtil::PhpToJsObject(Array(
'ERROR'
=>
'PULL_MODULE_NOT_INSTALLED'
));
16
CMain::FinalActions
();
17
die
();
18
}
19
20
if
(intval(
$USER
->GetID()) <= 0)
21
{
22
echo CUtil::PhpToJsObject(Array(
'ERROR'
=>
'AUTHORIZE_ERROR'
));
23
CMain::FinalActions
();
24
die
();
25
}
26
27
if
(
check_bitrix_sessid
())
28
{
29
$errorMessage
=
""
;
30
if
($_POST[
'COMMAND'
] ==
'signaling'
)
31
{
32
\Bitrix\Pull\Event::add
(intval($_POST[
'USER_ID'
]), Array(
33
'module_id'
=>
'ycp'
,
34
'command'
=>
'call'
,
35
'params'
=> Array(
36
'senderId'
=>
$USER
->GetID(),
37
'command'
=>
'signaling'
,
38
'peer'
=> $_POST[
'PEER'
],
39
),
40
));
41
}
42
else
43
{
44
\Bitrix\Pull\Event::add
(intval($_POST[
'USER_ID'
]), Array(
45
'module_id'
=>
'ycp'
,
46
'command'
=>
'call'
,
47
'params'
=> Array(
48
'senderId'
=>
$USER
->GetID(),
49
'command'
=> $_POST[
'COMMAND'
]
50
),
51
));
52
}
53
echo CUtil::PhpToJsObject(Array(
54
'ERROR'
=>
''
55
));
56
}
57
else
58
{
59
echo CUtil::PhpToJsObject(Array(
60
'BITRIX_SESSID'
=>
bitrix_sessid
(),
61
'ERROR'
=>
'SESSION_ERROR'
62
));
63
}
64
CMain::FinalActions
();
65
die
();
Bitrix\Pull\Event\add
static add($recipient, array $parameters, $channelType=\CPullChannel::TYPE_PRIVATE)
Определения
event.php:22
CAllMain\FinalActions
static FinalActions($output="")
Определения
main.php:3690
$errorMessage
while($arParentIBlockProperty=$dbParentIBlockProperty->Fetch()) $errorMessage
Определения
iblock_subelement_generator.php:275
$_SERVER
$_SERVER["DOCUMENT_ROOT"]
Определения
cron_frame.php:9
$USER
global $USER
Определения
csv_new_run.php:40
check_bitrix_sessid
check_bitrix_sessid($varname='sessid')
Определения
tools.php:4686
bitrix_sessid
bitrix_sessid()
Определения
tools.php:4656
die
die
Определения
quickway.php:367
bitrix
modules
pull
demo
webrtc
components
pull.webrtc
call.ajax.php
Создано системой
1.14.0