+$cols = "*, (SELECT count(*) FROM comments WHERE"
+ . " page=i.page||'/'||i.id AND message IS NOT NULL) AS replycount";
+$sql = "SELECT $cols FROM issues i WHERE page = ?";
+if (isset($_GET['open'])) {
+ $sql .= ' AND closed IS NULL';
+}
+$sql .= ' ORDER BY closed IS NOT NULL, updated DESC';
+$query = $Db->query($sql, [$Page]);
+
+if ($id == 'feed') {
+ require 'issue/feed.inc.php';
+}