diff --git a/src/elogd.c b/src/elogd.c
index 0f07fc59..eef4a757 100755
--- a/src/elogd.c
+++ b/src/elogd.c
@@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG
$Log$
+ Revision 1.244 2004/02/13 23:27:20 midas
+ Restructured code
+
Revision 1.243 2004/02/13 20:45:09 midas
Fixed another problem with quotation marks
@@ -2339,7 +2342,6 @@ char *loc(char *orig)
return result;
}
-
getcfg("global", "Language", language);
printf("Language error: string \"%s\" not found for language \"%s\"\n", orig,
language);
@@ -5924,6 +5926,58 @@ BOOL is_cond_attr(index)
/*------------------------------------------------------------------*/
+void show_date_selector(int day, int month, int year, int index)
+{
+ int i;
+
+ rsprintf("\n");
+
+ rsprintf("\n");
+
+ if (year)
+ rsprintf(" %s: ",
+ loc("Year"), index, year);
+ else
+ rsprintf(" %s: ",
+ loc("Year"), index);
+
+ rsprintf("\n\n");
+}
+
+/*------------------------------------------------------------------*/
+
void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL bupload,
BOOL breedit)
{
@@ -6405,54 +6459,10 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
day = pts->tm_mday;
}
- /* display date selector */
- rsprintf("
\n");
-
- rsprintf("\n");
-
- if (year)
- rsprintf(" %s: ",
- loc("Year"), index, year);
- else
- rsprintf(" %s: ",
- loc("Year"), index);
-
- rsprintf("\n\n");
-
+ rsprintf(" | ");
+ show_date_selector(day, month, year, index);
rsprintf(" | \n");
-
+
} else {
/* show normal edit field */
@@ -7077,42 +7087,12 @@ void show_find_form(LOGBOOK * lbs)
/* table for two-column items */
rsprintf("\n");
- rsprintf("| %s: | ", loc("Start date"));
- rsprintf("\n");
-
- rsprintf("\n");
-
- rsprintf(" %s: ",
- loc("Year"));
-
- rsprintf("\n\n");
-
+ rsprintf(" |
| %s: | ", loc("Entry date"));
+ rsprintf("\n");
+ rsprintf("| %s: | ", loc("Start"));
+
+ show_date_selector(0, 0, 0, 1);
+
rsprintf(" / %s: ", loc("Show last"));
rsprintf(" | \n");
- rsprintf("| %s: | ", loc("End date"));
- rsprintf(" | |
\n");
for (i = 0; i < lbs->n_attr; i++) {
rsprintf("| %s: | ", attr_list[i]);