本文整理匯總了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>