diff --git a/favicon.svg b/favicon.svg new file mode 100644 index 0000000..ad6e06e --- /dev/null +++ b/favicon.svg @@ -0,0 +1,2166 @@ + + + + diff --git a/rss.php b/rss.php new file mode 100644 index 0000000..b1e7d2a --- /dev/null +++ b/rss.php @@ -0,0 +1,56 @@ +connect_error) { + die("数据库连接失败: " . $conn->connect_error); +} + +// 查询最新的 app 列表,按发布时间降序排列 +$sql = "SELECT * FROM apps ORDER BY created_at DESC LIMIT 20"; +$result = $conn->query($sql); + +// 获取当前时间 +$now = date('c'); + +// 生成 Atom 内容 +$atom = " + + 最新 App 列表 + +leonmmcoset.jjmm.ink:3232 + + " . $now . " + http://leonmmcoset.jjmm.ink:3232 + + 管理员 + +"; + +if ($result->num_rows > 0) { + while($row = $result->fetch_assoc()) { + $atom .= " + " . htmlspecialchars($row['name']) . " + + http://leonmmcoset.jjmm.ink:3232/app.php?id=" . $row['id'] . " + " . date('c', strtotime($row['created_at'])) . " + " . htmlspecialchars($row['description']) . " + +"; + } +} + +$atom .= ""; + +// 输出 Atom 内容 +print $atom; + +// 关闭数据库连接 +$conn->close(); \ No newline at end of file