Beispiel #1
0
    $id = isset($_GET['id']) ? intval($_GET['id']) : '';
    $Comment_Model->showComment($id);
    $CACHE->updateCache(array('sta', 'comment'));
    emDirect("./comment.php?active_show=1");
}
if ($action == 'admin_all_coms') {
    $operate = isset($_POST['operate']) ? $_POST['operate'] : '';
    $comments = isset($_POST['com']) ? array_map('intval', $_POST['com']) : array();
    if ($operate == '') {
        emDirect("./comment.php?error_b=1");
    }
    if ($comments == '') {
        emDirect("./comment.php?error_a=1");
    }
    if ($operate == 'del') {
        $Comment_Model->batchComment('delcom', $comments);
        $CACHE->updateCache(array('sta', 'comment'));
        emDirect("./comment.php?active_del=1");
    }
    if ($operate == 'hide') {
        $Comment_Model->batchComment('hidecom', $comments);
        $CACHE->updateCache(array('sta', 'comment'));
        emDirect("./comment.php?active_hide=1");
    }
    if ($operate == 'pub') {
        $Comment_Model->batchComment('showcom', $comments);
        $CACHE->updateCache(array('sta', 'comment'));
        emDirect("./comment.php?active_show=1");
    }
}
if ($action == 'reply_comment') {