Ejemplo n.º 1
0
            } else {
                msg($do->errmsg);
            }
        } else {
            extract($do->get_one());
            $addtime = timetodate($addtime);
            include tpl('answer_edit', $module);
        }
        break;
    case 'delete':
        $itemid or msg('请选择答案');
        $do->delete($itemid);
        dmsg('删除成功', $this_forward);
        break;
    case 'check':
        if ($itemid) {
            $status = $status == 3 ? 3 : 2;
            $do->check($itemid, $status);
            dmsg($status == 3 ? '审核成功' : '取消成功', $forward);
        } else {
            $lists = $do->get_list('status=2' . $condition, $dorder[$order]);
            $menuid = 1;
            include tpl('answer', $module);
        }
        break;
    default:
        $lists = $do->get_list('status=3' . $condition, $dorder[$order]);
        $menuid = 0;
        include tpl('answer', $module);
        break;
}