1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
sonet_set_content_view.php
См. документацию.
1
<?
2
define(
"NO_KEEP_STATISTIC"
,
true
);
3
define(
"BX_STATISTIC_BUFFER_USED"
,
false
);
4
define(
"NO_LANG_FILES"
,
true
);
5
define(
"NOT_CHECK_PERMISSIONS"
,
true
);
6
define(
"PUBLIC_AJAX_MODE"
,
true
);
7
define(
'BX_SECURITY_SESSION_READONLY'
,
true
);
8
9
$site_id
= (isset(
$_REQUEST
[
"site"
]) && is_string(
$_REQUEST
[
"site"
])) ? trim(
$_REQUEST
[
"site"
]):
""
;
10
$site_id
= mb_substr(preg_replace(
"/[^a-z0-9_]/i"
,
""
,
$site_id
), 0, 2);
11
12
define(
"SITE_ID"
,
$site_id
);
13
14
require_once(
$_SERVER
[
"DOCUMENT_ROOT"
].
"/bitrix/modules/main/bx_root.php"
);
15
require_once(
$_SERVER
[
"DOCUMENT_ROOT"
].
"/bitrix/modules/main/include/prolog_before.php"
);
16
17
$xmlIdList
= (
18
isset(
$_REQUEST
[
"viewXMLIdList"
])
19
&& is_array(
$_REQUEST
[
"viewXMLIdList"
])
20
?
$_REQUEST
[
"viewXMLIdList"
]
21
:
array
()
22
);
23
24
$action
= (isset(
$_REQUEST
[
"action"
]) && is_string(
$_REQUEST
[
"action"
])) ? trim(
$_REQUEST
[
"action"
]):
""
;
25
$action
= preg_replace(
"/[^a-z0-9_]/i"
,
""
,
$action
);
26
27
$contentId
= (isset(
$_REQUEST
[
"contentId"
]) && is_string(
$_REQUEST
[
"contentId"
])) ? trim(
$_REQUEST
[
"contentId"
]) :
""
;
28
$page
= (isset(
$_REQUEST
[
"page"
]) && intval(
$_REQUEST
[
"page"
]) > 0) ? intval(
$_REQUEST
[
"page"
]) : 1;
29
30
$pathToUserProfile
= (isset(
$_REQUEST
[
"pathToUserProfile"
]) && is_string(
$_REQUEST
[
"pathToUserProfile"
])) ? trim(
$_REQUEST
[
"pathToUserProfile"
]) :
""
;
31
32
33
use
Bitrix\Socialnetwork\Livefeed
;
34
use
Bitrix\Main\Loader
;
35
36
$result
=
array
();
37
if
(
38
check_bitrix_sessid
()
39
&& Loader::includeModule(
"socialnetwork"
)
40
&& in_array(
$action
,
array
(
'set_content_view'
,
'get_view_list'
))
41
)
42
{
43
if
(
44
$action
==
'set_content_view'
45
&& !empty(
$xmlIdList
)
46
)
47
{
48
foreach
(
$xmlIdList
as
$val
)
49
{
50
$xmlId =
$val
[
'xmlId'
];
51
$save
= (!isset(
$val
[
'save'
]) ||
$val
[
'save'
] !=
'N'
);
52
53
$tmp
= explode(
'-'
, $xmlId, 2);
54
$entityType = trim(
$tmp
[0]);
55
$entityId
= intval(
$tmp
[1]);
56
57
if
(
58
!empty($entityType)
59
&&
$entityId
> 0
60
)
61
{
62
$provider
=
Livefeed\Provider::init
(
array
(
63
'ENTITY_TYPE'
=> $entityType,
64
'ENTITY_ID'
=>
$entityId
,
65
));
66
if
(
$provider
)
67
{
68
$provider
->setContentView(
array
(
69
'save'
=>
$save
70
));
71
}
72
}
73
}
74
}
75
elseif
(
76
$action
==
'get_view_list'
77
&& !empty(
$contentId
)
78
)
79
{
80
$userList
=
\Bitrix\Socialnetwork\Item\UserContentView::getUserList
(
array
(
81
'contentId'
=>
$contentId
,
82
'page'
=>
$page
,
83
'pathToUserProfile'
=>
$pathToUserProfile
84
));
85
86
$result
[
'items'
] =
$userList
[
'items'
];
87
$result
[
'itemsCount'
] =
count
(
$result
[
'items'
]);
88
$result
[
'hiddenCount'
] =
$userList
[
'hiddenCount'
];
89
}
90
91
$result
[
"SUCCESS"
] =
"Y"
;
92
}
93
94
if
(empty(
$_REQUEST
[
'mobile_action'
]))
95
{
96
header(
'Content-Type: application/x-javascript; charset='
.
LANG_CHARSET
);
97
}
98
echo
CUtil::PhpToJSObject
(
$result
);
99
\CMain::finalActions();
100
die
;
101
?>
$provider
if(!Loader::includeModule('messageservice')) $provider
Определения
callback_ednaruimhpx.php:21
Bitrix\Main\Loader
Определения
loader.php:13
Bitrix\Socialnetwork\Item\UserContentView\getUserList
static getUserList(array $params=[])
Определения
usercontentview.php:101
Bitrix\Socialnetwork\Livefeed\Provider\init
static init(array $params)
Определения
provider.php:279
CUtil\PhpToJSObject
static PhpToJSObject($arData, $bWS=false, $bSkipTilda=false, $bExtType=false)
Определения
util.php:66
$tmp
if(!is_array($prop["VALUES"])) $tmp
Определения
component_props.php:203
$userList
$userList
Определения
discount_coupon_list.php:276
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$_REQUEST
$_REQUEST["admin_mnu_menu_id"]
Определения
get_menu.php:8
$result
$result
Определения
get_property_values.php:14
$save
$save
Определения
iblock_catalog_edit.php:365
$_SERVER
$_SERVER["DOCUMENT_ROOT"]
Определения
cron_frame.php:9
LANG_CHARSET
const LANG_CHARSET
Определения
include.php:65
check_bitrix_sessid
check_bitrix_sessid($varname='sessid')
Определения
tools.php:4686
Bitrix\Socialnetwork\Livefeed
Определения
bitrix24newuser.php:3
$entityId
$entityId
Определения
payment.php:4
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
die
die
Определения
quickway.php:367
$page
$page
Определения
order_form.php:33
count
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения
waybill.php:936
$val
$val
Определения
options.php:1793
$pathToUserProfile
$pathToUserProfile
Определения
sonet_set_content_view.php:30
$xmlIdList
$xmlIdList
Определения
sonet_set_content_view.php:17
$contentId
$contentId
Определения
sonet_set_content_view.php:27
$site_id
$site_id
Определения
sonet_set_content_view.php:9
$action
$action
Определения
file_dialog.php:21
bitrix
modules
socialnetwork
tools
sonet_set_content_view.php
Создано системой
1.14.0