Subversion Repositories RepoView

Rev

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

Rev 49 Rev 50
Line 1... Line 1...
1
/* $Id: modern.c 49 2024-08-22 05:58:54Z nishi $ */
1
/* $Id: modern.c 50 2024-08-22 05:59:51Z 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 466... Line 466...
466
				FILE* f = fopen(path, "wb");
466
				FILE* f = fopen(path, "wb");
467
				fwrite(entry->data, 1, entry->length, f);
467
				fwrite(entry->data, 1, entry->length, f);
468
				fclose(f);
468
				fclose(f);
469
				char* reason;
469
				char* reason;
470
				if(rv_resize_picture(path, outpath, &reason)) {
470
				if(rv_resize_picture(path, outpath, &reason)) {
471
					add_data(&page, "Uploaded the profile picture successfully.\n");
471
					add_data(&page, "Uploaded the profile picture successfully.<br>\n");
472
				} else {
472
				} else {
473
					add_data(&page, "Failed to upload the profile picture.<br><code>\n");
473
					add_data(&page, "Failed to upload the profile picture.<br><code>\n");
474
					char* esc = html_escape(reason);
474
					char* esc = html_escape(reason);
475
					add_data(&page, esc);
475
					add_data(&page, esc);
476
					free(esc);
476
					free(esc);
Line 485... Line 485...
485
				char* path = rv_strcat3(BIO_ROOT, "/", user);
485
				char* path = rv_strcat3(BIO_ROOT, "/", user);
486
				FILE* f = fopen(path, "w");
486
				FILE* f = fopen(path, "w");
487
				fwrite(entry->data, 1, entry->length, f);
487
				fwrite(entry->data, 1, entry->length, f);
488
				fclose(f);
488
				fclose(f);
489
				free(path);
489
				free(path);
490
				add_data(&page, "Uploaded the bio successfully.\n");
490
				add_data(&page, "Uploaded the bio successfully.<br>\n");
491
			}
491
			}
492
		}
492
		}
493
#endif
493
#endif
494
	} else if(strcmp(query, "myrepo") == 0) {
494
	} else if(strcmp(query, "myrepo") == 0) {
495
		title = rv_strdup("My Repositories");
495
		title = rv_strdup("My Repositories");