path, '/')); if ($id and ctype_digit($id)) { $Page->title = "Issue #$id"; $Page->path = "/$id"; # minimal reference $Issue = $Db->query( 'SELECT * FROM issues WHERE page = ? AND id = ?', [$Page->handler, $id] )->fetch(); if (!$Issue) throw new Exception('Issuenummer niet gevonden'); $replies = placeholder_include('reply'); # handle updates $Page->title .= ': '.htmlspecialchars($Issue->subject); $Page->teaser = $Issue->body; $Page->body = $replies; # find image print "

{$Page->title}

\n"; print '\n\n"; print '
'; print $Issue->body; print $replies; print "
\n"; return; } if ($_POST) { require_once 'upload.inc.php'; $query = $Db->set('issues', [ 'page' => $Page->handler, 'subject' => $_POST['subject'], 'body' => messagehtml($_POST['body']), 'author' => $User->login, ]); if (!$query->rowCount()) { throw new Exception('Issue niet opgeslagen.'); } $_POST = []; } $subsql = "SELECT count(*) FROM comments WHERE page=i.page||'/'||i.id"; $cols = "*, ($subsql AND message IS NOT NULL) AS replycount"; $cols .= ", ($subsql AND message ~ 'query($sql, [$Page->handler]); if ($id == 'feed') { require 'issue/feed.inc.php'; } ob_start(); print '\n"; $Place['issuelist'] = ob_get_clean();