Subversion Repositories RepoView

Rev

Rev 10 | Rev 12 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 11
Line 1... Line 1...
1
/* $Id: modern.c 10 2024-08-21 02:13:48Z nishi $ */
1
/* $Id: modern.c 11 2024-08-21 04:31:55Z nishi $ */
2
 
2
 
3
#include "rv_query.h"
3
#include "rv_query.h"
4
 
4
 
5
#include "rv_util.h"
5
#include "rv_util.h"
6
#include "rv_version.h"
6
#include "rv_version.h"
7
#include "rv_auth.h"
7
#include "rv_auth.h"
8
#include "rv_db.h"
8
#include "rv_db.h"
-
 
9
#include "rv_repo.h"
9
 
10
 
10
#include "../../config.h"
11
#include "../../config.h"
11
 
12
 
12
#include <stdio.h>
13
#include <stdio.h>
13
#include <stdlib.h>
14
#include <stdlib.h>
Line 19... Line 20...
19
 
20
 
20
char* title = NULL;
21
char* title = NULL;
21
char* desc = NULL;
22
char* desc = NULL;
22
char* page = NULL;
23
char* page = NULL;
23
char* nav = NULL;
24
char* nav = NULL;
-
 
25
char* grepouser;
24
extern char* user;
26
extern char* user;
25
 
27
 
-
 
28
char* url_escape(const char* input) {
-
 
29
	const char hex[] = "0123456789ABCDEF";
-
 
30
	char* r = malloc(1);
-
 
31
	r[0] = 0;
-
 
32
	char cbuf[2];
-
 
33
	cbuf[1] = 0;
-
 
34
	int i;
-
 
35
	for(i = 0; input[i] != 0; i++) {
-
 
36
		if(input[i] == 0x20 || input[i] == 0x22 || input[i] == 0x25 || input[i] == 0x2d || input[i] == 0x2e || input[i] == 0x3c || input[i] == 0x3e || input[i] == 0x5c || input[i] == 0x5e || input[i] == 0x5f || input[i] == 0x60 || input[i] == 0x7b || input[i] == 0x7c || input[i] == 0x7d || input[i] == 0x7e || input[i] == 0x21 || input[i] == 0x23 || input[i] == 0x24 || input[i] == 0x26 || input[i] == 0x27 || input[i] == 0x28 || input[i] == 0x29 || input[i] == 0x2a || input[i] == 0x2b || input[i] == 0x2c || input[i] == 0x2f || input[i] == 0x3a || input[i] == 0x3b || input[i] == 0x3d || input[i] == 0x3f || input[i] == 0x40 || input[i] == 0x5b || input[i] == 0x5d) {
-
 
37
			add_data(&r, "%");
-
 
38
			cbuf[0] = hex[(input[i] >> 4) & 0xf];
-
 
39
			add_data(&r, cbuf);
-
 
40
			cbuf[0] = hex[input[i] & 0xf];
-
 
41
			add_data(&r, cbuf);
-
 
42
		} else {
-
 
43
			cbuf[0] = input[i];
-
 
44
			add_data(&r, cbuf);
-
 
45
		}
-
 
46
	}
-
 
47
	return r;
-
 
48
}
-
 
49
 
-
 
50
char* html_escape(const char* input) {
-
 
51
	char* r = malloc(1);
-
 
52
	r[0] = 0;
-
 
53
	char cbuf[2];
-
 
54
	cbuf[1] = 0;
-
 
55
	int i;
-
 
56
	for(i = 0; input[i] != 0; i++) {
-
 
57
		if(input[i] == '<') {
-
 
58
			add_data(&r, "&lt;");
-
 
59
		} else if(input[i] == '>') {
-
 
60
			add_data(&r, "&gt;");
-
 
61
		} else {
-
 
62
			cbuf[0] = input[i];
-
 
63
			add_data(&r, cbuf);
-
 
64
		}
-
 
65
	}
-
 
66
	return r;
-
 
67
}
-
 
68
 
-
 
69
char* html_escape_nl_to_br(const char* input) {
-
 
70
	char* r = malloc(1);
-
 
71
	r[0] = 0;
-
 
72
	char cbuf[2];
-
 
73
	cbuf[1] = 0;
-
 
74
	int i;
-
 
75
	for(i = 0; input[i] != 0; i++) {
-
 
76
		if(input[i] == '<') {
-
 
77
			add_data(&r, "&lt;");
-
 
78
		} else if(input[i] == '>') {
-
 
79
			add_data(&r, "&gt;");
-
 
80
		} else if(input[i] == '\n') {
-
 
81
			add_data(&r, "<br>");
-
 
82
		} else {
-
 
83
			cbuf[0] = input[i];
-
 
84
			add_data(&r, cbuf);
-
 
85
		}
-
 
86
	}
-
 
87
	return r;
-
 
88
}
-
 
89
 
-
 
90
void list_repo(const char* name, const char* rev) {
-
 
91
	char* showname = html_escape(name);
-
 
92
	char* urluser = url_escape(user);
-
 
93
	char* urlrepo = url_escape(name);
-
 
94
	add_data(&page, "<tr>");
-
 
95
	add_data(&page, "<td><a href=\"");
-
 
96
	add_data(&page, INSTANCE_ROOT);
-
 
97
	add_data(&page, "/?page=repo&reponame=");
-
 
98
	add_data(&page, urlrepo);
-
 
99
	add_data(&page, "&username=");
-
 
100
	add_data(&page, urluser);
-
 
101
	add_data(&page, "\">");
-
 
102
	add_data(&page, showname);
-
 
103
	add_data(&page, "</a></td>");
-
 
104
	add_data(&page, "<td>");
-
 
105
	add_data(&page, rev);
-
 
106
	add_data(&page, "</td>");
-
 
107
	add_data(&page, "</tr>");
-
 
108
	free(showname);
-
 
109
	free(urluser);
-
 
110
	free(urlrepo);
-
 
111
}
-
 
112
 
-
 
113
int fcounter = 0;
-
 
114
void list_files(const char* pathname) {
-
 
115
	if(fcounter == 0) {
-
 
116
		add_data(&nav, "<li><a href=\"#filelist\">File List</a></li>\n");
-
 
117
		add_data(&page, "<h2 id=\"filelist\">File List</h2>\n");
-
 
118
		add_data(&page, "<tr style=\"background-color: #D2E1F6;\"><th>Name</th><th>Size</th></tr>\n");
-
 
119
	}
-
 
120
	fcounter++;
-
 
121
	add_data(&page, "<tr style=\"background-color: #");
-
 
122
	if((fcounter % 2) == 0) {
-
 
123
		add_data(&page, "D2E1C0");
-
 
124
	} else {
-
 
125
		add_data(&page, "FFFFFF");
-
 
126
	}
-
 
127
	char* path = rv_get_query("path");
-
 
128
	if(path == NULL) path = "/";
-
 
129
	char* query = rv_strdup("?page=repo&reponame=");
-
 
130
	char* esc;
-
 
131
	esc = url_escape(rv_get_query("reponame"));
-
 
132
	add_data(&query, esc);
-
 
133
	free(esc);
-
 
134
	add_data(&query, "&username=");
-
 
135
	esc = url_escape(user);
-
 
136
	add_data(&query, esc);
-
 
137
	free(esc);
-
 
138
	add_data(&query, "&path=");
-
 
139
	char* urlpath = rv_strcat(path, pathname);
-
 
140
	esc = url_escape(urlpath);
-
 
141
	add_data(&query, esc);
-
 
142
	free(esc);
-
 
143
	char* sz = malloc(128);
-
 
144
	sprintf(sz, "%lld", rv_get_filesize(grepouser, urlpath));
-
 
145
	add_data(&page, "\"><td><a href=\"");
-
 
146
	add_data(&page, query);
-
 
147
	add_data(&page, "\">");
-
 
148
	add_data(&page, pathname);
-
 
149
	add_data(&page, "</a></td>\n");
-
 
150
	add_data(&page, "<td>\n");
-
 
151
	if(strcmp(sz, "-1") != 0) {
-
 
152
		add_data(&page, sz);
-
 
153
	} else {
-
 
154
		add_data(&page, "&lt;DIR&gt;");
-
 
155
	}
-
 
156
	add_data(&page, "</td>\n");
-
 
157
	free(sz);
-
 
158
	add_data(&page, "</tr>\n");
-
 
159
	free(query);
-
 
160
	free(urlpath);
-
 
161
}
-
 
162
 
26
void render_page(void) {
163
void render_page(void) {
27
	rv_load_query('Q');
164
	rv_load_query('Q');
28
	char* query = rv_get_query("page");
165
	char* query = rv_get_query("page");
29
	if(query == NULL) query = "welcome";
166
	if(query == NULL) query = "welcome";
30
 
167
 
Line 59... Line 196...
59
	} else if(strcmp(query, "sendlogin") == 0) {
196
	} else if(strcmp(query, "sendlogin") == 0) {
60
		title = rv_strdup("Login Result");
197
		title = rv_strdup("Login Result");
61
		page = rv_strdup("");
198
		page = rv_strdup("");
62
 
199
 
63
		rv_load_query('P');
200
		rv_load_query('P');
-
 
201
		if(user != NULL) {
-
 
202
			page = rv_strdup("It looks like you are already logged in.<br>Want to <a href=\"");
-
 
203
			add_data(&page, INSTANCE_ROOT);
-
 
204
			add_data(&page, "/?page=login\">log out</a>?\n");
64
		if(rv_get_query("username") == NULL || rv_get_query("password") == NULL) {
205
		} else if(rv_get_query("username") == NULL || rv_get_query("password") == NULL) {
65
			add_data(&page, "Invalid form.\n");
206
			add_data(&page, "Invalid form.\n");
66
		} else {
207
		} else {
67
			if(rv_has_user(rv_get_query("username"))) {
208
			if(rv_has_user(rv_get_query("username"))) {
68
				if(rv_check_password(rv_get_query("username"), rv_get_query("password"))) {
209
				if(rv_check_password(rv_get_query("username"), rv_get_query("password"))) {
69
					if(user != NULL) free(user);
210
					if(user != NULL) free(user);
Line 102... Line 243...
102
		if(user == NULL) {
243
		if(user == NULL) {
103
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
244
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
104
			add_data(&page, INSTANCE_ROOT);
245
			add_data(&page, INSTANCE_ROOT);
105
			add_data(&page, "/?page=login\">log in</a>?\n");
246
			add_data(&page, "/?page=login\">log in</a>?\n");
106
		} else {
247
		} else {
-
 
248
			char cbuf[2];
-
 
249
			cbuf[0] = REPO_USER_DELIM;
-
 
250
			cbuf[1] = 0;
107
			nav = rv_strdup("");
251
			nav = rv_strdup("");
108
			add_data(&nav, "<li><a href=\"#createrepo\">Create a repository</a></li>\n");
252
			add_data(&nav, "<li><a href=\"#createrepo\">Create a repository</a></li>\n");
109
			add_data(&nav, "<li><a href=\"#repolist\">Repository List</a></li>\n");
253
			add_data(&nav, "<li><a href=\"#repolist\">Repository List</a></li>\n");
110
			page = rv_strdup("");
254
			page = rv_strdup("");
111
			add_data(&page, "<h2 id=\"createrepo\">Create a repository</h2>\n");
255
			add_data(&page, "<h2 id=\"createrepo\">Create a repository</h2>\n");
Line 119... Line 263...
119
			add_data(&page, "				<input name=\"name\">\n");
263
			add_data(&page, "				<input name=\"name\">\n");
120
			add_data(&page, "			</td>\n");
264
			add_data(&page, "			</td>\n");
121
			add_data(&page, "			<td><input type=\"submit\" value=\"Create\"></td>\n");
265
			add_data(&page, "			<td><input type=\"submit\" value=\"Create\"></td>\n");
122
			add_data(&page, "		</tr>\n");
266
			add_data(&page, "		</tr>\n");
123
			add_data(&page, "	</table>\n");
267
			add_data(&page, "	</table>\n");
-
 
268
			add_data(&page, "Repository name cannot contain '<code>");
-
 
269
			add_data(&page, cbuf);
-
 
270
			add_data(&page, "</code>'.");
124
			add_data(&page, "</form>\n");
271
			add_data(&page, "</form>\n");
125
			add_data(&page, "<h2 id=\"repolist\">Repository List</h2>\n");
272
			add_data(&page, "<h2 id=\"repolist\">Repository List</h2>\n");
-
 
273
			add_data(&page, "<table border=\"0\">\n");
-
 
274
			add_data(&page, "<tr><th>Repository name</th><th>Revision</th></tr>\n");
-
 
275
			rv_repo_list(user, list_repo);
-
 
276
			add_data(&page, "</table>\n");
-
 
277
		}
-
 
278
	} else if(strcmp(query, "createrepo") == 0) {
-
 
279
		title = rv_strdup("Creating Repository Result");
-
 
280
		page = rv_strdup("");
-
 
281
 
-
 
282
		rv_load_query('P');
-
 
283
		if(user == NULL) {
-
 
284
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
-
 
285
			add_data(&page, INSTANCE_ROOT);
-
 
286
			add_data(&page, "/?page=login\">log in</a>?\n");
-
 
287
		} else if(rv_get_query("name") == NULL) {
-
 
288
			add_data(&page, "Invalid form.\n");
-
 
289
		} else {
-
 
290
			int i;
-
 
291
			bool reject = false;
-
 
292
			char* name = rv_get_query("name");
-
 
293
			for(i = 0; name[i] != 0; i++) {
-
 
294
				if(name[i] == REPO_USER_DELIM) {
-
 
295
					char cbuf[2];
-
 
296
					cbuf[0] = REPO_USER_DELIM;
-
 
297
					cbuf[1] = 0;
-
 
298
					add_data(&page, "Repository name cannot contain '<code>");
-
 
299
					add_data(&page, cbuf);
-
 
300
					add_data(&page, "</code>'.");
-
 
301
					reject = true;
-
 
302
					break;
-
 
303
				}
-
 
304
			}
-
 
305
			if(!reject) {
-
 
306
				char* ru = rv_construct_repouser(name, user);
-
 
307
				if(rv_repo_exists(ru)) {
-
 
308
					add_data(&page, "Repository already exists.");
-
 
309
				} else {
-
 
310
					char* esc;
-
 
311
					rv_create_repo(ru);
-
 
312
					add_data(&page, "Repository has been created.<br>\n");
-
 
313
					add_data(&page, "<a href=\"");
-
 
314
					add_data(&page, INSTANCE_ROOT);
-
 
315
					esc = url_escape(name);
-
 
316
					add_data(&page, "/?page=repo&reponame=");
-
 
317
					add_data(&page, esc);
-
 
318
					free(esc);
-
 
319
					esc = url_escape(user);
-
 
320
					add_data(&page, "&username=");
-
 
321
					add_data(&page, esc);
-
 
322
					free(esc);
-
 
323
					add_data(&page, "\">Go to the repository</a>.\n");
-
 
324
				}
-
 
325
				free(ru);
-
 
326
			}
126
		}
327
		}
127
	} else if(strcmp(query, "logout") == 0) {
328
	} else if(strcmp(query, "logout") == 0) {
128
		title = rv_strdup("Logout");
329
		title = rv_strdup("Logout");
129
		desc = rv_strdup("You can log out from your account here.");
330
		desc = rv_strdup("You can log out from your account here.");
130
		if(user == NULL) {
331
		if(user == NULL) {
Line 138... Line 339...
138
			add_data(&page, INSTANCE_ROOT);
339
			add_data(&page, INSTANCE_ROOT);
139
			add_data(&page, "/?page=sendlogout\">\n");
340
			add_data(&page, "/?page=sendlogout\">\n");
140
			add_data(&page, "	<input type=\"submit\" value=\"Yes\">\n");
341
			add_data(&page, "	<input type=\"submit\" value=\"Yes\">\n");
141
			add_data(&page, "</form>\n");
342
			add_data(&page, "</form>\n");
142
		}
343
		}
-
 
344
	} else if(strcmp(query, "repo") == 0) {
-
 
345
		title = rv_strdup("Repository");
-
 
346
		desc = rv_strdup("");
-
 
347
		page = rv_strdup("");
-
 
348
		nav = rv_strdup("");
-
 
349
		if(rv_get_query("username") == NULL || rv_get_query("reponame") == NULL) {
-
 
350
			add_data(&page, "Required parameters not set.");
-
 
351
		} else {
-
 
352
			char* user = rv_get_query("username");
-
 
353
			char* repo = rv_get_query("reponame");
-
 
354
			char* repouser = rv_construct_repouser(repo, user);
-
 
355
			grepouser = repouser;
-
 
356
			if(rv_repo_exists(repouser)) {
-
 
357
				char* showuser = html_escape(user);
-
 
358
				char* showrepo = html_escape(repo);
-
 
359
				char* showreadme = rv_get_readme(repouser);
-
 
360
				desc = html_escape_nl_to_br(showreadme);
-
 
361
				add_data(&title, " - ");
-
 
362
				add_data(&title, showrepo);
-
 
363
				add_data(&title, "/");
-
 
364
				add_data(&title, showuser);
-
 
365
				free(showuser);
-
 
366
				free(showrepo);
-
 
367
				free(showreadme);
-
 
368
 
-
 
369
				int isdir;
-
 
370
				char* path = rv_get_query("path");
-
 
371
				if(path == NULL) path = "/";
-
 
372
				fcounter = 0;
-
 
373
				add_data(&page, "<table border=\"0\" style=\"width: 100%;\">");
-
 
374
				if(!rv_get_list(repouser, path, list_files, &isdir)) {
-
 
375
					add_data(&page, "<tr><td>Path not found.</td></tr>\n");
-
 
376
				}
-
 
377
				add_data(&page, "</table>");
-
 
378
				if(isdir == 0) {
-
 
379
					add_data(&nav, "<li><a href=\"#filecontent\">Content</a></li>");
-
 
380
					add_data(&page, "<h2 id=\"filecontent\">Content</h2>\n");
-
 
381
					add_data(&page, "<pre class=\"codeblock\"><code>");
-
 
382
					char* data = rv_read_file(repouser, path);
-
 
383
					char* esc = html_escape_nl_to_br(data);
-
 
384
					add_data(&page, esc);
-
 
385
					free(esc);
-
 
386
					free(data);
-
 
387
					add_data(&page, "</code></pre>");
-
 
388
				}
-
 
389
			} else {
-
 
390
				add_data(&page, "Repository does not exist.\n");
-
 
391
			}
-
 
392
			free(repouser);
-
 
393
		}
143
	}
394
	}
144
 
395
 
145
	if(title == NULL) title = rv_strdup("");
396
	if(title == NULL) title = rv_strdup("");
146
	if(desc == NULL) desc = rv_strdup("");
397
	if(desc == NULL) desc = rv_strdup("");
147
	if(page == NULL) page = rv_strdup("");
398
	if(page == NULL) page = rv_strdup("");
Line 206... Line 457...
206
	add_data(&buffer, "	margin: 0 0;\n");
457
	add_data(&buffer, "	margin: 0 0;\n");
207
	add_data(&buffer, "	padding-left: 0;\n");
458
	add_data(&buffer, "	padding-left: 0;\n");
208
	add_data(&buffer, "	padding-right: 25px;\n");
459
	add_data(&buffer, "	padding-right: 25px;\n");
209
	add_data(&buffer, "	padding-top: 7px;\n");
460
	add_data(&buffer, "	padding-top: 7px;\n");
210
	add_data(&buffer, "}\n");
461
	add_data(&buffer, "}\n");
-
 
462
	add_data(&buffer, "th,td {\n");
-
 
463
	add_data(&buffer, "	padding: 2px;\n");
-
 
464
	add_data(&buffer, "}\n");
211
	add_data(&buffer, "body {\n");
465
	add_data(&buffer, "body {\n");
212
	add_data(&buffer, "	background-color: #1F4677;\n");
466
	add_data(&buffer, "	background-color: #1F4677;\n");
213
	add_data(&buffer, "	width: 940px;\n");
467
	add_data(&buffer, "	width: 940px;\n");
214
	add_data(&buffer, "	margin: 5px auto;\n");
468
	add_data(&buffer, "	margin: 5px auto;\n");
215
	add_data(&buffer, "	font-family: sans-serif;\n");
469
	add_data(&buffer, "	font-family: sans-serif;\n");
Line 223... Line 477...
223
	add_data(&buffer, "	padding: 8px;\n");
477
	add_data(&buffer, "	padding: 8px;\n");
224
	add_data(&buffer, "	padding-left: 32px;\n");
478
	add_data(&buffer, "	padding-left: 32px;\n");
225
	add_data(&buffer, "	font-size: 22px;\n");
479
	add_data(&buffer, "	font-size: 22px;\n");
226
	add_data(&buffer, "	font-weight: bold;\n");
480
	add_data(&buffer, "	font-weight: bold;\n");
227
	add_data(&buffer, "}\n");
481
	add_data(&buffer, "}\n");
-
 
482
	add_data(&buffer, "pre {\n");
-
 
483
	add_data(&buffer, "	background-color: #dddddd;\n");
-
 
484
	add_data(&buffer, "	border: solid 2px #bbbbbb;\n");
-
 
485
	add_data(&buffer, "}\n");
228
	add_data(&buffer, "#index {\n");
486
	add_data(&buffer, "#index {\n");
229
	add_data(&buffer, "	list-style: none;\n");
487
	add_data(&buffer, "	list-style: none;\n");
230
	add_data(&buffer, "	line-height: normal;\n");
488
	add_data(&buffer, "	line-height: normal;\n");
231
	add_data(&buffer, "	margin: auto 0;\n");
489
	add_data(&buffer, "	margin: auto 0;\n");
232
	add_data(&buffer, "	padding-left: 0;\n");
490
	add_data(&buffer, "	padding-left: 0;\n");
Line 237... Line 495...
237
	add_data(&buffer, "	height: 128px;\n");
495
	add_data(&buffer, "	height: 128px;\n");
238
	add_data(&buffer, "	padding: 24px;\n");
496
	add_data(&buffer, "	padding: 24px;\n");
239
	add_data(&buffer, "}\n");
497
	add_data(&buffer, "}\n");
240
	add_data(&buffer, "#descinside {\n");
498
	add_data(&buffer, "#descinside {\n");
241
	add_data(&buffer, "	float: left;\n");
499
	add_data(&buffer, "	float: left;\n");
-
 
500
	add_data(&buffer, "	width: 700px;\n");
-
 
501
	add_data(&buffer, "	overflow-y: scroll;\n");
-
 
502
	add_data(&buffer, "	max-height: 128px;\n");
242
	add_data(&buffer, "}\n");
503
	add_data(&buffer, "}\n");
243
	add_data(&buffer, "#logo {\n");
504
	add_data(&buffer, "#logo {\n");
244
	add_data(&buffer, "	float: right;\n");
505
	add_data(&buffer, "	float: right;\n");
245
	add_data(&buffer, "}\n");
506
	add_data(&buffer, "}\n");
246
	add_data(&buffer, "#content {\n");
507
	add_data(&buffer, "#content {\n");
247
	add_data(&buffer, "	background-color: #FFFFFF;\n");
508
	add_data(&buffer, "	background-color: #FFFFFF;\n");
248
	add_data(&buffer, "	margin: -10px auto;\n");
509
	add_data(&buffer, "	margin: -10px auto;\n");
249
	add_data(&buffer, "	padding: 8px 24px 24px;\n");
510
	add_data(&buffer, "	padding: 8px 24px 24px;\n");
250
	add_data(&buffer, "	min-height: 128px;\n");
-
 
251
	add_data(&buffer, "}\n");
511
	add_data(&buffer, "}\n");
252
	add_data(&buffer, "#pageindex {\n");
512
	add_data(&buffer, "#pageindex {\n");
253
	add_data(&buffer, "	background-color: #FFFFFF;\n");
513
	add_data(&buffer, "	background-color: #FFFFFF;\n");
254
	add_data(&buffer, "	padding-right: 24px;\n");
514
	add_data(&buffer, "	padding-right: 24px;\n");
255
	add_data(&buffer, "	padding-bottom: 24px;\n");
515
	add_data(&buffer, "	padding-bottom: 24px;\n");
Line 350... Line 610...
350
	add_data(&buffer, nav);
610
	add_data(&buffer, nav);
351
	add_data(&buffer, "				</ul>\n");
611
	add_data(&buffer, "				</ul>\n");
352
	add_data(&buffer, "			</div>\n");
612
	add_data(&buffer, "			</div>\n");
353
	add_data(&buffer, "			<div id=\"pagecontent\">\n");
613
	add_data(&buffer, "			<div id=\"pagecontent\">\n");
354
	add_data(&buffer, page);
614
	add_data(&buffer, page);
355
	add_data(&buffer, "				<div class=\"fixfloat\"></div>\n");
-
 
356
	add_data(&buffer, "			</div>\n");
615
	add_data(&buffer, "			</div>\n");
-
 
616
	add_data(&buffer, "			<div class=\"fixfloat\"></div>\n");
357
	add_data(&buffer, "		</div>\n");
617
	add_data(&buffer, "		</div>\n");
358
	add_data(&buffer, "		<div id=\"footer\">\n");
618
	add_data(&buffer, "		<div id=\"footer\">\n");
359
	add_data(&buffer, "			<div id=\"gotop\">\n");
619
	add_data(&buffer, "			<div id=\"gotop\">\n");
360
	add_data(&buffer, "				<a href=\"#top\">Top</a>\n");
620
	add_data(&buffer, "				<a href=\"#top\">Top</a>\n");
361
	add_data(&buffer, "			</div>\n");
621
	add_data(&buffer, "			</div>\n");