aboutsummaryrefslogtreecommitdiff
path: root/t/post.tc
blob: 4453246adc342740193ffc82cd00f1e42c7380c8 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "head.tc" 
printf("\n<h1>Post ");
printf("%d", id); 
printf(": ");
printf("%s",  post->subject );
printf("</h1>\n<p>From: ");
printf("%s",  user->full? user->full: "" );
printf("\n");
if(user->full) printf("&lt;"); 
printf("<a href=\"?user=");
printf("%d", user->id); 
printf("\">");
printf("%s",  user->name );
printf("</a>");
if(user->full) printf("&gt;"); 
printf("\n<br>Date: ");
printdate(post->created); 
printf("\n");
if(post->edited){
	printf("<br>Edited: ");
	printdate(post->edited);
} 
printf("\n");
if(post->parent){ 
printf("\n<br>In Reply To: <a href=\"?post=");
printf("%d", post->parent); 
printf("\">");
printf("%d", post->parent); 
printf("</a>\n");
} 
printf("\n<pre>\n");
printf("%s",  post->text );
printf("\n</pre>\n");
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"