/** * 评论管理 * @copyright (c) Emlog All Rights Reserved */ require_once 'globals.php'; $Comment_Model = new Comment_Model(); if ($action == '') { $blogId = isset($_GET['gid']) ? intval($_GET['gid']) : null; $hide = isset($_GET['hide']) ? addslashes($_GET['hide']) : ''; $page = isset($_GET['page']) ? intval($_GET['page']) : 1; $addUrl_1 = $blogId ? "gid={$blogId}&" : ''; $addUrl_2 = $hide ? "hide={$hide}&" : ''; $addUrl = $addUrl_1 . $addUrl_2; $comment = $Comment_Model->getComments(1, $blogId, $hide, $page); $cmnum = $Comment_Model->getCommentNum($blogId, $hide); $hideCommNum = $Comment_Model->getCommentNum($blogId, 'y'); $pageurl = pagination($cmnum, Option::get('admin_perpage_num'), $page, "comment.php?{$addUrl}page="); include View::getView('header'); require_once View::getView('comment'); include View::getView('footer'); 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') {