New page "raporty-i-ebooki"

This commit is contained in:
Roman Pyrih
2025-05-13 11:42:45 +02:00
parent daef81b6f6
commit 72b34e1135
5 changed files with 133 additions and 16 deletions

View File

@@ -78,7 +78,7 @@ $page_template = \front\factory\Pages::get_layout_id( $this -> page_id );
<?endif;?>
<!-- NEW -->
<? if ( $page[ 'id' ] == 61 or $page[ 'id' ] == 12 or $page['menu_id'] == 4 or $page['id'] == 17 ):?>
<? if ( $page[ 'id' ] == 61 or $page[ 'id' ] == 12 or $page['menu_id'] == 4 or $page['id'] == 17 or $page['id'] == 94 ):?>
<div class="article-entry">
<?
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \S::seo( $this -> article['language']['title'] );
@@ -101,22 +101,25 @@ $page_template = \front\factory\Pages::get_layout_id( $this -> page_id );
echo '</div>';
endif;
?>
<div class="article-tags">
<?
global $mdb;
<?php if ($page['id'] != 94) : ?>
<div class="article-tags">
<?
global $mdb;
$results = $mdb -> query( 'SELECT page_id FROM pp_articles_pages WHERE article_id = ' . $this -> article['id'] . ' AND page_id NOT IN (12)' ) -> fetchAll();
if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row )
{
$page_tmp = \front\factory\Pages::page_details( $row['page_id'] );
if ( $row['page_id'] == 18 )
$url_tmp = '/blog';
else
$url_tmp = \front\factory\Pages::lang_url( $page_tmp['id'], $lang_id );
echo '<a href="' . $url_tmp . '" class="item">' . $page_tmp['language']['title'] . '</a>';
}
?>
</div>
<?php endif; ?>
$results = $mdb -> query( 'SELECT page_id FROM pp_articles_pages WHERE article_id = ' . $this -> article['id'] . ' AND page_id NOT IN (12)' ) -> fetchAll();
if ( is_array( $results ) and !empty( $results ) ) foreach ( $results as $row )
{
$page_tmp = \front\factory\Pages::page_details( $row['page_id'] );
if ( $row['page_id'] == 18 )
$url_tmp = '/blog';
else
$url_tmp = \front\factory\Pages::lang_url( $page_tmp['id'], $lang_id );
echo '<a href="' . $url_tmp . '" class="item">' . $page_tmp['language']['title'] . '</a>';
}
?>
</div>
<div class="article-content">
<h3 class="article-title">
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $this -> article['language']['title'];?>" <? if ( $this -> article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $this -> article['language']['title'];?></a>

View File

@@ -49,6 +49,42 @@ $page_template = \front\factory\Pages::get_layout_id( $this -> page_id );
</div>
<? endforeach; ?>
</div>
<? elseif ( $page_template == 59 ) : ?>
<div class="row">
<div class="col-12">
<? if ( is_array( $this -> articles ) ) foreach ( $this -> articles as $key => $article )
{
if( $key == 1) echo '<div class="blog-list-masonry">';
if($key == 0) {
$tpl = new \Tpl;
$tpl -> page_id = $this -> page_id;
$tpl -> article = $article;
$tpl -> element_id = $key;
echo '<div class="blog-first-box">';
echo $tpl -> render( 'articles/article-entry' );
echo \front\view\Newsletter::newsletter();
// include 'templates_user/blog-newsletter-v2.php';
echo '</div>';
} else {
if ( $article['password'] and !\S::get_session( 'article-' . $article['id'] . '-' . $article['password'] ) )
echo \front\view\Articles::password_view( [ 'article' => $article ] );
else
{
$tpl = new \Tpl;
$tpl -> page_id = $this -> page_id;
$tpl -> article = $article;
$tpl -> element_id = $key;
echo $tpl -> render( 'articles/article-entry' );
}
}
if( $key == count($this -> articles) - 1) echo '</div>';
}
?>
</div>
</div>
<? else: ?>
<div class="row">
<div class="col-12">