Exemple #1
0
</div>

</div>

</section>

<?php 
}
echo '<section class="el-row">

<h2>' . $LANG['news_title'] . ' <a href="#" class="updown" data-set="news">' . (isset($_SESSION['ses_set']['news']) && ($show_news = $_SESSION['ses_set']['news']) ? 'S' : 'R') . '</a></h2>

<div class="el-row-body"' . (!empty($show_news) ? ' style="display: none;"' : '') . '>

<ul class="elements-list">';
if ($news = admin_query::news() > 0) {
    foreach (admin_query::while_news(array('max' => 7, 'orderby' => 'date DESC')) as $item) {
        echo '<li><a href="' . $item->url . '" target="_blank">' . $item->title . '</a></li>';
    }
} else {
    echo '<li>' . $LANG['no_news_yet'] . '</li>';
}
echo '</ul>';
if ($news > 0) {
    echo '<div class="links">
  <a href="?route=news.php">' . $LANG['news_list'] . '</a>
</div>';
}
echo '</div>

</section>