mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Fixed problem with 'Back' button
SVN revision: 1140
This commit is contained in:
parent
fff6555663
commit
1dbf4afb09
35
src/elogd.c
35
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.518 2004/12/06 20:42:51 midas
|
||||||
|
Fixed problem with 'Back' button
|
||||||
|
|
||||||
Revision 1.517 2004/12/05 11:52:53 midas
|
Revision 1.517 2004/12/05 11:52:53 midas
|
||||||
Added date check
|
Added date check
|
||||||
|
|
||||||
@ -6676,9 +6679,10 @@ void set_login_cookies(LOGBOOK * lbs, char *user, char *enc_pwd)
|
|||||||
strcpy(lb_name, "global");
|
strcpy(lb_name, "global");
|
||||||
|
|
||||||
/* get optional expriation from configuration file */
|
/* get optional expriation from configuration file */
|
||||||
if (isparam("remember")) {
|
if (getcfg(lbs->name, "Login expiration", str, sizeof(str)) || atof(str) > 0)
|
||||||
if (!getcfg(lb_name, "Login expiration", exp, sizeof(exp)))
|
strcpy(exp, str);
|
||||||
strcpy(exp, "744"); /* one month by default = 31*24 */
|
else if (isparam("remember")) {
|
||||||
|
strcpy(exp, "744"); /* one month by default = 31*24 */
|
||||||
} else
|
} else
|
||||||
exp[0] = 0;
|
exp[0] = 0;
|
||||||
|
|
||||||
@ -18090,7 +18094,7 @@ BOOL check_user_password(LOGBOOK * lbs, char *user, char *password, char *redir)
|
|||||||
rsprintf("<tr><td align=right class=\"dlgform\">%s:</td>\n", loc("Password"));
|
rsprintf("<tr><td align=right class=\"dlgform\">%s:</td>\n", loc("Password"));
|
||||||
rsprintf("<td align=left class=\"dlgform\"><input type=password name=upassword></td></tr>\n");
|
rsprintf("<td align=left class=\"dlgform\"><input type=password name=upassword></td></tr>\n");
|
||||||
|
|
||||||
if (!getcfg(lbs->name, "Login expiration", str, sizeof(str)) || atoi(str) > 0) {
|
if (!getcfg(lbs->name, "Login expiration", str, sizeof(str)) || atof(str) > 0) {
|
||||||
rsprintf("<td align=center colspan=2 class=\"dlgform\">");
|
rsprintf("<td align=center colspan=2 class=\"dlgform\">");
|
||||||
|
|
||||||
if (isparam("urem") && atoi(getparam("urem")) == 0)
|
if (isparam("urem") && atoi(getparam("urem")) == 0)
|
||||||
@ -18975,15 +18979,8 @@ void interprete(char *lbook, char *path)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check for "List" button */
|
/* check for "Back" button */
|
||||||
if (strieq(command, loc("List"))
|
if (strieq(command, loc("Back"))) {
|
||||||
&& getcfg(lbs->name, "Back to main", str, sizeof(str))
|
|
||||||
&& atoi(str) == 1) {
|
|
||||||
redirect(lbs, "../");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strieq(command, loc("List"))) {
|
|
||||||
if (isparam("edit_id")) {
|
if (isparam("edit_id")) {
|
||||||
/* unlock message */
|
/* unlock message */
|
||||||
el_lock_message(lbs, atoi(getparam("edit_id")), NULL);
|
el_lock_message(lbs, atoi(getparam("edit_id")), NULL);
|
||||||
@ -18991,6 +18988,18 @@ void interprete(char *lbook, char *path)
|
|||||||
sprintf(str, "../%s/%s", logbook_enc, getparam("edit_id"));
|
sprintf(str, "../%s/%s", logbook_enc, getparam("edit_id"));
|
||||||
} else
|
} else
|
||||||
sprintf(str, "../%s/", logbook_enc);
|
sprintf(str, "../%s/", logbook_enc);
|
||||||
|
|
||||||
|
if (getcfg(lbs->name, "Back to main", str, sizeof(str))
|
||||||
|
&& atoi(str) == 1)
|
||||||
|
strcpy(str, "../");
|
||||||
|
|
||||||
|
redirect(lbs, str);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check for "List" button */
|
||||||
|
if (strieq(command, loc("List"))) {
|
||||||
|
sprintf(str, "../%s/", logbook_enc);
|
||||||
redirect(lbs, str);
|
redirect(lbs, str);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user