%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.148.109.45 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/templates/artantiq/components/bitrix/system.pagenavigation/news_nav/ |
Upload File : |
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); /** @var array $arParams */ /** @var array $arResult */ /** @global CMain $APPLICATION */ /** @global CUser $USER */ /** @global CDatabase $DB */ /** @var CBitrixComponentTemplate $this */ /** @var string $templateName */ /** @var string $templateFile */ /** @var string $templateFolder */ /** @var string $componentPath */ /** @var CBitrixComponent $component */ $this->setFrameMode(true); if(!$arResult["NavShowAlways"]) { if ($arResult["NavRecordCount"] == 0 || ($arResult["NavPageCount"] == 1 && $arResult["NavShowAll"] == false)) return; } $strNavQueryString = ($arResult["NavQueryString"] != "" ? $arResult["NavQueryString"]."&" : ""); $strNavQueryStringFull = ($arResult["NavQueryString"] != "" ? "?".$arResult["NavQueryString"] : ""); ?> <?if($arResult["NavPageCount"] > 1):?> <?if ($arResult["NavPageNomer"]+1 <= $arResult["nEndPage"]):?> <? $plus = $arResult["NavPageNomer"]+1; $url = $arResult["sUrlPathParams"] . "PAGEN_".$arResult["NavNum"]."=".$plus; ?> <div class="load_more sm_text" data-url="<?=$url?>"> <i class="icon icon_restart"></i> <span>Показать еще</span> </div> <?endif?> <?endif?> <ul class="pagination sm_text"> <?if ($arResult["NavPageNomer"] > 1):?> <?if($arResult["bSavePage"]):?> <li class="page_item"> <a class="page_link page_link__prev" href="<?=$arResult["sUrlPath"]?>?<?=$strNavQueryString?>PAGEN_<?=$arResult["NavNum"]?>=<?=($arResult["NavPageNomer"]-1)?>"></a> </li> <?else:?> <?if ($arResult["NavPageNomer"] > 2):?> <li class="page_item"> <a class="page_link page_link__prev" href="<?=$arResult["sUrlPath"]?>?<?=$strNavQueryString?>PAGEN_<?=$arResult["NavNum"]?>=<?=($arResult["NavPageNomer"]-1)?>"></a> </li> <?else:?> <li class="page_item"> <a class="page_link page_link__prev" href="<?=$arResult["sUrlPath"]?><?=$strNavQueryStringFull?>"></a> </li> <?endif?> <?endif?> <?endif?> <?while($arResult["nStartPage"] <= $arResult["nEndPage"]):?> <?if ($arResult["nStartPage"] == $arResult["NavPageNomer"]):?> <li class="page_item active"><?=$arResult["nStartPage"]?></li> <?elseif($arResult["nStartPage"] == 1 && $arResult["bSavePage"] == false):?> <li class="page_item"> <a class="page_link" href="<?=$arResult["sUrlPath"]?><?=$strNavQueryStringFull?>"><?=$arResult["nStartPage"]?></a> </li> <?else:?> <li class="page_item"> <a class="page_link" href="<?=$arResult["sUrlPath"]?>?<?=$strNavQueryString?>PAGEN_<?=$arResult["NavNum"]?>=<?=$arResult["nStartPage"]?>"><?=$arResult["nStartPage"]?></a> </li> <?endif?> <?$arResult["nStartPage"]++?> <?endwhile?> <?if($arResult["NavPageNomer"] < $arResult["NavPageCount"]):?> <li class="page_item"> <a class="page_link page_link__next" href="<?=$arResult["sUrlPath"]?>?<?=$strNavQueryString?>PAGEN_<?=$arResult["NavNum"]?>=<?=($arResult["NavPageNomer"]+1)?>"></a> </li> <?endif?> </ul> <script> $(document).ready(function(){ $(document).on('click', '.load_more', function(){ var targetContainer = $(this).parent().prev(), url = $('.load_more').attr('data-url'); if (url !== undefined) { $.ajax({ type: 'GET', url: url, dataType: 'html', success: function(data){ $('.load_more').remove(); var elements = $(data).find('#ajaxItems').find('.ajax_item'), pagination = $(data).find('.load_more'); targetContainer.append(elements); $('#ajaxItems .page_nav').prepend(pagination); const paginationLinks = $('#ajaxItems .pagination .page_link:not(.page_link__next)'); $("#ajaxItems .pagination .page_item").removeClass('active'); paginationLinks.each(function () { if ($(this).attr("href") == url) { $(this).parent().addClass('active'); } }); } }); } }); }); </script>