3 require_once 'database.inc.php';
4 $id = trim($Args, '/');
7 $Article->title = "Issue #$id";
10 'SELECT * FROM issues WHERE id = ?', [$id]
12 if (!$row) throw new Exception('Issuenummer niet gevonden');
14 $Article->title .= ': '.htmlspecialchars($row->subject);
15 print "<h2>{$Article->title}</h2>\n";
18 printf('<p><strong>%s</strong> <small class=date>%s</small></p>'."\n",
19 'Opgelost', showdate(preg_split('/\D/', $row->closed))
22 print placeholder_include('reply');
27 $html = nl2br(htmlspecialchars($_POST['body']));
28 $html = empty($html) ? NULL : "<p>$html</p>";
29 $query = $Db->insert('issues', [
31 'subject' => $_POST['subject'],
33 'author' => $User->login,
35 if (!$query->rowCount()) {
36 throw new Exception('Issue niet opgeslagen.');
41 $query = $Db->query('SELECT * FROM issues ORDER BY created DESC');
45 while ($row = $query->fetch()) {
46 printf('<li><a href="%s">%s <small class="date">%s</small></a>',
48 sprintf($row->closed ? '<strike>%s</strike>' : '%s',
49 htmlspecialchars($row->subject)),
50 showdate(array_slice(preg_split('/\D/', $row->created), 0, 3))
55 $Place['issuelist'] = ob_get_clean();