pass('administrator')) { exit; } // 获取数据库连接 $db = Typecho_Db::get(); // 分页设置 $page = isset($_GET['page']) ? intval($_GET['page']) : 1; if ($page < 1) $page = 1; $pageSize = 20; $offset = ($page - 1) * $pageSize; // 获取总记录数 $totalCount = $db->fetchRow($db->select('COUNT(*) as count')->from('table.edit_history'))['count']; $totalPages = ceil($totalCount / $pageSize); if ($totalPages < 1) $totalPages = 1; if ($page > $totalPages) $page = $totalPages; // 获取编辑记录,按时间倒序排列 $records = $db->fetchAll($db->select() ->from('table.edit_history') ->order('edit_time', Typecho_Db::SORT_DESC) ->limit($pageSize) ->offset($offset)); // 获取用户信息 $userIds = []; $postIds = []; foreach ($records as $record) { if ($record['editor']) { $userIds[$record['editor']] = $record['editor']; } $postIds[$record['cid']] = $record['cid']; } $users = []; if (!empty($userIds)) { $userResults = $db->fetchAll($db->select('uid', 'screenName', 'name') ->from('table.users') ->where('uid IN (' . implode(',', $userIds) . ')')); foreach ($userResults as $user) { $users[$user['uid']] = $user; } } // 获取文章标题和slug $posts = []; if (!empty($postIds)) { $postResults = $db->fetchAll($db->select('cid', 'title', 'slug') ->from('table.contents') ->where('cid IN (' . implode(',', $postIds) . ')')); foreach ($postResults as $post) { $posts[$post['cid']] = $post; } } // 获取选项 $options = Typecho_Widget::widget('Widget_Options'); $adminUrl = rtrim($options->adminUrl, '/'); $siteUrl = rtrim($options->siteUrl, '/'); ?> 编辑记录管理 - <?php echo $options->title; ?>

总记录数: 当前页数: /
📄

暂无编辑记录

返回文章管理
编辑时间
编辑用户
文章标题
编辑备注
常用操作
' . $summary . ''; ?>
编辑时间:
用户:
文章:
编辑备注:
1): ?>
页 / 共