aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-04-29 20:43:35 +0300
committerAqua-sama <aqua@iserlohn-fortress.net>2021-04-29 20:43:35 +0300
commit7319816b7c712cd16d6e83bcd617c95943b79be6 (patch)
treeae5de7c1e2a4387c50ee1df53b24b0021be5c591 /index.php
parentFinish user management (diff)
downloadbugtracker-7319816b7c712cd16d6e83bcd617c95943b79be6.tar.xz
CRUD reports
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/index.php b/index.php
index f63f3af..02ad53a 100644
--- a/index.php
+++ b/index.php
@@ -39,11 +39,11 @@ foreach ($bugs_r as $row) {
<?php
if(session_set()) {
- echo "<p><a href='{$config['urls']['base']}/reports/edit.php'>Create</a></p>\n";
+ echo "<p><a href='{$config['urls']['base']}/report/edit.php'>Create</a></p>\n";
}
# reports query
-$reports_q = 'SELECT title, description, author FROM reports WHERE bug IS NULL';
+$reports_q = 'SELECT reports.id AS id, title, description, users.username AS user FROM reports JOIN users ON reports.author=users.id WHERE bug IS NULL ORDER BY id';
$reports_r = $conn->query($reports_q);
if($reports_r->rowCount() > 0) {
@@ -53,7 +53,7 @@ if($reports_r->rowCount() > 0) {
<tr><th>Title</th><th>Description</th><th>Submitted by</th></tr>
<?php
foreach ($reports_r as $row) {
- echo "<tr><td><a href=view.php?id=$row[id]>$row[title]</a></td> <td>" . truncate($row['description']) . "</td> <td>$row[submitter]</td></tr>\n";
+ echo "<tr><td><a href=report/view.php?id=$row[id]>$row[title]</a></td> <td>" . truncate($row['description']) . "</td> <td>$row[user]</td></tr>\n";
}
?>
</table>