本文整理汇总了PHP中Articles::GetList方法的典型用法代码示例。如果您正苦于以下问题:PHP Articles::GetList方法的具体用法?PHP Articles::GetList怎么用?PHP Articles::GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Articles
的用法示例。
在下文中一共展示了Articles::GetList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$where = " classid = '" . $classid . "' and isplay = 1 ";
}
if (isset($filename) && !empty($filename)) {
$where = $where . " and `classid` = '" . $info['id'] . "' ";
}
$pageListNum = 12;
//每页显示
//20120715
if (intval($info['listnum']) > 0) {
$pageListNum = $info['listnum'];
}
$totalPage = 0;
//总页数
$page = isset($page) ? (int) $page : 1;
$start = ($page - 1) * $pageListNum;
$List = $articles->GetList(array('id', 'classid', 'title', 'filename', 'addtime', 'thumb', 'intro', 'titlecolor', 'author', 'clicks', 'istop'), $start, $pageListNum, $where, 'istop desc,addtime desc,id desc');
include WEB_INC . "page.class.php";
$sqlNum = "select id from {tablepre}articles where " . $where;
$db->Execute($sqlNum);
$pageNum = $db->GetRsNum();
$totalPage = ceil($pageNum / $pageListNum);
//总页数
$pages = new PageClass($page, $totalPage);
$showpage = $pages->showPage();
$templatefile = 'articles_list.tpl.php';
if ($config['customtemplatemode'] == 1) {
//==========个性化模版检测20111208===============
$custom_templates = '';
$custom_templates = $c . '_' . $a . '_classid_' . $info['id'] . '.tpl.php';
if (is_file(WEB_TPL . 'custom_templates/' . $custom_templates)) {
$templatefile = 'custom_templates/' . $custom_templates;
示例2: Articles
//功能部分
include WEB_MOD . 'articles.class.php';
include WEB_MOD . 'articles_class.class.php';
$articles = new Articles();
$articles_class = new Articles_class();
require_once WEB_INC . 'uclass.class.php';
$CL = new Uclass();
//
$perSiteMpasNum = 500;
$sitemapsTop = '';
$sitempasEnd = '';
$sitemapsBody = '';
$sitemapsContent = '';
$sitemapsFilename = '';
switch ($a) {
case 'step0':
default:
//list
$templatefile = 'sitemaps_step0.php';
break;
case 'step1':
//
//正式生成
//数据初始化
$listArticle = $articles->GetList(array('id', 'classid', 'title', 'addtime'), 0, $perSiteMpasNum, '', 'id desc');
$sitemapsTop = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
$sitemapsTop = $sitemapsTop . "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\r\n";
$sitemapsEnd = "</urlset>\r\n";
$templatefile = 'sitemaps_step1.php';
break;
}
示例3: Articles
* @time 20111004
*/
//初始化
$pagetitle = '首页';
$topTitle = '';
$where = '';
//功能部分
include WEB_MOD . 'articles.class.php';
include WEB_MOD . 'articles_class.class.php';
$articles = new Articles();
$articles_class = new Articles_class();
include WEB_MODULE . 'downloads/model/downloads.class.php';
include WEB_MODULE . 'downloads/model/downloads_class.class.php';
$downloads = new Downloads();
$downloads_class = new Downloads_class();
include WEB_MODULE . 'products/model/products.class.php';
include WEB_MODULE . 'products/model/products_class.class.php';
$products = new Products();
$products_class = new Products_class();
include WEB_MOD . 'ads.class.php';
include WEB_MOD . 'adflash.class.php';
$ads = new Ads();
$adflash = new Adflash();
include WEB_MOD . 'links.class.php';
$links = new Links();
//调用
$newList = $articles->GetList(array('id', 'classid', 'title', 'filename', 'addtime', 'titlecolor'), '0', '7', ' isplay = 1 ', 'addtime desc,id desc');
$hotList = $articles->GetList(array('id', 'classid', 'title', 'filename', 'addtime', 'titlecolor'), '0', '5', ' isplay = 1 and ishot = 1 ', 'id desc');
$topList = $articles->GetList(array('id', 'classid', 'title', 'filename', 'addtime', 'titlecolor'), '0', '5', ' isplay = 1 and istop = 1 ', 'id desc');
$goodList = $articles->GetList(array('id', 'classid', 'title', 'filename', 'intro', 'thumb', 'titlecolor'), '0', '5', ' isplay = 1 and isgood = 1 ', 'id desc');
$templatefile = 'index.tpl.php';