总数
通连
失连
未检
通连率
有RSS
无RSS
导出

'通连', 'offline' => '失连', 'unchecked' => '未查' ]; // 新增星级名称映射 $starNames = [ '0' => '无星级', '1' => '★', '2' => '★★', '3' => '★★★', 'starred' => '有星级' ]; $filters = []; if ($searchKeyword) { $filters[] = '搜索关键词:"' . htmlspecialchars($searchKeyword) . '"'; } if ($currentCategory) { $categoryName = ''; foreach ($categories as $cat) { if ($cat['id'] == $currentCategory) { $categoryName = $cat['name']; break; } } if ($categoryName) { $filters[] = '分类:"' . htmlspecialchars($categoryName) . '"'; } } if ($currentStatus && isset($statusNames[$currentStatus])) { $filters[] = '状态:"' . $statusNames[$currentStatus] . '"'; } // 新增:星级筛选提示 if ($currentStarRating && isset($starNames[$currentStarRating])) { $filters[] = '星级:"' . $starNames[$currentStarRating] . '"'; } if ($currentHasRss) { $filters[] = 'RSS:"' . ($currentHasRss == 'yes' ? '有' : '无') . '"'; } echo implode(',', $filters); ?>

'; } else { echo ''; } } else { foreach ($urls as $url) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; // 状态列 echo ''; // 新增:星级列 echo ''; // 新增:检查时间列 echo ''; echo ''; // 操作列 echo ''; echo ''; } } ?>
' . _t('没有找到符合条件的网址') . '
' . _t('暂无网址,点击"新增网址"按钮添加') . '
' . $url['id'] . '' . htmlspecialchars($url['title']) . '' . htmlspecialchars($url['url']) . ''; if ($url['category_name']) { echo '' . htmlspecialchars($url['category_name']) . ''; } else { echo '' . _t('未分类') . ''; } echo '' . htmlspecialchars($url['description'] ?: '-') . ''; $statusClass = 'status-unknown'; $statusTitle = '未查'; if (!empty($url['last_status_check'])) { if ($url['is_online'] == 1) { $statusClass = 'status-online'; $statusTitle = '通连'; if ($url['last_status_code']) { $statusTitle .= ' (HTTP ' . $url['last_status_code'] . ')'; } $statusTitle .= ' - 最后检查: ' . date('Y-m-d', strtotime($url['last_status_check'])); } else { $statusClass = 'status-offline'; $statusTitle = '失连'; if ($url['last_status_code']) { $statusTitle .= ' (HTTP ' . $url['last_status_code'] . ')'; } $statusTitle .= ' - 最后检查: ' . date('Y-m-d', strtotime($url['last_status_check'])); } } else if (!empty($url['created_at'])) { $createdDays = floor((time() - strtotime($url['created_at'])) / (60 * 60 * 24)); if ($createdDays > 30) { $statusTitle .= ' (添加超过' . $createdDays . '天)'; } } echo '
'; echo '
'; $starRating = isset($url['star_rating']) ? intval($url['star_rating']) : 0; $starText = UrlNav_Plugin::getStarRatingText($starRating); $starClass = $starRating > 0 ? 'has-star' : 'no-star'; echo '' . $starText . ''; echo ''; if (!empty($url['last_status_check'])) { // 将UTC时间转换为北京时间 $beijingTime = date('Y-m-d', strtotime($url['last_status_check']) + (8 * 3600)); echo $beijingTime; } else { echo '未检查'; } echo ''; if (!empty($url['rss_url'])) { echo 'RSS'; } else { echo ''; } echo ''; echo '' . _t('编辑') . ''; echo '' . _t('删除') . ''; echo '
1): ?>
  • 1): ?>
  • =2) if ($totalPages >= 2) { $showPages[] = 2; } // 显示当前页前后各1页 for ($i = max(3, $currentPage - 1); $i <= min($totalPages - 2, $currentPage + 1); $i++) { if ($i > 2 && $i < $totalPages - 1) { $showPages[] = $i; } } // 显示倒数第2页 if ($totalPages > 3 && $totalPages - 1 > $currentPage + 1) { $showPages[] = $totalPages - 1; } // 显示最后一页 if ($totalPages > 2) { $showPages[] = $totalPages; } // 去重并排序 $showPages = array_unique($showPages); sort($showPages); $prevPage = 0; foreach ($showPages as $page) { // 添加省略号 if ($page - $prevPage > 1) { echo '
  • ...
  • '; } if ($page === $currentPage) { echo '
  • ' . $page . '
  • '; } else { echo '
  • ' . $page . '
  • '; } $prevPage = $page; } ?>
'; } else { foreach ($categories as $category) { $stats = isset($categoryStats[$category['id']]) ? $categoryStats[$category['id']] : ['url_count' => 0, 'rss_count' => 0]; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } } ?>
' . _t('暂无分类,点击"新增分类"按钮添加') . '
' . $category['id'] . '' . htmlspecialchars($category['name']) . '' . htmlspecialchars($category['description'] ?: '-') . '' . $category['sort_order'] . ''; echo '' . $stats['url_count'] . ''; echo ''; echo '' . $stats['rss_count'] . ''; echo ''; echo '' . _t('编辑') . ''; echo '' . _t('删除') . ''; echo '