$errorMessage .= GetMessage("CATALOG_MODULE_NOT_INSTALLED") . '<br>'; $fCriticalError = true; } // Using iblock module if (!CModule::IncludeModule('iblock')) { $errorMessage .= GetMessage("IBLOCK_MODULE_NOT_INSTALLED") . '<br>'; $fCriticalError = true; } // If exists $ID parameter and it more than 0, then it is identifier of report that will be created. $ID = (int) $_REQUEST['ID']; if ($ID == 0) { $errorMessage .= GetMessage("REPORT_VIEW_REP_ID_NOT_SET") . '<br>'; $fCriticalError = true; } if (!$fCriticalError) { CBaseSaleReportHelper::init(); //<editor-fold defaultstate='collapsed' desc="Forming parameters of component report.view"> $arParams = array('PATH_TO_REPORT_LIST' => '/bitrix/admin/sale_report.php?lang=' . LANG, 'PATH_TO_REPORT_CONSTRUCT' => '/bitrix/admin/sale_report_construct.php?lang=' . LANG, 'PATH_TO_REPORT_VIEW' => '/bitrix/admin/sale_report_view.php', 'REPORT_ID' => $ID, 'ROWS_PER_PAGE' => 50, 'NAV_TEMPLATE' => 'arrows_adm', 'USE_CHART' => true); //</editor-fold> // <editor-fold defaultstate="collapsed" desc="POST action"> if ($_REQUEST['cancel']) { LocalRedirect($arParams['PATH_TO_REPORT_LIST']); } $siteList = CBaseSaleReportHelper::getSiteList(); if (isset($_REQUEST['F_SALE_SITE'])) { $siteId = substr($_REQUEST['F_SALE_SITE'], 0, 2); if (array_key_exists($siteId, $siteList)) { $siteCookieId = CBaseSaleReportHelper::getSiteCookieId(); setcookie($siteCookieId, $siteId, time() + 365 * 24 * 3600); } $arParams['F_SALE_SITE'] = $siteId;