- Created Articles.php for rendering article views including full articles, miniature lists, and news sections. - Added Banners.php for handling banner displays. - Introduced Languages.php for rendering language options. - Implemented Menu.php for dynamic menu rendering. - Developed Newsletter.php for newsletter view rendering. - Created Scontainers.php for rendering specific containers. - Added ShopCategory.php for category descriptions and product listings. - Introduced ShopClient.php for managing client-related views such as address editing and order history. - Implemented ShopPaymentMethod.php for displaying payment methods in the basket. - Created ShopProduct.php for generating product URLs. - Added ShopSearch.php for rendering a simple search form. - Added .htaccess file to enhance security by restricting access to sensitive files and directories.
89 lines
3.7 KiB
PHP
89 lines
3.7 KiB
PHP
<? global $lang, $config, $settings; ?>
|
|
|
|
<? if ($this->page_id == 9) : ?>
|
|
<section id="splide-2" class="splide container" aria-label="Splide Basic HTML Example">
|
|
<div class="splide__track">
|
|
<ul class="splide__list">
|
|
<? foreach ($this->articles as $article) : ?>
|
|
<li class="splide__slide">
|
|
<div class="article-list">
|
|
<? $article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \Shared\Helpers\Helpers::seo($article['language']['title']); ?>
|
|
<a href="/<?= $url; ?>" title="<?= $article['language']['title']; ?>" <? if ($article['language']['noindex']) : ?>rel="nofollow" <? endif; ?>>
|
|
<div class="blog-image">
|
|
<img src="<?= \front\Views\Articles::getImage($article); ?>" alt="<?= $article['language']['title']; ?>">
|
|
</div>
|
|
<div class="article-list-text-container">
|
|
<h3 class="article-title"><?= $article['language']['title']; ?></h3>
|
|
<div class="article-entry">
|
|
<?
|
|
if ($article['language']['entry'])
|
|
{
|
|
$content = $article['language']['entry'];
|
|
|
|
$content = preg_replace("/<img[^>]+\>/i", "", $content);
|
|
$content = preg_replace("/<p[^>]*?>/", "", $content);
|
|
$content = preg_replace("/[\n\r]/", " ", $content);
|
|
$content = mb_substr($content, 0, 150, 'UTF-8') . '...';
|
|
echo $content;
|
|
|
|
if ($article['language']['text'])
|
|
$more = true;
|
|
}
|
|
else
|
|
{
|
|
echo $article['language']['text'];
|
|
|
|
$more = false;
|
|
}
|
|
?>
|
|
</div>
|
|
<div class="date-add"><i class="fa fa-calendar-o "></i><?= date('d.m.y', strtotime($article['date_add'])); ?></div>
|
|
<button class="slider-btn">Czytaj więcej</button>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</li>
|
|
<? endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<?else :?>
|
|
<? foreach ($this->articles as $article) : ?>
|
|
<div class="col-12 col-lg-6 col-xl-3">
|
|
<div class="article-list">
|
|
<? $article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \Shared\Helpers\Helpers::seo($article['language']['title']); ?>
|
|
<a href="/<?= $url; ?>" title="<?= $article['language']['title']; ?>" <? if ($article['language']['noindex']) : ?>rel="nofollow" <? endif; ?>>
|
|
<div class="blog-image">
|
|
<img src="<?= \front\Views\Articles::getImage($article); ?>" alt="<?= $article['language']['title']; ?>">
|
|
<div class="date-add"><?= date('d.m.y', strtotime($article['date_add'])); ?></div>
|
|
</div>
|
|
<h3 class="article-title"><?= $article['language']['title']; ?></h3>
|
|
<div class="article-entry">
|
|
<?
|
|
if ($article['language']['entry'])
|
|
{
|
|
$content = $article['language']['entry'];
|
|
|
|
$content = preg_replace("/<img[^>]+\>/i", "", $content);
|
|
$content = preg_replace("/<p[^>]*?>/", "", $content);
|
|
$content = preg_replace("/[\n\r]/", " ", $content);
|
|
$content = mb_substr($content, 0, 150, 'UTF-8') . '...';
|
|
echo $content;
|
|
|
|
if ($article['language']['text'])
|
|
$more = true;
|
|
}
|
|
else
|
|
{
|
|
echo $article['language']['text'];
|
|
|
|
$more = false;
|
|
}
|
|
?>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<? endforeach; ?>
|
|
|
|
<? endif; ?>
|