diff --git a/doc/ChangeLog b/doc/ChangeLog index 29a000f7..5f412f85 100755 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -8,6 +8,8 @@ Version 2.3.9, released June xxth, 2003 - Remove blanks from "Referer:" - Fixed problem with Reply-To in elog utility - Don't send email notificatin to users which are not in the 'Login user' list +- Replace 'Email message body' by 'Email format' +- Send attachments as email attachments Version 2.3.8, released June 4th, 2003 ====================================== diff --git a/doc/config.html b/doc/config.html index 9d848b8b..2123c9e0 100755 --- a/doc/config.html +++ b/doc/config.html @@ -188,7 +188,7 @@ the standard selection page produced by elogd can be used.
  • Guest Selection page = <file>
    -The same for installations which have a global password file. This means that the +The same for installations which have a global password file. This means that the logbook selection page is also password protected. It might be however that some logbooks have guest access, in which case guest access to the selection page should be allowed as well (maybe with only a subset of the available logbooks). In that case @@ -908,7 +908,7 @@ actual user name. For a full listing of substitutions, see the "Subst <att The user name and password are stored as cookies on the user side. The expiration is controlled by the Remember me checkbox during the login. If unchecked, the cookies expire after the -current browser session. If checked, they expire after 31 days by default, which +current browser session. If checked, they expire after 31 days by default, which can be changed with the Login expiration option, giving the expiration time in hours. Setting this to 24 for example, makes the password expire after one day. If presistent cookies are not @@ -1033,8 +1033,14 @@ Email Subject = <string> statement specifies which text is used as the email subject. The text can contain $<attribute> statements which are substituted with the current value of that attribute. For a full list of possible substitutions, see the -"Subst <attribute>" option. The option Use Email From = <string> - is used for the "from" field in the email. If the flag +"Subst <attribute>" option.

    + +The option Use Email From = <string> + is used for the "From:" field in the email. Please note that more and +more email servers do not accept invalid "From:" addresses, in order to reduce spam mail. +So it might be necessary to use this option to supply a "real" email address.

    + +If the flag Omit Email To is set to 1, the To: field in the email is left empty instead set to the real email address of the recipients. This can be useful if one recipient should not see the email addresses of the other recipients. @@ -1143,10 +1149,21 @@ suppresses this display, in case users need not see that email is being sent and The default is 1.

    -

  • Email message body = 0|1 +
  • Email Format = <n>
    -If this flag is 1, the email notification send by elog contains the -full message body in addition to the attributes. The default is 0. +Specifies what is sent in an email notification. <n> is the sum of following +flags:
    + +
      +
    • 1 : Send heading line "A new entry has been submitted..." +
    • 2 : Send attributes +
    • 4 : Send URL of logbook entry +
    • 8 : Send message body +
    • 16: Send optional attachments as email attachments +
    + +So to send for example only the attributes and the URL, set <n> +to 6. Default is 31 (send everything).

  • Suppress Email on edit = 0|1 @@ -1195,7 +1212,7 @@ The default is 1.
  • Hidden = 0|1
    If this flag is 1, the logbook is not displayed in the initial logbook selection -page and in the logbook tabs. This can be useful for logbooks which are only accessed +page and in the logbook tabs. This can be useful for logbooks which are only accessed for backup or archiving and would clutter up the logbook list for the normal user. To access hidden logbooks, one has to enter the logbook URL directly, or from a bookmark list. Default is 0. @@ -1207,7 +1224,7 @@ If this flag is 1, a logbook entry is locked when someone edits it the Edit command). A locked message gets displayed with a little red sign indicating that the message is currently edited by someone and should not be touched. This can be helpful in installations where several people can edit messages. Without locking, the second -submission of an edited message overwrites the first submission without notice. Although +submission of an edited message overwrites the first submission without notice. Although the sign gets displayed, the message can still be edited, but it's the user's response to avoid any conflict.

    diff --git a/src/elogd.c b/src/elogd.c index 63248e3b..aa53cb40 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.122 2003/07/01 06:21:19 midas + Added emailing of attachments + Revision 1.121 2003/06/30 18:38:21 midas Increase textarea width for old messages according to longest line @@ -886,7 +889,7 @@ \********************************************************************/ /* Version of ELOG */ -#define VERSION "2.3.8" +#define VERSION "2.3.9" #include #include @@ -1131,7 +1134,7 @@ typedef struct { } LOGBOOK; typedef struct LBNODE *LBLIST; - + struct LBNODE { char name[256]; LBLIST member; @@ -1437,6 +1440,37 @@ unsigned int t, pad; *(--d) = '='; } +void base64_bufenc(unsigned char *s, int len, char *d) +{ +unsigned int t, pad; +int i; + + pad = 3 - len % 3; + if (pad == 3) + pad = 0; + for (i=0 ; i>= 6; + *(d+2) = map[t & 63]; + t >>= 6; + *(d+1) = map[t & 63]; + t >>= 6; + *(d+0) = map[t & 63]; + + d += 4; + } + *d = 0; + while (pad--) + *(--d) = '='; +} + void do_crypt(char *s, char *d) { #ifdef HAVE_CRYPT @@ -1539,20 +1573,26 @@ struct timeval timeout; } -INT sendmail(char *smtp_host, char *from, char *to, char *subject, char *text, BOOL email_to, char *url) +INT sendmail(LOGBOOK *lbs, char *smtp_host, char *from, char *to, char *subject, char *text, + BOOL email_to, char *url, char att_file[MAX_ATTACHMENTS][256]) { struct sockaddr_in bind_addr; struct hostent *phe; -int i, n, s, offset, strsize; +int i, n, s, offset, strsize, n_att, index, fh; char buf[80]; -char *str, *p; +char *str, *p, boundary[256], file_name[MAX_PATH_LENGTH]; time_t now; struct tm *ts; -char list[1024][NAME_LENGTH]; +char list[1024][NAME_LENGTH], buffer[256]; if (verbose) printf("\n\nEmail from %s to %s, SMTP host %s:\n", from, to, smtp_host); + /* count attachments */ + n_att = 0; + if (att_file) + for (n_att = 0 ; att_file[n_att][0] && n_att < MAX_ATTACHMENTS ; n_att++); + /* create a new socket for connecting to remote server */ s = socket(AF_INET, SOCK_STREAM, 0); if (s == -1) @@ -1578,27 +1618,27 @@ char list[1024][NAME_LENGTH]; str = malloc(strsize); recv_string(s, str, strsize, 10000); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); /* drain server messages */ do { str[0] = 0; recv_string(s, str, strsize, 300); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); } while (str[0]); snprintf(str, strsize - 1, "HELO %s\r\n", host_name); send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); recv_string(s, str, strsize, 3000); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); snprintf(str, strsize - 1, "MAIL FROM: <%s>\r\n", from); send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); recv_string(s, str, strsize, 3000); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); /* break recipients into list */ n = strbreak(to, list, 1024); @@ -1607,16 +1647,16 @@ char list[1024][NAME_LENGTH]; { snprintf(str, strsize - 1, "RCPT TO: <%s>\r\n", list[i]); send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); recv_string(s, str, strsize, 3000); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); } snprintf(str, strsize - 1, "DATA\r\n"); send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); recv_string(s, str, strsize, 3000); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); if (email_to) snprintf(str, strsize - 1, "To: %s\r\n", to); @@ -1624,30 +1664,26 @@ char list[1024][NAME_LENGTH]; snprintf(str, strsize - 1, "To: ELOG user\r\n"); send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); snprintf(str, strsize - 1, "From: %s\r\nSubject: %s\r\n", from, subject); send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); snprintf(str, strsize - 1, "X-Mailer: Elog, Version %s\r\n", VERSION); send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); if (url) { snprintf(str, strsize - 1, "X-Elog-URL: %s\r\n", url); send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); } snprintf(str, strsize - 1, "X-Elog-submit-type: web|elog\r\n"); send(s, str, strlen(str), 0); - if (verbose) puts(str); - - snprintf(str, strsize - 1, "Content-Type: text/plain\r\n"); - send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); time(&now); ts = localtime(&now); @@ -1655,10 +1691,40 @@ char list[1024][NAME_LENGTH]; offset = (-(int)timezone); if (ts->tm_isdst) offset += 3600; - snprintf(str, strsize - 1, "Date: %s %+03d%02d\r\n\r\n", buf, + snprintf(str, strsize - 1, "Date: %s %+03d%02d\r\n", buf, (int) (offset/3600), (int) ((abs((int)offset)/60) % 60)); send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); + + if (n_att > 0) + { + snprintf(str, strsize - 1, "MIME-Version: 1.0\r\n"); + send(s, str, strlen(str), 0); + if (verbose) fputs(str, stdout); + + sprintf(boundary, "%04X-%04X=:%04X", rand(), rand(), rand()); + snprintf(str, strsize - 1, "Content-Type: MULTIPART/MIXED; BOUNDARY=\"%s\"\r\n\r\n", boundary); + send(s, str, strlen(str), 0); + if (verbose) fputs(str, stdout); + + snprintf(str, strsize - 1, " This message is in MIME format. The first part should be readable text,\r\n"); + send(s, str, strlen(str), 0); + if (verbose) fputs(str, stdout); + + snprintf(str, strsize - 1, " while the remaining parts are likely unreadable without MIME-aware tools.\r\n\r\n"); + send(s, str, strlen(str), 0); + if (verbose) fputs(str, stdout); + + snprintf(str, strsize - 1, "--%s\r\nContent-Type: TEXT/PLAIN; charset=US-ASCII\r\n\r\n", boundary); + send(s, str, strlen(str), 0); + if (verbose) fputs(str, stdout); + } + else + { + snprintf(str, strsize - 1, "Content-Type: TEXT/PLAIN; charset=US-ASCII\r\n\r\n"); + send(s, str, strlen(str), 0); + if (verbose) fputs(str, stdout); + } /* analyze text for "." at beginning of line */ p = text; @@ -1671,18 +1737,91 @@ char list[1024][NAME_LENGTH]; strlcat(str, "\r\n..\r\n", strsize); } strlcat(str, p, strsize); - strlcat(str, "\r\n.\r\n", strsize); - + strlcat(str, "\r\n\r\n", strsize); send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); + + if (n_att > 0) + { + snprintf(str, strsize - 1, "--%s\r\n", boundary); + send(s, str, strlen(str), 0); + if (verbose) fputs(str, stdout); + + for (index=0 ; indexdata_dir, sizeof(file_name)); + strlcat(file_name, att_file[index], sizeof(file_name)); + + fh = open(file_name, O_RDONLY | O_BINARY); + if (fh > 0) + { + do + { + n = read(fh, buffer, 45); + if (n<=0) + break; + + base64_bufenc(buffer, n, str); + strcat(str, "\r\n"); + send(s, str, strlen(str), 0); + if (verbose) fputs(str, stdout); + } while(1); + + close(fh); + } + + /* send boundary */ + if (index < n_att-1) + snprintf(str, strsize - 1, "\r\n--%s\r\n", boundary); + else + snprintf(str, strsize - 1, "\r\n--%s--\r\n", boundary); + + send(s, str, strlen(str), 0); + if (verbose) fputs(str, stdout); + } + } + + /* send "." to signal end of message */ + snprintf(str, strsize - 1, ".\r\n"); + send(s, str, strlen(str), 0); + if (verbose) fputs(str, stdout); + recv_string(s, str, strsize, 3000); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); snprintf(str, strsize - 1, "QUIT\r\n"); send(s, str, strlen(str), 0); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); recv_string(s, str, strsize, 3000); - if (verbose) puts(str); + if (verbose) fputs(str, stdout); closesocket(s); free(str); @@ -2938,7 +3077,7 @@ char message[TEXT_SIZE+1000], attachment_all[64*MAX_ATTACHMENTS]; /*------------------------------------------------------------------*/ -int el_submit_attachment(LOGBOOK *lbs, char *afilename, char *buffer, +int el_submit_attachment(LOGBOOK *lbs, char *afilename, char *buffer, int buffer_size, char *full_name) { char file_name[MAX_PATH_LENGTH], dir[MAX_PATH_LENGTH], str[MAX_PATH_LENGTH], *p; @@ -3064,7 +3203,7 @@ char message[TEXT_SIZE+1000], attachment_all[64*MAX_ATTACHMENTS]; el_decode(message, "Attachment: ", attachment_all); name[0] = 0; - + for (i=0 ; i<=n; i++) { if (i == 0) @@ -3706,10 +3845,10 @@ char att_file[MAX_ATTACHMENTS][256]; date[0] = 0; new_id = el_submit(lbs, 0, date, attr_list, attrib, lbs->n_attr, text, in_reply_to, reply_to, encoding, att_file, FALSE, locked_by); - + /* correct links */ el_correct_links(lbs, message_id, new_id); - + /* delete original message */ el_delete_message(lbs, message_id, FALSE, NULL, FALSE, FALSE); @@ -3748,7 +3887,7 @@ char att_file[MAX_ATTACHMENTS][256]; return EL_SUCCESS; } - + /*------------------------------------------------------------------*/ void logf(const char *format, ...) @@ -4190,7 +4329,7 @@ struct tm *gmt; /* to clear a cookie, set expiration date to yesterday */ if (value[0] == 0) exp = -24; - + /* add expriation date */ if (exp != 0) { @@ -4413,7 +4552,7 @@ char css[256], str[256]; show_http_header(expires); /* DOCTYPE */ - rsprintf("\n"); + rsprintf("\n"); /* page title */ rsprintf("%s\n", title); @@ -4426,7 +4565,7 @@ char css[256], str[256]; else if (lbs == NULL && getcfg("global", "CSS", str)) strlcpy(css, str, sizeof(css)); - + rsprintf("", css); rsprintf("\n"); @@ -4518,7 +4657,7 @@ char grplist[MAX_N_LIST][NAME_LENGTH]; if (strlen(grpname) < 7) strlcpy(lbl[n].name, "Invalid group definition!", 256); - else + else strlcpy(lbl[n].name, grpname+6, 256); m = strbreak(grpmembers, grplist, MAX_N_LIST); lbl[n].n_members = m; @@ -4548,7 +4687,7 @@ char grplist[MAX_N_LIST][NAME_LENGTH]; { lbl[i].member[j].member = lbl[k].member; lbl[i].member[j].n_members = lbl[k].n_members; - + /* mark group as subgroup */ lbl[k].subgroup = 1; break; @@ -4815,7 +4954,7 @@ BOOL global; int exist_file(char *file_name) { int fh; - + fh = open(file_name, O_RDONLY | O_BINARY); if (fh > 0) { @@ -5114,7 +5253,7 @@ int i, fh, size; void show_change_pwd_page(LOGBOOK *lbs) { -char str[256], old_pwd[32], +char str[256], old_pwd[32], new_pwd[32], new_pwd2[32], act_pwd[32], user[80]; int wrong_pwd; @@ -5211,7 +5350,7 @@ int wrong_pwd; /*------------------------------------------------------------------*/ int get_last_index(LOGBOOK *lbs, int index) -/* return value of specific attribute of last entry, can be used to +/* return value of specific attribute of last entry, can be used to auto-increment tags */ { int i, message_id; @@ -5483,7 +5622,7 @@ time_t now; /*---- menu buttons ----*/ rsprintf("\n"); - + rsprintf("\n", loc("Submit")); rsprintf("\n", loc("Back")); rsprintf("\n\n"); @@ -5578,7 +5717,7 @@ time_t now; rsprintf("%s%s:", attr_list[index], star); /* if attribute cannot be changed, just display text */ - if ((attr_flags[index] & AF_LOCKED) || + if ((attr_flags[index] & AF_LOCKED) || (bedit && (attr_flags[index] & AF_FIXED_EDIT)) || (message_id && !bedit && (attr_flags[index] & AF_FIXED_REPLY))) { @@ -5849,7 +5988,7 @@ time_t now; strlcpy(file_name, resource_dir, sizeof(file_name)); strlcat(file_name, str, sizeof(file_name)); } - + /* check if file exists */ fh = open(file_name, O_RDONLY | O_BINARY); if (fh > 0) @@ -5978,7 +6117,7 @@ time_t now; rsprintf("\n"); rsprintf("\n", str, att[i]); rsprintf("%s\n", att[i]+14); - rsprintf("  \n", + rsprintf("  \n", i, loc("Delete")); } else @@ -6048,7 +6187,7 @@ char str[NAME_LENGTH], mode[256], comment[256]; /*---- entry form ----*/ rsprintf("\n"); - + rsprintf("%s:  ", loc("Mode")); if (!getcfg(lbs->name, "Display mode", mode)) @@ -6465,10 +6604,10 @@ int i, fh, size, self_register; write(fh, "\n", 1); if (activate) - sprintf(str, "%s:%s:%s:%s:%s\n", getparam("new_user_name"), getparam("encpwd"), + sprintf(str, "%s:%s:%s:%s:%s\n", getparam("new_user_name"), getparam("encpwd"), getparam("new_full_name"), getparam("new_user_email"), getparam("email_notify")); else - sprintf(str, "%s:%s:%s:%s:%s\n", getparam("new_user_name"), new_pwd, + sprintf(str, "%s:%s:%s:%s:%s\n", getparam("new_user_name"), new_pwd, getparam("new_full_name"), getparam("new_user_email"), getparam("email_notify")); write(fh, str, strlen(str)); } @@ -6478,7 +6617,7 @@ int i, fh, size, self_register; lseek(fh, 0, SEEK_SET); write(fh, buf, pl-buf); - sprintf(str, "%s:%s:%s:%s:%s\n", getparam("new_user_name"), new_pwd, + sprintf(str, "%s:%s:%s:%s:%s\n", getparam("new_user_name"), new_pwd, getparam("new_full_name"), getparam("new_user_email"), getparam("email_notify")); write(fh, str, strlen(str)); @@ -6544,7 +6683,7 @@ int i, fh, size, self_register; sprintf(url+strlen(url), "?cmd=Login&unm=%s", getparam("new_user_name")); sprintf(mail_text+strlen(mail_text), "%s %s\r\n", loc("You can access it at"), url); - sendmail(smtp_host, mail_from, getparam("new_user_email"), subject, mail_text, TRUE, url); + sendmail(lbs, smtp_host, mail_from, getparam("new_user_email"), subject, mail_text, TRUE, url, NULL); } else { @@ -6597,10 +6736,10 @@ int i, fh, size, self_register; do_crypt(getparam("newpwd"), enc_pwd); url_encode(enc_pwd, sizeof(enc_pwd)); sprintf(mail_text+strlen(mail_text), "?cmd=Activate&new_user_name=%s&new_full_name=%s&new_user_email=%s&email_notify=%s&encpwd=%s&unm=%s\r\n", - getparam("new_user_name"), - str, - getparam("new_user_email"), - getparam("email_notify"), + getparam("new_user_name"), + str, + getparam("new_user_email"), + getparam("email_notify"), enc_pwd, pl); } @@ -6610,7 +6749,7 @@ int i, fh, size, self_register; loc("Logbook"), url, getparam("new_user_name"), pl); } - sendmail(smtp_host, mail_from, email_addr, subject, mail_text, TRUE, url); + sendmail(lbs, smtp_host, mail_from, email_addr, subject, mail_text, TRUE, url, NULL); } pl = strtok(NULL, " ,"); @@ -6632,7 +6771,7 @@ int i, fh, size, self_register; { set_login_cookies(lbs, getparam("new_user_name"), new_pwd); return 0; - } + } /* if new user, login as this user */ if (new_user && !*getparam("unm")) @@ -6723,7 +6862,7 @@ int i, fh, size; free(buf); close(fh); - + return 1; } @@ -6769,7 +6908,7 @@ int i; /*---- if admin user, show user list ----*/ - if (getcfg(logbook, "Admin user", str) && + if (getcfg(logbook, "Admin user", str) && strstr(str, getparam("unm")) != 0) { rsprintf("\n"); @@ -6806,15 +6945,15 @@ int i; rsprintf("\n", str); rsprintf("%s:\n", loc("Full name")); - rsprintf("\n", + rsprintf("\n", full_name); rsprintf("Email:\n"); - rsprintf("    \n", + rsprintf("    \n", user_email); rsprintf("%s:\n", loc("Enable email notifications")); - + if (email_notify[0]) rsprintf("\n"); else @@ -6826,7 +6965,7 @@ int i; rsprintf("\n", loc("Change password")); rsprintf("\n", loc("Remove user")); - if (!getcfg(logbook, "Admin user", str) || + if (!getcfg(logbook, "Admin user", str) || (getcfg(logbook, "Admin user", str) && strstr(str, getparam("unm")) != 0)) { rsprintf("\n", loc("New user")); @@ -6835,7 +6974,7 @@ int i; /* hidden field for password */ rsprintf("\n", password); - + rsprintf("\n\n"); rsprintf("\r\n"); } @@ -6930,7 +7069,7 @@ char str[1000], login_name[256], full_name[256], user_email[256], name[256], pwd strlcat(mail_text, "\r\n\r\n", sizeof(mail_text)); sprintf(mail_text+strlen(mail_text), "ELOG Version %s\r\n", VERSION); - if (sendmail(smtp_host, mail_from, user_email, subject, mail_text, TRUE, url) != -1) + if (sendmail(lbs, smtp_host, mail_from, user_email, subject, mail_text, TRUE, url, NULL) != -1) { /* save new password */ change_pwd(lbs, login_name, pwd_encrypted); @@ -7021,7 +7160,7 @@ void show_new_user_page(LOGBOOK *lbs) /*---- entry form ----*/ rsprintf("%s:\n", loc("Login name")); - rsprintf(" (%s)\n", + rsprintf(" (%s)\n", loc("name may not contain blanks")); rsprintf("%s:\n", loc("Full name")); @@ -7359,7 +7498,7 @@ FILE *f; /* show select box */ if (select && level == 0) rsprintf("\n", (*n_display)++, message_id); - + for (i=0 ; i", ref); rsputs(display); rsprintf("\n"); @@ -7786,7 +7925,7 @@ FILE *f; /*------------------------------------------------------------------*/ -void display_reply(LOGBOOK *lbs, int message_id, int printable, int expand, int n_line, +void display_reply(LOGBOOK *lbs, int message_id, int printable, int expand, int n_line, int n_attr_disp, char disp_attr[MAX_N_ATTR+4][NAME_LENGTH], int level) { char date[80], *text, in_reply_to[80], reply_to[256], encoding[80], locked_by[256], @@ -7854,7 +7993,7 @@ char *p; return NULL; p = strstr(p, param); - + /* if parameter is value of another parameter, skip it */ if (p > str+1 && *(p-1) == '=') p += strlen(param); @@ -7878,7 +8017,7 @@ char *p1, *p2, *s; { /* remove parameter */ s = param_in_str(str, param); - + if (s == NULL) return; @@ -8007,7 +8146,7 @@ int i, n; (getcfg(lbs->name, "Admin user", str) && strstr(str, getparam("unm")) != 0)) { strcat(menu_str, "Admin, "); - strcat(menu_str, loc("Change elogd.cfg")); + strcat(menu_str, "Change elogd.cfg"); strcat(menu_str, ", "); } strcat(menu_str, "Config, Logout, "); @@ -8039,7 +8178,7 @@ int i, n; if (strstr(admin_user, getparam("unm")) != NULL) { - strcat(menu_str, loc("Change elogd.cfg")); + strcat(menu_str, "Change elogd.cfg"); strcat(menu_str, ", "); } } @@ -8065,7 +8204,7 @@ int i, n; strcpy(other_str, "Upload, Submit, Back, Search, Save, Download, Cancel, First, Last, Previous, Next, Requested, Forgot, "); /* admin commands */ - if (getcfg(lbs->name, "Admin user", str) && + if (getcfg(lbs->name, "Admin user", str) && *getparam("unm") && strstr(str, getparam("unm")) != 0) { @@ -8098,7 +8237,7 @@ int i, n; for (i=0 ; i%s\n", loc("Year")); else rsprintf("