Пример #1
0
    View::output();
}
if ($action == 'del') {
    $id = isset($_GET['id']) ? intval($_GET['id']) : '';
    LoginAuth::checkToken();
    $Comment_Model->delComment($id);
    $CACHE->updateCache(array('sta', 'comment'));
    emDirect("./comment.php?active_del=1");
}
if ($action == 'delbyip') {
    LoginAuth::checkToken();
    if (ROLE != ROLE_ADMIN) {
        emMsg('权限不足!', './');
    }
    $ip = isset($_GET['ip']) ? $_GET['ip'] : '';
    $Comment_Model->delCommentByIp($ip);
    $CACHE->updateCache(array('sta', 'comment'));
    emDirect("./comment.php?active_del=1");
}
if ($action == 'hide') {
    $id = isset($_GET['id']) ? intval($_GET['id']) : '';
    $Comment_Model->hideComment($id);
    $CACHE->updateCache(array('sta', 'comment'));
    emDirect("./comment.php?active_hide=1");
}
if ($action == 'show') {
    $id = isset($_GET['id']) ? intval($_GET['id']) : '';
    $Comment_Model->showComment($id);
    $CACHE->updateCache(array('sta', 'comment'));
    emDirect("./comment.php?active_show=1");
}