/*
* $Id$
*
- *
+ * Handles the HTML display of calendar items.
*/
#include <ctype.h>
#ifndef WEBCIT_WITH_CALENDAR_SERVICE
void do_calendar_view(void) { /* stub for non-libical builds */
- wprintf("<CENTER><I>Calendar view not available</I></CENTER><BR>\n");
+ wprintf("<CENTER><I>Calendar view not available</I></CENTER><br />\n");
}
void do_tasks_view(void) { /* stub for non-libical builds */
- wprintf("<CENTER><I>Tasks view not available</I></CENTER><BR>\n");
+ wprintf("<CENTER><I>Tasks view not available</I></CENTER><br />\n");
}
#else /* WEBCIT_WITH_CALENDAR_SERVICE */
int all_day_event = 0;
if (WC->num_cal == 0) {
- wprintf("<BR><BR><BR>\n");
+ wprintf("<br /><br /><br />\n");
return;
}
localtime_r(&event_tt, &event_tm);
}
-lprintf(9, "Event: %04d/%02d/%02d, Now: %04d/%02d/%02d\n",
- event_tm.tm_year,
- event_tm.tm_mon,
- event_tm.tm_mday,
- today_tm.tm_year,
- today_tm.tm_mon,
- today_tm.tm_mday);
-
-
if ((event_tm.tm_year == today_tm.tm_year)
&& (event_tm.tm_mon == today_tm.tm_mon)
&& (event_tm.tm_mday == today_tm.tm_mday)) {
);
escputs((char *)
icalproperty_get_comment(p));
- wprintf("</A></FONT><BR>\n");
+ wprintf("</A></FONT><br />\n");
if (all_day_event) {
wprintf("</TD></TR></TABLE>");
}
/* Outer table (to get the background color) */
- wprintf("<TABLE width=100%% border=0 cellpadding=0 cellspacing=0 "
+ wprintf("<div style=\"margin-right:1px\">"
+ "<TABLE width=100%% border=0 cellpadding=0 cellspacing=0 "
"bgcolor=#204B78><TR><TD>\n");
- wprintf("<TABLE width=100%% border=0 cellpadding=0 cellspacing=0>"
- "<TR><TD align=left><font color=#FFFFFF>"
- " <A HREF=\"/display_edit_event?msgnum=0"
- "&year=%d&month=%d&day=%d\">"
- "Add new calendar event</A>"
- "</font></TD>\n",
- year, month, day
- );
+ wprintf("<TABLE width=100%% border=0 cellpadding=0 cellspacing=0><tr>\n");
wprintf("<TD ALIGN=CENTER>");
(int)(tm.tm_year)+1900, tm.tm_mon + 1);
wprintf("<IMG ALIGN=MIDDLE SRC=\"/static/forward.gif\" BORDER=0></A>\n");
- wprintf("</TD><TD align=right><font color=#FFFFFF size=-2>"
- "Click on any date for day view "
- "</FONT></TD></TR></TABLE>\n");
+ wprintf("</TD></TR></TABLE>\n");
/* Inner table (the real one) */
wprintf("<TABLE width=100%% border=0 cellpadding=1 cellspacing=1 "
wprintf("<TR>");
}
- wprintf("<TD BGCOLOR=\"#%s\" WIDTH=14%% HEIGHT=60 VALIGN=TOP><B>",
+ wprintf("<TD BGCOLOR=\"#%s\" WIDTH=14%% HEIGHT=60 align=left VALIGN=TOP><B>",
((tm.tm_mon != month-1) ? "DDDDDD" :
((tm.tm_wday==0 || tm.tm_wday==6) ? "EEEECC" :
"FFFFFF"))
wprintf("%s ", months[tm.tm_mon]);
}
wprintf("<A HREF=\"readfwd?calview=day&year=%d&month=%d&day=%d\">"
- "%d</A></B><BR>",
+ "%d</A></B><br />",
tm.tm_year + 1900,
tm.tm_mon + 1,
tm.tm_mday,
wprintf("</TABLE>" /* end of inner table */
"</TD></TR></TABLE>" /* end of outer table */
- "</CENTER>\n");
+ "</div>\n");
}
void calendar_week_view(int year, int month, int day) {
- wprintf("<CENTER><I>week view FIXME</I></CENTER><BR>\n");
+ wprintf("<CENTER><I>week view FIXME</I></CENTER><br />\n");
}
int all_day_event = 0;
if (WC->num_cal == 0) {
- wprintf("<BR><BR><BR>\n");
+ // FIXME wprintf("<br /><br /><br />\n");
return;
}
);
escputs((char *)
icalproperty_get_comment(p));
- wprintf("</A></FONT><BR>\n");
+ wprintf("</A></FONT><br />\n");
if (all_day_event) {
wprintf("</TD></TR></TABLE>");
/* Outer table (to get the background color) */
- wprintf("<TABLE width=100%% border=0 cellpadding=0 cellspacing=0 "
+ wprintf("<div style=\"margin-right:1px\">"
+ "<TABLE width=100%% border=0 cellpadding=0 cellspacing=0 "
"bgcolor=#204B78><TR><TD>\n");
/* Inner table (the real one) */
/* Today's date */
wprintf("<TD ALIGN=CENTER>");
- wprintf("<FONT SIZE=+2>%s</FONT><BR>"
- "<FONT SIZE=+3>%d</FONT><BR>"
- "<FONT SIZE=+2>%d</FONT><BR>",
+ wprintf("<FONT SIZE=+2>%s</FONT><br />"
+ "<FONT SIZE=+3>%d</FONT><br />"
+ "<FONT SIZE=+2>%d</FONT><br />",
months[month-1], day, year);
wprintf("</TD>");
wprintf("</TR></TABLE>\n");
/* End todays-date-with-left-and-right-arrows */
- wprintf("<BR><BR><CENTER><font color=#FFFFFF>"
- " <A HREF=\"/display_edit_event?msgnum=0"
- "&year=%d&month=%d&day=%d\">"
- "Add new calendar event</A>"
- "<BR><BR>\n",
- year, month, day
- );
-
- wprintf("<A HREF=\"readfwd?calview=month&year=%d&month=%d&day=1\">"
- "Back to month view</A>\n", year, month);
+ /* In the future we might want to put a month-o-matic here */
wprintf("</FONT></CENTER>\n");
wprintf("</TR></TABLE>" /* end of inner table */
- "</TD></TR></TABLE>" /* end of outer table */
+ "</TD></TR></TABLE></div>" /* end of outer table */
);
if (p != NULL) {
escputs((char *)
icalproperty_get_comment(p));
- wprintf(" (%s)<BR>\n", timestring);
+ wprintf(" (%s)<br />\n", timestring);
}
}
}
char buf[SIZ];
icalproperty *p;
- do_template("beginbox_nt");
-
- wprintf("<TABLE BORDER=0 CELLSPACING=0 WIDTH=100%%>\n<TR>\n"
+ wprintf("<div style=\"margin-right:1px\">"
+ "<table border=0 cellspacing=0 width=100%% bgcolor=\"#FFFFFF\">\n<tr>\n"
"<TH>Name of task</TH>\n"
"<TH>Date due</TH></TR>\n"
);
wprintf(">%s</FONT></TD></TR>\n", buf);
}
- wprintf("</TABLE>\n");
-
- wprintf("<HR><A HREF=\"/display_edit_task?msgnum=0\">"
- "Add new task</A>\n"
- );
-
- do_template("endbox");
-
+ wprintf("</table></div>\n");
/* Free the list */
free_calendar_buffer();