aboutsummaryrefslogtreecommitdiff
path: root/t/front.t
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-09-17 23:47:58 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-09-17 23:47:58 +0200
commit7d65ce8c8e304dc8367f4492948514f2acc07a3b (patch)
tree1d1e8584ad326cf3ea7701e2a726a0f0ae1cb6cf /t/front.t
parent56509ab16c8d2225182eb0400e5c6a4900870391 (diff)
downloadcforum-7d65ce8c8e304dc8367f4492948514f2acc07a3b.tar.gz
Whatever
Diffstat (limited to 't/front.t')
-rw-r--r--t/front.t24
1 files changed, 14 insertions, 10 deletions
diff --git a/t/front.t b/t/front.t
index a9badb0..86b8fb5 100644
--- a/t/front.t
+++ b/t/front.t
@@ -1,20 +1,24 @@
+<% #include "head.tc" %>
<h1><%= site.name %></h1>
<p>Thanks for the <%= getenv("REQUEST_METHOD") %> request!</p>
<table border="1">
- <tr style="font-weight: bold;">
- <td style="width: 60px;">Key</td>
- <td style="width: 140px;">Value</td>
- </tr>
<%
- char *p, *v;
- while(p = nextparam(GET, 512)){
- v = split(p);
+ struct post *post;
+ struct user *user;
+
+ while(post = getpost(stmt, 0)){
+ user = getuser(byid("users", post->user), 1);
%>
<tr>
- <td><%= p %></td>
- <td><%= v %></td>
+ <td><a href="?user=<% printf("%d", post->user); %>"><%=
+ user->name
+ %></a></td>
+ <td><a href="?post=<% printf("%d", post->id); %>"><%=
+ post->subject
+ %></a></td>
</tr>
<%
}
%>
-</table> \ No newline at end of file
+</table>
+<% #include "foot.tc" %> \ No newline at end of file