aboutsummaryrefslogtreecommitdiff
path: root/t/post.t
blob: 1e3d360dca22dea8664f20c409b1451173ee464e (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
<% #include "head.tc" %>
<h1>Post <% printf("%d", id); %>: <%= post->subject %></h1>
<p>From: <%= user->full? user->full: "" %>
<% if(user->full) printf("&lt;"); %><a href="?user=<% printf("%d", user->id); %>"><%= user->name %></a><% if(user->full) printf("&gt;"); %>
<br>Date: <% printdate(post->created); %>
<% if(post->edited){
	printf("<br>Edited: ");
	printdate(post->edited);
} %>
<% if(post->parent){ %>
<br>In Reply To: <a href="?post=<% printf("%d", post->parent); %>"><% printf("%d", post->parent); %></a>
<% } %>
<pre>
<%= post->text %>
</pre>
<% if(att = nextatt(stmt)){ %>
<h3>Attachments</h3>
<table border="1">
	<% do{ %>
	<tr>
		<td><a href="?att=<% printf("%d", att->id); %>"><%= att->name %></a></td>
		<td><%= att->mime %></td>
		<td><%= att->description %></td>
	</tr>
	<% free(att);
	}while(att = nextatt(stmt)); %>
</table>
<% } %>
<% #include "foot.tc" %>