aboutsummaryrefslogtreecommitdiff
path: root/ctl.c
blob: 1a3627cd88ae800180bbdc21b74f4cf040b4b838 (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
#include <stdio.h>
#include <string.h>
#include "db.h"
#include "query.h"
#include "site.h"

void
showfront()
{
	char *title;
	
	title = site.name;
	printf("Content-Type: text/html\n\n");
	#include "t/head.tc"
	#include "t/front.tc"
	#include "t/foot.tc"
}

void
showpost(int id)
{
	char *title;
	
	title = site.name;
	printf("Content-Type: text/html\n\n");
	#include "t/head.tc"
	#include "t/post.tc"
	#include "t/foot.tc"
}

void
showuser(int id)
{
	char *title;
	struct user *user;
	
	user = getuser(id);
	title = site.name;
	printf("Content-Type: text/html\n\n");
	#include "t/head.tc"
	#include "t/user.tc"
	#include "t/foot.tc"
	free(user);
}