From abd001995da7a0e6294dac15e01c7e89d0cfd48c Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Mon, 14 Jan 2002 13:05:41 +0000 Subject: [PATCH] - Check for JavaScript in error display - Improved decoding of POST message (needed for lynx) SVN revision: 13 --- elogd.c | 83 ++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 31 deletions(-) diff --git a/elogd.c b/elogd.c index 62225e9f..e937f01d 100755 --- a/elogd.c +++ b/elogd.c @@ -6,6 +6,10 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.5 2002/01/14 13:05:41 midas + - Check for JavaScript in error display + - Improved decoding of POST message (needed for lynx) + Revision 1.4 2001/12/21 16:03:23 midas Moved themes directories under "themes/" @@ -2787,7 +2791,22 @@ void show_error(char *error) rsprintf("", gt("Cell BGColor")); + rsprintf("\n"); + + rsprintf("\n"); + + /* rsprintf("\n", loc("Back")); + */ + /* rsprintf("", loc("Back")); */ @@ -4985,25 +5004,13 @@ int i, j, n, missing, first, index, n_attr, n_mail, suppress, status; if (missing) { - show_standard_header("ELOG error", ""); + sprintf(error, ""); + sprintf(error+strlen(error), loc("Error: Attribute %s not supplied"), attr_list[i]); + sprintf(error+strlen(error), ".

\n"); + sprintf(error+strlen(error), loc("Please go back and enter the %s field"), attr_list[i]); + strcat(error, ".\n"); - rsprintf("

", - gt("Border width"), gt("Frame color")); - rsprintf("
\n", gt("Frame color")); - rsprintf("\n"); - - rsprintf("\n", loc("Back")); - - - rsprintf("
"); - - rsprintf(""); - rsprintf(loc("Error: Attribute %s not supplied"), attr_list[i]); - rsprintf(".

\n"); - rsprintf(loc("Please go back and enter the %s field"), attr_list[i]); - rsprintf(".

", gt("Cell BGColor")); - rsprintf("
\n"); - rsprintf("\n"); + show_error(error); return; } @@ -6822,7 +6829,7 @@ char *p, *pitem; void decode_post(char *string, char *boundary, int length) { -char *pinit, *p, *pitem, *ptmp, file_name[256], str[256]; +char *pinit, *p, *ptmp, file_name[256], str[256], line[256], item[256]; int i, n; for (i=0 ; i