public function executeComponent() { try { if ($this->notCache() || $this->StartResultCache(false)) { if (!Loader::includeModule('iblock')) { ShowError(GetMessage("IT_MODULE_NOT_INSTALLED")); return; } $this->inCacheFunction(); if ($this->includeComponentTemplateInCache) { $this->SetResultCacheKeys($this->arSaveInCacheKeys); $this->IncludeComponentTemplate(); } else { $this->EndResultCache(); } } $this->lastCacheFunction(); if (!$this->includeComponentTemplateInCache) { $this->IncludeComponentTemplate(); } } catch (Exception $exc) { if ($this->set404) { @define("ERROR_404", "Y"); } elseif ($this->showError) { $this->__showError($exc->getMessage()); } $this->AbortResultCache(); } }
public function executeComponent() { global $USER, $APPLICATION; if (!CModule::IncludeModule('mail')) { ShowError(GetMessage('MAIL_MODULE_NOT_INSTALLED')); return; } if (!is_object($USER) || !$USER->IsAuthorized()) { $APPLICATION->AuthForm(''); return; } if (!CIntranetUtils::IsExternalMailAvailable()) { ShowError(GetMessage('INTR_MAIL_UNAVAILABLE')); return; } $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : null; switch ($page) { case 'domain': return $this->executeDomainPage(); break; case 'manage': return $this->executeManagePage(); break; case 'success': return $this->executeSuccessPage(); break; default: return $this->executeHomePage($page); } }
function payload() { $root = new CXMLCreator("soap:Envelope"); $root->setAttribute("xmlns:soap", BX_SOAP_ENV); $root->setAttribute(BX_SOAP_XSI_PREFIX, BX_SOAP_SCHEMA_INSTANCE); $root->setAttribute(BX_SOAP_XSD_PREFIX, BX_SOAP_SCHEMA_DATA); $root->setAttribute(BX_SOAP_ENC_PREFIX, BX_SOAP_ENC); $header = new CXMLCreator("soap:Header"); $root->addChild($header); foreach ($this->Headers as $hx) { $header->addChild($hx); } // add the body $body = new CXMLCreator("soap:Body"); foreach ($this->BodyAttributes as $attribute => $value) { $body->setAttribute($attribute, $value); } // add the request $request = new CXMLCreator($this->Name); $request->setAttribute("xmlns", $this->Namespace); // add the request parameters $param = null; foreach ($this->Parameters as $parameter => $value) { unset($param); $param = CXMLCreator::encodeValueLight($parameter, $value); if ($param == false) { ShowError("Error enconding data for payload"); } $request->addChild($param); } $body->addChild($request); $root->addChild($body); return CXMLCreator::getXMLHeader() . $root->getXML(); }
/** * @return bool * @throws \Bitrix\Main\LoaderException */ protected function checkModules() { if (!Loader::includeModule('adelshin.person')) { ShowError(Loc::getMessage('ADELSHIN_PERSON_MODULE_NOT_INSTALLED')); return false; } return true; }
function setOutputVars($functionName) { if (!isset($this->typensVars[$functionName]["output"])) { ShowError("encodeValue() cant find output declaration."); exit; } $this->outputVars = $this->typensVars[$functionName]["output"]; }
/** * @return bool */ public function checkComponent() { if (!Loader::includeModule('iblock')) { $this->AbortResultCache(); ShowError(GetMessage('IBLOCK_MODULE_NOT_INSTALLED')); return false; } return true; }
/** * выполняет логику работы компонента */ public function executeComponent() { try { $this->setSefDefaultParams(); $this->getResult(); $this->includeComponentTemplate($this->page); } catch (Exception $e) { ShowError($e->getMessage()); } }
function __ExtSaleWizardShowError($text) { ShowError($text); echo '<script type="text/javascript">'; echo 'BX.WindowManager.Get().SetButtons([BX.WindowManager.Get().btnClose]);'; echo 'BX.WindowManager.Get().AdjustShadow();'; echo '</script>'; require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin_after.php"; exit; }
/** * @param string $code код инфблока * @return int ID инфоблока */ public static function GetIdByCode($code) { $res = CIBlock::GetList(array(), array('TYPE' => 'bizproc_iblockx', 'SITE_ID' => SITE_ID, 'ACTIVE' => 'Y', "CODE" => $code), true); if (empty($res)) { ShowError("Инфоблок с кодом=" . $code . " не найден"); return 0; } $data = $res->GetNext(); return $data["ID"]; }
protected function showError() { $errors = array(); foreach ($this->getErrors() as $error) { /** @var Error $error */ $errors[] = $error->getMessage(); } unset($error); ShowError(implode("", $errors)); $this->end(false); }
function get_result($sql) { if (empty($sql)) { die($this - ShowError("Error.", "Ingrese una instruccion SQL.")); } $res = $this->query($sql); if (mysql_num_rows($res) == 0) { return "N/A"; } else { return mysql_fetch_array($res); } }
protected function processBeforeAction($actionName) { parent::processBeforeAction($actionName); if (strlen($this->arParams['STORAGE_ID']) <= 0) { ShowError(Loc::getMessage('ACCESS_DENIED') . ' ' . Loc::getMessage('BIZPROC_WFEDIT_ERROR_TYPE')); return false; } if ($this->arResult['ID'] > 0) { $templatesList = CBPWorkflowTemplateLoader::getList(array(), array('ID' => $this->arResult['ID'])); if ($template = $templatesList->fetch()) { if (!CBPDocument::canUserOperateDocumentType(CBPCanUserOperateOperation::CreateWorkflow, $this->getUser()->getID(), $template['DOCUMENT_TYPE'])) { $this->showAccessDenied(); return false; } $this->arResult['TEMPLATE_NAME'] = $template['NAME']; $this->arResult['TEMPLATE_DESC'] = $template['DESCRIPTION']; $this->arResult['TEMPLATE_AUTOSTART'] = $template['AUTO_EXECUTE']; $this->arResult['TEMPLATE'] = $template['TEMPLATE']; $this->arResult['PARAMETERS'] = $template['PARAMETERS']; $this->arResult['VARIABLES'] = $template['VARIABLES']; $this->arResult['CONSTANTS'] = $template['CONSTANTS']; } else { $this->arResult['ID'] = 0; } if ($template["ENTITY"] == Bitrix\Disk\BizProcDocument::className()) { $this->arResult['DOCUMENT_COMPLEX_TYPE'] = \Bitrix\Disk\BizProcDocument::generateDocumentComplexType($this->arParams['STORAGE_ID']); $this->arResult['ENTITY'] = $template['ENTITY']; } else { $this->arResult['DOCUMENT_COMPLEX_TYPE'] = \Bitrix\Disk\BizProcDocumentCompatible::generateDocumentComplexType($this->arParams['STORAGE_ID']); $this->arResult['ENTITY'] = $template['ENTITY']; } } else { $this->arResult['ENTITY'] = Bitrix\Disk\BizProcDocument::className(); $this->arResult['DOCUMENT_COMPLEX_TYPE'] = \Bitrix\Disk\BizProcDocument::generateDocumentComplexType($this->arParams['STORAGE_ID']); if (!CBPDocument::canUserOperateDocumentType(CBPCanUserOperateOperation::CreateWorkflow, $this->getUser()->getID(), $this->arResult['DOCUMENT_COMPLEX_TYPE'])) { $this->showAccessDenied(); return false; } $this->arResult['TEMPLATE_NAME'] = Loc::getMessage("BIZPROC_WFEDIT_DEFAULT_TITLE"); $this->arResult['TEMPLATE_DESC'] = ''; $this->arResult['TEMPLATE_AUTOSTART'] = 1; $this->arResult['PARAMETERS'] = array(); $this->arResult['VARIABLES'] = array(); $this->arResult['CONSTANTS'] = array(); if ($this->request->getQuery('init') == 'statemachine') { $this->arResult['TEMPLATE'] = array(array('Type' => 'StateMachineWorkflowActivity', 'Name' => 'Template', 'Properties' => array(), 'Children' => array())); } else { $this->arResult['TEMPLATE'] = array(array('Type' => 'SequentialWorkflowActivity', 'Name' => 'Template', 'Properties' => array(), 'Children' => array())); } } return true; }
function serialize($entity_id, $entity_key_id, $entity_key_id2, $sTags, $bAddOnly = false) { $entity_id = (int) $entity_id; $entity_key_id = (int) $entity_key_id; $entity_key_id2 = (int) $entity_key_id2; $sTags = trim($sTags); if ($sTags == '') { if (!$bAddOnly) { $this->deleteByEntity($entity_id, $entity_key_id, $entity_key_id2); } return; } $oTag =& CreateObject('dcl.dbTag'); $aTags = split(',', $sTags); $aTagID = array(); foreach ($aTags as $sTag) { $sTag = trim($sTag); if ($sTag == '') { continue; } if (strlen($sTag) > $GLOBALS['phpgw_baseline'][$oTag->TableName]['fd']['tag_desc']['precision']) { ShowError(sprintf(STR_DB_TAGLENGTHERR, htmlspecialchars($sTag), $GLOBALS['phpgw_baseline'][$oTag->TableName]['fd']['tag_desc']['precision'])); continue; } $iID = $oTag->getIdByName($sTag); if ($iID !== null && !in_array($iID, $aTagID)) { $aTagID[] = $iID; } } if (count($aTagID) < 1) { $aTagID[] = -1; } $sTagID = join(',', $aTagID); // Delete the tags that are no longer referenced if we're not in add only mode if (!$bAddOnly) { if ($entity_id == DCL_ENTITY_WORKORDER) { $this->Execute("DELETE FROM dcl_entity_tag WHERE entity_id = {$entity_id} AND entity_key_id = {$entity_key_id} AND entity_key_id2 = {$entity_key_id2} AND tag_id NOT IN ({$sTagID})"); } else { $this->Execute("DELETE FROM dcl_entity_tag WHERE entity_id = {$entity_id} AND entity_key_id = {$entity_key_id} AND tag_id NOT IN ({$sTagID})"); } } // Add the new tags if ($sTagID != '-1') { if ($entity_id == DCL_ENTITY_WORKORDER) { $this->Execute("INSERT INTO dcl_entity_tag SELECT {$entity_id}, {$entity_key_id}, {$entity_key_id2}, tag_id FROM dcl_tag WHERE tag_id IN ({$sTagID}) AND tag_id NOT IN (SELECT tag_id FROM dcl_entity_tag WHERE entity_id = {$entity_id} AND entity_key_id = {$entity_key_id} AND entity_key_id2 = {$entity_key_id2})"); } else { $this->Execute("INSERT INTO dcl_entity_tag SELECT {$entity_id}, {$entity_key_id}, 0, tag_id FROM dcl_tag WHERE tag_id IN ({$sTagID}) AND tag_id NOT IN (SELECT tag_id FROM dcl_entity_tag WHERE entity_id = {$entity_id} AND entity_key_id = {$entity_key_id})"); } } }
public function executeComponent() { global $APPLICATION; $APPLICATION->setTitle(Loc::getMessage('CC_LCP_TITLE')); if (!empty($this->errors)) { ShowError(array_shift($this->errors)); return; } $this->loadDataProcesses(); if (!empty($this->errors)) { ShowError(array_shift($this->errors)); return; } $this->arResult['RAND_STRING'] = $this->randString(); $this->arResult['LISTS_URL'] = $this->arParams['LISTS_URL']; $this->includeComponentTemplate(); }
public function executeComponent() { if (!empty($this->arParams['ERROR'])) { ShowError(array_shift($this->arParams['ERROR'])); return; } $this->arResult['SOCNET_GROUP_ID'] = $this->arParams['SOCNET_GROUP_ID']; $this->arResult['RAND_STRING'] = $this->randString(); $this->arResult['DESTINATION'] = $this->arParams['DESTINATION']; $path = rtrim(SITE_DIR, '/'); $this->arResult['LISTS_URL'] = $path . COption::GetOptionString('lists', 'livefeed_url'); $this->arResult['IBLOCK_ID'] = intval($this->arParams['IBLOCK_ID']); if ($this->arResult['IBLOCK_ID']) { $this->getIblockData(); } $this->includeComponentTemplate(); }
public function executeComponent() { if (!CModule::IncludeModule('crm')) { ShowError(GetMessage('CRM_MODULE_NOT_INSTALLED')); return; } $catalogID = isset($this->arParams['CATALOG_ID']) ? intval($this->arParams['CATALOG_ID']) : 0; if ($catalogID <= 0) { $catalogID = CCrmCatalog::EnsureDefaultExists(); } $this->arResult['CATALOG_ID'] = $catalogID; $this->arResult['JS_EVENTS_MANAGER_ID'] = isset($this->arParams['JS_EVENTS_MANAGER_ID']) ? $this->arParams['JS_EVENTS_MANAGER_ID'] : ''; if (!is_string($this->arResult['JS_EVENTS_MANAGER_ID']) || $this->arResult['JS_EVENTS_MANAGER_ID'] === '') { return; } $this->includeComponentTemplate(); }
function Show() { global $dcl_info, $g_oSec; commonHeader(); if (!$g_oSec->HasPerm(DCL_ENTITY_BUILDMANAGER, DCL_PERM_MODIFY)) { return PrintPermissionDenied(); } if (($product_id = DCL_Sanitize::ToInt($_REQUEST['product_id'])) === null) { return PrintPermissionDenied(); } if (($version_id = DCL_Sanitize::ToInt($_REQUEST['product_version_id'])) === null) { return PrintPermissionDenied(); } $oProduct = CreateObject('dcl.dbProducts'); $oProduct->Load($product_id); $oPV = CreateObject('dcl.dbProductVersion'); if ($oPV->Load(array('product_version_id' => $version_id)) == -1) { ShowError('Failed to load version ID ' . $version_id, 'Error'); return; } $this->oSmarty->assign('VAL_JSDATEFORMAT', GetJSDateFormat()); $this->oSmarty->assign('VAL_FORMACTION', menuLink()); if (isset($GLOBALS['add'])) { $this->oSmarty->assign('VAL_MENUACTION', 'boBuildManager.addRelease'); } else { $this->oSmarty->assign('VAL_MENUACTION', 'boBuildManager.modifyRelease'); } $this->oSmarty->assign('TXT_BM_ADD_RELEASE', STR_BM_MOD_RELEASE); $this->oSmarty->assign('TXT_BM_PRODUCT', STR_BM_PRODUCT); $this->oSmarty->assign('TXT_BM_RELEASE_ALIAS_TITLE', STR_BM_RELEASE_ALIAS_TITLE); $this->oSmarty->assign('TXT_BM_RELEASEDATE_DESC', STR_BM_RELEASEDATE_DESC); $this->oSmarty->assign('TXT_BM_RELEASEDATE', STR_BM_RELEASEDATE); $this->oSmarty->assign('VAL_PRODUCTNAME', $oProduct->name); $this->oSmarty->assign('VAL_PRODUCTID', $oProduct->id); $this->oSmarty->assign('VAL_VERSIONID', $version_id); $this->oSmarty->assign('VAL_VERSIONTEXT', $oPV->product_version_text); $this->oSmarty->assign('VAL_VERSIONDESCR', $oPV->product_version_descr); $this->oSmarty->assign('VAL_ACTIVE', $oPV->active); $this->oSmarty->assign('VAL_VERSIONACTUALDATE', $oPV->product_version_actual_date); $this->oSmarty->assign('VAL_VERSIONTARGETDATE', $oPV->product_version_target_date); $this->oSmarty->assign('date', $oPV->product_version_target_date); $this->oSmarty->assign('VAL_DATEELEMENT', 'product_version_target_date'); $this->oSmarty->assign('VAL_WHICH', $GLOBALS['which']); SmartyDisplay($this->oSmarty, 'htmlBuildManagerReleaseForm.tpl'); }
function serialize($entity_id, $entity_key_id, $entity_key_id2, $sHotlists, $bAddOnly = false) { $entity_id = (int) $entity_id; $entity_key_id = (int) $entity_key_id; $entity_key_id2 = $entity_id == DCL_ENTITY_WORKORDER ? (int) $entity_key_id2 : 0; $sHotlists = trim($sHotlists); if ($sHotlists == '') { if (!$bAddOnly) { $this->deleteByEntity($entity_id, $entity_key_id, $entity_key_id2); } return; } $oHotlist =& CreateObject('dcl.dbHotlist'); $aHotlists = split(',', $sHotlists); $aHotlistID = array(); foreach ($aHotlists as $sHotlist) { $sHotlist = trim($sHotlist); if ($sHotlist == '') { continue; } if (strlen($sHotlist) > $GLOBALS['phpgw_baseline'][$oHotlist->TableName]['fd']['hotlist_tag']['precision']) { ShowError(sprintf(STR_DB_TAGLENGTHERR, htmlspecialchars($sHotlist), $GLOBALS['phpgw_baseline'][$oHotlist->TableName]['fd']['hotlist_tag']['precision'])); continue; } $iID = $oHotlist->getIdByName($sHotlist); if ($iID !== null && !in_array($iID, $aHotlistID)) { $aHotlistID[] = $iID; } } if (count($aHotlistID) < 1) { $aHotlistID[] = -1; } $sHotlistID = join(',', $aHotlistID); // Delete the hotlists that are no longer referenced if we're not in add only mode if (!$bAddOnly) { $this->deleteByEntity($entity_id, $entity_key_id, $entity_key_id2, $sHotlistID); } // Add the new hotlists if ($sHotlistID != '-1') { $created_by = $GLOBALS['DCLID']; $created_on = $this->GetDateSQL(); $this->Execute("INSERT INTO dcl_entity_hotlist_audit (entity_id, entity_key_id, entity_key_id2, hotlist_id, sort, audit_by, audit_on, audit_type)\r\n\t\t\t\t\t\t\tSELECT {$entity_id}, {$entity_key_id}, {$entity_key_id2}, hotlist_id, 999999, {$created_by}, {$created_on}, 1\r\n\t\t\t\t\t\t\tFROM dcl_hotlist\r\n\t\t\t\t\t\t\tWHERE hotlist_id IN ({$sHotlistID})\r\n\t\t\t\t\t\t\tAND hotlist_id NOT IN (SELECT hotlist_id FROM dcl_entity_hotlist WHERE entity_id = {$entity_id} AND entity_key_id = {$entity_key_id} AND entity_key_id2 = {$entity_key_id2})"); $this->Execute("INSERT INTO dcl_entity_hotlist SELECT {$entity_id}, {$entity_key_id}, {$entity_key_id2}, hotlist_id, 999999\r\n\t\t\t\t\t\t\tFROM dcl_hotlist\r\n\t\t\t\t\t\t\tWHERE hotlist_id IN ({$sHotlistID})\r\n\t\t\t\t\t\t\tAND hotlist_id NOT IN (SELECT hotlist_id FROM dcl_entity_hotlist WHERE entity_id = {$entity_id} AND entity_key_id = {$entity_key_id} AND entity_key_id2 = {$entity_key_id2})"); } }
public function executeComponent() { global $APPLICATION; $this->setFrameMode(false); if (!CModule::IncludeModule('lists')) { ShowError(Loc::getMessage("CC_BLL_MODULE_NOT_INSTALLED")); return; } $this->createDataExcel(); $APPLICATION->RestartBuffer(); header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: filename=list_" . $this->arIBlock["ID"] . ".xls"); $this->IncludeComponentTemplate(); $r = $APPLICATION->EndBufferContentMan(); echo $r; include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php"; die; }
public function executeComponent() { global $USER, $APPLICATION; $this->setFrameMode(false); if (!CModule::IncludeModule('lists')) { ShowError(Loc::getMessage("CC_BLL_MODULE_NOT_INSTALLED")); return; } $this->arResult["BIZPROC"] = (bool) CModule::includeModule("bizproc"); $this->arResult["DISK"] = (bool) CModule::includeModule("disk"); $this->listsPerm = CListPermissions::CheckAccess($USER, $this->arParams["~IBLOCK_TYPE_ID"], $this->arResult["IBLOCK_ID"], $this->arParams["~SOCNET_GROUP_ID"]); if ($this->listsPerm < 0) { switch ($this->listsPerm) { case CListPermissions::WRONG_IBLOCK_TYPE: ShowError(GetMessage("CC_BLL_WRONG_IBLOCK_TYPE")); return; case CListPermissions::WRONG_IBLOCK: ShowError(GetMessage("CC_BLL_WRONG_IBLOCK")); return; case CListPermissions::LISTS_FOR_SONET_GROUP_DISABLED: ShowError(GetMessage("CC_BLL_LISTS_FOR_SONET_GROUP_DISABLED")); return; default: ShowError(GetMessage("CC_BLL_UNKNOWN_ERROR")); return; } } elseif ($this->listsPerm < CListPermissions::CAN_READ && !(CIBlockRights::UserHasRightTo($this->arResult["IBLOCK_ID"], $this->arResult["IBLOCK_ID"], "element_read") || CIBlockSectionRights::UserHasRightTo($this->arResult["IBLOCK_ID"], $this->arResult["SECTION_ID"], "section_element_bind"))) { ShowError(GetMessage("CC_BLL_ACCESS_DENIED")); return; } if (!(!$this->arResult["IS_SOCNET_GROUP_CLOSED"] && ($this->listsPerm > CListPermissions::CAN_READ || CIBlockSectionRights::UserHasRightTo($this->arResult["IBLOCK_ID"], $this->arResult["SECTION_ID"], "element_read") || CIBlockSectionRights::UserHasRightTo($this->arResult["IBLOCK_ID"], $this->arResult["SECTION_ID"], "section_element_bind")))) { ShowError(GetMessage("CC_BLL_ACCESS_DENIED")); return; } $this->createDataExcel(); $APPLICATION->RestartBuffer(); header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: filename=list_" . $this->arIBlock["ID"] . ".xls"); $this->IncludeComponentTemplate(); $r = $APPLICATION->EndBufferContentMan(); echo $r; include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php"; die; }
function __WDShowError($sError) { if (isset($_REQUEST["use_light_view"]) || isset($_REQUEST["use_hidden_view"])) { $GLOBALS['APPLICATION']->RestartBuffer(); require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php"; $popupWindow = new CJSPopup('', ''); $popupWindow->ShowTitlebar(GetMessage("WD_UPLOAD_ERROR_TITLE")); $popupWindow->StartContent(); } if (strpos($sError, "<") > 0) { echo "<p><font class=\"errortext\">" . $sError . "</font></p>\n"; } else { ShowError($sError); } if (isset($_REQUEST["use_light_view"]) || isset($_REQUEST["use_hidden_view"])) { $popupWindow->ShowStandardButtons(array("close")); die; } }
public function executeComponent() { try { $this->checkParams($this->arParams); } catch (\Exception $e) { ShowError($e->getMessage()); return; } $stores = array(); $arStoreLocation = array("yandex_scale" => 11, "PLACEMARKS" => array()); foreach ($this->arParams["STORES_LIST"] as $storeId => $storeParams) { $stores[$storeParams["ID"]] = $storeParams; if (intval($storeParams["IMAGE_ID"]) > 0) { $arImage = CFile::GetFileArray($storeParams["IMAGE_ID"]); $imgValue = CFile::ShowImage($arImage, 115, 115, "border=0", "", false); $stores[$storeParams["ID"]]["IMAGE"] = $imgValue; $stores[$storeParams["ID"]]["IMAGE_URL"] = $arImage["SRC"]; } if (floatval($arStoreLocation["yandex_lat"]) <= 0) { $arStoreLocation["yandex_lat"] = $storeParams["GPS_N"]; } if (floatval($arStoreLocation["yandex_lon"]) <= 0) { $arStoreLocation["yandex_lon"] = $storeParams["GPS_S"]; } $arLocationTmp = array(); $arLocationTmp["ID"] = $storeParams["ID"]; if (strlen($storeParams["GPS_N"]) > 0) { $arLocationTmp["LAT"] = $storeParams["GPS_N"]; } if (strlen($storeParams["GPS_S"]) > 0) { $arLocationTmp["LON"] = $storeParams["GPS_S"]; } if (strlen($storeParams["TITLE"]) > 0) { $arLocationTmp["TEXT"] = $storeParams["TITLE"] . "\r\n" . $storeParams["DESCRIPTION"]; } $arStoreLocation["PLACEMARKS"][] = $arLocationTmp; } $this->arResult["LOCATION"] = serialize($arStoreLocation); $this->arResult["SHOW_IMAGES"] = isset($_REQUEST["showImages"]) && $_REQUEST["showImages"] == "Y"; $this->arResult["STORES"] = $stores; $this->includeComponentTemplate(); }
public function executeComponent() { global $APPLICATION; try { $this->checkToken(); \beGateway\Settings::$shopId = (int) \Bitrix\Main\Config\Option::get($this->module_id, "shop_id"); \beGateway\Settings::$shopKey = \Bitrix\Main\Config\Option::get($this->module_id, "shop_key"); \beGateway\Settings::$gatewayBase = "https://" . \Bitrix\Main\Config\Option::get($this->module_id, "domain_gateway"); \beGateway\Settings::$checkoutBase = "https://" . \Bitrix\Main\Config\Option::get($this->module_id, "domain_payment_page"); $query = new \beGateway\QueryByToken(); $query->setToken($this->arParams["TOKEN"]); $response = $query->submit()->getResponse(); if (!isset($response->checkout)) { throw new Exception(Loc::getMessage("DEVTM_BEGATEWAY_FAIL_TOKEN_QUERY")); } $response->checkout->order->amount = $this->floatAmount($response->checkout->order->amount); $this->arResult = $response->checkout; $this->IncludeComponentTemplate(); } catch (Exception $e) { ShowError($e->getMessage()); } }
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } $pageId = "user_files"; include "util_menu.php"; include "util_profile.php"; if ($arParams["FATAL_ERROR"] == "Y") { if (!empty($arParams["ERROR_MESSAGE"])) { ShowError($arParams["ERROR_MESSAGE"]); } else { ShowNote($arParams["NOTE_MESSAGE"], "notetext-simple"); } $this->__component->__menu_values = false; return false; } if ($arResult["VARIABLES"]["PAGE_NAME"] == "WEBDAV_TASK") { $GLOBALS["APPLICATION"]->AddChainItem(GetMessage("WD_TASK"), CComponentEngine::MakePathFromTemplate($arResult['~PATH_TO_GROUP_FILES_WEBDAV_TASK_LIST'], array())); } elseif ($arResult["VARIABLES"]["PAGE_NAME"] == "PATH_TO_GROUP_FILES_WEBDAV_BIZPROC_WORKFLOW_EDIT") { $GLOBALS["APPLICATION"]->AddChainItem(GetMessage("WD_BP"), CComponentEngine::MakePathFromTemplate($arResult['~PATH_TO_GROUP_FILES_WEBDAV_BIZPROC_WORKFLOW_ADMIN'], array())); } ?> <br class="sn-br" /> <?php if ($arParams["SHOW_WEBDAV"] == "Y") { $url_help = $arResult["~PATH_TO_USER_FILES_HELP"]; $url_base = str_replace(":443", "", rtrim($arResult["VARIABLES"]["BASE_URL"], '/')); $url_base = ($GLOBALS["APPLICATION"]->IsHTTPS() ? 'https' : 'http') . '://' . str_replace("//", "/", $_SERVER['HTTP_HOST'] . "/" . $url_base . "/"); include_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/components/bitrix/webdav/templates/.default/informer.php"; }
} else { //$currentSum += ($arItemsList["BASKET_PRICE"] - $arItemsList["BASKET_DISCOUNT_PRICE"]) * $arItemsList["BASKET_QUANTITY"]; $currentSum += $arItemsList["BASKET_PRICE"] * $arItemsList["BASKET_QUANTITY"]; } } while ($arItemsList = $dbItemsList->Fetch()); $arResult["ROWS"][] = array("NAME" => $currentBasketName, "QUANTITY" => $currentQuantity, "SUM" => $currentSum, "CURRENCY" => $affiliateCurrency, "SUM_FORMAT" => SaleFormatCurrency($currentSum, $affiliateCurrency)); $totalQuantity += $currentQuantity; $totalSum += $currentSum; $arResult["TOTAL"] = array("QUANTITY" => $totalQuantity, "SUM" => $totalSum, "CURRENCY" => $affiliateCurrency, "SUM_FORMAT" => SaleFormatCurrency($totalSum, $affiliateCurrency)); } $arResult["FILTER_ID"] = rand(0, 10000); } else { $arResult = false; } $this->IncludeComponentTemplate(); } else { LocalRedirect($arParams["REGISTER_PAGE"] . "?REDIRECT_PAGE=" . UrlEncode($APPLICATION->GetCurPage())); die; } } else { LocalRedirect($arParams["REGISTER_PAGE"] . "?REDIRECT_PAGE=" . UrlEncode($APPLICATION->GetCurPage())); die; } } else { ?> <b><?php echo ShowError(GetMessage("SPCAS1_NO_SHOP")); ?> </b> <?php }
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if (!CModule::IncludeModule("socialnetwork")) { ShowError(GetMessage("SONET_MODULE_NOT_INSTALL")); return; } if (!CModule::IncludeModule("bizproc")) { ShowError(GetMessage("SONET_MODULE_BIZPROC_NOT_INSTALL")); return; } if (strLen($arParams["TASK_VAR"]) <= 0) { $arParams["TASK_VAR"] = "task_id"; } if (strLen($arParams["PAGE_VAR"]) <= 0) { $arParams["PAGE_VAR"] = "page"; } $arParams["PATH_TO_BIZPROC_EDIT"] = trim($arParams["PATH_TO_BIZPROC_EDIT"]); if (strlen($arParams["PATH_TO_BIZPROC_EDIT"]) <= 0) { $arParams["PATH_TO_BIZPROC_EDIT"] = htmlspecialcharsbx($APPLICATION->GetCurPage() . "?" . $arParams["PAGE_VAR"] . "=bizproc_edit&" . $arParams["TASK_VAR"] . "=#task_id#"); } if (!$GLOBALS["USER"]->IsAuthorized()) { $arResult["NEED_AUTH"] = "Y"; } else { if ($arParams["SET_TITLE"] == "Y") { $APPLICATION->SetTitle(GetMessage("SONET_BIZPROC_TITLE")); } if ($arParams["SET_NAV_CHAIN"] != "N") { $APPLICATION->AddChainItem(GetMessage("SONET_BIZPROC_TITLE"));
protected function processActionSetResponsible() { $this->checkRequiredPostParams(array('iblockId')); if (!Loader::includeModule('bizproc')) { $this->errorCollection->add(array(new Error(Loc::getMessage('LISTS_SEAC_CONNECTION_MODULE_BIZPROC')))); } if ($this->errorCollection->hasErrors()) { $errorObject = array_shift($this->errorCollection->toArray()); ShowError($errorObject->getMessage()); return; } $this->iblockId = intval($this->request->getPost('iblockId')); if (!CIBlockRights::UserHasRightTo($this->iblockId, $this->iblockId, 'iblock_edit')) { ShowError(Loc::getMessage('LISTS_SEAC_ACCESS_DENIED')); return; } $documentType = BizprocDocument::generateDocumentComplexType(COption::GetOptionString("lists", "livefeed_iblock_type_id"), $this->iblockId); $templateObject = CBPWorkflowTemplateLoader::getTemplatesList(array('ID' => 'DESC'), array('DOCUMENT_TYPE' => $documentType, 'AUTO_EXECUTE' => CBPDocumentEventType::Create), false, false, array('ID')); $template = $templateObject->fetch(); if (empty($template)) { $this->errorCollection->add(array(new Error(Loc::getMessage('LISTS_SEAC_NOT_BIZPROC_TEMPLATE')))); } if ($this->errorCollection->hasErrors()) { $errorObject = array_shift($this->errorCollection->toArray()); ShowError($errorObject->getMessage()); return; } $this->getApplication()->includeComponent('bitrix:bizproc.workflow.setconstants', '', array('ID' => $template['ID'], 'POPUP' => 'Y')); }
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if (!is_array($arResult['USERS']) || !($USERS_CNT = count($arResult['USERS']))) { if ($arResult['EMPTY_UNFILTERED_LIST'] == 'Y') { ShowNote(GetMessage('ISL_TPL_NOTE_UNFILTERED')); } elseif ($arParams['SHOW_ERROR_ON_NULL'] == 'Y') { ShowError(GetMessage('ISL_TPL_NOTE_NULL')); } } else { if (!is_array($arParams['USER_PROPERTY']) || count($arParams['USER_PROPERTY']) <= 0) { $arParams['USER_PROPERTY'] = array('FULL_NAME', 'EMAIL', 'WORK_POSITION', 'WORK_PHONE'); } ?> <table class="bx-users-table data-table" style="border: 0px" width="100%"> <thead> <tr> <?php foreach ($arParams['USER_PROPERTY'] as $key) { ?> <td><?php echo $arResult['USER_PROP'][$key] ? $arResult['USER_PROP'][$key] : GetMessage('ISL_' . $key); ?> </td> <?php } ?> </tr> </thead>
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } //Authorized? if (!$USER->IsAuthorized()) { $APPLICATION->AuthForm(GetMessage("LEARNING_NO_AUTHORIZE")); } //Module if (!CModule::IncludeModule("learning")) { ShowError(GetMessage("LEARNING_MODULE_NOT_FOUND")); return; } //Params $arParams["TEST_DETAIL_TEMPLATE"] = strlen($arParams["TEST_DETAIL_TEMPLATE"]) > 0 ? htmlspecialcharsbx($arParams["TEST_DETAIL_TEMPLATE"]) : "course/test.php?TEST_ID=#TEST_ID#"; $arParams["COURSE_DETAIL_TEMPLATE"] = strlen($arParams["COURSE_DETAIL_TEMPLATE"]) > 0 ? htmlspecialcharsbx($arParams["COURSE_DETAIL_TEMPLATE"]) : "course/index.php?COURSE_ID=#COURSE_ID#"; if (strlen($arParams["TEST_ID_VARIABLE"]) <= 0 || !preg_match("#^[A-Za-z_][A-Za-z01-9_]*\$#", $arParams["TEST_ID_VARIABLE"])) { $arParams["TEST_ID_VARIABLE"] = "TEST_ID"; } //Set Title $arParams["SET_TITLE"] = $arParams["SET_TITLE"] == "N" ? "N" : "Y"; if ($arParams["SET_TITLE"] == "Y") { $APPLICATION->SetTitle(GetMessage("LEARNING_PROFILE_TITLE")); } $currentPage = GetPagePath(false, false); $queryString = htmlspecialcharsbx(DeleteParam(array($arParams["TEST_ID_VARIABLE"]))); $arResult = array("RECORDS" => array(), "ATTEMPTS" => array(), "CURRENT_PAGE" => $currentPage . ($queryString == "" ? "" : "?") . $queryString); //GradeBook $rsGradebook = CGradeBook::GetList(array("ID" => "DESC"), array("STUDENT_ID" => intval($USER->GetID()), "SITE_ID" => LANG, "TEST_ID" => array_key_exists($arParams["TEST_ID_VARIABLE"], $_REQUEST) ? intval($_REQUEST[$arParams["TEST_ID_VARIABLE"]]) : "")); // Collection of tests' ids
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if (!$this->__component->__parent || empty($this->__component->__parent->__name)) { $GLOBALS['APPLICATION']->SetAdditionalCSS('/bitrix/components/bitrix/forum/templates/.default/style.css'); $GLOBALS['APPLICATION']->SetAdditionalCSS('/bitrix/components/bitrix/forum/templates/.default/themes/blue/style.css'); $GLOBALS['APPLICATION']->SetAdditionalCSS('/bitrix/components/bitrix/forum/templates/.default/styles/additional.css'); } $path = str_replace(array("\\", "//"), "/", dirname(__FILE__) . "/interface.php"); include_once $path; // ***************************************************************************************** if (!empty($arResult["ERROR_MESSAGE"])) { ?> <div class="forum-note-box forum-note-error"> <div class="forum-note-box-text"><?php echo ShowError($arResult["ERROR_MESSAGE"], "forum-note-error"); ?> </div> </div> <?php } if (!empty($arResult["OK_MESSAGE"])) { ?> <div class="forum-note-box forum-note-success"> <div class="forum-note-box-text"><?php echo ShowNote($arResult["OK_MESSAGE"], "forum-note-success"); ?> </div> </div> <?php }