Subversion Repositories RepoView

Rev

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

Rev 22 Rev 27
Line 1... Line 1...
1
/* $Id: modern.c 22 2024-08-21 16:50:19Z nishi $ */
1
/* $Id: modern.c 27 2024-08-21 17:26:30Z 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 346... Line 346...
346
			rv_logout();
346
			rv_logout();
347
			add_data(&page, "Goodbye.\n");
347
			add_data(&page, "Goodbye.\n");
348
			free(user);
348
			free(user);
349
			user = NULL;
349
			user = NULL;
350
		}
350
		}
-
 
351
#ifdef USE_MYPAGE
351
	} else if(strcmp(query, "mypage") == 0) {
352
	} else if(strcmp(query, "mypage") == 0) {
352
		title = rv_strdup("My Page");
353
		title = rv_strdup("My Page");
353
		desc = rv_strdup("You manage your information here.");
354
		desc = rv_strdup("You manage your information here.");
354
		if(user == NULL) {
355
		if(user == NULL) {
355
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
356
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
356
			add_data(&page, INSTANCE_ROOT);
357
			add_data(&page, INSTANCE_ROOT);
357
			add_data(&page, "/?page=login\">log in</a>?\n");
358
			add_data(&page, "/?page=login\">log in</a>?\n");
358
		}
359
		}
-
 
360
#endif
359
	} else if(strcmp(query, "myrepo") == 0) {
361
	} else if(strcmp(query, "myrepo") == 0) {
360
		title = rv_strdup("My Repositories");
362
		title = rv_strdup("My Repositories");
361
		desc = rv_strdup("You manage your repositories here.");
363
		desc = rv_strdup("You manage your repositories here.");
362
		if(user == NULL) {
364
		if(user == NULL) {
363
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
365
			page = rv_strdup("It looks like you are not logged in.<br>Want to <a href=\"");
Line 867... Line 869...
867
		add_data(&buffer, INSTANCE_ROOT);
869
		add_data(&buffer, INSTANCE_ROOT);
868
		add_data(&buffer, "/?page=signup\">Signup</a>\n");
870
		add_data(&buffer, "/?page=signup\">Signup</a>\n");
869
		add_data(&buffer, "			</div>\n");
871
		add_data(&buffer, "			</div>\n");
870
#endif
872
#endif
871
	} else {
873
	} else {
-
 
874
#ifdef USE_MYPAGE
872
		add_data(&buffer, "			<div>\n");
875
		add_data(&buffer, "			<div>\n");
873
		add_data(&buffer, "				<a href=\"");
876
		add_data(&buffer, "				<a href=\"");
874
		add_data(&buffer, INSTANCE_ROOT);
877
		add_data(&buffer, INSTANCE_ROOT);
875
		add_data(&buffer, "/?page=mypage\">My Page</a>\n");
878
		add_data(&buffer, "/?page=mypage\">My Page</a>\n");
876
		add_data(&buffer, "			</div>\n");
879
		add_data(&buffer, "			</div>\n");
-
 
880
#endif
877
 
881
 
878
		add_data(&buffer, "			<div>\n");
882
		add_data(&buffer, "			<div>\n");
879
		add_data(&buffer, "				<a href=\"");
883
		add_data(&buffer, "				<a href=\"");
880
		add_data(&buffer, INSTANCE_ROOT);
884
		add_data(&buffer, INSTANCE_ROOT);
881
		add_data(&buffer, "/?page=myrepo\">My Repositories</a>\n");
885
		add_data(&buffer, "/?page=myrepo\">My Repositories</a>\n");