%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 18.118.166.45
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/seo/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/seo/lib//advtabengine.php
<?php
namespace Bitrix\Seo;

use Bitrix\Main\Application;
use Bitrix\Main\Config\Option;
use Bitrix\Main\Context;
use Bitrix\Main\Loader;
use Bitrix\Main\Localization\Loc;
use Bitrix\Main\IO;
use Bitrix\Seo\Engine;

Loc::loadMessages(__FILE__);

/**
 * Class AdvTabEngine
 *
 * Events handler for integration with IBlock element edit form
 *
 * @package Bitrix\Seo
 **/

class AdvTabEngine
{
	public static function eventHandler()
	{
		if(
			Option::get('main', 'vendor', '') == '1c_bitrix'
			&& Loc::getDefaultLang(LANGUAGE_ID) == 'ru'
			&& IsModuleInstalled('socialservices')
		)
		{
			return array(
				"TABSET" => "seo_adv",
				"Check" => array(__CLASS__, 'checkFields'),
				"Action" => array(__CLASS__, 'saveData'),
				"GetTabs" => array(__CLASS__, 'getTabs'),
				"ShowTab" => array(__CLASS__, 'showTab'),
			);
		}
	}

	public static function getTabs($iblockElementInfo)
	{
		$showTab = false;

		$request = Context::getCurrent()->getRequest();

		if($iblockElementInfo["ID"] > 0 && (!isset($request['action']) || $request['action'] != 'copy'))
		{
			$showTab = true;
			if(Loader::includeModule('catalog'))
			{
/*
				$dbRes = CatalogIblockTable::getList(array(
					'filter' => array(
						'=IBLOCK_ID' => $iblockElementInfo["IBLOCK"]["ID"],
						'!PRODUCT_IBLOCK_ID' => 0
					),
					'select' => array('IBLOCK_ID'),
				));
				if($dbRes->fetch())
				{
					$showTab = false;
				}
*/
				if(\CCatalogSku::getInfoByOfferIBlock($iblockElementInfo["IBLOCK"]["ID"]) !== false)
				{
					$showTab = false;
				}
			}
		}

		return $showTab ? array(
			array(
				"DIV" => "seo_adv",
				"SORT" => 4,
				"TAB" => Loc::getMessage("SEO_ADV_TAB"),
				"TITLE" => Loc::getMessage("SEO_ADV_TAB_TITLE"),
			),
		) : null;
	}

	public static function showTab($div,$iblockElementInfo)
	{
		$engineList = array();

		if(Option::get('main', 'vendor', '') == '1c_bitrix')
		{
			$engineList[] = array(
				"DIV" => "yandex_direct",
				"TAB" => Loc::getMessage("SEO_ADV_YANDEX_DIRECT"),
				"TITLE" => Loc::getMessage("SEO_ADV_YANDEX_DIRECT_TITLE"),
				"HANDLER" => IO\Path::combine(
					Application::getDocumentRoot(),
					BX_ROOT,
					"/modules/seo/admin/tab/seo_search_yandex_direct.php"
				),
			);
		}

		if(count($engineList) > 0)
		{
			$engineTabControl = new \CAdminViewTabControl("engineTabControl", $engineList);
?>
<tr>
	<td colspan="2">
<?php
			$engineTabControl->begin();
			foreach($engineList as $engineTab)
			{
				$engineTabControl->beginNextTab();

				$file = new IO\File($engineTab["HANDLER"]);
				if($file->isExists())
				{
					require($file->getPath());
				}
			}

			$engineTabControl->end();
?>
	</td>
</tr>
<?php
		}
	}

	public static function checkFields()
	{
		return true;
	}

	public static function saveData()
	{
		return true;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit