Файловый менеджер - Редактировать - /www/wwwroot/gamenworld.store/themes/newsone/layout/home/content.phtml
�азад
<?php global $zon, $site_url;?> <section class="hero"> <div class="container"> <?php if (getAdById("1", 'status') == 0) { ?> <div style="display: grid; place-items: center; height: 250px; height: 100%;"> <?= getAdById("1", 'code') ?> </div> <?php } ?> </div> </section> <section class="content-list"> <h4 style="margin: 0px 0px 10px 40px;">Latest News</h4> <div class="container" id="news-container"> <?php // Pagination variables $perPage = 20; $currentPage = isset($_GET['page']) ? (int)$_GET['page'] : 1; $offset = ($currentPage - 1) * $perPage; // Fetch blogs from the database using getBlogs function $blogs = getBlogs($offset, $perPage); if (!empty($blogs)) { foreach ($blogs as $blogKey => $blog) {?> <?php if ($blogKey == 3 && getAdById("2", 'status') == 0) { ?> <div class="mx-2"> <div style="display: grid; place-items: center; margin-top:35px"> <?= getAdById("2", 'code') ?> </div> </div> <?php } ?> <a class="content-card" href="<?=$site_url ?>blog/<?=makeSlug($blog['blog_title'])?>/<?=$blog['id']?>"> <div class="card-icon"> <img alt="" src="<?=$blog['blog_image']?>"> </div> <div class="card-main"> <h3 class="card-title"><?=htmlspecialchars($blog['blog_title'])?></h3> <p class="card-info"><?=htmlspecialchars($blog['blog_date'])?></p> </div> </a> <?php } } else { echo '<p>No news articles found.</p>'; } ?> </div> <div id="loading-spinner" class="loading-spinner"> <i class="fas fa-spinner fa-spin"></i> </div> <?php if (getAdById("4", 'status') == 0) { ?> <div class="mx-2"> <!-- 顶部锚定广告 --> <div class="top-anchor-ad" id="topAnchorAd" style="display: flex; align-items: center; justify-content: center;"> <div class="top-drawer-handle" onclick="this.parentElement.classList.toggle('ad-hidden'); document.body.style.paddingTop = this.parentElement.classList.contains('ad-hidden') ? '0px' : '120px';">▼</div> <?= getAdById("4", 'code') ?> </div> </div> <?php } ?> <?php if (getAdById("5", 'status') == 0) { ?> <div class="mx-2"> <!-- 底部锚定广告 --> <div class="anchor-ad" id="anchorAd" style="display: flex; align-items: center; justify-content: center;"> <div class="drawer-handle" onclick="this.parentElement.classList.toggle('ad-hidden'); document.body.style.paddingBottom = this.parentElement.classList.contains('ad-hidden') ? '0px' : '120px';">▲</div> <?= getAdById("5", 'code') ?> </div> </div> <?php } ?> <?php if (getAdById("14", 'status') == 0) { ?> <div class="mx-2"> <!-- 顶部锚定广告 --> <div class="top-anchor-ad" id="topAnchorAd" style="display: flex; align-items: center; justify-content: center;"> <div class="top-drawer-handle" onclick="this.parentElement.classList.toggle('ad-hidden'); document.body.style.paddingTop = this.parentElement.classList.contains('ad-hidden') ? '0px' : '120px';">▼</div> <?= getAdById("4", 'code') ?> </div> </div> <?php } ?> <?php if (getAdById("15", 'status') == 0) { ?> <div class="mx-2"> <!-- 底部锚定广告 --> <div class="anchor-ad" id="anchorAd" style="display: flex; align-items: center; justify-content: center;"> <div class="drawer-handle" onclick="this.parentElement.classList.toggle('ad-hidden'); document.body.style.paddingBottom = this.parentElement.classList.contains('ad-hidden') ? '0px' : '120px';">▲</div> <?= getAdById("5", 'code') ?> </div> </div> <?php } ?> </section> <script> document.addEventListener('DOMContentLoaded', function() { let currentPage = 1; const newsContainer = document.getElementById('news-container'); const loadingSpinner = document.getElementById('loading-spinner'); let isLoading = false; window.addEventListener('scroll', () => { if (window.innerHeight + window.scrollY >= document.body.offsetHeight - 40 && !isLoading) { loadMoreBlogs(); } }); function loadMoreBlogs() { isLoading = true; currentPage++; loadingSpinner.style.display = 'block'; setTimeout(() => { fetch(`<?php echo $site_url ?>/xhr/loadmoreblogs.php?page=${currentPage}`) .then(response => response.text()) .then(data => { if (data.trim() === '<p>No more news articles found.</p>') { window.removeEventListener('scroll', loadMoreBlogs); } else { newsContainer.insertAdjacentHTML('beforeend', data); } loadingSpinner.style.display = 'none'; isLoading = false; }) .catch(error => { console.error('Error loading more blogs:', error); loadingSpinner.style.display = 'none'; isLoading = false; }); }, 1000); // 1-second delay } }); </script>
| ver. 1.4 |
Github
|
.
| PHP 8.0.26 | Генераци� �траницы: 0 |
proxy
|
phpinfo
|
�а�тройка