X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fcalendar_tools.c;h=5fffee44c3b692e5358fa4c78629165fde99c176;hb=fb6f6fa4ec4e3277e30d84326d48e6850822d318;hp=1a9f9c99a080fdd841f2b432fb8fbb6b89bb5d44;hpb=997c125457276c638b62ea31ab2668629f4760f0;p=citadel.git
diff --git a/webcit/calendar_tools.c b/webcit/calendar_tools.c
index 1a9f9c99a..5fffee44c 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,115 @@ 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("