%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.119.248.44 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/sale/install/components/bitrix/sale.crm.site.master/wizard/ |
Upload File : |
<?php namespace Bitrix\Sale\CrmSiteMaster\Steps; if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) { die(); } use Bitrix\Main, Bitrix\Main\Config\Option, Bitrix\Main\Localization\Loc, Bitrix\Sale\Update\CrmEntityCreatorStepper, Bitrix\Sale\CrmSiteMaster\Tools\SitePatcher; Loc::loadMessages(__FILE__); if (Main\IO\File::isFileExists($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intranet/install/wizards/bitrix/portal/wizard.php")) { include_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/intranet/install/wizards/bitrix/portal/wizard.php"); } elseif (Main\IO\File::isFileExists($_SERVER["DOCUMENT_ROOT"]."/bitrix/wizards/bitrix/portal/wizard.php")) { include_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/wizards/bitrix/portal/wizard.php"); } /** @noinspection PhpUndefinedClassInspection */ /** * Class FinishStep * Step with finish information * * @package Bitrix\Sale\CrmSiteMaster\Steps */ class FinishStep extends \FinishStep { private $currentStepName = __CLASS__; /** @var \SaleCrmSiteMaster */ private $component = null; private $siteId; private $sitePath; private $siteDir; /** * Initialization step id and title */ public function initStep() { $this->component = $this->GetWizard()->GetVar("component"); $this->SetStepID($this->currentStepName); $this->SetTitle(Loc::getMessage("SALE_CSM_WIZARD_FINISHSTEP_TITLE")); } /** * @return bool * @throws Main\ArgumentException * @throws Main\ArgumentNullException * @throws Main\ArgumentOutOfRangeException * @throws Main\LoaderException * @throws Main\ObjectPropertyException * @throws Main\SystemException */ public function showStep() { if (!$this->component->isSaleCrmSiteMasterFinish()) { $this->component->setSaleCrmSiteMasterFinish(); $this->component->setSaleCrmSiteMasterStub(); $this->component->setLandingSmnExtended(); $this->siteId = SitePatcher::getCrmSiteId(); $this->sitePath = SitePatcher::getInstance()->getCrmSitePath(); $this->siteDir = SitePatcher::getInstance()->getCrmSiteDir(); SitePatcher::disableRegularArchive(); $this->createNewIndex(); // register event for show progress bar and bind agent CrmEntityCreatorStepper::registerEventHandler(); SitePatcher::saveConfig1C(); // enable composite SitePatcher::enableComposite(); // enable crm shop SitePatcher::crmShopEnable(); } ob_start(); ?> <div class="adm-crm-site-master-finish"> <img class="adm-crm-site-master-finish-image" src="<?=$this->component->getPath()?>/wizard/images/smile.svg" alt=""> </div> <div class="adm-crm-site-master-finish-description"> <?=Loc::getMessage("SALE_CSM_WIZARD_FINISHSTEP_DESCR1")?> </div> <div class="adm-crm-site-master-finish-description"> <?=Loc::getMessage("SALE_CSM_WIZARD_FINISHSTEP_DESCR2")?> </div> <? $content = ob_get_contents(); ob_end_clean(); $this->content = $content; return true; } /** * @return array * @throws Main\ArgumentException * @throws Main\ObjectPropertyException * @throws Main\SystemException */ public function showButtons() { ob_start(); ?> <a href="<?=$this->component->getPathToOrderList()?>" class="ui-btn ui-btn-primary"> <?=Loc::getMessage("SALE_CSM_WIZARD_FINISHSTEP_ORDER_LINK")?> </a> <? $content = ob_get_contents(); ob_end_clean(); return [ "CONTENT" => $content, "NEED_WRAPPER" => true, "CENTER" => true, ]; } /** * Create index.php * * @throws Main\ArgumentNullException * @throws Main\ArgumentOutOfRangeException */ public function createNewIndex() { $wizard =& $this->GetWizard(); define("WIZARD_SITE_PATH", str_replace("//", "/", $this->sitePath."/".$this->siteDir."/")); $firstStep = Option::get( "main", "wizard_first".mb_substr($wizard->GetID(), 7)."_".$this->siteId, false, $this->siteId ); if (IsModuleInstalled("bitrix24")) { $firstStep = "Y"; } define("WIZARD_FIRST_INSTAL", $firstStep); //Copy index page if (WIZARD_FIRST_INSTAL !== "Y" && $wizard->GetVar("templateID") === "bitrix24") { CopyDirFiles( WIZARD_SITE_PATH."_index.php", WIZARD_SITE_PATH."index_old.php", true, true, true ); CopyDirFiles( WIZARD_SITE_PATH."index_b24.php", WIZARD_SITE_PATH."index.php", true, true, true ); } else { CopyDirFiles( WIZARD_SITE_PATH."/_index.php", WIZARD_SITE_PATH."/index.php", true, true, true ); } Option::set("main", "wizard_first".mb_substr($wizard->GetID(), 7)."_".$this->siteId, "Y", $this->siteId); Option::set("main", "~wizard_id", mb_substr($wizard->GetID(), 7), $this->siteId); Option::set("main", "wizard_solution", $wizard->GetID(), $this->siteId); } }