Subversion Repositories RepoView

Rev

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

Rev 7 Rev 9
Line 1... Line 1...
1
/* $Id: modern.c 7 2024-08-21 01:12:44Z nishi $ */
1
/* $Id: modern.c 9 2024-08-21 02:02:13Z 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"
Line 93... Line 93...
93
		if(user == NULL) {
93
		if(user == NULL) {
94
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
94
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
95
			add_data(&page, INSTANCE_ROOT);
95
			add_data(&page, INSTANCE_ROOT);
96
			add_data(&page, "/?page=login\">log in</a>?\n");
96
			add_data(&page, "/?page=login\">log in</a>?\n");
97
		}
97
		}
-
 
98
	} else if(strcmp(query, "myrepo") == 0) {
-
 
99
		title = rv_strdup("My Repositories");
-
 
100
		desc = rv_strdup("You manage your repositories here.");
-
 
101
		if(user == NULL) {
-
 
102
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
-
 
103
			add_data(&page, INSTANCE_ROOT);
-
 
104
			add_data(&page, "/?page=login\">log in</a>?\n");
-
 
105
		}
98
	} else if(strcmp(query, "logout") == 0) {
106
	} else if(strcmp(query, "logout") == 0) {
99
		title = rv_strdup("Logout");
107
		title = rv_strdup("Logout");
100
		desc = rv_strdup("You can log out from your account here.");
108
		desc = rv_strdup("You can log out from your account here.");
101
		if(user == NULL) {
109
		if(user == NULL) {
102
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
110
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
Line 172... Line 180...
172
	add_data(&buffer, "}\n");
180
	add_data(&buffer, "}\n");
173
	add_data(&buffer, "#nav div {\n");
181
	add_data(&buffer, "#nav div {\n");
174
	add_data(&buffer, "	float: left;\n");
182
	add_data(&buffer, "	float: left;\n");
175
	add_data(&buffer, "	margin: 0 0;\n");
183
	add_data(&buffer, "	margin: 0 0;\n");
176
	add_data(&buffer, "	padding-left: 0;\n");
184
	add_data(&buffer, "	padding-left: 0;\n");
177
	add_data(&buffer, "	padding-right: 20px;\n");
185
	add_data(&buffer, "	padding-right: 25px;\n");
178
	add_data(&buffer, "	padding-top: 7px;\n");
186
	add_data(&buffer, "	padding-top: 7px;\n");
179
	add_data(&buffer, "}\n");
187
	add_data(&buffer, "}\n");
180
	add_data(&buffer, "body {\n");
188
	add_data(&buffer, "body {\n");
181
	add_data(&buffer, "	background-color: #1F4677;\n");
189
	add_data(&buffer, "	background-color: #1F4677;\n");
182
	add_data(&buffer, "	width: 940px;\n");
190
	add_data(&buffer, "	width: 940px;\n");
Line 274... Line 282...
274
		add_data(&buffer, "			</div>\n");
282
		add_data(&buffer, "			</div>\n");
275
	} else {
283
	} else {
276
		add_data(&buffer, "			<div>\n");
284
		add_data(&buffer, "			<div>\n");
277
		add_data(&buffer, "				<a href=\"");
285
		add_data(&buffer, "				<a href=\"");
278
		add_data(&buffer, INSTANCE_ROOT);
286
		add_data(&buffer, INSTANCE_ROOT);
-
 
287
		add_data(&buffer, "/?page=mypage\">My Page</a>\n");
-
 
288
		add_data(&buffer, "			</div>\n");
-
 
289
 
-
 
290
		add_data(&buffer, "			<div>\n");
-
 
291
		add_data(&buffer, "				<a href=\"");
-
 
292
		add_data(&buffer, INSTANCE_ROOT);
-
 
293
		add_data(&buffer, "/?page=myrepo\">My Repositories</a>\n");
-
 
294
		add_data(&buffer, "			</div>\n");
-
 
295
 
-
 
296
		add_data(&buffer, "			<div>\n");
-
 
297
		add_data(&buffer, "				<a href=\"");
-
 
298
		add_data(&buffer, INSTANCE_ROOT);
279
		add_data(&buffer, "/?page=logout\">Logout</a>\n");
299
		add_data(&buffer, "/?page=logout\">Logout</a>\n");
280
		add_data(&buffer, "			</div>\n");
300
		add_data(&buffer, "			</div>\n");
281
	}
301
	}
282
	if(user != NULL) {
302
	if(user != NULL) {
283
		add_data(&buffer, "<div style=\"float: right;font-size: 10px;padding-top: 36px;padding-right: 0;font-style: italic;\">You have logged in as <a href=\"");
303
		add_data(&buffer, "<div style=\"float: right;font-size: 10px;padding-top: 36px;padding-right: 0;font-style: italic;\">You have logged in as <a href=\"");