当前位置: 首页>>代码示例>>PHP>>正文


PHP Articles::ReadAllArticles方法代码示例

本文整理汇总了PHP中Articles::ReadAllArticles方法的典型用法代码示例。如果您正苦于以下问题:PHP Articles::ReadAllArticles方法的具体用法?PHP Articles::ReadAllArticles怎么用?PHP Articles::ReadAllArticles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Articles的用法示例。


在下文中一共展示了Articles::ReadAllArticles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Articles

    		<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', '');
开发者ID:ludovicinaction,项目名称:PHPscripts,代码行数:31,代码来源:blog.php

示例2: Articles

<?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)) {
开发者ID:ludovicinaction,项目名称:PHPscripts,代码行数:31,代码来源:blog_admin_controler.php


注:本文中的Articles::ReadAllArticles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。