blob: 2662be220aa3e7988bef79a2c911affe599f6ea3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<% #include "head.tc" %>
<h1><%= site.name %></h1>
<ul>
<li><a href="?new=user">Sign up</a></li>
</ul>
<h3>Latest posts</h3>
<table border="1">
<% 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(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" %>
|