aboutsummaryrefslogtreecommitdiff
path: root/t/post.t
diff options
context:
space:
mode:
Diffstat (limited to 't/post.t')
-rw-r--r--t/post.t22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/post.t b/t/post.t
index b4d1e52..200e27d 100644
--- a/t/post.t
+++ b/t/post.t
@@ -13,4 +13,26 @@
<pre>
<%= post->text %>
</pre>
+<%
+struct attachment *attachment;
+
+if(attachment = getattachment(stmt, 0)){
+%>
+<h3>Attachments</h3>
+<table border="1">
+ <%
+ do{
+ %>
+ <tr>
+ <td><a href="?attachment=<% printf("%d", attachment->id); %>"><%= attachment->name %></a></td>
+ <td><%= attachment->mime %></td>
+ <td><%= attachment->description %></td>
+ </tr>
+ <%
+ }while(attachment = getattachment(stmt, 0));
+ %>
+</table>
+<%
+}
+%>
<% #include "foot.tc" %> \ No newline at end of file