mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Changed indentation
SVN revision: 1327
This commit is contained in:
parent
cd3f7ce1a4
commit
f11204d096
178
src/elogd.c
178
src/elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.632 2005/04/19 06:43:45 ritt
|
||||||
|
Changed indentation
|
||||||
|
|
||||||
Revision 1.631 2005/04/18 20:39:32 ritt
|
Revision 1.631 2005/04/18 20:39:32 ritt
|
||||||
Added SMTP error reporting
|
Added SMTP error reporting
|
||||||
|
|
||||||
@ -1008,7 +1011,7 @@
|
|||||||
\********************************************************************/
|
\********************************************************************/
|
||||||
|
|
||||||
/* Version of ELOG */
|
/* Version of ELOG */
|
||||||
#define VERSION "2.5.8-3"
|
#define VERSION "2.5.8-4"
|
||||||
char cvs_revision[] = "$Id$";
|
char cvs_revision[] = "$Id$";
|
||||||
|
|
||||||
/* ELOG identification */
|
/* ELOG identification */
|
||||||
@ -1334,7 +1337,7 @@ struct {
|
|||||||
".XSL", "text/xml"}, {
|
".XSL", "text/xml"}, {
|
||||||
".ZIP", "application/x-zip-compressed"}, {
|
".ZIP", "application/x-zip-compressed"}, {
|
||||||
|
|
||||||
".THUMB", "image/jpeg"}, { // hard-coded for now...
|
".THUMB", "image/jpeg"}, { // hard-coded for now...
|
||||||
"", ""},};
|
"", ""},};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -2548,8 +2551,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 *subject, char *text, BOOL email_to, char *url,
|
char *subject, char *text, BOOL email_to, char *url,
|
||||||
char att_file[MAX_ATTACHMENTS][256], char *error,
|
char att_file[MAX_ATTACHMENTS][256], char *error, int error_size)
|
||||||
int error_size)
|
|
||||||
{
|
{
|
||||||
struct sockaddr_in bind_addr;
|
struct sockaddr_in bind_addr;
|
||||||
struct hostent *phe;
|
struct hostent *phe;
|
||||||
@ -2681,7 +2683,7 @@ INT sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to,
|
|||||||
strcpy(subject_enc, "=?");
|
strcpy(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(subject, subject_enc+strlen(subject_enc));
|
base64_encode(subject, subject_enc + strlen(subject_enc));
|
||||||
strlcat(subject_enc, "?=", sizeof(subject_enc));
|
strlcat(subject_enc, "?=", sizeof(subject_enc));
|
||||||
|
|
||||||
snprintf(str, strsize - 1, "From: %s\r\nSubject: %s\r\n", from, subject_enc);
|
snprintf(str, strsize - 1, "From: %s\r\nSubject: %s\r\n", from, subject_enc);
|
||||||
@ -2896,7 +2898,7 @@ INT sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to,
|
|||||||
if (!check_smtp_error(str, 221, error, error_size))
|
if (!check_smtp_error(str, 221, error, error_size))
|
||||||
goto smtp_error;
|
goto smtp_error;
|
||||||
|
|
||||||
smtp_error:
|
smtp_error:
|
||||||
|
|
||||||
closesocket(s);
|
closesocket(s);
|
||||||
xfree(str);
|
xfree(str);
|
||||||
@ -7937,8 +7939,8 @@ void attrib_from_param(int n_attr, char attrib[MAX_N_ATTR][NAME_LENGTH])
|
|||||||
ts.tm_mon = month - 1;
|
ts.tm_mon = month - 1;
|
||||||
ts.tm_mday = day;
|
ts.tm_mday = day;
|
||||||
ts.tm_hour = hour;
|
ts.tm_hour = hour;
|
||||||
ts.tm_min = min;
|
ts.tm_min = min;
|
||||||
ts.tm_sec = sec;
|
ts.tm_sec = sec;
|
||||||
ts.tm_isdst = -1;
|
ts.tm_isdst = -1;
|
||||||
|
|
||||||
if (month && day) {
|
if (month && day) {
|
||||||
@ -7955,17 +7957,18 @@ void attrib_from_param(int n_attr, char attrib[MAX_N_ATTR][NAME_LENGTH])
|
|||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
|
|
||||||
void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL bupload, BOOL breedit, BOOL bduplicate)
|
void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL bupload, BOOL breedit,
|
||||||
|
BOOL bduplicate)
|
||||||
{
|
{
|
||||||
int i, j, n, index, aindex, size, width, height, fh, length, input_size, input_maxlen,
|
int i, j, n, index, aindex, size, width, height, fh, length, input_size, input_maxlen,
|
||||||
format_flags[MAX_N_ATTR], year, month, day, hour, min, sec, n_attr, n_disp_attr, attr_index[MAX_N_ATTR];
|
format_flags[MAX_N_ATTR], year, month, day, hour, min, sec, n_attr, n_disp_attr,
|
||||||
|
attr_index[MAX_N_ATTR];
|
||||||
char str[1000], preset[1000], *p, *pend, star[80], comment[10000], reply_string[256],
|
char str[1000], preset[1000], *p, *pend, star[80], comment[10000], reply_string[256],
|
||||||
list[MAX_N_ATTR][NAME_LENGTH], file_name[256], *buffer, format[256], date[80],
|
list[MAX_N_ATTR][NAME_LENGTH], file_name[256], *buffer, format[256], date[80],
|
||||||
attrib[MAX_N_ATTR][NAME_LENGTH], *text, orig_tag[80],
|
attrib[MAX_N_ATTR][NAME_LENGTH], *text, orig_tag[80], reply_tag[MAX_REPLY_TO * 10],
|
||||||
reply_tag[MAX_REPLY_TO * 10], att[MAX_ATTACHMENTS][256], encoding[80],
|
att[MAX_ATTACHMENTS][256], encoding[80], slist[MAX_N_ATTR + 10][NAME_LENGTH],
|
||||||
slist[MAX_N_ATTR + 10][NAME_LENGTH], svalue[MAX_N_ATTR + 10][NAME_LENGTH],
|
svalue[MAX_N_ATTR + 10][NAME_LENGTH], owner[256], locked_by[256], class_value[80], class_name[80],
|
||||||
owner[256], locked_by[256], class_value[80], class_name[80], condition[256],
|
condition[256], ua[NAME_LENGTH], mid[80], title[256], login_name[256];
|
||||||
ua[NAME_LENGTH], mid[80], title[256], login_name[256];
|
|
||||||
time_t now, ltime;
|
time_t now, ltime;
|
||||||
char fl[8][NAME_LENGTH];
|
char fl[8][NAME_LENGTH];
|
||||||
struct tm *pts;
|
struct tm *pts;
|
||||||
@ -8037,7 +8040,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
/* do not format date for date attributes */
|
/* do not format date for date attributes */
|
||||||
i = build_subst_list(lbs, slist, svalue, attrib,
|
i = build_subst_list(lbs, slist, svalue, attrib,
|
||||||
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
||||||
strsubst(preset, slist, svalue, i);
|
strsubst(preset, slist, svalue, i);
|
||||||
|
|
||||||
/* check for index substitution */
|
/* check for index substitution */
|
||||||
@ -8061,7 +8064,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
/* do not format date for date attributes */
|
/* do not format date for date attributes */
|
||||||
i = build_subst_list(lbs, slist, svalue, attrib,
|
i = build_subst_list(lbs, slist, svalue, attrib,
|
||||||
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
||||||
strsubst(preset, slist, svalue, i);
|
strsubst(preset, slist, svalue, i);
|
||||||
|
|
||||||
/* check for index substitution */
|
/* check for index substitution */
|
||||||
@ -8106,8 +8109,8 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
strlcat(condition, str, sizeof(condition));
|
strlcat(condition, str, sizeof(condition));
|
||||||
}
|
}
|
||||||
|
|
||||||
set_condition(condition);
|
set_condition(condition);
|
||||||
n_attr = scan_attributes(lbs->name);
|
n_attr = scan_attributes(lbs->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8135,7 +8138,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
/* do not format date for date attributes */
|
/* do not format date for date attributes */
|
||||||
i = build_subst_list(lbs, slist, svalue, attrib,
|
i = build_subst_list(lbs, slist, svalue, attrib,
|
||||||
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
||||||
strsubst(preset, slist, svalue, i);
|
strsubst(preset, slist, svalue, i);
|
||||||
|
|
||||||
/* check for index substitution */
|
/* check for index substitution */
|
||||||
@ -8159,7 +8162,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
/* do not format date for date attributes */
|
/* do not format date for date attributes */
|
||||||
i = build_subst_list(lbs, slist, svalue, attrib,
|
i = build_subst_list(lbs, slist, svalue, attrib,
|
||||||
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
||||||
strsubst(preset, slist, svalue, i);
|
strsubst(preset, slist, svalue, i);
|
||||||
|
|
||||||
/* check for index substitution */
|
/* check for index substitution */
|
||||||
@ -8240,7 +8243,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
/* do not format date for date attributes */
|
/* do not format date for date attributes */
|
||||||
i = build_subst_list(lbs, slist, svalue, attrib,
|
i = build_subst_list(lbs, slist, svalue, attrib,
|
||||||
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
||||||
sprintf(str, "%d", message_id);
|
sprintf(str, "%d", message_id);
|
||||||
add_subst_list(slist, svalue, "message id", str, &i);
|
add_subst_list(slist, svalue, "message id", str, &i);
|
||||||
add_subst_time(lbs, slist, svalue, "entry time", date, &i);
|
add_subst_time(lbs, slist, svalue, "entry time", date, &i);
|
||||||
@ -8259,7 +8262,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
/* do not format date for date attributes */
|
/* do not format date for date attributes */
|
||||||
i = build_subst_list(lbs, slist, svalue, attrib,
|
i = build_subst_list(lbs, slist, svalue, attrib,
|
||||||
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
(attr_flags[index] & (AF_DATE | AF_DATETIME)) == 0);
|
||||||
|
|
||||||
sprintf(str, "%d", message_id);
|
sprintf(str, "%d", message_id);
|
||||||
add_subst_list(slist, svalue, "message id", str, &i);
|
add_subst_list(slist, svalue, "message id", str, &i);
|
||||||
@ -10372,7 +10375,7 @@ int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user, BOOL activate)
|
|||||||
/* if register through selection page, use first logbook with same password file */
|
/* if register through selection page, use first logbook with same password file */
|
||||||
if (lbs == NULL) {
|
if (lbs == NULL) {
|
||||||
getcfg(NULL, "password file", file_name, sizeof(file_name));
|
getcfg(NULL, "password file", file_name, sizeof(file_name));
|
||||||
for (i=0 ; lb_list[i].name[0] ; i++) {
|
for (i = 0; lb_list[i].name[0]; i++) {
|
||||||
getcfg(lb_list[i].name, "password file", str, sizeof(str));
|
getcfg(lb_list[i].name, "password file", str, sizeof(str));
|
||||||
if (strieq(file_name, str))
|
if (strieq(file_name, str))
|
||||||
break;
|
break;
|
||||||
@ -10471,7 +10474,8 @@ int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user, BOOL activate)
|
|||||||
sprintf(url + strlen(url), "?cmd=Login&unm=%s", getparam("new_user_name"));
|
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);
|
sprintf(mail_text + strlen(mail_text), "%s %s\r\n", loc("You can access it at"), url);
|
||||||
|
|
||||||
sendmail(lbs, smtp_host, mail_from, getparam("new_user_email"), subject, mail_text, TRUE, url, NULL, NULL, 0);
|
sendmail(lbs, smtp_host, mail_from, getparam("new_user_email"), subject, mail_text, TRUE, url, NULL,
|
||||||
|
NULL, 0);
|
||||||
} else {
|
} else {
|
||||||
if (getcfg(lbs->name, "Admin user", admin_user, sizeof(admin_user))) {
|
if (getcfg(lbs->name, "Admin user", admin_user, sizeof(admin_user))) {
|
||||||
pl = strtok(admin_user, " ,");
|
pl = strtok(admin_user, " ,");
|
||||||
@ -10524,24 +10528,23 @@ int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user, BOOL activate)
|
|||||||
url_encode(enc_pwd, sizeof(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",
|
sprintf(mail_text + strlen(mail_text), "?cmd=Activate&new_user_name=%s&new_full_name=%s",
|
||||||
getparam("new_user_name"), str);
|
getparam("new_user_name"), str);
|
||||||
sprintf(mail_text + strlen(mail_text), "&new_user_email=%s",
|
sprintf(mail_text + strlen(mail_text), "&new_user_email=%s", getparam("new_user_email"));
|
||||||
getparam("new_user_email"));
|
|
||||||
|
|
||||||
for (i=0 ; lb_list[i].name[0] ; i++) {
|
for (i = 0; lb_list[i].name[0]; i++) {
|
||||||
sprintf(str, "sub_lb%d", i);
|
sprintf(str, "sub_lb%d", i);
|
||||||
if (isparam(str) && atoi(getparam(str)) == 1)
|
if (isparam(str) && atoi(getparam(str)) == 1)
|
||||||
sprintf(mail_text + strlen(mail_text),"&%s=1", str);
|
sprintf(mail_text + strlen(mail_text), "&%s=1", str);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(mail_text + strlen(mail_text),"&encpwd=%s&unm=%s\r\n",
|
sprintf(mail_text + strlen(mail_text), "&encpwd=%s&unm=%s\r\n", enc_pwd, pl);
|
||||||
enc_pwd, pl);
|
|
||||||
} else {
|
} else {
|
||||||
sprintf(mail_text + strlen(mail_text),
|
sprintf(mail_text + strlen(mail_text),
|
||||||
"\r\n%s URL : %s?cmd=Config&cfg_user=%s&unm=%s\r\n",
|
"\r\n%s URL : %s?cmd=Config&cfg_user=%s&unm=%s\r\n",
|
||||||
loc("Logbook"), url, getparam("new_user_name"), pl);
|
loc("Logbook"), url, getparam("new_user_name"), pl);
|
||||||
}
|
}
|
||||||
|
|
||||||
sendmail(lbs, smtp_host, mail_from, email_addr, subject, mail_text, TRUE, url, NULL, NULL, 0);
|
sendmail(lbs, smtp_host, mail_from, email_addr, subject, mail_text, TRUE, url, NULL, NULL,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
pl = strtok(NULL, " ,");
|
pl = strtok(NULL, " ,");
|
||||||
@ -10859,7 +10862,8 @@ void show_forgot_pwd_page(LOGBOOK * lbs)
|
|||||||
strlcat(mail_text, "\r\n\r\n", sizeof(mail_text));
|
strlcat(mail_text, "\r\n\r\n", sizeof(mail_text));
|
||||||
sprintf(mail_text + strlen(mail_text), "ELOG Version %s\r\n", VERSION);
|
sprintf(mail_text + strlen(mail_text), "ELOG Version %s\r\n", VERSION);
|
||||||
|
|
||||||
if (sendmail(lbs, smtp_host, mail_from, user_email, subject, mail_text, TRUE, url, NULL, NULL, 0) != -1) {
|
if (sendmail(lbs, smtp_host, mail_from, user_email, subject, mail_text, TRUE, url, NULL, NULL, 0)
|
||||||
|
!= -1) {
|
||||||
/* save new password */
|
/* save new password */
|
||||||
change_pwd(lbs, login_name, pwd_encrypted);
|
change_pwd(lbs, login_name, pwd_encrypted);
|
||||||
|
|
||||||
@ -14271,7 +14275,8 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
|
|||||||
strlcat(thumb_name, ".thumb", sizeof(thumb_name));
|
strlcat(thumb_name, ".thumb", sizeof(thumb_name));
|
||||||
|
|
||||||
if (!show_attachments) {
|
if (!show_attachments) {
|
||||||
rsprintf("<a href=\"%s\" target=\"_blank\">%s</a> ", ref, attachment[index] + 14);
|
rsprintf("<a href=\"%s\" target=\"_blank\">%s</a> ", ref,
|
||||||
|
attachment[index] + 14);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (file_exist(thumb_name)) {
|
if (file_exist(thumb_name)) {
|
||||||
@ -17048,14 +17053,22 @@ int compose_email(LOGBOOK * lbs, char *mail_to, int message_id,
|
|||||||
status = 0;
|
status = 0;
|
||||||
if (flags & 16) {
|
if (flags & 16) {
|
||||||
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)
|
||||||
status = sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, FALSE, url, att_file, error, sizeof(error));
|
status =
|
||||||
|
sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, FALSE, url, att_file, error,
|
||||||
|
sizeof(error));
|
||||||
else
|
else
|
||||||
status = sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, TRUE, url, att_file, error, sizeof(error));
|
status =
|
||||||
|
sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, TRUE, url, att_file, error,
|
||||||
|
sizeof(error));
|
||||||
} else {
|
} else {
|
||||||
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)
|
||||||
status = sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, FALSE, url, NULL, error, sizeof(error));
|
status =
|
||||||
|
sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, FALSE, url, NULL, error,
|
||||||
|
sizeof(error));
|
||||||
else
|
else
|
||||||
status = sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, TRUE, url, NULL, error, sizeof(error));
|
status =
|
||||||
|
sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, TRUE, url, NULL, error,
|
||||||
|
sizeof(error));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
@ -18084,64 +18097,64 @@ void copy_to(LOGBOOK * lbs, int src_id, char *dest_logbook, int move, int orig_i
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* old status message, removed until someone complains...
|
/* old status message, removed until someone complains...
|
||||||
if (source_id)
|
if (source_id)
|
||||||
sprintf(str, "%d", source_id);
|
sprintf(str, "%d", source_id);
|
||||||
else
|
|
||||||
str[0] = 0;
|
|
||||||
show_standard_header(lbs, FALSE, loc("Copy ELog entry"), str, FALSE);
|
|
||||||
|
|
||||||
rsprintf("<table class=\"dlgframe\" cellspacing=0 align=center>");
|
|
||||||
rsprintf("<tr><td colspan=2 class=\"dlgtitle\">\n");
|
|
||||||
|
|
||||||
if (n_done == 0)
|
|
||||||
rsprintf(loc("No entry selected"));
|
|
||||||
else {
|
|
||||||
if (n_done == 1)
|
|
||||||
rsprintf(loc("One entry"));
|
|
||||||
else
|
else
|
||||||
rsprintf(loc("%d messages"), n_done);
|
str[0] = 0;
|
||||||
|
show_standard_header(lbs, FALSE, loc("Copy ELog entry"), str, FALSE);
|
||||||
|
|
||||||
|
rsprintf("<table class=\"dlgframe\" cellspacing=0 align=center>");
|
||||||
|
rsprintf("<tr><td colspan=2 class=\"dlgtitle\">\n");
|
||||||
|
|
||||||
|
if (n_done == 0)
|
||||||
|
rsprintf(loc("No entry selected"));
|
||||||
|
else {
|
||||||
|
if (n_done == 1)
|
||||||
|
rsprintf(loc("One entry"));
|
||||||
|
else
|
||||||
|
rsprintf(loc("%d messages"), n_done);
|
||||||
|
|
||||||
if (n_done_reply) {
|
if (n_done_reply) {
|
||||||
rsprintf(" ");
|
rsprintf(" ");
|
||||||
|
|
||||||
if (n_done == 1)
|
if (n_done == 1)
|
||||||
rsprintf(loc("and its replies"));
|
rsprintf(loc("and its replies"));
|
||||||
else
|
else
|
||||||
rsprintf(loc("and their replies"));
|
rsprintf(loc("and their replies"));
|
||||||
}
|
}
|
||||||
|
|
||||||
rsprintf(" ");
|
rsprintf(" ");
|
||||||
|
|
||||||
if (move)
|
if (move)
|
||||||
rsprintf(loc("moved successfully from \"%s\" to \"%s\""), lbs->name, lbs_dest->name);
|
rsprintf(loc("moved successfully from \"%s\" to \"%s\""), lbs->name, lbs_dest->name);
|
||||||
else
|
else
|
||||||
rsprintf(loc("copied successfully from \"%s\" to \"%s\""), lbs->name, lbs_dest->name);
|
rsprintf(loc("copied successfully from \"%s\" to \"%s\""), lbs->name, lbs_dest->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
rsprintf("</b></tr>\n");
|
rsprintf("</b></tr>\n");
|
||||||
if (source_id)
|
if (source_id)
|
||||||
rsprintf
|
rsprintf
|
||||||
("<tr><td align=center class=\"dlgform\">%s <a href=\"../%s/%d\">%s</td></tr>\n",
|
("<tr><td align=center class=\"dlgform\">%s <a href=\"../%s/%d\">%s</td></tr>\n",
|
||||||
loc("Go to"), lbs->name, source_id, lbs->name);
|
loc("Go to"), lbs->name, source_id, lbs->name);
|
||||||
else {
|
else {
|
||||||
strcpy(str, getparam("lastcmd"));
|
strcpy(str, getparam("lastcmd"));
|
||||||
url_decode(str);
|
url_decode(str);
|
||||||
|
|
||||||
rsprintf
|
rsprintf
|
||||||
("<tr><td align=center class=\"dlgform\">%s <a href=\"../%s/%s\">%s</td></tr>\n",
|
("<tr><td align=center class=\"dlgform\">%s <a href=\"../%s/%s\">%s</td></tr>\n",
|
||||||
loc("Go to"), lbs->name, str, lbs->name);
|
loc("Go to"), lbs->name, str, lbs->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
rsprintf
|
rsprintf
|
||||||
("<tr><td align=center class=\"dlgform\">%s <a href=\"../%s/\">%s</td></tr>\n",
|
("<tr><td align=center class=\"dlgform\">%s <a href=\"../%s/\">%s</td></tr>\n",
|
||||||
loc("Go to"), lbs_dest->name, lbs_dest->name);
|
loc("Go to"), lbs_dest->name, lbs_dest->name);
|
||||||
|
|
||||||
rsprintf("</table>\n");
|
rsprintf("</table>\n");
|
||||||
show_bottom_text(lbs);
|
show_bottom_text(lbs);
|
||||||
rsprintf("</body></html>\r\n");
|
rsprintf("</body></html>\r\n");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
@ -18885,7 +18898,8 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
|
|||||||
("<tr><td nowrap width=\"10%%\" class=\"attribname\">%s %d:</td>\n",
|
("<tr><td nowrap width=\"10%%\" class=\"attribname\">%s %d:</td>\n",
|
||||||
loc("Attachment"), index + 1);
|
loc("Attachment"), index + 1);
|
||||||
|
|
||||||
rsprintf("<td class=\"attribvalue\"><a href=\"%s\" target=\"_blank\">%s</a>\n", ref, attachment[index] + 14);
|
rsprintf("<td class=\"attribvalue\"><a href=\"%s\" target=\"_blank\">%s</a>\n", ref,
|
||||||
|
attachment[index] + 14);
|
||||||
|
|
||||||
rsprintf(" <span class=\"bytes\">");
|
rsprintf(" <span class=\"bytes\">");
|
||||||
|
|
||||||
@ -19368,7 +19382,7 @@ BOOL enum_user_line(LOGBOOK * lbs, int n, char *user, int size)
|
|||||||
if (lbs->pwd_xml_tree == NULL)
|
if (lbs->pwd_xml_tree == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
sprintf(str, "/list/user[%d]/name", n+1);
|
sprintf(str, "/list/user[%d]/name", n + 1);
|
||||||
if ((node = mxml_find_node(lbs->pwd_xml_tree, str)) == NULL)
|
if ((node = mxml_find_node(lbs->pwd_xml_tree, str)) == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@ -20446,15 +20460,15 @@ void interprete(char *lbook, char *path)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strieq(command, loc("New")) || strieq(command, loc("Edit")) || strieq(command, loc("Reply")) ||
|
if (strieq(command, loc("New")) || strieq(command, loc("Edit")) || strieq(command, loc("Reply")) ||
|
||||||
strieq(command, loc("Duplicate")) || strieq(command, loc("Delete")) || strieq(command, loc("Upload")) ||
|
strieq(command, loc("Duplicate")) || strieq(command, loc("Delete")) || strieq(command, loc("Upload"))
|
||||||
strieq(command, loc("Submit"))) {
|
|| strieq(command, loc("Submit"))) {
|
||||||
sprintf(str, "%s?cmd=%s", path, command);
|
sprintf(str, "%s?cmd=%s", path, command);
|
||||||
if (!check_password(lbs, "Write password", getparam("wpwd"), str))
|
if (!check_password(lbs, "Write password", getparam("wpwd"), str))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strieq(command, loc("Delete")) || strieq(command, loc("Config")) ||
|
if (strieq(command, loc("Delete")) || strieq(command, loc("Config")) ||
|
||||||
strieq(command, loc("Copy to")) || strieq(command, loc("Move to"))) {
|
strieq(command, loc("Copy to")) || strieq(command, loc("Move to"))) {
|
||||||
sprintf(str, "%s?cmd=%s", path, command);
|
sprintf(str, "%s?cmd=%s", path, command);
|
||||||
if (!check_password(lbs, "Admin password", getparam("apwd"), str))
|
if (!check_password(lbs, "Admin password", getparam("apwd"), str))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user