1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
subscription_card_product.php
См. документацию.
1
<?php
4
const
STOP_STATISTICS
=
true
;
5
const
NO_AGENT_CHECK
=
true
;
6
const
PUBLIC_AJAX_MODE
=
true
;
7
8
use
Bitrix\Catalog
;
9
use
Bitrix\Catalog\Access\AccessController
;
10
use
Bitrix\Catalog\Access\ActionDictionary
;
11
use
Bitrix\Main
;
12
use
Bitrix\Main\Localization\Loc
;
13
use
Bitrix\Main\Loader
;
14
use
Bitrix\Main\Type\DateTime
;
15
16
require_once(
$_SERVER
[
'DOCUMENT_ROOT'
] .
'/bitrix/modules/main/include/prolog_admin_before.php'
);
17
18
Loc::loadMessages(__FILE__);
19
20
$error
=
false
;
21
$errorMessage
=
''
;
22
if
(!Loader::includeModule(
'catalog'
))
23
{
24
$error
=
true
;
25
$errorMessage
= Loc::getMessage(
'CSD_MODULE_NOT_INSTALLED'
,
array
(
'#NAME#'
=>
'catalog'
));
26
}
27
if
(
28
!AccessController::getCurrent()->check(ActionDictionary::ACTION_CATALOG_READ)
29
&& !AccessController::getCurrent()->check(ActionDictionary::ACTION_CATALOG_VIEW)
30
)
31
{
32
$error
=
true
;
33
$errorMessage
= Loc::getMessage(
'CSD_ACCESS_DENIED'
);
34
}
35
if
(!
check_bitrix_sessid
())
36
{
37
$error
=
true
;
38
$errorMessage
= Loc::getMessage(
'CSD_INCORRECT_SESSION'
);
39
}
40
if
(
$error
)
41
{
42
echo
Bitrix\Main\Web\Json::encode
([
43
'error'
=>
true
,
44
'message'
=>
$errorMessage
,
45
]);
46
require(
$_SERVER
[
'DOCUMENT_ROOT'
] .
'/bitrix/modules/main/include/epilog_admin_after.php'
);
47
die
();
48
}
49
50
$request
= Main\Context::getCurrent()->getRequest();
51
$totalCount
= 0;
52
$activeCount
= 0;
53
54
if
(
$request
->isPost() &&
$request
->get(
'getSubscriptionData'
) ===
'Y'
)
55
{
56
try
57
{
58
$totalCount
= Catalog\SubscribeTable::getCount([
59
'=ITEM_ID'
=> (
int
)
$request
->get(
'itemId'
),
60
]);
61
62
$activeCount
= Catalog\SubscribeTable::getCount([
63
'=ITEM_ID'
=> (
int
)
$request
->get(
'itemId'
),
64
[
65
'LOGIC'
=>
'OR'
,
66
[
'=DATE_TO'
=>
false
],
67
[
'>DATE_TO'
=>
new
DateTime()],
68
]
69
]);
70
71
echo
Bitrix\Main\Web\Json::encode
([
72
'success'
=>
true
,
73
'data'
=> [
74
'totalCount'
=>
$totalCount
,
75
'activeCount'
=>
$activeCount
,
76
],
77
]);
78
require(
$_SERVER
[
'DOCUMENT_ROOT'
] .
'/bitrix/modules/main/include/epilog_admin_after.php'
);
79
die
();
80
}
81
catch
(
Main
\SystemException $exception)
82
{
83
echo
Bitrix\Main\Web\Json::encode
([
84
'error'
=>
true
,
85
'message'
=> $exception->getMessage(),
86
]);
87
require(
$_SERVER
[
'DOCUMENT_ROOT'
].
'/bitrix/modules/main/include/epilog_admin_after.php'
);
88
die
();
89
}
90
}
PUBLIC_AJAX_MODE
const PUBLIC_AJAX_MODE
Определения
catalog_reindex.php:6
$request
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения
catalog_reindex.php:36
Bitrix\Catalog\Access\AccessController
Определения
AccessController.php:29
Bitrix\Catalog\Access\ActionDictionary
Определения
ActionDictionary.php:17
Bitrix\Main\Loader
Определения
loader.php:13
Bitrix\Main\Localization\Loc
Определения
loc.php:12
Bitrix\Main\Type\DateTime
Определения
datetime.php:9
Bitrix\Main\Web\Json\encode
static encode($data, $options=null)
Определения
json.php:22
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
STOP_STATISTICS
const STOP_STATISTICS
Определения
froogle_util.php:2
$errorMessage
while($arParentIBlockProperty=$dbParentIBlockProperty->Fetch()) $errorMessage
Определения
iblock_subelement_generator.php:275
$_SERVER
$_SERVER["DOCUMENT_ROOT"]
Определения
cron_frame.php:9
NO_AGENT_CHECK
const NO_AGENT_CHECK
Определения
cron_frame.php:17
check_bitrix_sessid
check_bitrix_sessid($varname='sessid')
Определения
tools.php:4686
Bitrix\Catalog
Bitrix\Main
die
die
Определения
quickway.php:367
$activeCount
$activeCount
Определения
subscription_card_product.php:52
$error
$error
Определения
subscription_card_product.php:20
$totalCount
$totalCount
Определения
subscription_card_product.php:51
bitrix
modules
catalog
tools
subscription_card_product.php
Создано системой
1.14.0