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


PHP CAdminNotify类代码示例

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


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

示例1: InstallDB

 function InstallDB($install_wizard = true)
 {
     global $DB, $DBType, $APPLICATION;
     $errors = null;
     if (!$DB->Query("SELECT 'x' FROM b_disk_storage", true)) {
         $errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/install/db/" . $DBType . "/install.sql");
     }
     $this->InstallTasks();
     if (!empty($errors)) {
         $APPLICATION->ThrowException(implode("", $errors));
         return false;
     }
     $isWebdavInstalled = isModuleInstalled('webdav');
     $this->RegisterModuleDependences(!$isWebdavInstalled);
     RegisterModule("disk");
     $this->InstallUserFields();
     /** @noinspection PhpDynamicAsStaticMethodCallInspection */
     CAgent::addAgent('\\Bitrix\\Disk\\ExternalLink::removeExpiredWithTypeAuto();', 'disk', 'N');
     /** @noinspection PhpDynamicAsStaticMethodCallInspection */
     CAgent::addAgent('\\Bitrix\\Disk\\Bitrix24Disk\\UploadFileManager::removeIrrelevant();', 'disk', 'N');
     if (!$isWebdavInstalled) {
         require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/lib/configuration.php";
         \Bitrix\Main\Config\Option::set('disk', 'successfully_converted', 'Y');
         \Bitrix\Main\Config\Option::set('disk', 'disk_revision_api', \Bitrix\Disk\Configuration::REVISION_API);
     } else {
         \CAdminNotify::add(array("MESSAGE" => Loc::getMessage("DISK_NOTIFY_MIGRATE_WEBDAV", array("#LINK#" => "/bitrix/admin/disk_from_webdav_convertor.php?lang=" . \Bitrix\Main\Application::getInstance()->getContext()->getLanguage())), "TAG" => "disk_migrate_from_webdav", "MODULE_ID" => "disk", "ENABLE_CLOSE" => "N"));
     }
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:29,代码来源:index.php

示例2: DoInstall

 public function DoInstall()
 {
     if (IsModuleInstalled('sale')) {
         global $APPLICATION;
         $this->InstallFiles();
         RegisterModule($this->MODULE_ID);
         return true;
     }
     $MODULE_ID = $this->MODULE_ID;
     $TAG = 'VWS';
     $MESSAGE = GetMessage('LP_ERR_MODULE_NOT_FOUND', array('#MODULE#' => 'sale'));
     $intID = CAdminNotify::Add(compact('MODULE_ID', 'TAG', 'MESSAGE'));
     return false;
 }
开发者ID:norayrx,项目名称:plugin-bitrix,代码行数:14,代码来源:index.php

示例3: hideNotifier

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

示例4: define

<?php

define("NO_KEEP_STATISTIC", true);
define("NO_AGENT_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS", true);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
if ($USER->IsAdmin() && isset($_POST["ID"]) && check_bitrix_sessid()) {
    CAdminNotify::Delete(intval($_POST["ID"]));
}
echo "OK";
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_admin_after.php";
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:11,代码来源:admin_notify.php

示例5: GetPanelHtml


//.........这里部分代码省略.........
                $last_btn_small_cnt = 0;
            }
            if ($bHasAction && substr(strtolower($arButton['HREF']), 0, 11) == 'javascript:') {
                $arButton['ONCLICK'] = substr($arButton['HREF'], 11);
                $arButton['HREF'] = 'javascript:void(0)';
            }
            if ($arButton['HINT']) {
                if (isset($arButton['HINT']['ID']) && $arButton['HINT']['ID']) {
                    $hintOptions = CUtil::GetPopupOptions($arButton['HINT']['ID']);
                    if ($hintOptions['display'] == 'off') {
                        unset($arButton['HINT']);
                    }
                }
                if ($arButton['HINT']) {
                    unset($arButton['ALT']);
                }
                if ($bHasMenu && (!isset($arButton['HINT_MENU']) || !$arButton['HINT_MENU'])) {
                    $arButton['HINT']['TARGET'] = 'parent';
                }
            }
            $title = isset($arButton['ALT']) ? htmlspecialcharsbx($arButton['ALT']) : '';
            $onClick = isset($arButton['ONCLICK']) ? htmlspecialcharsbx($arButton['ONCLICK']) : '';
            $onClickJs = isset($arButton['ONCLICK']) ? CUtil::JSEscape($arButton['ONCLICK']) : '';
            $hintMenu = isset($arButton['HINT_MENU']) ? CUtil::PhpToJsObject($arButton['HINT_MENU']) : '';
            switch ($arButton['TYPE']) {
                case 'SMALL':
                    if ($last_btn_small_cnt >= 3 && $main_sort == $arButton["MAIN_SORT"]) {
                        $result .= '</span><span class="bx-panel-button-group" data-group-id="' . ++$groupId . '">';
                        $last_btn_small_cnt = 0;
                    } elseif ($last_btn_small_cnt > 0) {
                        $result .= '<span class="bx-panel-break"></span>';
                    }
                    $result .= '<span class="bx-panel-small-button"><span class="bx-panel-small-button-inner">';
                    $button_icon = '<span class="bx-panel-small-button-icon' . ($arButton['ICON'] ? ' ' . $arButton['ICON'] : '') . '"' . (isset($arButton['SRC']) && $arButton['SRC'] ? ' style="background: scroll transparent url(' . htmlspecialcharsbx($arButton['SRC']) . ') no-repeat center center !important;"' : '') . '></span>';
                    $button_text = '<span class="bx-panel-small-button-text">' . htmlspecialcharsbx($arButton['TEXT']) . '</span>';
                    $button_text_js = CUtil::JSEscape($arButton['TEXT']);
                    if ($bHasAction) {
                        $result .= '<a href="' . htmlspecialcharsbx($arButton['HREF']) . '" onclick="' . $onClick . ';BX.removeClass(this.parentNode.parentNode, \'bx-panel-small-button' . ($bHasMenu ? '-text' : '') . '-active\')" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . $hkInstance->GetTitle("bx_topmenu_btn_" . $key) . '"' : '"' . $hkInstance->GetTitle("bx_topmenu_btn_" . $key) . '"') . '>' . $button_icon . $button_text . '</a>';
                        $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'SMALL\', ACTIVE_CSS: \'bx-panel-small-button' . ($bHasMenu ? '-text' : '') . '-active\', HOVER_CSS: \'bx-panel-small-button' . ($bHasMenu ? '-text' : '') . '-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', SKIP : ' . ($bHasMenu ? "true" : "false") . ', LINK: "' . CUtil::JSEscape($arButton['HREF']) . '", ACTION : "' . $onClickJs . '",TEXT :  "' . $button_text_js . '" })</script>';
                        if ($bHasMenu) {
                            $result .= '<a href="javascript:void(0)" class="bx-panel-small-button-arrow" id="bx_topmenu_btn_' . $key . '_menu"><span class="bx-panel-small-button-arrow"></span></a>';
                            $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '_menu\', TYPE: \'SMALL\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-small-button-arrow-active\', HOVER_CSS: \'bx-panel-small-button-arrow-hover\'' . ($hintMenu ? ', HINT: ' . $hintMenu : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"})</script>';
                        }
                    } elseif ($bHasMenu) {
                        $result .= '<a href="javascript:void(0)" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . '"' : '') . '>' . $button_icon . $button_text . '<span class="bx-panel-small-single-button-arrow"></span></a>';
                        $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'SMALL\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-small-button-active\', HOVER_CSS: \'bx-panel-small-button-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"})</script>';
                    }
                    $result .= '</span></span>';
                    $last_btn_small_cnt++;
                    break;
                case 'BIG':
                    $last_btn_small_cnt = 0;
                    $result .= '<span class="bx-panel-button"><span class="bx-panel-button-inner">';
                    $button_icon = '<span class="bx-panel-button-icon' . ($arButton['ICON'] ? ' ' . $arButton['ICON'] : '') . '"' . (isset($arButton['SRC']) && $arButton['SRC'] ? ' style="background: scroll transparent url(' . htmlspecialcharsbx($arButton['SRC']) . ') no-repeat center center !important;"' : '') . '></span>';
                    $button_text_js = CUtil::JSEscape(str_replace('#BR#', ' ', $arButton['TEXT']));
                    if ($bHasAction && $bHasMenu) {
                        $button_text = '<span class="bx-panel-button-text">' . str_replace('#BR#', '<span class="bx-panel-break"></span>', $arButton['TEXT']) . '&nbsp;<span class="bx-panel-button-arrow"></span></span>';
                        $result .= '<a href="' . htmlspecialcharsbx($arButton['HREF']) . '" onclick="' . $onClick . ';BX.removeClass(this.parentNode.parentNode, \'bx-panel-button-icon-active\');" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . '"' : '') . '>' . $button_icon . '</a><a id="bx_topmenu_btn_' . $key . '_menu" href="javascript:void(0)">' . $button_text . '</a>';
                        $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'BIG\', ACTIVE_CSS: \'bx-panel-button-icon-active\', HOVER_CSS: \'bx-panel-button-icon-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', SKIP : true }); BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '_menu\', TYPE: \'BIG\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-button-text-active\', HOVER_CSS: \'bx-panel-button-text-hover\'' . ($hintMenu ? ', HINT: ' . $hintMenu : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"})</script>';
                    } else {
                        if ($bHasAction) {
                            $button_text = '<span class="bx-panel-button-text">' . str_replace('#BR#', '<span class="bx-panel-break"></span>', $arButton['TEXT']) . '</span>';
                            $result .= '<a href="' . htmlspecialcharsbx($arButton['HREF']) . '" onclick="' . $onClick . ';BX.removeClass(this.parentNode.parentNode, \'bx-panel-button-active\');" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . '"' : '') . '>' . $button_icon . $button_text . '</a>';
                            $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'BIG\', ACTIVE_CSS: \'bx-panel-button-active\', HOVER_CSS: \'bx-panel-button-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', LINK: "' . CUtil::JSEscape($arButton['HREF']) . '", ACTION : "' . $onClickJs . '", TEXT :  "' . $button_text_js . '"});</script>';
                        } else {
                            $button_text = '<span class="bx-panel-button-text">' . str_replace('#BR#', '<span class="bx-panel-break"></span>', $arButton['TEXT']) . '&nbsp;<span class="bx-panel-button-arrow"></span></span>';
                            $result .= '<a href="javascript:void(0)" id="bx_topmenu_btn_' . $key . '_menu">' . $button_icon . $button_text . '</a>';
                            $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '_menu\', TYPE: \'BIG\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-button-active\', HOVER_CSS: \'bx-panel-button-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"});</script>';
                        }
                    }
                    $result .= '</span></span>';
                    break;
            }
            $main_sort = $arButton["MAIN_SORT"];
            $last_btn_type = $arButton['TYPE'];
        }
        $result .= '</span>';
        $result .= '</div>
			</div>
		</div>';
        if ($USER->IsAdmin()) {
            $result .= CAdminNotify::GetHtml();
        }
        $result .= '
	</div>
	';
        $result .= '<script type="text/javascript">
		BX.admin.panel.state = {
			fixed: ' . ($aUserOpt["fix"] == "on" ? 'true' : 'false') . ',
			collapsed: ' . ($aUserOpt["collapsed"] == "on" ? 'true' : 'false') . '
		}
		BX.admin.moreButton.init({ buttonTitle : "' . GetMessageJS("top_panel_more_button_title") . '"});
		</script>';
        //start menu preload
        // if($aUserOptGlobal["start_menu_preload"] == 'Y')
        // 	$result .= '<script type="text/javascript">BX.ready(function(){jsStartMenu.PreloadMenu(\''.CUtil::JSEscape($href.($params<>""? "?".$params:"")).'\');});</script>';
        //show script to play sound
        $result .= $adminPage->ShowSound();
        return $result;
    }
开发者ID:ASDAFF,项目名称:open_bx,代码行数:101,代码来源:top_panel.php

示例6: checkAdminNotification

 /**
  * Adds admin users notification about index rebuild.
  *
  * @param boolean $force Whenever skip iblock check.
  *
  * @return void
  */
 public static function checkAdminNotification($force = false)
 {
     if ($force) {
         $add = true;
     } else {
         $iblockList = \Bitrix\Iblock\IblockTable::getList(array('select' => array('ID'), 'filter' => array('=PROPERTY_INDEX' => 'I')));
         $add = $iblockList->fetch() ? true : false;
     }
     if ($add) {
         $notifyList = \CAdminNotify::getList(array(), array("TAG" => "iblock_property_reindex"));
         if (!$notifyList->fetch()) {
             \CAdminNotify::add(array("MESSAGE" => Loc::getMessage("IBLOCK_NOTIFY_PROPERTY_REINDEX", array("#LINK#" => "/bitrix/admin/iblock_reindex.php?lang=" . \Bitrix\Main\Application::getInstance()->getContext()->getLanguage())), "TAG" => "iblock_property_reindex", "MODULE_ID" => "iblock", "ENABLE_CLOSE" => "Y", "PUBLIC_SECTION" => "N"));
         }
     } else {
         \CAdminNotify::deleteByTag("iblock_property_reindex");
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:24,代码来源:manager.php

示例7: UnInstallDB

 function UnInstallDB($arParams = array())
 {
     global $APPLICATION, $DB, $errors;
     $this->errors = false;
     if (!$arParams['savedata']) {
         $this->errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . "/bitrix/modules/im/install/db/" . strtolower($DB->type) . "/uninstall.sql");
     }
     if (is_array($this->errors)) {
         $arSQLErrors = $this->errors;
     }
     if (!empty($arSQLErrors)) {
         $this->errors = $arSQLErrors;
         $APPLICATION->ThrowException(implode("", $arSQLErrors));
         return false;
     }
     CAdminNotify::DeleteByTag("IM_CONVERT");
     CAgent::RemoveAgent("CIMMail::MailNotifyAgent();", "im");
     CAgent::RemoveAgent("CIMMail::MailMessageAgent();", "im");
     CAgent::RemoveAgent("CIMDisk::RemoveTmpFileAgent();", "im");
     UnRegisterModuleDependences("im", "OnGetNotifySchema", "im", "CIMNotifySchema", "OnGetNotifySchema");
     UnRegisterModuleDependences("perfmon", "OnGetTableSchema", "im", "CIMTableSchema", "OnGetTableSchema");
     UnRegisterModuleDependences('main', 'OnAddRatingVote', 'im', 'CIMEvent', 'OnAddRatingVote');
     UnRegisterModuleDependences('main', 'OnUserDelete', 'im', 'CIMEvent', 'OnUserDelete');
     UnRegisterModuleDependences('main', 'OnCancelRatingVote', 'im', 'CIMEvent', 'OnCancelRatingVote');
     UnRegisterModuleDependences('main', 'OnAfterUserUpdate', 'im', 'CIMEvent', 'OnAfterUserUpdate');
     UnRegisterModuleDependences("pull", "OnGetDependentModule", "im", "CIMEvent", "OnGetDependentModule");
     UnRegisterModuleDependences("main", "OnProlog", "main", "", "", "/modules/im/ajax_hit.php");
     UnRegisterModuleDependences("main", "OnApplicationsBuildList", "im", "DesktopApplication", "OnApplicationsBuildList");
     UnRegisterModuleDependences('rest', 'OnRestServiceBuildDescription', 'im', 'CIMRestService', 'OnRestServiceBuildDescription');
     UnRegisterModule("im");
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:32,代码来源:index.php

示例8: 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

示例9: 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

示例10: GetMessage

<?php 
    $tabControl->End();
    ?>
</form>
<h2><?php 
    echo GetMessage("SALE_SYSTEM_PROCEDURES");
    ?>
</h2>
	<?php 
    $showbasketDiscountConvert = (string) Main\Config\Option::get('sale', 'basket_discount_converted') != 'Y' && Main\ModuleManager::isModuleInstalled('catalog');
    if ($showbasketDiscountConvert) {
        if (CSaleBasketDiscountConvert::getAllCounter() == 0) {
            $adminNotifyIterator = CAdminNotify::GetList(array(), array('MODULE_ID' => 'sale', 'TAG' => 'BASKET_DISCOUNT_CONVERTED'));
            if ($adminNotifyIterator) {
                if ($adminNotify = $adminNotifyIterator->Fetch()) {
                    CAdminNotify::Delete($adminNotify['ID']);
                }
                unset($adminNotify);
            }
            unset($adminNotifyIterator);
            $showbasketDiscountConvert = false;
        }
    }
    $systemTabs[] = array('DIV' => 'saleSysTabReindex', 'TAB' => GetMessage('SALE_SYSTEM_TAB_REINDEX'), 'ICON' => 'sale_settings', 'TITLE' => GetMessage('SALE_SYSTEM_TAB_REINDEX_TITLE'));
    if ($showbasketDiscountConvert) {
        $systemTabs[] = array('DIV' => 'saleSysTabConvert', 'TAB' => GetMessage('SALE_SYSTEM_TAB_CONVERT'), 'ICON' => 'sale_settings', 'TITLE' => GetMessage('SALE_SYSTEM_TAB_CONVERT_TITLE'));
    }
    $systemTabControl = new CAdminTabControl('saleSysTabControl', $systemTabs, true, true);
    $systemTabControl->Begin();
    $systemTabControl->BeginNextTab();
    ?>
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:options.php

示例11: showAlarmMessage

 static function showAlarmMessage()
 {
     $tag = "PAY_SYSTEM_ACTION_ALARM";
     $dbRes = CAdminNotify::GetList(array(), array("TAG" => $tag));
     if ($res = $dbRes->Fetch()) {
         return false;
     }
     return CAdminNotify::Add(array("MESSAGE" => GetMessage("SKGPSA_ALARM_MESSAGE", array("#LANGUAGE_ID#" => LANGUAGE_ID)), "TAG" => $tag, "MODULE_ID" => "SALE", "ENABLE_CLOSE" => "Y", "TYPE" => CAdminNotify::TYPE_ERROR));
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:9,代码来源:pay_system_action.php

示例12: array

					$arFields = array(
						"MESSAGE" => str_replace("#LINK#", '/bitrix/admin/cat_discount_convert.php', $arMess['BT_MOD_CAT_DSC_CONV_INVITE'][$strDefLang]),
						"TAG" => "CATALOG_DISC_CONVERT",
						"MODULE_ID" => "catalog",
						"ENABLE_CLOSE" => "N"
					);
					$arLangMess = array();
					foreach ($arMess['BT_MOD_CAT_DSC_CONV_INVITE'] as $strLangID => $strMess)
					{
						if (empty($strMess))
							continue;
						$arLangMess[$strLangID] = str_replace("#LINK#", '/bitrix/admin/cat_discount_convert.php', $strMess);
					}
					if (!empty($arLangMess))
						$arFields['LANG'] = $arLangMess;
					CAdminNotify::Add($arFields);
				}
			}
		}
	}
}

if ($bVarsFromForm)
{
	if ($boolCondParseError)
	{
		$mxTempo = $arDiscount['CONDITIONS'];
		$arDiscount = $arFields;
		$arDiscount['CONDITIONS'] = $mxTempo;
		unset($mxTempo);
	}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:cat_discount_edit.php

示例13: foreach

    foreach ($propertyValues as $propertyValue) {
        $variantIdId = $list[$propertyValue['value']];
        $valuesToElements[$propertyValue['id_element']][] = $variantIdId;
    }
    foreach ($valuesToElements as $elementId => $elementValues) {
        $iblockElement->SetPropertyValuesEx($elementId, $idIBlock, array($idProperty => $elementValues));
    }
    return true;
};
if ($_POST['apply'] == 'Применить') {
    $iblockID = intval($_POST['selectIblocks']);
    $propertyID = intval($_POST['selectProperties']);
    $newTypeIBlock = $_POST['new-type-property-info-block'];
    $conversionResult = $conversionProperty($propertyID, $iblockID, $newTypeIBlock);
    $conversionResult && CAdminNotify::Add(array('MESSAGE' => 'Конвертация прошла успешно', 'TAG' => 'save_property_notify', 'MODULE_ID' => 'ws.tools', 'ENABLE_CLOSE' => 'Y'));
    !$conversionResult && CAdminNotify::Error(array('MESSAGE' => 'Конвертация не прошла успешно', 'TAG' => 'save_property_notify_error', 'MODULE_ID' => 'ws.tools', 'ENABLE_CLOSE' => 'Y'));
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$jsParams = array();
$types = array();
$rsTypes = \Bitrix\Iblock\TypeLanguageTable::getList(array('filter' => array('LANGUAGE_ID' => LANG)));
while ($type = $rsTypes->fetch()) {
    $types[$type['IBLOCK_TYPE_ID']] = $type['NAME'];
}
$jsParams['types'] = array('name' => 'selectTypes', 'list' => $types);
$iblocks = array();
$rsIblocks = \Bitrix\Iblock\IblockTable::getList();
while ($iblock = $rsIblocks->fetch()) {
    $iblocks[$iblock['ID']] = array('name' => $iblock['NAME'], 'type' => $iblock['IBLOCK_TYPE_ID']);
}
$jsParams['iblocks'] = array('name' => 'selectIblocks', 'list' => $iblocks);
开发者ID:Under5,项目名称:bitrix-module-tools,代码行数:31,代码来源:conversion.php

示例14: 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

示例15: 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


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