diff options
Diffstat (limited to 't/front.t')
-rw-r--r-- | t/front.t | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -2,14 +2,26 @@ <h1><%= site.name %></h1> <h3>Latest posts</h3> <table border="1"> - <% while(post = nextpost(stmt)){ - user = getuser(byid("users", post->user)); %> + <% while(post = nextpost(pstmt)){ + user = getuser(selectbyint("users", "oid", post->user)); %> <tr> <td><a href="?post=<% printf("%d", post->id); %>"><%= post->subject %></a></td> <td><a href="?user=<% printf("%d", post->user); %>"><%= user->name %></a></td> <td><% printdate(post->created); %></td> </tr> - <% free(post); + <% free(user); + free(post); + } %> +</table> +<h3>Latest users</h3> +<table border="1"> + <% while(user = nextuser(ustmt)){ %> + <tr> + <td><a href="?user=<% printf("%d", user->id); %>"><%= user->name %></a></td> + <td><%= user->full %></td> + <td><% printdate(user->created); %></td> + </tr> + <% free(user); } %> </table> <% #include "foot.tc" %>
\ No newline at end of file |