|
|
|
@ -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(" \n");
|
|
|
|
rsprintf(" \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(" \n");
|
|
|
|
rsprintf(" \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 ", attr_icon, attr_icon, attr_icon);
|
|
|
|
rsprintf("\n<img border=0 src=\"icons/%s\" alt=\"%s\" title=\"%s\">\n ", 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 ", loc("Entry"), loc("Entry"));
|
|
|
|
rsprintf("\n<img border=0 src=\"entry.png\" alt=\"%s\" title=\"%s\">\n ", loc("Entry"),
|
|
|
|
|
|
|
|
loc("Entry"));
|
|
|
|
else
|
|
|
|
else
|
|
|
|
rsprintf("\n<img border=0 src=\"reply.png\" alt=\"%s\" title=\"%s\">\n ", loc("Reply"), loc("Reply"));
|
|
|
|
rsprintf("\n<img border=0 src=\"reply.png\" alt=\"%s\" title=\"%s\">\n ", 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\"> ", loc("Entry"), loc("Entry"));
|
|
|
|
rsprintf("\n<img border=0 src=\"entry.png\" alt=\"%s\" title=\"%s\"> ", loc("Entry"),
|
|
|
|
|
|
|
|
loc("Entry"));
|
|
|
|
else
|
|
|
|
else
|
|
|
|
rsprintf("\n<img border=0 src=\"reply.png\" alt=\"%s\" title=\"%s\"> ", loc("Reply"), loc("Reply"));
|
|
|
|
rsprintf("\n<img border=0 src=\"reply.png\" alt=\"%s\" title=\"%s\"> ", 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(" \n<img border=0 src=\"icons/%s\" alt=\"%s\" title=\"%s\"> ", attrib[i],
|
|
|
|
rsprintf(" \n<img border=0 src=\"icons/%s\" alt=\"%s\" title=\"%s\"> ",
|
|
|
|
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(" </td>");
|
|
|
|
rsprintf(" </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> ",
|
|
|
|
rsprintf
|
|
|
|
|
|
|
|
("<a href=\"%s\"><img align=\"middle\" border=\"0\" src=\"new_entry.png\" alt=\"%s\" title=\"%s\"></a> ",
|
|
|
|
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> ",
|
|
|
|
rsprintf
|
|
|
|
|
|
|
|
("<a href=\"%s\"><img align=\"middle\" border=\"0\" src=\"all_entry.png\" alt=\"%s\" title=\"%s\"></a> ",
|
|
|
|
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\">|<</a> \n", message_id, loc("First"));
|
|
|
|
rsprintf("<a href=\"%d?cmd=%s\">|<</a> \n", message_id, loc("First"));
|
|
|
|
rsprintf("<a href=\"%d?cmd=%s\"><</a> \n", message_id, loc("Previous"));
|
|
|
|
rsprintf("<a href=\"%d?cmd=%s\"><</a> \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\"> ", lattr);
|
|
|
|
rsprintf("<input type=\"checkbox\" checked name=\"%s\" value=\"1\"> ", lattr);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
rsprintf("<input alt=\"text\" title=\"text\"type=\"checkbox\" name=\"%s\" value=\"1\"> ", lattr);
|
|
|
|
rsprintf("<input alt=\"text\" title=\"text\"type=\"checkbox\" name=\"%s\" value=\"1\"> ",
|
|
|
|
|
|
|
|
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(" ");
|
|
|
|
rsprintf(" ");
|
|
|
|
rsprintf("<a href=\"?i=%s&m=%d&y=%d\">", index, cur_mon, cur_year - 1);
|
|
|
|
rsprintf("<a href=\"?i=%s&m=%d&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(" %d ", cur_year);
|
|
|
|
rsprintf(" %d ", cur_year);
|
|
|
|
|
|
|
|
|
|
|
|
/* link to next year */
|
|
|
|
/* link to next year */
|
|
|
|
rsprintf("<a href=\"?i=%s&m=%d&y=%d\">", index, cur_mon, cur_year + 1);
|
|
|
|
rsprintf("<a href=\"?i=%s&m=%d&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));
|
|
|
|
|