X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fdownloads.c;h=6571591cc15c835dcce5cea15d4293fa686c6959;hb=8a86f7520848e71eb7105210102a6a53633d0f20;hp=f97b1b4fdbab42be3a0ae7234f642ad46a18e427;hpb=e9e55a430dd210ce2347b5b598eb136351b72671;p=citadel.git diff --git a/webcit/downloads.c b/webcit/downloads.c index f97b1b4fd..6571591cc 100644 --- a/webcit/downloads.c +++ b/webcit/downloads.c @@ -2,6 +2,7 @@ * $Id$ */ #include "webcit.h" +#include "webserver.h" void display_room_directory(void) { @@ -12,6 +13,7 @@ void display_room_directory(void) char comment[512]; int bg = 0; char title[256]; + int havepics = 0; output_headers(1, 1, 2, 0, 0, 0); wprintf("
\n"); @@ -51,6 +53,8 @@ void display_room_directory(void) wprintf(""); escputs(mimetype); wprintf(""); wprintf(""); escputs(comment); wprintf(""); wprintf("\n"); + if (!havepics && (strstr(mimetype, "image") != NULL)) + havepics = 1; } wprintf("\n"); @@ -78,9 +82,77 @@ void display_room_directory(void) } wprintf("
\n"); + if (havepics) + wprintf("
%s
", _("Slideshow")); wDumpContent(1); } + +void display_pictureview(void) +{ + char buf[1024]; + char filename[256]; + char filesize[256]; + char mimetype[64]; + char comment[512]; + char title[256]; + int n = 0; + + + if (atol(bstr("frame")) == 1) { + + output_headers(1, 1, 2, 0, 0, 0); + wprintf("
\n"); + wprintf("

"); + snprintf(title, sizeof title, _("Pictures in %s"), WC->wc_roomname); + escputs(title); + wprintf("

"); + wprintf("
\n"); + + wprintf("
\n"); + + wprintf("
" + "
\n"); + + + + wprintf("\n"); + wprintf("
\n"); + wprintf("\n"); + wprintf("\n"); + } + wDumpContent(1); + + +} + extern char* static_dirs[]; void display_mime_icon(void) {