本文整理汇总了PHP中news::get_list方法的典型用法代码示例。如果您正苦于以下问题:PHP news::get_list方法的具体用法?PHP news::get_list怎么用?PHP news::get_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类news
的用法示例。
在下文中一共展示了news::get_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dmsg
}
dmsg($L['op_del_success'], $forward);
break;
default:
$status = isset($status) ? intval($status) : 3;
in_array($status, array(1, 2, 3)) or $status = 3;
$typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1;
$type_select = type_select($TYPE, 0, 'typeid', $L['default_type'], $typeid, '', $L['all_type']);
$condition = "username='{$_username}' AND status={$status}";
if ($keyword) {
$condition .= " AND title LIKE '%{$keyword}%'";
}
if ($typeid > -1) {
$condition .= " AND typeid={$typeid}";
}
$lists = $do->get_list($condition);
foreach ($lists as $k => $v) {
$lists[$k]['type'] = $lists[$k]['typeid'] && isset($TYPE[$lists[$k]['typeid']]) ? set_style($TYPE[$lists[$k]['typeid']]['typename'], $TYPE[$lists[$k]['typeid']]['style']) : $L['default_type'];
}
$head_title = $L['news_title'];
break;
}
$nums = array();
$limit_used = 0;
for ($i = 1; $i < 4; $i++) {
$r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}news WHERE username='{$_username}' AND status={$i}");
$nums[$i] = $r['num'];
$limit_used += $r['num'];
}
$nums[0] = count($TYPE);
$limit_free = $MG['news_limit'] && $MG['news_limit'] > $limit_used ? $MG['news_limit'] - $limit_used : 0;
示例2: while
if ($db->affected_rows($result)) {
while ($r = $db->fetch_array($result)) {
$itemid = $r['itemid'];
$do->update($itemid);
}
$itemid += 1;
} else {
$itemid = $fid + $num;
}
} else {
dmsg('更新成功', "?moduleid={$moduleid}&file={$file}");
}
msg('ID从' . $fid . '至' . ($itemid - 1) . '更新成功' . progress($sid, $fid, $tid), "?moduleid={$moduleid}&file={$file}&action={$action}&sid={$sid}&fid={$itemid}&tid={$tid}&num={$num}");
break;
case 'recycle':
$lists = $do->get_list('status=0' . $condition, $dorder[$order]);
include tpl('news_recycle', $module);
break;
case 'check':
if ($itemid && !$psize) {
$do->check($itemid);
dmsg('审核成功', $forward);
} else {
$lists = $do->get_list('status=2' . $condition, $dorder[$order]);
include tpl('news_check', $module);
}
break;
case 'reject':
if ($itemid && !$psize) {
$do->reject($itemid);
dmsg('拒绝成功', $forward);