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/rospirotorg.ru/bitrix/modules/main/admin/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/main/admin/component_install.php
<?
/**
 * @global \CUser $USER
 * @global \CMain $APPLICATION
 * @global \CDatabase $DB
 */

require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php");

$filemanPerms = $APPLICATION->GetGroupRight("fileman");
if ($filemanPerms == "D")
	$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));

IncludeModuleLangFile(__FILE__);

$action = (($action == "uninstall") ? "uninstall" : "install");

$APPLICATION->SetTitle(str_replace("#NAME#", $component, (($action == "install") ? "Инсталляция компонента '#NAME#'" : "Деинсталляция компонента '#NAME#'" )));

require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_popup_admin.php");

echo "<h1>".str_replace("#NAME#", $component, (($action == "install") ? "Инсталляция компонента '#NAME#'" : "Деинсталляция компонента '#NAME#'" ))."</h1>";

$componentErrorMessage = "";

$component = trim($component);
if ($component == '')
	$componentErrorMessage .= "Не указан компонент";

if ($componentErrorMessage == '')
{
	if (!isset($componentEngine) || !is_object($componentEngine))
		$componentEngine = new CComponentEngine();

	$path2Comp = $componentEngine->MakeComponentPath($component);
	if ($path2Comp == '')
		$componentErrorMessage .= str_replace("#NAME#", $component, "'#NAME#' не является именем компонента");
}

if ($componentErrorMessage == '')
{
	$componentPath = "/bitrix/components".$path2Comp;

	if (!file_exists($_SERVER["DOCUMENT_ROOT"].$componentPath)
		|| !is_dir($_SERVER["DOCUMENT_ROOT"].$componentPath)
		|| !file_exists($_SERVER["DOCUMENT_ROOT"].$componentPath."/index.php")
		|| !is_file($_SERVER["DOCUMENT_ROOT"].$componentPath."/index.php"))
	{
		$componentErrorMessage .= str_replace("#NAME#", $component, "'#NAME#' не является компонентом");
	}
}

if ($componentErrorMessage == '')
{
	$actionFile = $componentPath."/install/".(($action == "install") ? "install.php" : "uninstall.php");

	if (!file_exists($_SERVER["DOCUMENT_ROOT"].$actionFile) || !is_file($_SERVER["DOCUMENT_ROOT"].$actionFile))
		$componentErrorMessage .= str_replace("#NAME#", $component, (($action == "install") ? "'#NAME#' не имеет инсталлятора" : "'#NAME#' не имеет деинсталлятора" ));
}

if ($componentErrorMessage == '')
{
	$step = intval($_REQUEST["step"]);
	if ($step <= 0)
		$step = 1;

	include($_SERVER["DOCUMENT_ROOT"].$actionFile);
}
else
{
	CAdminMessage::ShowMessage(
		array(
			"DETAILS" => $componentErrorMessage,
			"TYPE" => "ERROR",
			"MESSAGE" => "Ошибка установки компонента",
			"HTML" => true
		)
	);
}

require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_popup_admin.php");
?>

Youez - 2016 - github.com/yon3zu
LinuXploit