diff --git a/elogd.c b/elogd.c
index 620f3948..788718da 100755
--- a/elogd.c
+++ b/elogd.c
@@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG
$Log$
+ Revision 2.54 2002/08/02 11:00:10 midas
+ Started working on user configuration page
+
Revision 2.53 2002/07/31 11:48:08 midas
Added page wise display
@@ -3522,7 +3525,8 @@ struct tm *ts;
void show_change_pwd_page(LOGBOOK *lbs)
{
-char str[256], file_name[256], line[256], *p, *pl, old_pwd[32], new_pwd[32];
+char str[256], file_name[256], line[256], *p, *pl, old_pwd[32],
+ new_pwd[32], new_pwd2[32];
char *buf;
FILE *f;
int i, wrong_pwd, size;
@@ -3530,9 +3534,9 @@ double exp;
time_t now;
struct tm *gmt;
-
do_crypt(getparam("oldpwd"), old_pwd);
do_crypt(getparam("newpwd"), new_pwd);
+ do_crypt(getparam("newpwd2"), new_pwd2);
getcfg(lbs->name, "Password file", str);
@@ -3597,7 +3601,10 @@ struct tm *gmt;
*strchr(str, ':') = 0;
if (strcmp(old_pwd, str) != 0)
- wrong_pwd = TRUE;
+ wrong_pwd = 1;
+
+ if (strcmp(new_pwd, new_pwd2) != 0)
+ wrong_pwd = 2;
}
/* replace password */
@@ -3672,9 +3679,12 @@ struct tm *gmt;
gt("Border width"), gt("Frame color"));
rsprintf("
\n", gt("Frame color"));
- if (wrong_pwd)
+ if (wrong_pwd == 1)
rsprintf("| %s! | \n", loc("Wrong password"));
+ if (wrong_pwd == 2)
+ rsprintf("| %s! | \n", loc("New passwords do not match, please retype"));
+
rsprintf("| \n", gt("Title bgcolor"));
rsprintf("%s \"%s\" | \n",
@@ -3684,6 +3694,8 @@ struct tm *gmt;
gt("Cell BGColor"), loc("Old Password"));
rsprintf("| %s: | \n",
gt("Cell BGColor"), loc("New Password"));
+ rsprintf("| %s: | \n",
+ gt("Cell BGColor"), loc("Retype new password"));
rsprintf(" | ",
gt("Cell BGColor"), loc("Submit"));
@@ -4411,6 +4423,13 @@ char str[256], mode[256];
}
}
+ rsprintf("", gt("Categories bgcolor2"));
+ rsprintf(loc("Display"));
+ if (!getcfg(lbs->name, "Entries per page", str))
+ strcpy(str, "20");
+ rsprintf(" ", str);
+ rsprintf(loc("entries per page"));
+
rsprintf(" | | %s: | ", gt("Categories bgcolor1"), loc("Start date"));
rsprintf(" | \n\n");
+ rsprintf(" |