本文整理汇总了PHP中get_article_count函数的典型用法代码示例。如果您正苦于以下问题:PHP get_article_count函数的具体用法?PHP get_article_count怎么用?PHP get_article_count使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_article_count函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: ceil
$pages = $count > 0 ? ceil($count / $size) : 1;
if ($page > $pages) {
$page = $pages;
}
$pager['search']['id'] = $cat_id;
$keywords = '';
$goon_keywords = '';
//继续传递的搜索关键词
/* 获得文章列表 */
if (isset($_REQUEST['keywords'])) {
$keywords = addslashes(htmlspecialchars(urldecode(trim($_REQUEST['keywords']))));
$pager['search']['keywords'] = $keywords;
$search_url = substr(strrchr($_POST['cur_url'], '/'), 1);
$smarty->assign('search_value', stripslashes(stripslashes($keywords)));
$smarty->assign('search_url', $search_url);
$count = get_article_count($cat_id, $keywords);
$pages = $count > 0 ? ceil($count / $size) : 1;
if ($page > $pages) {
$page = $pages;
}
$goon_keywords = urlencode($_REQUEST['keywords']);
}
$smarty->assign('artciles_list', get_cat_articles($cat_id, $page, $size, $keywords));
$smarty->assign('cat_id', $cat_id);
/* 分页 */
assign_pager('article_cat', $cat_id, $count, $size, '', '', $page, $goon_keywords);
assign_dynamic('article_cat');
}
$smarty->assign('feed_url', $_CFG['rewrite'] == 1 ? "feed-typearticle_cat" . $cat_id . ".xml" : 'feed.php?type=article_cat' . $cat_id);
// RSS URL
$smarty->display('article_cat.dwt', $cache_id);
开发者ID:xiaoxiaowu007,项目名称:jicai,代码行数:31,代码来源:article_cat.php
示例2: get_article_count
<h3 class="handle"><span>Content</span></h3>
<div class="dashboardBoxInside">
<div class="table">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td valign="top"><strong><?php
echo get_article_count();
?>
Article(s)</strong></td>
<td valign="top">
<?php
echo get_article_count('active');
?>
Published<br />
<?php
echo get_article_count('pending');
?>
Pending
</td>
</tr>
<tr>
<td valign="top"><strong><?php
echo get_news_count();
?>
News Item(s)</strong></td>
<td valign="top">
<?php
echo get_news_count('active');
?>
Published<br />
<?php
开发者ID:sherdog,项目名称:cvsi,代码行数:31,代码来源:index.php
示例3: get_wap_pager
}
$pagebar = get_wap_pager($article_num, $page_num, $page, 'article.php', 'page');
$smarty->assign('pagebar', $pagebar);
include_once ROOT_PATH . '/includes/lib_article.php';
$article_array = get_cat_articles(-1, $page, $page_num);
$i = 1;
foreach ($article_array as $key => $article_data) {
$article_array[$key]['i'] = $i;
$article_array[$key]['title'] = encode_output($article_data['title']);
$i++;
}
$smarty->assign('article_array', $article_array);
}
} else {
include_once ROOT_PATH . '/includes/lib_article.php';
$article_num = get_article_count($cid);
$page_num = '10';
$page = !empty($_GET['page']) ? intval($_GET['page']) : 1;
$pages = ceil($article_num / $page_num);
if ($page <= 0) {
$page = 1;
}
if ($pages == 0) {
$pages = 1;
}
if ($page > $pages) {
$page = $pages;
}
$pagebar = get_wap_pager($article_num, $page_num, $page, 'article.php?cid=' . $cid, 'page');
$smarty->assign('pagebar', $pagebar);
$article_array = get_cat_articles($cid, $page, $page_num);
开发者ID:norain2050,项目名称:mhFault,代码行数:31,代码来源:article.php
示例4: get_top10
// 网店帮助
$smarty->assign('top_goods', get_top10());
// 销售排行
$smarty->assign('best_goods', get_recommend_goods('best'));
$smarty->assign('new_goods', get_recommend_goods('new'));
$smarty->assign('hot_goods', get_recommend_goods('hot'));
$smarty->assign('promotion_goods', get_promote_goods());
$smarty->assign('promotion_info', get_promotion_info());
/* Meta */
$meta = $db->getRow("SELECT keywords, cat_desc FROM " . $ecs->table('article_cat') . " WHERE cat_id = '{$cat_id}'");
if ($meta === false || empty($meta)) {
/* 如果没有找到任何记录则返回首页 */
ecs_header("Location: ./\n");
exit;
}
$smarty->assign('keywords', htmlspecialchars($meta['keywords']));
$smarty->assign('description', htmlspecialchars($meta['cat_desc']));
/* 获得文章总数 */
$size = isset($_CFG['article_page_size']) && intval($_CFG['article_page_size']) > 0 ? intval($_CFG['article_page_size']) : 20;
$count = get_article_count($cat_id);
$pages = $count > 0 ? ceil($count / $size) : 1;
if ($page > $pages) {
$page = $pages;
}
/* 获得文章列表 */
$smarty->assign('artciles_list', get_cat_articles($cat_id, $page, $size));
/* 分页 */
assign_pager('article_cat', $cat_id, $count, $size, '', '', $page);
assign_dynamic('article_cat');
}
$smarty->display('article_cat.dwt', $cache_id);
开发者ID:BGCX261,项目名称:zishashop-svn-to-git,代码行数:31,代码来源:article_cat.php
注:本文中的get_article_count函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论