當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。