Version 2.6.0

SVN revision: 1548
This commit is contained in:
Stefan Ritt 2005-12-14 21:35:18 +00:00
parent 9a3517df45
commit d2d4e32d69
16 changed files with 375 additions and 233 deletions

View File

@ -1,3 +1,95 @@
Version 2.6.0, released Dec 14th, 2005
======================================
- Major new feature: Implemented ELCode tags
- Improved error handling of uploaded images
- Implemented first version of inline images in email notification
- Removed "nowrap" from attribute display in edit form
- Fixed crash on password reminder with invalid SMTP server
- Implemented absolute redirection via URL statement in logbook selection page
- Implemented proper time zone handling when sorting entries
- Show last page in list display per default if reverse sort is off
- Implemented logging level 4
- Removed help/language files from main directory and put them in resources directory
- Renamed help and language files
- Added time zone to elog entry
- Fixed problem with search highlighting and ELCode
- Fixed problem with [URL="file://...]
- Removed fixed text size in class "messagepre"
- Implemented escape character for http://, mailto:, etc.
- Added darwin specific changed from Exaos Lee
- Added Chinese language files
- Mode cookies expire after ten years
- Fixed problem with 'POST' in search text
- Modifications made on flight CA931
- Added '\' escape for smileys
- Implemented show/hide attachments in full view
- Limit summary lines to 150 characters in threaded mode
- Fixed infinite redirection with ?fail=1
- Fixed problem with extendable attributes which are fixed during edit
- Fixed bug with subtext quick filter
- Show HTML logbook comment properly
- Implemented 'Subtext' quick filter
- Fixed problem with long subjects by splitting it into separate encoded words
- Fixed login problem with protected selection pages and top groups
- Do not distinguish between invalid user name and invalid password for security reasons
- Added error output if password file cannot be written
- Implemented 'Email Format = 64' for only attachment names
- Implemented 'resolve host names'
- Added icons for 'show new/all'
- Added 'filter menu text'
- Added validity check for year in date/time attributes
- Added 'Edit page title'
- Added 'reply comment'
- Changed 'summary page title' to 'list page title'
- Changed 'rss feed' to 'alternate'
- Added $elogbook
- Made elog: links abolute for email notification
- Implemented 'change <attrib>' and 'list change <attrib>'
- Applied pointer casting patch from Recai
- Fixed {n} display with ROptions
- Added condition evaluation in list display
- Replaced tcp_hostname by listen_interface
- Added line break for thread display
- Made conditional attributes also work for email notification
- Implemented conditional attributes also for display
- Made 'list' work together with 'start page = 0?cmd=Last'
- Do not interprete ELCode inside [code]...[/code]
- Removed 'host:' for HTML/1.0
- Added 'email attributes' option
- Added '\' as escape character for HTML and ELCode tags
- Added 'title' to all icons for FireFox
- Treat attributes with <img> as HTML
- Added 'suppress default = 3'
- Added tooltip to logbook selection bar
- Added 'default encoding'
- Converted links to absolute URLs for threads
- 'Show all entries' keeps parameters from original search
- Put absolute link for CSS
- Added image insertion by JScript
- Added [*] for LIST
- Changed 'find menu' to 'list menu'
- Fixed bug with user activation and global password files
- Fixed problem with reverse sort in quick filters
- Applied patch from Emiliano with strftime workaround
- Use absolute http:// links for smileys
- Implemented last_activity, HTML email
- Switched login page to POST method
- Only use letters in randomly generated recovery password
- Fixed 'pippo-bug' of 'list display' option
- Fixed problem that encoding could not be selected on new entries
- Use orig_author for reply quoting
- Changed default font
- Remove hard wraps for textarea in non-plain mode
- Added smpt username
- Changed 'set current time' to 'insert current time'
- Added confimation dialog for removing users
- Supersede 'Display mode' by cookie
- Store list mode in cookie
- Change '(' to '\(' in quick filters for regex matching
Version 2.5.9, released May 2nd, 2005 Version 2.5.9, released May 2nd, 2005
===================================== =====================================

View File

@ -2,7 +2,6 @@
<HEAD> <HEAD>
<TITLE>ELOG - Syntax of elogd.cfg</TITLE> <TITLE>ELOG - Syntax of elogd.cfg</TITLE>
<LINK REV="made" HREF="mailto:fredpmygale.org"> <LINK REV="made" HREF="mailto:fredpmygale.org">
<META NAME="generator" CONTENT="NoteTab Light 4.86c">
<META NAME="author" CONTENT="Fred Pacquier"> <META NAME="author" CONTENT="Fred Pacquier">
<META NAME="description" CONTENT="Home of the Electronic Logbook (ELOG) package"> <META NAME="description" CONTENT="Home of the Electronic Logbook (ELOG) package">
<META NAME="keywords" CONTENT="ELOG MIDAS PSI RITT"> <META NAME="keywords" CONTENT="ELOG MIDAS PSI RITT">
@ -1791,8 +1790,8 @@ flags:<br>
</ul> </ul>
So to send email in plain text and full HTML, set &lt;n&gt; So to send email in plain text and full HTML, set &lt;n&gt;
to <b>5</b>. Most email clients have the possibility then to switch from one view to <b>5</b>. Some email clients have the possibility then to switch from one view
to the other. Default is <b>2</b> (send everything). to the other. Default is <b>2</b>.
<p> <p>
<li><b><code>Back to main = 0|1</code></b> <li><b><code>Back to main = 0|1</code></b>

View File

@ -25,7 +25,7 @@
&nbsp;[<a class="nav" href="#links">Links</a>]&nbsp; *&nbsp;</div> &nbsp;[<a class="nav" href="#links">Links</a>]&nbsp; *&nbsp;</div>
<P class="Sub">Home of the <i>Electronic Logbook</i> package by <a href="mailto:Stefan.Ritt&#64;psi.ch"> <P class="Sub">Home of the <i>Electronic Logbook</i> package by <a href="mailto:Stefan.Ritt&#64;psi.ch">
Stefan Ritt</a></P> Stefan Ritt</a></P>
<div class="version">Current version is : 2.5.9</div> <div class="version">Current version is : 2.6.0</div>
<hr> <hr>
<a name="whatis"> <a name="whatis">
<div class="section">&nbsp; What is ELOG ? &nbsp;</div> <div class="section">&nbsp; What is ELOG ? &nbsp;</div>

View File

@ -400,3 +400,4 @@ Enter name of hyperlink =
Enter URL of hyperlink = Enter URL of hyperlink =
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" =

View File

@ -402,3 +402,4 @@ Enter name of hyperlink =
Enter URL of hyperlink = Enter URL of hyperlink =
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" =

View File

@ -401,3 +401,4 @@ Enter name of hyperlink =
Enter URL of hyperlink = Enter URL of hyperlink =
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" =

View File

@ -403,3 +403,4 @@ Enter name of hyperlink =
Enter URL of hyperlink = Enter URL of hyperlink =
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" =

View File

@ -400,3 +400,4 @@ Enter name of hyperlink =
Enter URL of hyperlink = Enter URL of hyperlink =
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" =

View File

@ -337,11 +337,6 @@ Please enter minute for attribute '%s' = Bitte Minute eingeben f
Please enter second for attribute '%s' = Bitte Sekunde eingeben für Attribut '%s' Please enter second for attribute '%s' = Bitte Sekunde eingeben für Attribut '%s'
No admin user has been defined in configuration file = In der Konfigurationsdatei ist kein Benutzer mit Administrationsrechten eingetragen No admin user has been defined in configuration file = In der Konfigurationsdatei ist kein Benutzer mit Administrationsrechten eingetragen
Duplicate = Duplizieren Duplicate = Duplizieren
#
#---- please translate following items and then remove this comment ----#
#
Cannot lookup server name = Kann Server Name nicht finden Cannot lookup server name = Kann Server Name nicht finden
Cannot connect to server = Kann mit Server nicht verbinden Cannot connect to server = Kann mit Server nicht verbinden
%s wrote = %s schrieb %s wrote = %s schrieb
@ -400,3 +395,5 @@ Enter name of hyperlink = Name von Hyperlink eingeben
Enter URL of hyperlink = URL von Hyperlink eingeben Enter URL of hyperlink = URL von Hyperlink eingeben
astonished = erstaunt astonished = erstaunt
Error in regular expression "%s" = Fehler in regulärem Ausdruck "%s" Error in regular expression "%s" = Fehler in regulärem Ausdruck "%s"
File not found at URL "%s" = Datei bei URL "%s" nicht gefunden

View File

@ -398,3 +398,4 @@ Enter name of hyperlink =
Enter URL of hyperlink = Enter URL of hyperlink =
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" =

View File

@ -398,3 +398,4 @@ Enter name of hyperlink =
Enter URL of hyperlink = Enter URL of hyperlink =
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" =

View File

@ -400,3 +400,4 @@ Cannot retrieve file from URL "%s" = No puedo obtener el archivo desde la URL "%
# #
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" =

View File

@ -399,3 +399,4 @@ Enter name of hyperlink =
Enter URL of hyperlink = Enter URL of hyperlink =
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" =

View File

@ -399,3 +399,4 @@ Enter name of hyperlink =
Enter URL of hyperlink = Enter URL of hyperlink =
astonished = astonished =
Error in regular expression "%s" = Error in regular expression "%s" =
File not found at URL "%s" =

View File

@ -10,7 +10,7 @@
\********************************************************************/ \********************************************************************/
/* Version of ELOG */ /* Version of ELOG */
#define VERSION "2.6.0-beta5" #define VERSION "2.6.0"
char svn_revision[] = "$Id$"; char svn_revision[] = "$Id$";
/* ELOG identification */ /* ELOG identification */
@ -1612,9 +1612,12 @@ void compose_email_header(LOGBOOK * lbs, char *subject, char *from, char *to,
struct tm *ts; struct tm *ts;
i = 0; i = 0;
if (mail_encoding & 1) i++; if (mail_encoding & 1)
if (mail_encoding & 2) i++; i++;
if (mail_encoding & 4) i++; if (mail_encoding & 2)
i++;
if (mail_encoding & 4)
i++;
multipart = i > 1; multipart = i > 1;
if (!getcfg("global", "charset", charset, sizeof(charset))) if (!getcfg("global", "charset", charset, sizeof(charset)))
@ -1633,8 +1636,8 @@ void compose_email_header(LOGBOOK * lbs, char *subject, char *from, char *to,
sprintf(str, "timezone: %d, offset: %d\n", (int) timezone, (int) offset); sprintf(str, "timezone: %d, offset: %d\n", (int) timezone, (int) offset);
efputs(str); efputs(str);
} }
snprintf(mail_text+strlen(mail_text), size-strlen(mail_text)-1, "Date: %s %+03d%02d\r\n", buf, (int) (offset / 3600), snprintf(mail_text + strlen(mail_text), size - strlen(mail_text) - 1, "Date: %s %+03d%02d\r\n", buf,
(int) ((abs((int) offset) / 60) % 60)); (int) (offset / 3600), (int) ((abs((int) offset) / 60) % 60));
getcfg("global", "Language", str, sizeof(str)); getcfg("global", "Language", str, sizeof(str));
if (str[0]) if (str[0])
@ -1645,7 +1648,8 @@ void compose_email_header(LOGBOOK * lbs, char *subject, char *from, char *to,
strlcat(mail_text, "\r\n", size); strlcat(mail_text, "\r\n", size);
snprintf(mail_text + strlen(mail_text), size - strlen(mail_text) - 1, "From: %s\r\n", from); snprintf(mail_text + strlen(mail_text), size - strlen(mail_text) - 1, "From: %s\r\n", from);
snprintf(mail_text+strlen(mail_text), size-strlen(mail_text)-1, "User-Agent: Elog Version %s\r\n", VERSION); snprintf(mail_text + strlen(mail_text), size - strlen(mail_text) - 1, "User-Agent: Elog Version %s\r\n",
VERSION);
if (multipart) if (multipart)
strlcat(mail_text, "MIME-Version: 1.0\r\n", size); strlcat(mail_text, "MIME-Version: 1.0\r\n", size);
@ -1664,8 +1668,7 @@ void compose_email_header(LOGBOOK * lbs, char *subject, char *from, char *to,
strlcat(subject_enc, "=?", sizeof(subject_enc)); strlcat(subject_enc, "=?", sizeof(subject_enc));
strlcat(subject_enc, charset, sizeof(subject_enc)); strlcat(subject_enc, charset, sizeof(subject_enc));
strlcat(subject_enc, "?B?", sizeof(subject_enc)); strlcat(subject_enc, "?B?", sizeof(subject_enc));
base64_encode((unsigned char *) buffer, base64_encode((unsigned char *) buffer, (unsigned char *) (subject_enc + strlen(subject_enc)));
(unsigned char *) (subject_enc + strlen(subject_enc)));
strlcat(subject_enc, "?=", sizeof(subject_enc)); strlcat(subject_enc, "?=", sizeof(subject_enc));
if (strlen(subject + i) < 40) if (strlen(subject + i) < 40)
break; break;
@ -1717,8 +1720,7 @@ int check_smtp_error(char *str, int expected, char *error, int error_size)
/*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/
INT sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to, INT sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to, char *text, char *error, int error_size)
char *text, char *error, int error_size)
{ {
struct sockaddr_in bind_addr; struct sockaddr_in bind_addr;
struct hostent *phe; struct hostent *phe;
@ -1953,10 +1955,14 @@ void split_url(char *url, char *host, int *port, char *subdir, char *param)
{ {
char *p, str[256]; char *p, str[256];
if (host) host[0] = 0; if (host)
if (port) *port = 80; host[0] = 0;
if (subdir) subdir[0] = 0; if (port)
if (param) param[0] = 0; *port = 80;
if (subdir)
subdir[0] = 0;
if (param)
param[0] = 0;
p = url; p = url;
if (strncmp(url, "http://", 7) == 0) if (strncmp(url, "http://", 7) == 0)
@ -5186,7 +5192,8 @@ PATTERN_LIST pattern_list[] = {
{"", ""} {"", ""}
}; };
char *email_quote_table = "<table width=100%% border=1 align=\"left\" cellpadding=3><tr><td bgcolor=#486090><font color=white>%s:</font></td></tr><tr><td bgcolor=#FFFFB0>"; char *email_quote_table =
"<table width=100%% border=1 align=\"left\" cellpadding=3><tr><td bgcolor=#486090><font color=white>%s:</font></td></tr><tr><td bgcolor=#FFFFB0>";
void rsputs_elcode(LOGBOOK * lbs, BOOL email_notify, const char *str) void rsputs_elcode(LOGBOOK * lbs, BOOL email_notify, const char *str)
{ {
@ -9235,7 +9242,8 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
rsprintf("<label for=\"shell_suppress\">%s</label>\n", loc("Suppress shell execution")); rsprintf("<label for=\"shell_suppress\">%s</label>\n", loc("Suppress shell execution"));
} else if (atoi(str) == 1) { } else if (atoi(str) == 1) {
rsprintf("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n"); rsprintf("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n");
rsprintf("<input type=\"checkbox\" checked name=\"shell_suppress\" id=\"shell_suppress\" value=1>"); rsprintf
("<input type=\"checkbox\" checked name=\"shell_suppress\" id=\"shell_suppress\" value=1>");
rsprintf("<label for=\"shell_suppress\">%s</label>\n", loc("Suppress shell execution")); rsprintf("<label for=\"shell_suppress\">%s</label>\n", loc("Suppress shell execution"));
} }
} else { } else {
@ -9253,7 +9261,8 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
rsprintf("<label for=\"shell_suppress\">%s</label>\n", loc("Suppress shell execution")); rsprintf("<label for=\"shell_suppress\">%s</label>\n", loc("Suppress shell execution"));
} else if (atoi(str) == 1) { } else if (atoi(str) == 1) {
rsprintf("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n"); rsprintf("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n");
rsprintf("<input type=\"checkbox\" checked name=\"shell_suppress\" id=\"shell_suppress\" value=1>"); rsprintf
("<input type=\"checkbox\" checked name=\"shell_suppress\" id=\"shell_suppress\" value=1>");
rsprintf("<label for=\"shell_suppress\">%s</label>\n", loc("Suppress shell execution")); rsprintf("<label for=\"shell_suppress\">%s</label>\n", loc("Suppress shell execution"));
} }
} else { } else {
@ -10508,8 +10517,8 @@ int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user, BOOL activate)
retrieve_email_from(lbs, mail_from, mail_from_name, NULL); retrieve_email_from(lbs, mail_from, mail_from_name, NULL);
if (activate) { if (activate) {
compose_email_header(lbs, loc("Your ELOG account has been activated"), mail_from_name, getparam("new_user_email"), compose_email_header(lbs, loc("Your ELOG account has been activated"), mail_from_name,
NULL, mail_text, sizeof(mail_text), FALSE, 0, NULL); getparam("new_user_email"), NULL, mail_text, sizeof(mail_text), FALSE, 0, NULL);
sprintf(mail_text, loc("Your ELOG account has been activated on host")); sprintf(mail_text, loc("Your ELOG account has been activated on host"));
sprintf(mail_text + strlen(mail_text), " %s", host_name); sprintf(mail_text + strlen(mail_text), " %s", host_name);
@ -13954,13 +13963,16 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
rsprintf("\n<a href=\"%s\">", ref); rsprintf("\n<a href=\"%s\">", ref);
if (attr_icon[0]) if (attr_icon[0])
rsprintf("\n<img border=0 src=\"icons/%s\" alt=\"%s\" title=\"%s\">\n&nbsp;", attr_icon, attr_icon, attr_icon); rsprintf("\n<img border=0 src=\"icons/%s\" alt=\"%s\" title=\"%s\">\n&nbsp;", attr_icon, attr_icon,
attr_icon);
else { else {
/* display standard icons */ /* display standard icons */
if (level == 0) if (level == 0)
rsprintf("\n<img border=0 src=\"entry.png\" alt=\"%s\" title=\"%s\">\n&nbsp;", loc("Entry"), loc("Entry")); rsprintf("\n<img border=0 src=\"entry.png\" alt=\"%s\" title=\"%s\">\n&nbsp;", loc("Entry"),
loc("Entry"));
else else
rsprintf("\n<img border=0 src=\"reply.png\" alt=\"%s\" title=\"%s\">\n&nbsp;", loc("Reply"), loc("Reply")); rsprintf("\n<img border=0 src=\"reply.png\" alt=\"%s\" title=\"%s\">\n&nbsp;", loc("Reply"),
loc("Reply"));
} }
if (highlight != message_id) if (highlight != message_id)
rsprintf("</a>\n"); rsprintf("</a>\n");
@ -13971,7 +13983,8 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
add_subst_time(lbs, (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, add_subst_time(lbs, (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue,
"entry time", date, &j); "entry time", date, &j);
strsubst_list(display, sizeof(display), (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, j); strsubst_list(display, sizeof(display), (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue,
j);
if (highlight != message_id) if (highlight != message_id)
rsprintf("\n<a href=\"%s\">\n", ref); rsprintf("\n<a href=\"%s\">\n", ref);
@ -14012,9 +14025,11 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
if (strieq(disp_attr[index], loc("ID"))) { if (strieq(disp_attr[index], loc("ID"))) {
if (strieq(mode, "Threaded")) { if (strieq(mode, "Threaded")) {
if (level == 0) if (level == 0)
rsprintf("\n<img border=0 src=\"entry.png\" alt=\"%s\" title=\"%s\">&nbsp;", loc("Entry"), loc("Entry")); rsprintf("\n<img border=0 src=\"entry.png\" alt=\"%s\" title=\"%s\">&nbsp;", loc("Entry"),
loc("Entry"));
else else
rsprintf("\n<img border=0 src=\"reply.png\" alt=\"%s\" title=\"%s\">&nbsp;", loc("Reply"), loc("Reply")); rsprintf("\n<img border=0 src=\"reply.png\" alt=\"%s\" title=\"%s\">&nbsp;", loc("Reply"),
loc("Reply"));
} else { } else {
rsprintf("<td class=\"%s\">", sclass); rsprintf("<td class=\"%s\">", sclass);
@ -14063,14 +14078,16 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
if (strieq(disp_attr[index], loc("Edit"))) { if (strieq(disp_attr[index], loc("Edit"))) {
if (!strieq(mode, "Threaded")) { if (!strieq(mode, "Threaded")) {
rsprintf("\n<td class=\"%s\" %s><a href=\"%s?cmd=%s\">", sclass, nowrap, ref, loc("Edit")); rsprintf("\n<td class=\"%s\" %s><a href=\"%s?cmd=%s\">", sclass, nowrap, ref, loc("Edit"));
rsprintf("\n<img src=\"edit.png\" border=0 alt=\"%s\" title=\"%s\"></a></td>\n", loc("Edit entry"), loc("Edit entry")); rsprintf("\n<img src=\"edit.png\" border=0 alt=\"%s\" title=\"%s\"></a></td>\n",
loc("Edit entry"), loc("Edit entry"));
} }
} }
if (strieq(disp_attr[index], loc("Delete"))) { if (strieq(disp_attr[index], loc("Delete"))) {
if (!strieq(mode, "Threaded")) { if (!strieq(mode, "Threaded")) {
rsprintf("\n<td class=\"%s\" %s><a href=\"%s?cmd=%s\">", sclass, nowrap, ref, loc("Delete")); rsprintf("\n<td class=\"%s\" %s><a href=\"%s?cmd=%s\">", sclass, nowrap, ref, loc("Delete"));
rsprintf("\n<img src=\"delete.png\" border=0 alt=\"%s\" title=\"%s\"></a></td>\n", loc("Delete entry"), loc("Delete entry")); rsprintf("\n<img src=\"delete.png\" border=0 alt=\"%s\" title=\"%s\"></a></td>\n",
loc("Delete entry"), loc("Delete entry"));
} }
} }
@ -14118,8 +14135,8 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
else if (attr_flags[i] & AF_ICON) { else if (attr_flags[i] & AF_ICON) {
if (attrib[i][0]) if (attrib[i][0])
rsprintf("&nbsp;\n<img border=0 src=\"icons/%s\" alt=\"%s\" title=\"%s\">&nbsp;", attrib[i], rsprintf("&nbsp;\n<img border=0 src=\"icons/%s\" alt=\"%s\" title=\"%s\">&nbsp;",
attrib[i], attrib[i]); attrib[i], attrib[i], attrib[i]);
} }
else { else {
@ -14182,7 +14199,8 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
else if (attr_flags[i] & AF_ICON) { else if (attr_flags[i] & AF_ICON) {
rsprintf("<td class=\"%s\">", sclass); rsprintf("<td class=\"%s\">", sclass);
if (attrib[i][0]) if (attrib[i][0])
rsprintf("\n<img border=0 src=\"icons/%s\" alt=\"%s\" title=\"%s\">", attrib[i], attrib[i], attrib[i]); rsprintf("\n<img border=0 src=\"icons/%s\" alt=\"%s\" title=\"%s\">", attrib[i],
attrib[i], attrib[i]);
rsprintf("&nbsp;</td>"); rsprintf("&nbsp;</td>");
} }
@ -14395,7 +14413,8 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
if (show_attachments) { if (show_attachments) {
rsprintf("<tr><td colspan=%d class=\"attachmentframe\">\n", colspan); rsprintf("<tr><td colspan=%d class=\"attachmentframe\">\n", colspan);
rsprintf("<a name=\"att%d\" href=\"%s\">\n", index + 1, ref); rsprintf("<a name=\"att%d\" href=\"%s\">\n", index + 1, ref);
rsprintf("<img src=\"%s.thumb\" alt=\"%s\" title=\"%s\"></a>\n", ref, attachment[index] + 14, attachment[index] + 14); rsprintf("<img src=\"%s.thumb\" alt=\"%s\" title=\"%s\"></a>\n", ref,
attachment[index] + 14, attachment[index] + 14);
rsprintf("</td></tr>\n\n"); rsprintf("</td></tr>\n\n");
} }
} else { } else {
@ -14406,7 +14425,8 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
if (show_attachments) { if (show_attachments) {
rsprintf("</td></tr><tr>"); rsprintf("</td></tr><tr>");
rsprintf("<td colspan=%d class=\"attachmentframe\">", colspan); rsprintf("<td colspan=%d class=\"attachmentframe\">", colspan);
rsprintf("<img src=\"%s\" alt=\"%s\" title=\"%s\">", ref, attachment[index] + 14, attachment[index] + 14); rsprintf("<img src=\"%s\" alt=\"%s\" title=\"%s\">", ref, attachment[index] + 14,
attachment[index] + 14);
rsprintf("</td></tr>\n"); rsprintf("</td></tr>\n");
} }
} else { } else {
@ -15015,11 +15035,13 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands,
ref[0] = 0; ref[0] = 0;
if (!isparam("new_entries") || atoi(getparam("new_entries")) == 0) { if (!isparam("new_entries") || atoi(getparam("new_entries")) == 0) {
build_ref(ref, sizeof(ref), "", "", "", "1"); build_ref(ref, sizeof(ref), "", "", "", "1");
rsprintf("<a href=\"%s\"><img align=\"middle\" border=\"0\" src=\"new_entry.png\" alt=\"%s\" title=\"%s\"></a>&nbsp;&nbsp;", rsprintf
("<a href=\"%s\"><img align=\"middle\" border=\"0\" src=\"new_entry.png\" alt=\"%s\" title=\"%s\"></a>&nbsp;&nbsp;",
ref, loc("Show only new entries"), loc("Show only new entries")); ref, loc("Show only new entries"), loc("Show only new entries"));
} else { } else {
build_ref(ref, sizeof(ref), "", "", "", "0"); build_ref(ref, sizeof(ref), "", "", "", "0");
rsprintf("<a href=\"%s\"><img align=\"middle\" border=\"0\" src=\"all_entry.png\" alt=\"%s\" title=\"%s\"></a>&nbsp;&nbsp;", rsprintf
("<a href=\"%s\"><img align=\"middle\" border=\"0\" src=\"all_entry.png\" alt=\"%s\" title=\"%s\"></a>&nbsp;&nbsp;",
ref, loc("Show all entries"), loc("Show all entries")); ref, loc("Show all entries"), loc("Show all entries"));
} }
@ -15504,7 +15526,8 @@ void show_rss_feed(LOGBOOK * lbs)
add_subst_time(lbs, (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, add_subst_time(lbs, (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue,
"entry time", date, &i); "entry time", date, &i);
strsubst_list(title, sizeof(title), (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, i); strsubst_list(title, sizeof(title), (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue,
i);
} else { } else {
title[0] = 0; title[0] = 0;
@ -16169,8 +16192,8 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, BOOL defa
add_subst_time(lbs, (char (*)[NAME_LENGTH]) slist, add_subst_time(lbs, (char (*)[NAME_LENGTH]) slist,
(char (*)[NAME_LENGTH]) svalue, "entry time", date, &j); (char (*)[NAME_LENGTH]) svalue, "entry time", date, &j);
strsubst_list(str, sizeof(str), (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, strsubst_list(str, sizeof(str), (char (*)[NAME_LENGTH]) slist,
j); (char (*)[NAME_LENGTH]) svalue, j);
setparam(attr_list[i], str); setparam(attr_list[i], str);
} }
@ -16887,7 +16910,8 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, BOOL defa
if (strcmp(getparam("sort"), disp_attr[i]) == 0) if (strcmp(getparam("sort"), disp_attr[i]) == 0)
sprintf(img, "<img align=top src=\"up.png\" alt=\"%s\" title=\"%s\">", loc("up"), loc("up")); sprintf(img, "<img align=top src=\"up.png\" alt=\"%s\" title=\"%s\">", loc("up"), loc("up"));
else if (strcmp(getparam("rsort"), disp_attr[i]) == 0) else if (strcmp(getparam("rsort"), disp_attr[i]) == 0)
sprintf(img, "<img align=top src=\"down.png\" alt=\"%s\" title=\"%s\">", loc("down"), loc("down")); sprintf(img, "<img align=top src=\"down.png\" alt=\"%s\" title=\"%s\">", loc("down"),
loc("down"));
if (strieq(disp_attr[i], "Edit") || strieq(disp_attr[i], "Delete")) if (strieq(disp_attr[i], "Edit") || strieq(disp_attr[i], "Delete"))
rsprintf("<th class=\"listtitle\">%s</th>\n", disp_attr[i]); rsprintf("<th class=\"listtitle\">%s</th>\n", disp_attr[i]);
@ -17076,8 +17100,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, BOOL defa
*/ */
highlight_searchtext(re_buf, text, text1, strieq(encoding, "plain") || highlight_searchtext(re_buf, text, text1, strieq(encoding, "plain") ||
strieq(encoding, "ELCode") || strieq(encoding, "ELCode") || !strieq(mode, "Full"));
!strieq(mode, "Full"));
strlcpy(text, text1, TEXT_SIZE); strlcpy(text, text1, TEXT_SIZE);
} }
@ -17242,8 +17265,9 @@ int has_attachments(LOGBOOK * lbs, int message_id)
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
void format_email_attachments(LOGBOOK * lbs, int message_id, int attachment_type, char att_file[MAX_ATTACHMENTS][256], void format_email_attachments(LOGBOOK * lbs, int message_id, int attachment_type,
char *mail_text, int size, char *multipart_boundary, int content_id) char att_file[MAX_ATTACHMENTS][256], char *mail_text, int size,
char *multipart_boundary, int content_id)
{ {
int i, index, n_att, fh, n, is_inline; int i, index, n_att, fh, n, is_inline;
char str[256], file_name[256], buffer[256], email_from[256], *p; char str[256], file_name[256], buffer[256], email_from[256], *p;
@ -17262,7 +17286,8 @@ void format_email_attachments(LOGBOOK * lbs, int message_id, int attachment_type
if (attachment_type == 2 && !is_inline) if (attachment_type == 2 && !is_inline)
continue; continue;
snprintf(mail_text+strlen(mail_text), size-strlen(mail_text)-1, "\r\n--%s\r\n", multipart_boundary); snprintf(mail_text + strlen(mail_text), size - strlen(mail_text) - 1, "\r\n--%s\r\n",
multipart_boundary);
/* return proper Content-Type for file type */ /* return proper Content-Type for file type */
for (i = 0; i < (int) strlen(att_file[index]) && i < (int) sizeof(str) - 1; i++) for (i = 0; i < (int) strlen(att_file[index]) && i < (int) sizeof(str) - 1; i++)
@ -17340,7 +17365,8 @@ void format_email_text(LOGBOOK * lbs, char attrib[MAX_N_ATTR][NAME_LENGTH],
strlcat(mail_text, "--", size); strlcat(mail_text, "--", size);
strlcat(mail_text, multipart_boundary, size); strlcat(mail_text, multipart_boundary, size);
strlcat(mail_text, "\r\n", size); strlcat(mail_text, "\r\n", size);
sprintf(mail_text + strlen(mail_text), "Content-Type: text/plain; charset=%s; format=flowed\r\n", charset); sprintf(mail_text + strlen(mail_text), "Content-Type: text/plain; charset=%s; format=flowed\r\n",
charset);
sprintf(mail_text + strlen(mail_text), "Content-Transfer-Encoding: 7bit\r\n\r\n"); sprintf(mail_text + strlen(mail_text), "Content-Transfer-Encoding: 7bit\r\n\r\n");
} }
@ -17509,7 +17535,8 @@ void format_email_html(LOGBOOK * lbs, int message_id, char attrib[MAX_N_ATTR][NA
if (getcfg(lbs->name, "Email format", str, sizeof(str))) if (getcfg(lbs->name, "Email format", str, sizeof(str)))
flags = atoi(str); flags = atoi(str);
strcpy(mail_text + strlen(mail_text), "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n"); strcpy(mail_text + strlen(mail_text),
"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n");
strcpy(mail_text + strlen(mail_text), "<html>\r\n<head>\r\n <title></title>\r\n</head>\r\n<body>\r\n"); strcpy(mail_text + strlen(mail_text), "<html>\r\n<head>\r\n <title></title>\r\n</head>\r\n<body>\r\n");
if (flags & 1) { if (flags & 1) {
@ -17620,7 +17647,8 @@ void format_email_html(LOGBOOK * lbs, int message_id, char attrib[MAX_N_ATTR][NA
for (i = 0; i < MAX_ATTACHMENTS && att_file[i][0]; i++) { for (i = 0; i < MAX_ATTACHMENTS && att_file[i][0]; i++) {
sprintf(mail_text + strlen(mail_text), sprintf(mail_text + strlen(mail_text),
"<tr><td bgcolor=\"#CCCCFF\">%s %d</td><td bgcolor=\"#DDEEBB\">", loc("Attachment"), i + 1); "<tr><td bgcolor=\"#CCCCFF\">%s %d</td><td bgcolor=\"#DDEEBB\">", loc("Attachment"), i + 1);
sprintf(mail_text + strlen(mail_text), "<a href=\"%s/%d\">%s</a></td></tr>\r\n", url, i+1, att_file[i]+14); sprintf(mail_text + strlen(mail_text), "<a href=\"%s/%d\">%s</a></td></tr>\r\n", url, i + 1,
att_file[i] + 14);
} }
} }
@ -17645,7 +17673,8 @@ void format_email_html(LOGBOOK * lbs, int message_id, char attrib[MAX_N_ATTR][NA
strcpy(mail_text + strlen(mail_text), "\r\n</html></body>\r\n\r\n"); strcpy(mail_text + strlen(mail_text), "\r\n</html></body>\r\n\r\n");
if (attachments_present) { if (attachments_present) {
format_email_attachments(lbs, message_id, 2, att_file, mail_text, size, multipart_boundary_related, TRUE); format_email_attachments(lbs, message_id, 2, att_file, mail_text, size, multipart_boundary_related,
TRUE);
strlcat(mail_text, "--", size); strlcat(mail_text, "--", size);
strlcat(mail_text, multipart_boundary_related, size); strlcat(mail_text, multipart_boundary_related, size);
strlcat(mail_text, "--\r\n\r\n", size); strlcat(mail_text, "--\r\n\r\n", size);
@ -17698,7 +17727,8 @@ void format_email_html2(LOGBOOK * lbs, int message_id, char att_file[MAX_ATTACHM
strlcat(mail_text, "\r\n", size); strlcat(mail_text, "\r\n", size);
if (attachments_present) { if (attachments_present) {
format_email_attachments(lbs, message_id, 0, att_file, mail_text, size, multipart_boundary_related, TRUE); format_email_attachments(lbs, message_id, 0, att_file, mail_text, size, multipart_boundary_related,
TRUE);
strlcat(mail_text, "--", size); strlcat(mail_text, "--", size);
strlcat(mail_text, multipart_boundary_related, size); strlcat(mail_text, multipart_boundary_related, size);
strlcat(mail_text, "--\r\n\r\n", size); strlcat(mail_text, "--\r\n\r\n", size);
@ -17771,22 +17801,26 @@ int compose_email(LOGBOOK * lbs, char *mail_to, int message_id,
if (getcfg(lbs->name, "Omit Email to", str, sizeof(str)) && atoi(str) == 1) if (getcfg(lbs->name, "Omit Email to", str, sizeof(str)) && atoi(str) == 1)
strcpy(mail_to, "ELOG"); strcpy(mail_to, "ELOG");
compose_email_header(lbs, subject, mail_from_name, mail_to, url, mail_text, mail_text_size, mail_encoding, n_attachments, multipart_boundary); compose_email_header(lbs, subject, mail_from_name, mail_to, url, mail_text, mail_text_size, mail_encoding,
n_attachments, multipart_boundary);
if (mail_encoding & 1) if (mail_encoding & 1)
format_email_text(lbs, attrib, att_file, old_mail, url, multipart_boundary, mail_text, mail_text_size); format_email_text(lbs, attrib, att_file, old_mail, url, multipart_boundary, mail_text, mail_text_size);
if (mail_encoding & 2) if (mail_encoding & 2)
format_email_html(lbs, message_id, attrib, att_file, old_mail, encoding, url, multipart_boundary, mail_text, mail_text_size); format_email_html(lbs, message_id, attrib, att_file, old_mail, encoding, url, multipart_boundary,
mail_text, mail_text_size);
if (mail_encoding & 4) if (mail_encoding & 4)
format_email_html2(lbs, message_id, att_file, old_mail, multipart_boundary, mail_text, mail_text_size); format_email_html2(lbs, message_id, att_file, old_mail, multipart_boundary, mail_text, mail_text_size);
if (n_attachments && (flags & 16)) { if (n_attachments && (flags & 16)) {
if ((mail_encoding & 6) > 0) if ((mail_encoding & 6) > 0)
/* only non-inline attachements */ /* only non-inline attachements */
format_email_attachments(lbs, message_id, 1, att_file, mail_text, mail_text_size, multipart_boundary, FALSE); format_email_attachments(lbs, message_id, 1, att_file, mail_text, mail_text_size, multipart_boundary,
FALSE);
else else
/* all attachments */ /* all attachments */
format_email_attachments(lbs, message_id, 0, att_file, mail_text, mail_text_size, multipart_boundary, FALSE); format_email_attachments(lbs, message_id, 0, att_file, mail_text, mail_text_size, multipart_boundary,
FALSE);
} }
if (multipart_boundary[0]) { if (multipart_boundary[0]) {
@ -19165,11 +19199,14 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
} }
strlcat(file_name, "first.png", sizeof(file_name)); strlcat(file_name, "first.png", sizeof(file_name));
if (stat(file_name, &st) >= 0) { if (stat(file_name, &st) >= 0) {
rsprintf("<input type=image name=cmd_first alt=\"%s\" title=\"%s\" src=\"first.png\">\n", loc("First entry"), loc("First entry")); rsprintf("<input type=image name=cmd_first alt=\"%s\" title=\"%s\" src=\"first.png\">\n",
loc("First entry"), loc("First entry"));
rsprintf("<input type=image name=cmd_previous alt=\"%s\" title=\"%s\" src=\"previous.png\">\n", rsprintf("<input type=image name=cmd_previous alt=\"%s\" title=\"%s\" src=\"previous.png\">\n",
loc("Previous entry"), loc("Previous entry")); loc("Previous entry"), loc("Previous entry"));
rsprintf("<input type=image name=cmd_next alt=\"%s\" title=\"%s\" src=\"next.png\">\n", loc("Next entry"), loc("Next entry")); rsprintf("<input type=image name=cmd_next alt=\"%s\" title=\"%s\" src=\"next.png\">\n",
rsprintf("<input type=image name=cmd_last alt=\"%s\" title=\"%s\" src=\"last.png\">\n", loc("Last entry"), loc("Last entry")); loc("Next entry"), loc("Next entry"));
rsprintf("<input type=image name=cmd_last alt=\"%s\" title=\"%s\" src=\"last.png\">\n",
loc("Last entry"), loc("Last entry"));
} else { } else {
rsprintf("<a href=\"%d?cmd=%s\">|&lt;</a>&nbsp;\n", message_id, loc("First")); rsprintf("<a href=\"%d?cmd=%s\">|&lt;</a>&nbsp;\n", message_id, loc("First"));
rsprintf("<a href=\"%d?cmd=%s\">&lt;</a>&nbsp;\n", message_id, loc("Previous")); rsprintf("<a href=\"%d?cmd=%s\">&lt;</a>&nbsp;\n", message_id, loc("Previous"));
@ -19286,7 +19323,8 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
if (locked_by && locked_by[0]) { if (locked_by && locked_by[0]) {
sprintf(str, "%s %s", loc("Entry is currently edited by"), locked_by); sprintf(str, "%s %s", loc("Entry is currently edited by"), locked_by);
rsprintf("<tr><td nowrap colspan=2 class=\"errormsg\"><img src=\"stop.png\" alt=\"%s\" title=\"%s\">\n", rsprintf
("<tr><td nowrap colspan=2 class=\"errormsg\"><img src=\"stop.png\" alt=\"%s\" title=\"%s\">\n",
loc("stop"), loc("stop")); loc("stop"), loc("stop"));
rsprintf("%s<br>%s</td></tr>\n", str, loc("You can \"steal\" the lock by editing this entry")); rsprintf("%s<br>%s</td></tr>\n", str, loc("You can \"steal\" the lock by editing this entry"));
} }
@ -19309,7 +19347,8 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
add_subst_time(lbs, (char (*)[NAME_LENGTH]) slist, add_subst_time(lbs, (char (*)[NAME_LENGTH]) slist,
(char (*)[NAME_LENGTH]) svalue, "entry time", date, &j); (char (*)[NAME_LENGTH]) svalue, "entry time", date, &j);
strsubst_list(display, sizeof(display), (char (*)[NAME_LENGTH]) slist, (char (*)[NAME_LENGTH]) svalue, j); strsubst_list(display, sizeof(display), (char (*)[NAME_LENGTH]) slist,
(char (*)[NAME_LENGTH]) svalue, j);
} else } else
sprintf(display, "%d", message_id); sprintf(display, "%d", message_id);
@ -19445,7 +19484,8 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
if (*getparam(lattr) == '1') if (*getparam(lattr) == '1')
rsprintf("<input type=\"checkbox\" checked name=\"%s\" value=\"1\">&nbsp;", lattr); rsprintf("<input type=\"checkbox\" checked name=\"%s\" value=\"1\">&nbsp;", lattr);
else else
rsprintf("<input alt=\"text\" title=\"text\"type=\"checkbox\" name=\"%s\" value=\"1\">&nbsp;", lattr); rsprintf("<input alt=\"text\" title=\"text\"type=\"checkbox\" name=\"%s\" value=\"1\">&nbsp;",
lattr);
} }
/* display checkbox for boolean attributes */ /* display checkbox for boolean attributes */
@ -19761,12 +19801,14 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
if (file_exist(thumb_name)) { if (file_exist(thumb_name)) {
rsprintf("<tr><td class=\"attachmentframe\">\n"); rsprintf("<tr><td class=\"attachmentframe\">\n");
rsprintf("<a name=\"att%d\" href=\"%s\">\n", index + 1, ref); rsprintf("<a name=\"att%d\" href=\"%s\">\n", index + 1, ref);
rsprintf("<img src=\"%s.thumb\" alt=\"%s\" title=\"%s\"></a>\n", ref, attachment[index] + 14, attachment[index] + 14); rsprintf("<img src=\"%s.thumb\" alt=\"%s\" title=\"%s\"></a>\n", ref,
attachment[index] + 14, attachment[index] + 14);
rsprintf("</td></tr>\n\n"); rsprintf("</td></tr>\n\n");
} else if (is_image(att)) { } else if (is_image(att)) {
rsprintf("<tr><td class=\"attachmentframe\">\n"); rsprintf("<tr><td class=\"attachmentframe\">\n");
rsprintf("<a name=\"att%d\"></a>\n", index + 1); rsprintf("<a name=\"att%d\"></a>\n", index + 1);
rsprintf("<img src=\"%s\" alt=\"%s\" title=\"%s\">\n", ref, attachment[index] + 14, attachment[index] + 14); rsprintf("<img src=\"%s\" alt=\"%s\" title=\"%s\">\n", ref, attachment[index] + 14,
attachment[index] + 14);
rsprintf("</td></tr>\n\n"); rsprintf("</td></tr>\n\n");
} else { } else {
if (is_ascii(file_name)) { if (is_ascii(file_name)) {
@ -20180,8 +20222,7 @@ int get_user_line(LOGBOOK * lbs, char *user, char *password, char *full_name,
/* open password file */ /* open password file */
load_password_files(); load_password_files();
return get_user_line(lbs, user, password, full_name, return get_user_line(lbs, user, password, full_name, email, email_notify, last_logout);
email, email_notify, last_logout);
} }
} }
@ -20581,7 +20622,8 @@ void show_logbook_node(LBLIST plb, LBLIST pparent, int level, int btop)
else { else {
if (pparent != NULL) { if (pparent != NULL) {
if (getcfg_topgroup()) if (getcfg_topgroup())
rsprintf("<a href=\"%s%s/?gexp=%s\">- %s</a> ", ref, getcfg_topgroup(), pparent->name, plb->name); rsprintf("<a href=\"%s%s/?gexp=%s\">- %s</a> ", ref, getcfg_topgroup(), pparent->name,
plb->name);
else else
rsprintf("<a href=\"%s?gexp=%s\">- %s</a> ", ref, pparent->name, plb->name); rsprintf("<a href=\"%s?gexp=%s\">- %s</a> ", ref, pparent->name, plb->name);
} else { } else {
@ -20596,7 +20638,8 @@ void show_logbook_node(LBLIST plb, LBLIST pparent, int level, int btop)
rsprintf(plb->name); rsprintf(plb->name);
else { else {
if (getcfg_topgroup()) if (getcfg_topgroup())
rsprintf("<a href=\"%s%s/?gexp=%s\">+ %s</a> ", ref, getcfg_topgroup(), plb->name, plb->name); rsprintf("<a href=\"%s%s/?gexp=%s\">+ %s</a> ", ref, getcfg_topgroup(), plb->name,
plb->name);
else else
rsprintf("<a href=\"%s?gexp=%s\">+ %s</a> ", ref, plb->name, plb->name); rsprintf("<a href=\"%s?gexp=%s\">+ %s</a> ", ref, plb->name, plb->name);
} }
@ -21003,14 +21046,16 @@ void show_calendar(LOGBOOK * lbs)
/* link to previous year */ /* link to previous year */
rsprintf("&nbsp;&nbsp;"); rsprintf("&nbsp;&nbsp;");
rsprintf("<a href=\"?i=%s&amp;m=%d&amp;y=%d\">", index, cur_mon, cur_year - 1); rsprintf("<a href=\"?i=%s&amp;m=%d&amp;y=%d\">", index, cur_mon, cur_year - 1);
rsprintf("<img border=0 align=\"absmiddle\" src=\"cal_prev.png\" alt=\"%s\" title=\"%s\"></a>", loc("Previous Year"), loc("Previous Year")); rsprintf("<img border=0 align=\"absmiddle\" src=\"cal_prev.png\" alt=\"%s\" title=\"%s\"></a>",
loc("Previous Year"), loc("Previous Year"));
/* current year */ /* current year */
rsprintf("&nbsp;%d&nbsp;", cur_year); rsprintf("&nbsp;%d&nbsp;", cur_year);
/* link to next year */ /* link to next year */
rsprintf("<a href=\"?i=%s&amp;m=%d&amp;y=%d\">", index, cur_mon, cur_year + 1); rsprintf("<a href=\"?i=%s&amp;m=%d&amp;y=%d\">", index, cur_mon, cur_year + 1);
rsprintf("<img border=0 align=\"absmiddle\" src=\"cal_next.png\" alt=\"%s\" title=\"%s\"></a>", loc("Next Year"), loc("Next Year")); rsprintf("<img border=0 align=\"absmiddle\" src=\"cal_next.png\" alt=\"%s\" title=\"%s\"></a>",
loc("Next Year"), loc("Next Year"));
/* go to first day of month */ /* go to first day of month */
ts->tm_mday = 1; ts->tm_mday = 1;
@ -21447,8 +21492,7 @@ void interprete(char *lbook, char *path)
/* deliver icons without password */ /* deliver icons without password */
if (chkext(path, ".gif") || chkext(path, ".jpg") || if (chkext(path, ".gif") || chkext(path, ".jpg") ||
chkext(path, ".png") || chkext(path, ".ico") || chkext(path, ".png") || chkext(path, ".ico") || chkext(path, ".htm") || chkext(path, ".css")) {
chkext(path, ".htm") || chkext(path, ".css")) {
/* check if file in resource directory */ /* check if file in resource directory */
strlcpy(str, resource_dir, sizeof(str)); strlcpy(str, resource_dir, sizeof(str));
strlcat(str, path, sizeof(str)); strlcat(str, path, sizeof(str));