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


PHP PClearComponentCacheEx函数代码示例

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


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

示例1: elseif

';
				</script><?php 
            }
        }
    } elseif ($photo_list_action == 'delete' && $arParams["PERMISSION"] >= "U") {
        CUtil::JSPostUnEscape();
        CModule::IncludeModule("iblock");
        @set_time_limit(0);
        $APPLICATION->ResetException();
        $res = CIBlockElement::Delete($arParams["ELEMENT_ID"]);
        if ($res) {
            $arEventFields = array("ID" => $arParams["ELEMENT_ID"], "IBLOCK_ID" => $arParams["IBLOCK_ID"], "SECTION_ID" => $arParams["SECTION_ID"]);
            foreach (GetModuleEvents("photogallery", "OnAfterPhotoDrop", true) as $arEvent) {
                ExecuteModuleEventEx($arEvent, array($arEventFields, $arParams));
            }
            PClearComponentCacheEx($arParams["IBLOCK_ID"], array(0, $arParams["SECTION_ID"]));
        } else {
            ?>
			<script>
				window.bxph_error = '<?php 
            echo GetMessage("DEL_ITEM_ERROR") . ($ex = $APPLICATION->GetException() ? ': ' . $ex->GetString() : '');
            ?>
';
			</script>
			<?php 
        }
    } elseif ($photo_list_action == 'edit' && $arParams["PERMISSION"] >= "U") {
        CUtil::JSPostUnEscape();
        CModule::IncludeModule("iblock");
        if (intVal($_REQUEST["SECTION_ID"]) > 0) {
            $arParams["SECTION_ID"] = intVal($_REQUEST["SECTION_ID"]);
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:action.php

示例2: array

                    $arResult["URL"] = CComponentEngine::MakePathFromTemplate($arParams["GALLERIES_URL"], array("USER_ID" => $arParams["USER_ID"]));
                } else {
                    $arResult["URL"] = CComponentEngine::MakePathFromTemplate($arParams["GALLERY_URL"], array("USER_ALIAS" => $_REQUEST["CODE"]));
                }
            }
        }
    }
    if (!empty($arError)) {
        $arResult["ERROR_MESSAGE"] = PhotoShowError($arError);
        $arResult["FORM"]["ID"] = $_REQUEST["ID"];
        $arResult["FORM"]["CODE"] = $_REQUEST["CODE"];
        $arResult["FORM"]["NAME"] = $_REQUEST["NAME"];
        $arResult["FORM"]["DESCRIPTION"] = $_REQUEST["DESCRIPTION"];
        $arResult["FORM"]["UF_DEFAULT"] = $_REQUEST["ACTIVE"];
    } else {
        PClearComponentCacheEx($arParams["IBLOCK_ID"], array($ID > 0 ? $ID : 0), array($_REQUEST["CODE"]), array($arResult["GALLERY"]["CREATED_BY"]));
        if (!empty($_REQUEST["back_url"])) {
            LocalRedirect($_REQUEST["back_url"]);
        } else {
            LocalRedirect($arResult["URL"]);
        }
    }
} elseif ($_SERVER['REQUEST_METHOD'] == "POST") {
    if (!empty($_REQUEST["back_url"])) {
        LocalRedirect($_REQUEST["back_url"]);
    }
    if ($arParams["ABS_PERMISSION"] >= "W" || count($arResult["GALLERIES"]) > 1) {
        $url = CComponentEngine::MakePathFromTemplate($arParams["GALLERIES_URL"], array("USER_ID" => $arParams["USER_ID"]));
    } elseif (!empty($arResult["GALLERY"]["CODE"])) {
        $url = CComponentEngine::MakePathFromTemplate($arParams["GALLERY_URL"], array("USER_ALIAS" => $arResult["GALLERY"]["CODE"]));
    } else {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例3: onAfterUpload

 function onAfterUpload($data, $post, $files)
 {
     $arParams = $this->arParams;
     $arResult = $this->arResult;
     $sectionsIds = array(0, $arParams['SECTION_ID']);
     $arGalleriesIds = array(0);
     $arUsers = array();
     if ($arResult['SECTION'] && $arResult['SECTION']['IBLOCK_SECTION_ID']) {
         $sectionsIds[] = $arResult['SECTION']['IBLOCK_SECTION_ID'];
     }
     if ($arParams["BEHAVIOUR"] == "USER") {
         $sectionsIds[] = $arResult["GALLERY"]["ID"];
     }
     if (isset($arResult["GALLERY"]["CODE"])) {
         $arGalleriesIds[] = $arResult["GALLERY"]["CODE"];
         if ($arResult["GALLERY"]["CREATED_BY"]) {
             $arUsers[] = $arResult["GALLERY"]["CREATED_BY"];
         }
     }
     PClearComponentCacheEx($arParams["IBLOCK_ID"], $sectionsIds, $arGalleriesIds, $arUsers);
     return true;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:22,代码来源:functions.php

示例4: CIBlockSection

            $bs = new CIBlockSection();
            if ($bs->CheckFields($arFields)) {
                if (!empty($arFiles)) {
                    $arFields["DETAIL_PICTURE"] = $arFiles["DETAIL_PICTURE"];
                }
                $GLOBALS["UF_DEFAULT"] = $arFields["UF_DEFAULT"];
                $GLOBALS["USER_FIELD_MANAGER"]->EditFormAddFields("IBLOCK_" . $arParams["IBLOCK_ID"] . "_SECTION", $arFields);
                $res = $bs->Add($arFields);
                $db_res = $bs->GetByID($res);
                if ($db_res && ($res = $db_res->Fetch())) {
                    $arResult["VARIABLES"]["GALLERY"] = $res;
                    $arUserIds = array();
                    if ($object == "user") {
                        $arUserIds[] = $USER->GetId();
                    }
                    PClearComponentCacheEx($arParams["IBLOCK_ID"], array(0, $res['ID']), array(0, $res['CODE']), $arUserIds);
                }
                if (!empty($arFiles)) {
                    @unlink($arFiles["PICTURE"]["tmp_name"]);
                    @unlink($arFiles["DETAIL_PICTURE"]["tmp_name"]);
                }
            }
        }
    }
    "";
} elseif ($user_alias != "NEW_ALIAS") {
    $cache_id = serialize(array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "USER_ALIAS" => $user_alias, "SECTION_ID" => 0));
    $cache_path = "/" . SITE_ID . "/photogallery/" . $arParams["IBLOCK_ID"] . "/gallery" . $user_alias;
    if ($arParams["CACHE_TIME"] > 0 && $cache->InitCache($arParams["CACHE_TIME"], $cache_id, $cache_path)) {
        $res = $cache->GetVars();
        $arResult["VARIABLES"]["GALLERY"] = $res["GALLERY"];
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:photogallery.php

示例5: array_merge

    $arParams = array_merge($_REQUEST["checkParams"], $_REQUEST["reqParams"]);
    $elementId = intVal($_REQUEST["ELEMENT_ID"]);
    if ($_REQUEST['getRaiting'] == 'Y' && $arParams["USE_RATING"] == "Y" && $arParams["PERMISSION"] >= "R") {
        if ($arParams["DISPLAY_AS_RATING"] == "rating_main") {
            // Don't delete <!--BX_PHOTO_RATING-->, <!--BX_PHOTO_RATING_END--> comments - they are used in js to catch html content
            ?>
<!--BX_PHOTO_RATING--><?php 
            $arParams["RATING_MAIN_TYPE"] = COption::GetOptionString("main", "rating_vote_template", COption::GetOptionString("main", "rating_vote_type", "standart") == "like" ? "like" : "standart");
            if ($arParams["RATING_MAIN_TYPE"] == "like_graphic") {
                $arParams["RATING_MAIN_TYPE"] = "like";
            } else {
                if ($arParams["RATING_MAIN_TYPE"] == "standart") {
                    $arParams["RATING_MAIN_TYPE"] = "standart_text";
                }
            }
            $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:rating.vote", $arParams["RATING_MAIN_TYPE"], array("ENTITY_TYPE_ID" => "IBLOCK_ELEMENT", "ENTITY_ID" => $elementId, "OWNER_ID" => intval($_REQUEST["AUTHOR_ID"]), "PATH_TO_USER_PROFILE" => $arParams["PATH_TO_USER"], "AJAX_MODE" => "Y"), $this, array("HIDE_ICONS" => "Y"));
            ?>
<!--BX_PHOTO_RATING_END--><?php 
        } else {
            // It's important for correct functionality of iblock.vote component
            $_REQUEST["AJAX_CALL"] = "N";
            $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:iblock.vote", "ajax_photo", array("IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"], "IBLOCK_ID" => $arParams["IBLOCK_ID"], "ELEMENT_ID" => $elementId, "READ_ONLY" => $arParams["READ_ONLY"], "MAX_VOTE" => $arParams["MAX_VOTE"], "VOTE_NAMES" => $arParams["VOTE_NAMES"], "DISPLAY_AS_RATING" => $arParams["DISPLAY_AS_RATING"], "INCLUDE_JS_FILE" => "N", "CACHE_TYPE" => $arParams["CACHE_TYPE"], "CACHE_TIME" => $arParams["CACHE_TIME"]), $this, array("HIDE_ICONS" => "Y"));
        }
    }
    if ($_REQUEST['increaseCounter'] == 'Y' && $arParams["PERMISSION"] >= "R") {
        CModule::IncludeModule("iblock");
        CIBlockElement::CounterInc($elementId);
        PClearComponentCacheEx($arParams["IBLOCK_ID"], array($arParams["SECTION_ID"]), false, false, false);
    }
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:responder.php

示例6: onAfterUpload

function onAfterUpload($Params)
{
    $savedData = CImageUploader::GetSavedData();
    $arParams = $Params['arParams'];
    $arResult = $Params['~arResult'];
    $savedData['UPLOADING_SUCCESS'] = "Y";
    CImageUploader::SetSavedData($savedData);
    $sectionsIds = array(0, $arParams['SECTION_ID']);
    $arGalleriesIds = array(0);
    $arUsers = array();
    if ($arResult['SECTION'] && $arResult['SECTION']['IBLOCK_SECTION_ID']) {
        $sectionsIds[] = $arResult['SECTION']['IBLOCK_SECTION_ID'];
    }
    if ($arParams["BEHAVIOUR"] == "USER") {
        $sectionsIds[] = $arResult["GALLERY"]["ID"];
    }
    if (isset($arResult["GALLERY"]["CODE"])) {
        $arGalleriesIds[] = $arResult["GALLERY"]["CODE"];
        if ($arResult["GALLERY"]["CREATED_BY"]) {
            $arUsers[] = $arResult["GALLERY"]["CREATED_BY"];
        }
    }
    PClearComponentCacheEx($arParams["IBLOCK_ID"], $sectionsIds, $arGalleriesIds, $arUsers);
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:24,代码来源:functions.php

示例7: doubleval

                            $res["GALLERY"] = $res_g;
                            $arSections[$res["ID"]] = $res;
                        }
                    }
                }
                if (!empty($res["GALLERY"]) && $iFileSize > 0) {
                    $gallery = $res["GALLERY"];
                    $gallery["UF_GALLERY_SIZE"] = doubleval($gallery["UF_GALLERY_SIZE"]) - $iFileSize;
                    $gallery["UF_GALLERY_SIZE"] = $gallery["UF_GALLERY_SIZE"] <= 0 ? 0 : $gallery["UF_GALLERY_SIZE"];
                    $arFields = array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "UF_GALLERY_SIZE" => $gallery["UF_GALLERY_SIZE"]);
                    $GLOBALS["UF_GALLERY_SIZE"] = $arFields["UF_GALLERY_SIZE"];
                    $GLOBALS["USER_FIELD_MANAGER"]->EditFormAddFields("IBLOCK_" . $arParams["IBLOCK_ID"] . "_SECTION", $arFields);
                    $bs = new CIBlockSection();
                    $bs->Update($gallery["ID"], $arFields, false, false);
                }
                PClearComponentCacheEx($arParams["IBLOCK_ID"], array($res["ID"], $res["IBLOCK_SECTION_ID"]));
            }
        }
        LocalRedirect($_REQUEST["from_detail_list"]);
    }
}
$file = trim(preg_replace("'[\\\\/]+'", "/", dirname(__FILE__) . "/lang/" . LANGUAGE_ID . "/result_modifier.php"));
__IncludeLang($file);
$arParams["SHOW_BEST_ELEMENT"] = $arParams["SHOW_BEST_ELEMENT"] == "N" ? "N" : "Y";
$arResult["MENU_VARIABLES"] = array();
if ($this->__page !== "menu") {
    $sTempatePage = $this->__page;
    $sTempateFile = $this->__file;
    $this->__component->IncludeComponentTemplate("menu");
    $arResult["MENU_VARIABLES"] = $this->__component->__photogallery_values;
    $this->__page = $sTempatePage;
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:result_modifier.php

示例8: ForumDeleteTopic

                        CModule::IncludeModule("forum");
                        ForumDeleteTopic($arRes["FORUM_TOPIC_ID"]);
                    }
                    $events = GetModuleEvents("photogallery", "OnAfterPhotoDrop");
                    $arEventFields = array("ID" => $arRes["ID"], "SECTION_ID" => $arRes["IBLOCK_SECTION_ID"]);
                    $sectionsIds[] = $arRes["IBLOCK_SECTION_ID"];
                    while ($arEvent = $events->Fetch()) {
                        ExecuteModuleEventEx($arEvent, array($arEventFields, $arParams));
                    }
                    break;
                case "move":
                    $bs = new CIBlockElement();
                    $itemID = $bs->Update($itemID, array("MODIFIED_BY" => $USER->GetID(), "IBLOCK_SECTION" => $_REQUEST["TO_SECTION_ID"]));
                    if ($itemID <= 0) {
                        $arError[] = array("id" => "move error", "text" => PhotoShowError(array("ID" => $itemID, "code" => "NOT_UPDATED", "title" => $bs->LAST_ERROR, "DATA" => $arRes)));
                    } else {
                        $sectionsIds[] = $arRes["TO_SECTION_ID"];
                    }
                    break;
            }
        }
        PClearComponentCacheEx($arParams["IBLOCK_ID"], $sectionsIds, $arGalleriesIds);
    }
    if (!empty($arError)) {
        $e = new CAdminException($arError);
        $arResult["ERROR_MESSAGE"] = $e->GetString();
    } elseif (!empty($_REQUEST["REDIRECT_URL"])) {
        LocalRedirect($_REQUEST["REDIRECT_URL"]);
    }
    $arResult["bVarsFromForm"] = $bVarsFromForm ? "Y" : "N";
}
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:action.php

示例9: array

    }
}
/********************************************************************
				/Input params
********************************************************************/
$arResult = array("~URL_TEMPLATES" => $arUrlTemplates, "URL_TEMPLATES" => $arResult["URL_TEMPLATES"], "VARIABLES" => $arVariables, "ALIASES" => is_array($arVariableAliases) ? $arVariableAliases : array(), "PAGE_NAME" => strToUpper($componentPage), "backurl_encode" => urlencode($GLOBALS['APPLICATION']->GetCurPageParam()));
/********************************************************************
				Actions
********************************************************************/
if ($_REQUEST["ACTION"] == "public" && $arParams["PERMISSION"] >= "W" && check_bitrix_sessid() && is_array($_REQUEST["items"])) {
    CModule::IncludeModule("iblock");
    foreach ($_REQUEST["items"] as $res) {
        CIBlockElement::SetPropertyValues($res, $arParams["IBLOCK_ID"], "Y", "APPROVE_ELEMENT");
        CIBlockElement::SetPropertyValues($res, $arParams["IBLOCK_ID"], "Y", "PUBLIC_ELEMENT");
    }
    PClearComponentCacheEx($arParams["IBLOCK_ID"], array(0));
    $url = $arParams["DETAIL_LIST_URL"];
    if (empty($url)) {
        $url = $APPLICATION->GetCurPageParam("PAGE_NAME=detail_list", array("PAGE_NAME", "SECTION_ID", "ELEMENT_ID", "ACTION", "sessid", "edit", "AJAX_CALL"));
    }
    $url = CComponentEngine::MakePathFromTemplate($url, array());
    if (strpos($url, "?") === false) {
        $url .= "?";
    }
    $url .= "&moderate=Y";
    LocalRedirect($url);
}
if ($arParams["PERMISSION"] >= "W" && $_REQUEST["galleries_recalc"] == "Y") {
    $componentPage = "galleries_recalc";
}
/********************************************************************
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例10: PClearComponentCacheEx

            $sectionsIds[] = $arParams['SECTION_ID'];
        }
        if ($arFields && $arFields['IBLOCK_SECTION_ID']) {
            $sectionsIds[] = $arFields['IBLOCK_SECTION_ID'];
        }
        if (isset($arResult) && isset($arResult['SECTION']['IBLOCK_SECTION_ID'])) {
            $sectionsIds[] = $arResult['SECTION']['IBLOCK_SECTION_ID'];
        }
        if (isset($arResult['GALLERY']['CODE'])) {
            $sectionsIds[] = $arResult['GALLERY']['ID'];
            $arGalleriesIds[] = $arResult["GALLERY"]["CODE"];
            if ($arResult["GALLERY"]["CREATED_BY"]) {
                $arUsers[] = $arResult["GALLERY"]["CREATED_BY"];
            }
        }
        PClearComponentCacheEx($iblockId, $sectionsIds, $arGalleriesIds, $arUsers);
        if ($arParams["AJAX_CALL"] == "Y") {
            $APPLICATION->RestartBuffer();
            echo CUtil::PhpToJSObject($arResultFields);
            die;
        } else {
            LocalRedirect(CHTTP::urlDeleteParams($arResult["URL"], array("sessid", "edit"), true));
        }
    }
    $arResult["ERROR_MESSAGE"] = $strWarning;
}
/********************************************************************
				/Actions
********************************************************************/
if ($arParams["AJAX_CALL"] == "Y" || $arParams["BX_PHOTO_AJAX"]) {
    $GLOBALS['APPLICATION']->RestartBuffer();
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:component.php


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