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


PHP article::get_list方法代码示例

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


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

示例1: module_article_list

function module_article_list()
{
    global $smarty;
    $obj = new cat_art();
    $obj->set_where('cat_best = 1');
    $best_cat = $obj->get_list();
    $art_list = array();
    if (count($best_cat) > 0) {
        $smarty->assign('show_all_art', 0);
        $list_len = get_varia('index_art_list_len');
        for ($i = 0; $i < count($best_cat); $i++) {
            $cat_id = $best_cat[$i]['cat_id'];
            $best_cat[$i]['channel'] = get_data('channel', $best_cat[$i]['cat_channel_id'], 'cha_code');
            $family = implode(',', get_cat_family('cat_art', $cat_id));
            $obj = new article();
            $obj->set_field('art_id,art_title,art_add_time');
            $obj->set_where("art_cat_id in ({$family})");
            $obj->set_page_size($list_len ? $list_len : 5);
            $list = $obj->get_list();
            for ($j = 0; $j < count($list); $j++) {
                $list[$j]['short_title'] = cut_str($list[$j]['art_title'], 22);
            }
            $art_list[$cat_id] = $list;
            unset($obj);
        }
        $smarty->assign('best_art_cat', $best_cat);
        $smarty->assign('art_list', $art_list);
    } else {
        $smarty->assign('show_all_art', 1);
    }
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:31,代码来源:article_list.php

示例2: module_new_article

function module_new_article()
{
    global $smarty;
    $obj = new article();
    $obj->set_field('art_id,art_channel_id,art_title,art_add_time');
    $obj->set_page_size(10);
    $list = $obj->get_list();
    for ($i = 0; $i < count($list); $i++) {
        $list[$i]['channel'] = get_data('channel', $list[$i]['art_channel_id'], 'cha_code');
        $list[$i]['short_title'] = cut_str($list[$i]['art_title'], 16);
    }
    $smarty->assign('new_article', $list);
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:13,代码来源:new_article.php

示例3: template

            if (!$item || $item['username'] != $_username) {
                message();
            }
            $do->recycle($itemid);
        }
        dmsg($L['success_delete'], $forward);
        break;
    default:
        $status = isset($status) ? intval($status) : 3;
        in_array($status, array(1, 2, 3)) or $status = 3;
        $condition = "username='{$_username}'";
        $condition .= " AND status={$status}";
        if ($keyword) {
            $condition .= " AND keyword LIKE '%{$keyword}%'";
        }
        if ($catid) {
            $condition .= $CAT['child'] ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}";
        }
        $timetype = strpos($MOD['order'], 'edit') === false ? 'add' : '';
        $lists = $do->get_list($condition, $MOD['order']);
        break;
}
$head_title = lang($L['module_manage'], array($MOD['name']));
if ($_userid) {
    $nums = array();
    for ($i = 1; $i < 4; $i++) {
        $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table} WHERE username='{$_username}' AND status={$i}");
        $nums[$i] = $r['num'];
    }
}
include template($MOD['template_my'] ? $MOD['template_my'] : 'my_' . $module, 'member');
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:my.inc.php

示例4: msg

     $itemid or msg('请选择' . $MOD['name']);
     $do->restore($itemid);
     dmsg('还原成功', $forward);
     break;
 case 'clear':
     $do->clear();
     dmsg('清空成功', $forward);
     break;
 case 'level':
     $itemid or msg('请选择' . $MOD['name']);
     $level = intval($level);
     $do->level($itemid, $level);
     dmsg('级别设置成功', $forward);
     break;
 case 'recycle':
     $lists = $do->get_list('status=0' . $condition, $dorder[$order]);
     $menuid = 4;
     include tpl('index', $module);
     break;
 case 'reject':
     if ($itemid && !$psize) {
         $do->reject($itemid);
         dmsg('拒绝成功', $forward);
     } else {
         $lists = $do->get_list('status=1' . $condition, $dorder[$order]);
         $menuid = 3;
         include tpl('index', $module);
     }
     break;
 case 'check':
     if ($itemid && !$psize) {
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:index.inc.php


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