diff options
author | John Ankarström <john@ankarstrom.se> | 2021-09-17 23:47:58 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-09-17 23:47:58 +0200 |
commit | 7d65ce8c8e304dc8367f4492948514f2acc07a3b (patch) | |
tree | 1d1e8584ad326cf3ea7701e2a726a0f0ae1cb6cf /t/front.t | |
parent | 56509ab16c8d2225182eb0400e5c6a4900870391 (diff) | |
download | cforum-7d65ce8c8e304dc8367f4492948514f2acc07a3b.tar.gz |
Whatever
Diffstat (limited to 't/front.t')
-rw-r--r-- | t/front.t | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -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 |