Initial commit

This commit is contained in:
Ivan Petrov
2025-12-24 19:19:01 +03:00
commit a7097c6178
19493 changed files with 94306 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
<?php
$type = $_GET["type"] ?? "category";
$page = $_GET["page"] ?? 1;
$current_list_int = intval($page) - 1;
$products_per_page = 30;
$offset = $products_per_page * $current_list_int;
$product_params = array(
"class" => "ProductCategory",
"limit" => $products_per_page,
"offset" => $offset
);
$search = new Search($product_params);
$products = $search->collect();
$product_count = $search->count;
?>
<?php $this->template_load("head.php"); ?>
<?php $this->template_load("header.php"); ?>
<section class="section first-other search">
<div class="container">
<h1 class="little vacancy__heading">Карта сайта</h1>
<div>
<ul class="generator-params__list variants-list">
<li class="generator-params__item <?= $type == "category" ? "active" : ""; ?>">
<a href="<?= $b->router_format_get_params(array("type" => "category"), true); ?>" class="generator-params__link">Категории</a>
</li>
<li class="generator-params__item <?= $type == "main" ? "active" : ""; ?>">
<a href="<?= $b->router_format_get_params(array("type" => "main"), true); ?>" class="generator-params__link">Типовые страницы</a>
</li>
</ul>
<article class="variants__products product-list" style="display: flex;flex-direction: column;">
<?php if($type == "category") {
foreach ($products as $key => $product) { ?>
<a href="/category/<?= $product->get_item_slug(); ?>" style="margin-bottom: 10px;"><?= $product->get_item_name(); ?></a>
<?php }
} else { ?>
<a href="/" style="margin-bottom: 10px;">Главная</a>
<a href="/page/about/" style="margin-bottom: 10px;">О компании</a>
<a href="/page/delivery/" style="margin-bottom: 10px;">Доставка</a>
<a href="/page/pay/" style="margin-bottom: 10px;">Оплата</a>
<a href="/page/guarantees/" style="margin-bottom: 10px;">Гарантии</a>
<a href="/reviews/" style="margin-bottom: 10px;">Отзывы</a>
<a href="/posts/all-publications/" style="margin-bottom: 10px;">Новости</a>
<a href="/faq/" style="margin-bottom: 10px;">Вопрос-ответ</a>
<a href="/page/contacts/" style="margin-bottom: 10px;">Контакты</a>
<a href="/page/public-offer/" style="margin-bottom: 10px;">Публичная оферта</a>
<a href="/page/privacy/" style="margin-bottom: 10px;">Политка конфиденциальности</a>
<?php } ?>
</article>
<?php if($type == "category") { ?>
<div class="posts-pagination">
<?php $b->template_load("productCategory/pagination.php", array("current_page" => $page, "items_per_page" => $products_per_page, "items_count" => $product_count)); ?>
</div>
<?php } ?>
</div>
</div>
</section>
<?php $this->template_load("footer.php"); ?>