Beispiel #1
0
function deleRecommend()
{
    if (getvar('admin', 'session')) {
        $recommend_id = getvar('recommend_id', 'post');
        if (!empty($recommend_id)) {
            $recommend = new Recommend();
            $result = $recommend->dele($recommend_id);
            if ($result) {
                setHint('删除成功');
            } else {
                setHint('删除失败');
            }
        } else {
            setHint('需要输入正确的ID');
        }
        redirect('recommendShow');
    } else {
        setHint('请先登录');
        redirect('login');
    }
}