本文整理汇总了PHP中CPullOptions::GetExcludeSites方法的典型用法代码示例。如果您正苦于以下问题:PHP CPullOptions::GetExcludeSites方法的具体用法?PHP CPullOptions::GetExcludeSites怎么用?PHP CPullOptions::GetExcludeSites使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPullOptions
的用法示例。
在下文中一共展示了CPullOptions::GetExcludeSites方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CheckNeedRun
public static function CheckNeedRun($bGetSectionStatus = true)
{
$arExcludeSites = CPullOptions::GetExcludeSites();
if (isset($arExcludeSites[SITE_ID])) {
return false;
}
global $CACHE_MANAGER;
$bAdminSection = false;
if (defined("ADMIN_SECTION") && ADMIN_SECTION == true) {
$bAdminSection = true;
}
$arResult = array();
$res = $CACHE_MANAGER->Read(2592000, "pull_cnr");
if ($res) {
$arResult = $CACHE_MANAGER->Get("pull_cnr");
}
if (!$res) {
$arResult = array('ADMIN_SECTION' => false, 'PUBLIC_SECTION' => false);
$arModule = self::GetDependentModule();
foreach ($arModule as $moduleId => $options) {
if (isset($options['ADMIN_SECTION']) && $options['ADMIN_SECTION'] == 'Y') {
$arResult['ADMIN_SECTION'] = true;
}
if (isset($options['PUBLIC_SECTION']) && $options['PUBLIC_SECTION'] == 'Y') {
$arResult['PUBLIC_SECTION'] = true;
}
}
$CACHE_MANAGER->Set("pull_cnr", $arResult);
}
return $bGetSectionStatus ? $arResult[$bAdminSection ? 'ADMIN_SECTION' : 'PUBLIC_SECTION'] : $arResult;
}
示例2: Array
$arDependentModule = Array();
$ar = CPullOptions::GetDependentModule();
foreach ($ar as $key => $value)
$arDependentModule[] = $value['MODULE_ID'];
$dbSites = CSite::GetList(($b = ""), ($o = ""), Array("ACTIVE" => "Y"));
$arSites = array();
$aSubTabs = array();
while ($site = $dbSites->Fetch())
{
$site["ID"] = htmlspecialcharsbx($site["ID"]);
$site["NAME"] = htmlspecialcharsbx($site["NAME"]);
$arSites[$site["ID"]] = $site;
}
$arExcludeSites = CPullOptions::GetExcludeSites();
?>
<tr>
<td width="40%"><?=GetMessage("PULL_OPTIONS_STATUS")?>:</td>
<td width="60%">
<? if(CPullOptions::ModuleEnable()): ?>
<span style="color:green; font-weight: bold"><?=GetMessage("PULL_OPTIONS_STATUS_Y")?></span>
<? else: ?>
<span style="color:gray; font-weight: bold"><?=GetMessage("PULL_OPTIONS_STATUS_N")?></span>
<? endif; ?>
</td>
</tr>
<? if(CPullOptions::ModuleEnable()): ?>
<tr>
<td width="40%"><?=GetMessage("PULL_OPTIONS_USE")?>:</td>
<td width="60%"><?=implode(", ", $arDependentModule)?></td>