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