本文整理汇总了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', '');
示例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)) {