本文整理汇总了PHP中news::recycle方法的典型用法代码示例。如果您正苦于以下问题:PHP news::recycle方法的具体用法?PHP news::recycle怎么用?PHP news::recycle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类news
的用法示例。
在下文中一共展示了news::recycle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: extract
extract($r);
$addtime = timetodate($addtime);
$type_select = type_select($TYPE, 0, 'post[typeid]', $L['default_type'], $typeid);
$head_title = $L['news_title_edit'];
}
break;
case 'delete':
$itemid or message($L['news_msg_choose']);
$itemids = is_array($itemid) ? $itemid : array($itemid);
foreach ($itemids as $itemid) {
$do->itemid = $itemid;
$item = $do->get_one();
if (!$item || $item['username'] != $_username) {
message();
}
$do->recycle($itemid);
}
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}";
}
示例2: tpl
$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);
} else {
$lists = $do->get_list('status=1' . $condition, $dorder[$order]);
include tpl('news_reject', $module);
}
break;
case 'delete':
$itemid or msg('请选择新闻');
isset($recycle) ? $do->recycle($itemid) : $do->delete($itemid);
dmsg('删除成功', $forward);
break;
case 'restore':
$itemid or msg('请选择新闻');
$do->restore($itemid);
dmsg('还原成功', $forward);
break;
case 'clear':
$do->clear();
dmsg('清空成功', $forward);
break;
case 'level':
$itemid or msg('请选择新闻');
$level = intval($level);
$do->level($itemid, $level);