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


PHP CIBlockElement::CounterInc方法代码示例

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


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

示例1:

<?php

//define("STOP_STATISTICS", true);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
if (isset($_SESSION["player_files"]) && is_array($_SESSION["player_files"]) && isset($_REQUEST["id"]) && isset($_SESSION["player_files"][$_REQUEST["id"]])) {
    $arFile = $_SESSION["player_files"][$_REQUEST["id"]];
    if ($arFile["STAT_EVENT"] && !$arFile["WAS_STAT_EVENT"] && strlen($arFile["STAT_EVENT1"]) > 0 && CModule::IncludeModule('statistic')) {
        CStatEvent::AddCurrent($arFile["STAT_EVENT1"], $arFile["STAT_EVENT2"], $arFile["STAT_EVENT3"]);
        $_SESSION["player_files"][$_REQUEST["id"]]["WAS_STAT_EVENT"] = true;
    }
    if ($arFile["SHOW_COUNTER_EVENT"] && !$arFile["WAS_SHOW_COUNTER_EVENT"] && CModule::IncludeModule('iblock')) {
        CIBlockElement::CounterInc($_REQUEST["id"]);
        $_SESSION["player_files"][$_REQUEST["id"]]["WAS_SHOW_COUNTER_EVENT"] = true;
    }
}
require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_after.php";
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:16,代码来源:stat.php

示例2: ShowError

    } else {
        $this->AbortResultCache();
        ShowError(GetMessage("PHOTO_ELEMENT_NOT_FOUND"));
        @define("ERROR_404", "Y");
        if ($arParams["SET_STATUS_404"] === "Y") {
            CHTTP::SetStatus("404 Not Found");
        }
    }
}
/*************************************************************************
	Any actions without cache (if there was some to display)
*************************************************************************/
if (isset($arResult["ID"])) {
    $arTitleOptions = null;
    if (CModule::IncludeModule("iblock")) {
        CIBlockElement::CounterInc($arResult["ID"]);
        if ($USER->IsAuthorized()) {
            if ($APPLICATION->GetShowIncludeAreas() || $arParams["SET_TITLE"] || isset($arResult[$arParams["BROWSER_TITLE"]])) {
                $arReturnUrl = array("add_element" => CIBlock::GetArrayByID($arResult["IBLOCK_ID"], "DETAIL_PAGE_URL"), "delete_element" => isset($arResult["SECTION"]) ? $arResult["SECTION"]["SECTION_PAGE_URL"] : $arResult["LIST_PAGE_URL"]);
                $arButtons = CIBlock::GetPanelButtons($arResult["IBLOCK_ID"], $arResult["ID"], $arResult["IBLOCK_SECTION_ID"], array("RETURN_URL" => $arReturnUrl));
                if ($APPLICATION->GetShowIncludeAreas()) {
                    $this->AddIncludeAreaIcons(CIBlock::GetComponentMenu($APPLICATION->GetPublicShowMode(), $arButtons));
                }
                if ($arParams["SET_TITLE"] || isset($arResult[$arParams["BROWSER_TITLE"]])) {
                    $arTitleOptions = array('ADMIN_EDIT_LINK' => $arButtons["submenu"]["edit_element"]["ACTION"], 'PUBLIC_EDIT_LINK' => $arButtons["edit"]["edit_element"]["ACTION"], 'COMPONENT_NAME' => $this->GetName());
                }
            }
        }
    }
    if (isset($arResult["PROPERTIES"][$arParams["META_KEYWORDS"]])) {
        $val = $arResult["PROPERTIES"][$arParams["META_KEYWORDS"]]["VALUE"];
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php

示例3: incShowCount

 /**
  *
  */
 public function incShowCount()
 {
     \CIBlockElement::CounterInc($this->id());
 }
开发者ID:techart,项目名称:bitrix.tao,代码行数:7,代码来源:entity.php

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

示例5: data

 /**
  * Обработчик результат. Вносим изменения при необходимости
  * @param  CDBResult $rsItems Выборка основного массива элементов
  * @return array              Основной массив элементов
  */
 private function data($rsItems) {
     if ($x = $rsItems->Fetch()) {
         $item = $this->composeItem(new Item($x));
     }
     CIBlockElement::CounterInc($item['id']);
     return $item;
 }
开发者ID:ASDAFF,项目名称:mp,代码行数:12,代码来源:class.php

示例6: is_array

********************************************************************/
/************** Title **********************************************/
if ($arParams["SET_TITLE"] != "N") {
    $APPLICATION->SetTitle($arResult["SECTION"]["NAME"] . ": " . $arResult["ELEMENT"]["NAME"]);
}
/************** BreadCrumb *****************************************/
if ($arParams["SET_NAV_CHAIN"] != "N") {
    $arResult["SECTION"]["PATH"] = is_array($arResult["SECTION"]["PATH"]) ? $arResult["SECTION"]["PATH"] : array();
    $bFounded = $arParams["BEHAVIOUR"] == "USER" ? false : true;
    foreach ($arResult["SECTION"]["PATH"] as $arPath) {
        if (!$bFounded) {
            $bFounded = $arResult["GALLERY"]["ID"] == $arPath["ID"];
            continue;
        }
        $APPLICATION->AddChainItem($arPath["NAME"], CComponentEngine::MakePathFromTemplate($arParams["~SECTION_URL"], array("USER_ALIAS" => $arParams["USER_ALIAS"], "SECTION_ID" => $arPath["ID"])));
    }
    $APPLICATION->AddChainItem($arResult["ELEMENT"]["NAME"]);
}
/************** Increment shows counter & Admin Panel **************/
if (CModule::IncludeModule("iblock")) {
    CIBlockElement::CounterInc($arResult["ELEMENT"]["ID"]);
    // if($arParams["DISPLAY_PANEL"] == "Y" && $USER->IsAuthorized())
    // {
    // CIBlock::ShowPanel($arParams["IBLOCK_ID"], $arResult["ELEMENT"]["ID"], $arResult["ELEMENT"]["IBLOCK_SECTION_ID"], $arParams["IBLOCK_TYPE"], false, $this->GetName());
    // }
}
/************** Returns ********************************************/
return $arResult["ELEMENT"]["ID"];
/********************************************************************
				/Standart
********************************************************************/
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:component.php

示例7: htmlspecialchars

                if (strlen($arParams["SECTION_URL"]) > 0) {
                    $arPath["SECTION_PAGE_URL"] = htmlspecialchars(str_replace(array("#SERVER_NAME#", "#SITE_DIR#", "#IBLOCK_ID#", "#SECTION_ID#"), array(SITE_SERVER_NAME, SITE_DIR, $arPath["IBLOCK_ID"], $arPath["ID"]), $arParams["SECTION_URL"]));
                }
                $arResult["SECTION"]["PATH"][] = $arPath;
            }
        }
        $this->IncludeComponentTemplate();
    } else {
        $this->AbortResultCache();
        ShowError(GetMessage("T_NEWS_DETAIL_NF"));
        @define("ERROR_404", "Y");
    }
}
if (isset($arResult["ID"])) {
    if (CModule::IncludeModule("iblock")) {
        CIBlockElement::CounterInc($arParams["ELEMENT_ID"]);
        if ($GLOBALS["APPLICATION"]->GetShowIncludeAreas()) {
            $this->AddIncludeAreaIcons(CIBlock::ShowPanel($arResult["IBLOCK_ID"], $arResult["ID"], 0, $arParams["IBLOCK_TYPE"], true));
            if ($arParams["DISPLAY_PANEL"]) {
                CIBlock::ShowPanel($arResult["IBLOCK_ID"], $arResult["ID"], 0, $arParams["IBLOCK_TYPE"]);
            }
        }
    }
    if ($arParams["SET_TITLE"]) {
        $APPLICATION->SetTitle($arResult["NAME"]);
    }
    if ($arParams["ADD_SECTIONS_CHAIN"] && is_array($arResult["SECTION"])) {
        foreach ($arResult["SECTION"]["PATH"] as $arPath) {
            $APPLICATION->AddChainItem($arPath["NAME"], $arPath["SECTION_PAGE_URL"]);
        }
    }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例8: data

 /**
  * Обработчик результат. Вносим изменения при необходимости
  * @param  CDBResult $rsItems Выборка основного массива элементов
  * @return array              Основной массив элементов
  */
 private function data($rsItems) {
     if ($objX = $rsItems->GetNextElement()) {
         $x = array_merge($objX->getFields(), array('properties' => $objX->getProperties()));
         $item = $this->composeItem(new Item($x));
     }
     CIBlockElement::CounterInc($item['id']);
     return $item;
 }
开发者ID:ASDAFF,项目名称:stex,代码行数:13,代码来源:class.php

示例9:

                                <div class="comment">
                                        <svg class="icons"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#comment-icon"></use></svg>
                                 </div>
                                <div class="znach"><?php 
echo $col_comments;
?>
</div>
                            </a>
                            <div class="col-3 noborder nobutton">
                                <div class="view">
                                        <svg class="icons"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#view-icon"></use></svg>
                                 </div>
                                <div class="znach">
                                <?
                                    /*Количество просмотров*/
                                    CIBlockElement::CounterInc($arResult['ID']);
                                    $res = CIBlockElement::GetByID($arResult['ID']);                                      
                                    if($ar_res = $res->GetNext())  
                                        echo $ar_res['SHOW_COUNTER'];
                                ?>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <div class="left">
			<div class="full-text">
开发者ID:CheBurashka334,项目名称:crado,代码行数:31,代码来源:template.php


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