diff --git a/elogd.c b/elogd.c index 2ae97587..3600a8d2 100755 --- a/elogd.c +++ b/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 2.16 2002/06/14 06:46:41 midas + Introduced wrapping logbook tabs + Revision 2.15 2002/06/14 06:08:19 midas Sort index by date @@ -2950,7 +2953,7 @@ void show_standard_header(char *title, char *path) void show_standard_title(char *logbook, char *text, int printable) { char str[256], ref[256]; -int i; +int i, j; /* overall table, containing title, menu and message body */ if (printable) @@ -2964,42 +2967,10 @@ int i; if (!printable && getcfg(logbook, "logbook tabs", str) && atoi(str) == 1) { - /* - if (!getcfg("global", "tab cellpadding", str)) - strcpy(str, "5"); - rsprintf("\n", str); - - if (getcfg("global", "main tab", str)) - { - rsprintf("\n", str); - rsprintf("\n"); - } - - for (i=0 ; ; i++) - { - if (!enumgrp(i, str)) - break; - - if (equal_ustring(str, "global")) - continue; - - strcpy(ref, str); - url_encode(ref); - - if (equal_ustring(str, logbook)) - rsprintf("\n", gt("Title BGColor"), gt("Title fontcolor"), str); - else - rsprintf("\n", ref, str); - rsprintf("\n"); - } - rsprintf("\n"); - rsprintf("
%s %s%s  
\n\n"); - */ - rsprintf("\n"); if (getcfg("global", "main tab", str)) - rsprintf(" %s  \n", str); + rsprintf(" %s  \n", str); for (i=0 ; ; i++) { @@ -3013,9 +2984,31 @@ int i; url_encode(ref); if (equal_ustring(str, logbook)) - rsprintf(" %s  \n", gt("Title fontcolor"), gt("Title BGColor"), str); + { + rsprintf(" ", + gt("Title fontcolor"), gt("Title BGColor")); + + for (j=0 ; j<(int)strlen(str) ; j++) + if (str[j] == ' ') + rsprintf(" "); + else + rsprintf("%c", str[j]); + + rsprintf("  \n"); + } else - rsprintf(" %s  \n", ref, str); + { + rsprintf(" "); + rsprintf("", ref); + + for (j=0 ; j<(int)strlen(str) ; j++) + if (str[j] == ' ') + rsprintf(" "); + else + rsprintf("%c", str[j]); + + rsprintf("  \n"); + } } rsprintf("\n\n");