Beispiel #1
0
    		<div class="row">
				<div class="col-sm-12 col-md-12 col-lg-12">
				<!--#include virtual="includes/menu.html" -->
				</div>
			</div>
		 
 <?php 
$oArticles = new Articles();
if (!isset($id)) {
    // Reading categories and combo display for selecting categories
    $alistCat = $oArticles->getCategoryData();
    include 'core/blog/views/form-categories.php';
}
if (isset($cat)) {
    // If a category is specified then display the articles in this category
    $oArticles->ReadAllArticles('util', $cat);
    $aConfigValues = $oArticles->getConfigValues();
    include 'core/blog/views/display_all_articles.php';
    // Pagination
    $nbTotArt = $aConfigValues['total_nbr_display'];
    $nbrPerPage = $aConfigValues['art_page'];
    $oPagination->DisplayPagination($nbTotArt, $nbrPerPage, 'blog.php', "cat={$cat}");
} elseif ((!isset($cat) or $cat == 'Tous') and !isset($id)) {
    // If no selected category or 'All' is selected then display all articles (all categories)
    $aArticles = $oArticles->ReadAllArticles('util', 0);
    $aConfigValues = $oArticles->getConfigValues();
    include 'core/blog/views/display_all_articles.php';
    // Result Pagination
    $nbTotArt = $aConfigValues['total_nbr_display'];
    $nbrPerPage = $aConfigValues['art_page'];
    $oPagination->DisplayPagination($nbTotArt, $nbrPerPage, 'blog.php', '');
<?php

/*
 * *****************************
 * "BLOG" MODULE ADMINISTATION
 * *****************************
 */
$oArticles = new Articles();
// Get message with translation
$aMsgPost = $oAdmin->getItemTransation('BLOG', 'BACK', $lang, 'MSG_POSTS_ADMIN');
//"BLOG" Menu => Viewing post management table
if (isset($a) && 'modif' == $a) {
    // If no item is chosen then display management table
    if (!isset($id)) {
        // Search All posts without pagination and for all category
        $oArticles->ReadAllArticles('admin', $cat);
        // Display form
        if ('yes' != isset($eng) && 'modif' == isset($a)) {
            include 'core/blog/views/admin-blog-articles.php';
        }
    }
    //  *** POSTS MODIFICATION Mode ***
    if (isset($id)) {
        if (!isset($eng)) {
            // Does not display the form after having validated.
            $oArticles->ReadOneArticle($id);
            $aArticle = $oArticles->getPostData();
            include 'core/blog/views/form-create-article.php';
        }
        // Save data post and request confirmation of registration after validation post
        if (isset($eng) && 'yes' == $eng && !isset($conf)) {