Added .jpeg file extension

SVN revision: 39
This commit is contained in:
Stefan Ritt 2002-03-14 11:48:43 +00:00
parent ec1bef5901
commit 8cbb6f1c92

12
elogd.c
View File

@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG Contents: Web server program for Electronic Logbook ELOG
$Log$ $Log$
Revision 1.14 2002/03/14 11:48:43 midas
Added .jpeg file extension
Revision 1.13 2002/02/25 16:12:26 midas Revision 1.13 2002/02/25 16:12:26 midas
Added BGImage and BDTImage in themes Added BGImage and BDTImage in themes
@ -216,6 +219,7 @@ struct {
} filetype[] = { } filetype[] = {
{ ".JPG", "image/jpeg" }, { ".JPG", "image/jpeg" },
{ ".JPEG", "image/jpeg" },
{ ".GIF", "image/gif" }, { ".GIF", "image/gif" },
{ ".PNG", "image/png" }, { ".PNG", "image/png" },
{ ".PS", "application/postscript" }, { ".PS", "application/postscript" },
@ -4859,6 +4863,7 @@ FILE *f;
{ {
if (strstr(str, ".GIF") || if (strstr(str, ".GIF") ||
strstr(str, ".JPG") || strstr(str, ".JPG") ||
strstr(str, ".JPEG") ||
strstr(str, ".PNG")) strstr(str, ".PNG"))
{ {
rsprintf("<tr><td colspan=%d bgcolor=%s><b>%s %d:</b> <a href=\"%s\">%s</a>\n", rsprintf("<tr><td colspan=%d bgcolor=%s><b>%s %d:</b> <a href=\"%s\">%s</a>\n",
@ -5760,7 +5765,8 @@ FILE *f;
if ((strlen(path) > 13 && path[6] == '_' && path[13] == '_') || if ((strlen(path) > 13 && path[6] == '_' && path[13] == '_') ||
(strlen(path) > 13 && path[6] == '_' && path[13] == '/') || (strlen(path) > 13 && path[6] == '_' && path[13] == '/') ||
strstr(path, ".gif") || strstr(path, ".jpg") || strstr(path, ".png")) strstr(path, ".gif") || strstr(path, ".jpg") ||
strstr(path, ".jpeg") || strstr(path, ".png"))
{ {
if ((strlen(path) > 13 && path[6] == '_' && path[13] == '_') || if ((strlen(path) > 13 && path[6] == '_' && path[13] == '_') ||
(strlen(path) > 13 && path[6] == '_' && path[13] == '/')) (strlen(path) > 13 && path[6] == '_' && path[13] == '/'))
@ -6319,6 +6325,7 @@ FILE *f;
{ {
if (strstr(att, ".GIF") || if (strstr(att, ".GIF") ||
strstr(att, ".JPG") || strstr(att, ".JPG") ||
strstr(att, ".JPEG") ||
strstr(att, ".PNG")) strstr(att, ".PNG"))
{ {
rsprintf("<tr><td><table width=100%% border=0 cellpadding=0 cellspacing=1 bgcolor=%s>\n", gt("Frame color")); rsprintf("<tr><td><table width=100%% border=0 cellpadding=0 cellspacing=1 bgcolor=%s>\n", gt("Frame color"));
@ -7492,7 +7499,8 @@ struct timeval timeout;
break; break;
} }
if (strstr(logbook, ".gif") || strstr(logbook, ".jpg") || strstr(logbook, ".png") || if (strstr(logbook, ".gif") || strstr(logbook, ".jpg") ||
strstr(logbook, ".jpg") || strstr(logbook, ".png") ||
strstr(logbook, ".htm")) strstr(logbook, ".htm"))
{ {
/* serve file directly */ /* serve file directly */