本文整理汇总了PHP中article::unset_home方法的典型用法代码示例。如果您正苦于以下问题:PHP article::unset_home方法的具体用法?PHP article::unset_home怎么用?PHP article::unset_home使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类article
的用法示例。
在下文中一共展示了article::unset_home方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: article
/**
* Cnews::recycle()
*
* @param integer $id
* @param mixed $value
* @return
*/
function isolate_recycle($id = 0, $value)
{
if ($id != 0) {
$news = new article($id);
if (!$news->exists()) {
show_404();
}
$news->recycle = ($news->recycle + 1) % 2;
$news->save();
$news->unset_home();
if ($news->recycle == 1) {
flash_message('success', "Xóa thành công.");
} else {
flash_message('success', "Phục hồi thành công.");
}
} else {
$arr = $this->input->post('checkinput');
foreach ($arr as $row) {
$news = new article($row);
$id = $news->id;
$news->recycle = $value;
$news->save();
$news->unset_home();
$news->clear();
}
if ($value == 1) {
flash_message('success', "Xóa thành công.");
} else {
flash_message('success', "Phục hồi thành công.");
}
}
$n = new Article($id);
$newscatalogue = $n->newscatalogue;
$this->session->set_userdata(array(config_item('session_admin') . 'menu_current' => $newscatalogue->navigation));
if (empty($newscatalogue->menu_active)) {
$dis['menu_active'] = "Tin";
} else {
$dis['menu_active'] = $newscatalogue->menu_active;
}
redirect($this->admin . "cnews/isolate_list_by_cat/" . $newscatalogue->id);
}