当前位置: 首页>>代码示例>>PHP>>正文


PHP ShowError函数代码示例

本文整理汇总了PHP中ShowError函数的典型用法代码示例。如果您正苦于以下问题:PHP ShowError函数的具体用法?PHP ShowError怎么用?PHP ShowError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ShowError函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: executeComponent

 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();
     }
 }
开发者ID:Orendev,项目名称:bitrx.local,代码行数:29,代码来源:class.php

示例2: executeComponent

 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);
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:30,代码来源:class.php

示例3: payload

 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();
 }
开发者ID:Satariall,项目名称:izurit,代码行数:34,代码来源:soaprequest.php

示例4: checkModules

 /**
  * @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;
 }
开发者ID:Orendev,项目名称:bitrx.local,代码行数:12,代码来源:class.php

示例5: setOutputVars

 function setOutputVars($functionName)
 {
     if (!isset($this->typensVars[$functionName]["output"])) {
         ShowError("encodeValue() cant find output declaration.");
         exit;
     }
     $this->outputVars = $this->typensVars[$functionName]["output"];
 }
开发者ID:Satariall,项目名称:izurit,代码行数:8,代码来源:soapcodec.php

示例6: checkComponent

 /**
  * @return bool
  */
 public function checkComponent()
 {
     if (!Loader::includeModule('iblock')) {
         $this->AbortResultCache();
         ShowError(GetMessage('IBLOCK_MODULE_NOT_INSTALLED'));
         return false;
     }
     return true;
 }
开发者ID:Varfann,项目名称:bx-features,代码行数:12,代码来源:class.php

示例7: executeComponent

 /**
  * выполняет логику работы компонента
  */
 public function executeComponent()
 {
     try {
         $this->setSefDefaultParams();
         $this->getResult();
         $this->includeComponentTemplate($this->page);
     } catch (Exception $e) {
         ShowError($e->getMessage());
     }
 }
开发者ID:belukov,项目名称:bx-components,代码行数:13,代码来源:class.php

示例8: __ExtSaleWizardShowError

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;
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:10,代码来源:wizard.php

示例9: GetIdByCode

 /**
  * @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"];
 }
开发者ID:st7art22,项目名称:bitrix,代码行数:14,代码来源:ciblockwrapper.php

示例10: showError

 protected function showError()
 {
     $errors = array();
     foreach ($this->getErrors() as $error) {
         /** @var Error $error */
         $errors[] = $error->getMessage();
     }
     unset($error);
     ShowError(implode("", $errors));
     $this->end(false);
 }
开发者ID:rasuldev,项目名称:torino,代码行数:11,代码来源:class.php

示例11: get_result

 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);
     }
 }
开发者ID:jsuarez,项目名称:Lexer,代码行数:12,代码来源:data.class.php

示例12: processBeforeAction

 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;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:52,代码来源:class.php

示例13: serialize

 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})");
         }
     }
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:50,代码来源:class.dbEntityTag.inc.php

示例14: executeComponent

 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();
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:17,代码来源:class.php

示例15: executeComponent

 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();
 }
开发者ID:Satariall,项目名称:izurit,代码行数:17,代码来源:class.php


注:本文中的ShowError函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。