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


PHP CAdminNotify::DeleteByTag方法代码示例

本文整理汇总了PHP中CAdminNotify::DeleteByTag方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminNotify::DeleteByTag方法的具体用法?PHP CAdminNotify::DeleteByTag怎么用?PHP CAdminNotify::DeleteByTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CAdminNotify的用法示例。


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

示例1: SendCommand

	private static function SendCommand($channelId, $message, $method = 'POST', $timeout = 5, $dont_wait_answer = true)
	{
		if (!is_array($channelId))
			$channelId = Array($channelId);

		$channelId = implode('/', array_unique($channelId));

		if (strlen($channelId) <=0 || strlen($message) <= 0)
			return false;

		if (!in_array($method, Array('POST', 'GET')))
			return false;

		$nginx_error = COption::GetOptionString("pull", "nginx_error", "N");
		if ($nginx_error != "N")
		{
			$nginx_error = unserialize($nginx_error);
			if (intval($nginx_error['date'])+120 < time())
			{
				COption::SetOptionString("pull", "nginx_error", "N");
				CAdminNotify::DeleteByTag("PULL_ERROR_SEND");
				$nginx_error = "N";
			}
			else if ($nginx_error['count'] >= 10)
			{
				$ar = Array(
					"MESSAGE" => GetMessage('PULL_ERROR_SEND'),
					"TAG" => "PULL_ERROR_SEND",
					"MODULE_ID" => "pull",
				);
				CAdminNotify::Add($ar);
				return false;
			}
		}

		$postdata = CHTTP::PrepareData($message);

		$CHTTP = new CHTTP();
		$CHTTP->http_timeout = intval($timeout);
		$arUrl = $CHTTP->ParseURL(CPullOptions::GetPublishUrl($channelId), false);
		if ($CHTTP->Query($method, $arUrl['host'], $arUrl['port'], $arUrl['path_query'], $postdata, $arUrl['proto'], 'N', $dont_wait_answer))
		{
			$result = $dont_wait_answer? '{}': $CHTTP->result;
		}
		else
		{
			if ($nginx_error == "N")
			{
				$nginx_error = Array(
					'count' => 1,
					'date' => time(),
					'date_increment' => time(),
				);
			}
			else if (intval($nginx_error['date_increment'])+1 < time())
			{
				$nginx_error['count'] = intval($nginx_error['count'])+1;
				$nginx_error['date_increment'] = time();
			}
			COption::SetOptionString("pull", "nginx_error", serialize($nginx_error));
			$result = false;
		}

		return $result;
	}
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:65,代码来源:pull_channel.php

示例2: elseif

} elseif (IsModuleInstalled('intranet')) {
    $strError = GetMessage("MODULE_INTRANET_ERROR");
}
if ($strError != "") {
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
    echo CAdminMessage::ShowMessage(array("DETAILS" => $strError));
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
    die;
}
$aTabs = array(array("DIV" => "main", "TAB" => GetMessage("BCL_MAIN_TAB1"), "ICON" => "main_user_edit", "TITLE" => GetMessage("BCL_MAIN_TAB_TITLE")), array("DIV" => "dirs", "TAB" => GetMessage("BCL_FOLDERS_TAB"), "ICON" => "main_user_edit", "TITLE" => GetMessage("BCL_FOLDERS_TAB_TITLE")), array("DIV" => "sites", "TAB" => GetMessage("BCL_SITES_TAB"), "ICON" => "main_user_edit", "TITLE" => GetMessage("BCL_SITES_TAB_TITLE")), array("DIV" => "ext", "TAB" => GetMessage("BCL_EXTENDED_TAB"), "ICON" => "main_user_edit", "TITLE" => GetMessage("BCL_EXTENDED_TAB_TITLE")));
$tabControl = new CAdminTabControl("tabControl", $aTabs, true, true);
$bVarsFromForm = false;
$message = null;
if ($_SERVER["REQUEST_METHOD"] == "POST" && (isset($_POST["save"]) || isset($_POST["apply"]) || isset($_POST["bitrixcloud_siteb"])) && check_bitrix_sessid()) {
    if (isset($_POST["save"]) || isset($_POST["apply"])) {
        CAdminNotify::DeleteByTag("bitrixcloud_off");
        $server_name = trim($_POST["server_name"]);
        if ($server_name == "") {
            $message = new CAdminMessage(GetMessage("BCL_DOMAIN_ERROR"));
        } elseif (empty($_POST["site"])) {
            $message = new CAdminMessage(GetMessage("BCL_SITES_ERROR"));
        } else {
            $cdn_config = CBitrixCloudCDNConfig::getInstance()->loadFromOptions();
            if ($cdn_config->getDomain() !== $server_name) {
                CBitrixCloudCDN::domainChanged();
            }
            $cdn_config->setSites(array_keys($_POST["site"]));
            $cdn_config->setDomain($server_name);
            $cdn_config->setKernelRewrite($_POST["kernel_folder"] !== "n");
            $cdn_config->setContentRewrite($_POST["content_folders"] === "y");
            $cdn_config->saveToOptions();
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:bitrixcloud_cdn.php

示例3: setIsAlreadyConverted

 public function setIsAlreadyConverted()
 {
     CAdminNotify::DeleteByTag('webdav_convertor_14_0_2');
     COption::SetOptionString('webdav', '~isAlreadyConvertedDropped', 'Y');
     return $this;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:6,代码来源:webdav_convertor.php

示例4: updateConfig

 /**
  *
  * @return bool
  *
  */
 private static function updateConfig()
 {
     if (!self::$config->lock()) {
         return true;
     }
     $delayExpiration = true;
     try {
         try {
             self::$config = CBitrixCloudCDNConfig::getInstance()->loadRemoteXML();
             self::$config->saveToOptions();
             self::$config->unlock();
         } catch (CBitrixCloudException $e) {
             //In case of documented XML error we'll disable CDN
             if ($e->getErrorCode() !== "") {
                 self::SetActive(false);
                 $delayExpiration = false;
             }
             throw $e;
         }
     } catch (exception $e) {
         if ($delayExpiration) {
             self::$config->setExpired(time() + 1800);
         }
         CAdminNotify::Add(array("MESSAGE" => GetMessage("BCL_CDN_NOTIFY", array("#HREF#" => "/bitrix/admin/bitrixcloud_cdn.php?lang=" . LANGUAGE_ID)), "TAG" => "bitrixcloud_off", "MODULE_ID" => "bitrixcloud", "ENABLE_CLOSE" => "Y"));
         self::$config->unlock();
         return false;
     }
     self::$config->unlock();
     //Web service were disabled
     if (!self::$config->isActive()) {
         //By traffic quota
         if (self::$config->getQuota()->getTrafficSize() > self::$config->getQuota()->getAllowedSize()) {
             self::$config->setExpired(time() + 1800);
             CAdminNotify::Add(array("MESSAGE" => GetMessage("BCL_CDN_NOTIFY_QUOTA_LIMIT"), "TAG" => "bitrixcloud_off", "MODULE_ID" => "bitrixcloud", "ENABLE_CLOSE" => "N"));
             self::$config->unlock();
             return false;
         } elseif (self::$config->getQuota()->isExpired()) {
             self::$config->setExpired(time() + 1800);
             CAdminNotify::Add(array("MESSAGE" => GetMessage("BCL_CDN_NOTIFY_QUOTA_EXPIRED"), "TAG" => "bitrixcloud_off", "MODULE_ID" => "bitrixcloud", "ENABLE_CLOSE" => "N"));
             self::$config->unlock();
             return false;
         }
     }
     CAdminNotify::DeleteByTag("bitrixcloud_off");
     return true;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:51,代码来源:cdn.php

示例5: hideNotifier

 public static function hideNotifier()
 {
     \CAdminNotify::DeleteByTag(self::NOTIF_TAG);
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:4,代码来源:migration.php

示例6: GetMessage

		CloseWaitWindow();
	</script>
	<?php 
    if (is_int($processedAtLastStep)) {
        $processedSummary += $processedAtLastStep;
    }
    if ($processedAtLastStep === false) {
        CAdminMessage::ShowMessage(array('MESSAGE' => GetMessage('LEARNING_CONVERT_FAILED'), 'DETAILS' => GetMessage('LEARNING_PROCESSED_SUMMARY') . ' <b>' . $processedSummary . '</b>' . '<div id="learning_convert_finish"></div>', 'HTML' => true, 'TYPE' => 'ERROR'));
        ?>
		<script>
			StopConvert();
		</script>
		<?php 
    } elseif (CLearnInstall201203ConvertDB::_IsAlreadyConverted()) {
        CAdminMessage::ShowMessage(array('MESSAGE' => GetMessage('LEARNING_CONVERT_COMPLETE'), 'DETAILS' => GetMessage('LEARNING_PROCESSED_SUMMARY') . ' <b>' . $processedSummary . '</b>' . '<div id="learning_convert_finish"></div>', 'HTML' => true, 'TYPE' => 'OK'));
        CAdminNotify::DeleteByTag('learning_convert_11_5_0');
        ?>
		<script>
			EndConvert();
		</script>
		<?php 
    } else {
        CAdminMessage::ShowMessage(array('MESSAGE' => GetMessage('LEARNING_CONVERT_IN_PROGRESS'), 'DETAILS' => GetMessage('LEARNING_PROCESSED_SUMMARY') . ' <b>' . $processedSummary . '</b>', 'HTML' => true, 'TYPE' => 'OK'));
        ?>
		<script>
			DoNext(<?php 
        echo $processedSummary;
        ?>
);
		</script>
		<?php 
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:learning_convert.php

示例7: GetMessage

						CloseWaitWindow();
						StopConvert();
					}
				}
			);
		}

		return false;
	}
	</script>

	<?php 
    $max_messages = CIMConvert::ConvertCount();
    if ($max_messages <= 0) {
        CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("IM_CONVERT_COMPLETE"), "DETAILS" => GetMessage("IM_CONVERT_COMPLETE_ALL_OK"), "HTML" => true, "TYPE" => "OK"));
        CAdminNotify::DeleteByTag("IM_CONVERT");
    }
    ?>
	<div id="convert_result_div" style="margin:0px">
	</div>


	<form method="POST" action="<?php 
    echo $APPLICATION->GetCurPage();
    ?>
?lang=<?php 
    echo htmlspecialcharsbx(LANG);
    ?>
" name="fs1">
	<?php 
    $tabControl->Begin();
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:im_convert.php

示例8: ShowError

    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
    ShowError(Loc::getMessage('CAT_SETS_AVAILABLE_ERRORS_FATAL'));
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
    die;
}
if ($_SERVER['REQUEST_METHOD'] == 'GET' && check_bitrix_sessid() && (isset($_REQUEST['operation']) && (string) $_REQUEST['operation'] == 'Y')) {
    CUtil::JSPostUnescape();
    $params = array('sessID' => $_GET['ajaxSessionID'], 'maxExecutionTime' => $_GET['maxExecutionTime'], 'maxOperationCounter' => $_GET['maxOperationCounter'], 'counter' => $_GET['counter'], 'operationCounter' => $_GET['operationCounter'], 'lastID' => $_GET['lastID']);
    $setsAvailable = new CCatalogProductSetAvailable($params['sessID'], $params['maxExecutionTime'], $params['maxOperationCounter']);
    $setsAvailable->initStep($params['counter'], $params['operationCounter'], $params['lastID']);
    $setsAvailable->run();
    $result = $setsAvailable->saveStep();
    if ($result['finishOperation']) {
        $adminNotifyIterator = CAdminNotify::GetList(array(), array('MODULE_ID' => 'catalog', 'TAG' => 'CATALOG_SETS_AVAILABLE'));
        if ($adminNotify = $adminNotifyIterator->Fetch()) {
            CAdminNotify::DeleteByTag('CATALOG_SETS_AVAILABLE');
        }
    }
    echo CUtil::PhpToJSObject($result, false, true);
    die;
} else {
    $APPLICATION->SetTitle(Loc::getMessage('CAT_SETS_AVAILABLE_PAGE_TITLE'));
    $setsCounter = CCatalogProductSetAvailable::getAllCounter();
    $oneStepTime = CCatalogProductSetAvailable::getDefaultExecutionTime();
    require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_admin_after.php';
    $tabList = array(array('DIV' => 'setTab01', 'TAB' => Loc::getMessage('CAT_SETS_AVAILABLE_TAB'), 'ICON' => 'catalog', 'TITLE' => Loc::getMessage('CAT_SETS_AVAILABLE_TAB_TITLE')));
    $tabControl = new CAdminTabControl('sets_available', $tabList, true, true);
    $APPLICATION->AddHeadScript('/bitrix/js/catalog/step_operations.js');
    ?>
<div id="sets_result_div" style="margin:0; display: none;"></div>
	<div id="sets_error_div" style="margin:0; display: none;">
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:sets_available.php

示例9:

     }
     if (empty($error)) {
         $message = Loc::getMessage('SALE_CONVERTER_AJAX_STEP_UPDATE_BASKET');
         $type = 'PROCESS';
         // SITE_START
         COption::SetOptionString("main", "site_stopped", "N");
         $result['NEXT_STEP'] = ++$ajax_step;
     } else {
         $message = Loc::getMessage('SALE_CONVERTER_AJAX_STEP_UPDATE_REPORT');
         $result['ERROR'] = true;
         $type = 'ERROR';
         $message .= "<br>" . $error;
     }
     $result['DATA'] = $message;
     Bitrix\Main\Config\Option::set("main", "~sale_converted_15", 'Y');
     CAdminNotify::DeleteByTag('SALE_ORDER_MASTER_CONVERT');
     break;
 case 22:
     if ($DB->TableExists('b_sale_basket')) {
         if ($DB->type == 'MYSQL') {
             if (!$DB->Query('ALTER TABLE b_sale_basket CHANGE PRICE PRICE DECIMAL(18,4) not null', true)) {
                 $error .= $DB->GetErrorMessage();
             }
             if (!$DB->Query('ALTER TABLE b_sale_basket CHANGE DISCOUNT_PRICE DISCOUNT_PRICE DECIMAL(18,4) not null', true)) {
                 $error .= $DB->GetErrorMessage();
             }
             if (!$DB->Query('ALTER TABLE b_sale_basket CHANGE QUANTITY QUANTITY DECIMAL(18,4) not null', true)) {
                 $error .= $DB->GetErrorMessage();
             }
             if (!$DB->Query("SELECT BASE_PRICE FROM b_sale_basket WHERE 1=0", true)) {
                 if (!$DB->Query("ALTER TABLE b_sale_basket ADD BASE_PRICE decimal(18, 4) null")) {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:converter.php

示例10: SendCommand

 private static function SendCommand($channelId, $message, $options = array())
 {
     if (!is_array($channelId)) {
         $channelId = array($channelId);
     }
     $channelId = implode('/', array_unique($channelId));
     if (strlen($channelId) <= 0 || strlen($message) <= 0) {
         return false;
     }
     $defaultOptions = array("method" => "POST", "timeout" => 5, "dont_wait_answer" => true);
     $options = array_merge($defaultOptions, $options);
     if (!in_array($options["method"], array('POST', 'GET'))) {
         return false;
     }
     $nginx_error = COption::GetOptionString("pull", "nginx_error", "N");
     if ($nginx_error != "N") {
         $nginx_error = unserialize($nginx_error);
         if (intval($nginx_error['date']) + 120 < time()) {
             COption::SetOptionString("pull", "nginx_error", "N");
             CAdminNotify::DeleteByTag("PULL_ERROR_SEND");
             $nginx_error = "N";
         } else {
             if ($nginx_error['count'] >= 10) {
                 $ar = array("MESSAGE" => GetMessage('PULL_ERROR_SEND'), "TAG" => "PULL_ERROR_SEND", "MODULE_ID" => "pull");
                 CAdminNotify::Add($ar);
                 return false;
             }
         }
     }
     $postdata = CHTTP::PrepareData($message);
     $CHTTP = new CHTTP();
     $CHTTP->http_timeout = intval($options["timeout"]);
     if (isset($options["expiry"])) {
         $CHTTP->SetAdditionalHeaders(array("Message-Expiry" => intval($options["expiry"])));
     }
     $arUrl = $CHTTP->ParseURL(CPullOptions::GetPublishUrl($channelId), false);
     try {
         $sendResult = $CHTTP->Query($options["method"], $arUrl['host'], $arUrl['port'], $arUrl['path_query'], $postdata, $arUrl['proto'], 'N', $options["dont_wait_answer"]);
     } catch (Exception $e) {
         $sendResult = false;
     }
     if ($sendResult) {
         $result = $options["dont_wait_answer"] ? '{}' : $CHTTP->result;
     } else {
         if ($nginx_error == "N") {
             $nginx_error = array('count' => 1, 'date' => time(), 'date_increment' => time());
         } else {
             if (intval($nginx_error['date_increment']) + 1 < time()) {
                 $nginx_error['count'] = intval($nginx_error['count']) + 1;
                 $nginx_error['date_increment'] = time();
             }
         }
         COption::SetOptionString("pull", "nginx_error", serialize($nginx_error));
         $result = false;
     }
     return $result;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:57,代码来源:pull_channel.php

示例11: _RemoveConvertDbNotify

 protected static function _RemoveConvertDbNotify()
 {
     CAdminNotify::DeleteByTag('learning_convert_11_5_0');
 }
开发者ID:Satariall,项目名称:izurit,代码行数:4,代码来源:index.php

示例12: deleteInformer

 public static function deleteInformer($informerTag)
 {
     if ((string) $informerTag == '') {
         return;
     }
     $rsAdminNotify = \CAdminNotify::GetList(array(), array('MODULE_ID' => 'sale', 'TAG' => $informerTag));
     if ($arAdminNotify = $rsAdminNotify->Fetch()) {
         \CAdminNotify::DeleteByTag($informerTag);
     }
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:10,代码来源:locationhelper.php

示例13: IncludeModuleLangFile

<?php

require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/bitrix.eshop/include.php";
IncludeModuleLangFile(__FILE__);
$arThemes = array("_blue", "_green", "_yellow", "_gray", "_wood", "_red");
foreach ($arThemes as $theme) {
    if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/bitrix/templates/eshop" . $theme . "/")) {
        CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . "/bitrix/templates/eshop" . $theme . "/components/bitrix/catalog/.default/", $_SERVER['DOCUMENT_ROOT'] . "/bitrix/templates/eshop" . $theme . "/components/bitrix/catalog/.default_old/", $rewrite = true, $recursive = true, $delete_after_copy = true);
    }
}
CAdminNotify::DeleteByTag("ESHOP_RENAME");
$APPLICATION->SetTitle(GetMessage("ESHOP_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
?>

<?php 
echo GetMessage("ESHOP_RENAME_SUCCESS");
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
开发者ID:webgksupport,项目名称:alpina,代码行数:19,代码来源:eshop_templates_rename.php

示例14: ShowError

		}

		return false;
	}
	</script><?php 
    $strChangeFormat = COption::GetOptionString('catalog', 'discount_format', 'N');
    $intCountFormat = CCatalogDiscountConvert::GetCountFormat();
    if (false === $intCountFormat) {
        ShowError(GetMessage('CAT_DISC_FATAL_ERR'));
        require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
        die;
    }
    $intCountFormat = intval($intCountFormat);
    if ('Y' == $strChangeFormat || 0 >= $intCountFormat) {
        CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("CAT_DISC_CONVERT_COMPLETE"), "DETAILS" => GetMessage("ICAT_DISC_CONVERT_COMPLETE_ALL_OK"), "HTML" => true, "TYPE" => "OK"));
        CAdminNotify::DeleteByTag("CATALOG_DISC_FORMAT");
        COption::SetOptionString('catalog', 'discount_format', 'Y');
    }
    ?>
<div id="convert_result_div" style="margin:0;"></div>
	<form method="POST" action="<?php 
    echo $APPLICATION->GetCurPage();
    ?>
" name="fs1"><?php 
    $tabControl->Begin();
    $tabControl->BeginNextTab();
    $max_execution_time = intval(COption::GetOptionString("catalog", "max_execution_time", 10));
    if ($max_execution_time <= 0) {
        $max_execution_time = '';
    }
    ?>
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:cat_discount_format.php

示例15: GetMessage

					if(BX('cat_disc_convert_finish') != null)
					{
						BX.closeWait();
						StopConvert();
					}
				}
			);
		}

		return false;
	}
	</script><?php 
    $intCountOld = CSaleDiscountConvert::GetCountOld();
    if (0 >= $intCountOld) {
        CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("SALE_DISC_CONVERT_COMPLETE"), "DETAILS" => GetMessage("SALE_DISC_CONVERT_COMPLETE_ALL_OK"), "HTML" => true, "TYPE" => "OK"));
        CAdminNotify::DeleteByTag("SALE_DISC_CONVERT");
    } elseif (1 < $intCountOld) {
        CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("SALE_DISC_CONVERT_DISABLE"), "DETAILS" => GetMessage("SALE_DISC_CONVERT_DISABLE_ALL"), "HTML" => true, "TYPE" => "OK"));
    }
    ?>
<div id="convert_result_div" style="margin:0;"></div>
	<form method="POST" action="<?php 
    echo $APPLICATION->GetCurPage();
    ?>
" name="fs1"><?php 
    $tabControl->Begin();
    $tabControl->BeginNextTab();
    $max_execution_time = intval(COption::GetOptionString("sale", "max_execution_time", 10));
    if ($max_execution_time <= 0) {
        $max_execution_time = '';
    }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:discount_convert.php


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