X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fcalendar_tools.c;h=86da183b8abcca7f6a8666b7e2b99a1ae1142fc5;hb=HEAD;hp=23dd53524b8f435ce131a47aa96b29202c2f671f;hpb=4d8058558a7251e6ac9222ebd1c2d1270cdd9153;p=citadel.git
diff --git a/webcit/calendar_tools.c b/webcit/calendar_tools.c
index 23dd53524..488296ca7 100644
--- a/webcit/calendar_tools.c
+++ b/webcit/calendar_tools.c
@@ -1,12 +1,21 @@
/*
- * $Id$
- *
* Miscellaneous functions which handle calendar components.
+ *
+ * Copyright (c) 1996-2012 by the citadel.org team
+ *
+ * This program is open source software. You can redistribute it and/or
+ * modify it under the terms of the GNU General Public License, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*/
#include "webcit.h"
-#include "webserver.h"
+
#include "time.h"
+#include "calendar.h"
/* Hour strings */
char *hourname[] = {
@@ -33,11 +42,11 @@ char *hourname[] = {
* might be to allow the user to specify his/her timezone.
*/
-void display_icaltimetype_as_webform(struct icaltimetype *t, char *prefix) {
+void display_icaltimetype_as_webform(struct icaltimetype *t, char *prefix, int date_only) {
+ wcsession *WCC = WC;
int i;
time_t now;
struct tm tm_now;
- int this_year;
time_t tt;
struct tm tm;
int all_day_event = 0;
@@ -48,7 +57,6 @@ void display_icaltimetype_as_webform(struct icaltimetype *t, char *prefix) {
now = time(NULL);
localtime_r(&now, &tm_now);
- this_year = tm_now.tm_year + 1900;
if (t == NULL) return;
if (t->is_date) all_day_event = 1;
@@ -60,109 +68,114 @@ void display_icaltimetype_as_webform(struct icaltimetype *t, char *prefix) {
localtime_r(&tt, &tm);
}
- wprintf("WBuf, prefix, -1, 0);
+ wc_printf("\" id=\"");
+ StrBufAppendBufPlain(WCC->WBuf, prefix, -1, 0);
+ wc_printf("\" size=\"10\" maxlength=\"10\" value=\"");
wc_strftime(timebuf, 32, "%Y-%m-%d", &tm);
- wprintf(timebuf);
- wprintf("\">");
- wprintf("");
- wprintf(_("Hour: "));
- wprintf("