%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.116.69.53 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/report/install/ |
Upload File : |
<? global $MESS; IncludeModuleLangFile(__FILE__); Class report extends CModule { var $MODULE_ID = "report"; var $MODULE_VERSION; var $MODULE_VERSION_DATE; var $MODULE_NAME; var $MODULE_DESCRIPTION; var $MODULE_CSS; var $errors; public function __construct() { $arModuleVersion = array(); include(__DIR__.'/version.php'); if (is_array($arModuleVersion) && array_key_exists("VERSION", $arModuleVersion)) { $this->MODULE_VERSION = $arModuleVersion["VERSION"]; $this->MODULE_VERSION_DATE = $arModuleVersion["VERSION_DATE"]; } else { $this->MODULE_VERSION = REPORT_VERSION; $this->MODULE_VERSION_DATE = REPORT_VERSION_DATE; } $this->MODULE_NAME = GetMessage("REPORT_MODULE_NAME"); $this->MODULE_DESCRIPTION = GetMessage("REPORT_MODULE_DESC"); } function InstallDB($arParams = array()) { global $DB, $APPLICATION; $this->errors = false; // Database tables creation if(!$DB->Query("SELECT 'x' FROM b_report WHERE 1=0", true)) { $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/report/install/db/mysql/install.sql"); } if($this->errors !== false) { $APPLICATION->ThrowException(implode("<br>", $this->errors)); return false; } RegisterModule("report"); RegisterModuleDependences('report', 'OnReportDelete', 'report', '\Bitrix\Report\Sharing', 'OnReportDelete'); // visual reports $eventManager = \Bitrix\Main\EventManager::getInstance(); $eventManager->registerEventHandler('report', 'onReportCategoryCollect', 'report', '\Bitrix\Report\VisualConstructor\EventHandler', 'onCategoriesCollect'); $eventManager->registerEventHandler('report', 'onReportsCollect', 'report', '\Bitrix\Report\VisualConstructor\EventHandler', 'onReportsCollect'); $eventManager->registerEventHandler('report', 'onReportViewCollect', 'report', '\Bitrix\Report\VisualConstructor\EventHandler', 'onViewsCollect'); $eventManager->registerEventHandler('report', 'onWidgetCollect', 'report', '\Bitrix\Report\VisualConstructor\EventHandler', 'onWidgetCollect'); return true; } function UnInstallDB($arParams = array()) { global $DB, $APPLICATION; $this->errors = false; if(!array_key_exists("savedata", $arParams) || $arParams["savedata"] != "Y") { $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/report/install/db/mysql/uninstall.sql"); } UnRegisterModuleDependences('report', 'OnReportDelete', 'report', '\Bitrix\Report\Sharing', 'OnReportDelete'); UnRegisterModule("report"); return true; } function InstallEvents() { return true; } function UnInstallEvents() { return true; } function InstallFiles($arParams = array()) { global $DB; if($_ENV["COMPUTERNAME"]!='BX') { CopyDirFiles( $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/report/install/components", $_SERVER["DOCUMENT_ROOT"]."/bitrix/components", true, true ); CopyDirFiles( $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/report/install/public/js", $_SERVER["DOCUMENT_ROOT"]."/bitrix/js", true, true ); CopyDirFiles( $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/report/install/images", $_SERVER["DOCUMENT_ROOT"]."/bitrix/images", true, true); } return true; } function UnInstallFiles() { DeleteDirFilesEx("/bitrix/js/report/");//scripts DeleteDirFilesEx("/bitrix/images/report/"); return true; } function DoInstall() { global $DB, $DOCUMENT_ROOT, $APPLICATION; if (!IsModuleInstalled("report")) { $this->InstallFiles(); $this->InstallDB(); $this->InstallEvents(); $GLOBALS["errors"] = $this->errors; $APPLICATION->IncludeAdminFile(GetMessage("REPORT_INSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/report/install/step1.php"); } } function DoUninstall() { global $DB, $DOCUMENT_ROOT, $APPLICATION, $step; $step = intval($step); if($step < 2) { $APPLICATION->IncludeAdminFile(GetMessage("REPORT_UNINSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/report/install/unstep1.php"); } elseif($step == 2) { $this->UnInstallDB(array( "savedata" => $_REQUEST["savedata"], )); $this->UnInstallFiles(); $this->UnInstallEvents(); $GLOBALS["errors"] = $this->errors; $APPLICATION->IncludeAdminFile(GetMessage("REPORT_UNINSTALL_TITLE"), $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/report/install/unstep2.php"); } } } ?>