|
|
|
@ -210,7 +210,7 @@ static int write_topbar(int fd, enum page page, const char *id, const char *titl
|
|
|
|
|
rc |= write_buf(fd, "</form></td>");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rc |= write_buf(fd, "</tr></table>");
|
|
|
|
|
rc |= write_buf(fd, "</tr></table>\n");
|
|
|
|
|
return rc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -434,7 +434,7 @@ static int dpi_serve_zet_all(int fd) {
|
|
|
|
|
"<title>Notes - All</title>"
|
|
|
|
|
"<meta charset=utf-8>"
|
|
|
|
|
"</head>"
|
|
|
|
|
"<body style=\"margin:0\">");
|
|
|
|
|
"<body style=\"margin:0\">\n");
|
|
|
|
|
rc |= write_topbar(fd, PAGE_ALL, NULL, NULL);
|
|
|
|
|
if (rc < 0) { warn("write"); close(fd); return 0; }
|
|
|
|
|
char errbuf[LINE_MAX] = "";
|
|
|
|
@ -488,7 +488,7 @@ static int dpi_serve_zet_recent(int fd) {
|
|
|
|
|
"<title>Notes - Recent</title>"
|
|
|
|
|
"<meta charset=utf-8>"
|
|
|
|
|
"</head>"
|
|
|
|
|
"<body style=\"margin:0\">");
|
|
|
|
|
"<body style=\"margin:0\">\n");
|
|
|
|
|
rc |= write_topbar(fd, PAGE_RECENT, NULL, NULL);
|
|
|
|
|
if (rc < 0) { warn("write"); goto cleanup; }
|
|
|
|
|
char errbuf[LINE_MAX] = "";
|
|
|
|
@ -589,7 +589,7 @@ static int dpi_serve_zet_search(int fd, char *qs) {
|
|
|
|
|
"<title>Notes</title>"
|
|
|
|
|
"<meta charset=utf-8>"
|
|
|
|
|
"</head>"
|
|
|
|
|
"<body style=\"margin:0\">"
|
|
|
|
|
"<body style=\"margin:0\">\n"
|
|
|
|
|
);
|
|
|
|
|
rc |= write_topbar(fd, PAGE_SEARCH, query, NULL);
|
|
|
|
|
if (rc < 0) { warn("write"); close(fd); return 0; }
|
|
|
|
@ -641,7 +641,7 @@ static int dpi_serve_zet_new(int fd) {
|
|
|
|
|
"<title>New Note</title>"
|
|
|
|
|
"<meta charset=utf-8>"
|
|
|
|
|
"</head>"
|
|
|
|
|
"<body style=\"margin:0\">");
|
|
|
|
|
"<body style=\"margin:0\">\n");
|
|
|
|
|
write_topbar(fd, PAGE_NEW, NULL, NULL);
|
|
|
|
|
dprintf(fd,
|
|
|
|
|
"<table style=\"width:100%%; height:100%%; border-collapse:collapse\"><tr>"
|
|
|
|
@ -877,7 +877,7 @@ static int dpi_serve_zet(int fd, char *path) {
|
|
|
|
|
&& (query[5] == '\0' || query[5] == '&' ||
|
|
|
|
|
(query[5] == '=' && !(query[6] == '\0' || query[6] == '&')));
|
|
|
|
|
if (!print) {
|
|
|
|
|
rc |= write_buf(fd, "<body style=\"margin:0\">");
|
|
|
|
|
rc |= write_buf(fd, "<body style=\"margin:0\">\n");
|
|
|
|
|
rc |= write_topbar(fd, PAGE_ZET, id, title);
|
|
|
|
|
rc |= dprintf(fd,
|
|
|
|
|
"<table style=\"width:100%%; height:100%%; border-collapse:collapse\"><tr>"
|
|
|
|
|