$fromtime = timetodate($fromtime, 3); $today = timetodate($totime, 'Ymd'); $totime = $totime ? timetodate($totime, 3) : ''; $head_title = $L['honor_title_edit']; } break; case 'delete': $itemid or message($L['honor_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, 4)) or $status = 3; if ($status == 3) { $do->expire("AND username='******'"); } $condition = "username='******'"; $condition .= " AND status={$status}"; if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'"; } $lists = $do->get_list($condition);
} else { msg($do->errmsg); } } else { extract($do->get_one()); $addtime = timetodate($addtime); $fromtime = timetodate($fromtime, 3); $totime = $totime ? timetodate($totime, 3) : ''; $menuon = array('5', '4', '2', '1', '3'); $menuid = $menuon[$status]; include tpl('honor_edit', $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 'recycle': $lists = $do->get_list('status=0' . $condition, $dorder[$order]); $menuid = 5; include tpl('honor', $module);