icalproperty *attendee = NULL;
char attendee_string[SIZ];
char buf[SIZ];
- int i;
int organizer_is_me = 0;
+ int i;
int sequence = 0;
now = time(NULL) % 60; /* mod 60 to force :00 seconds */
}
/* Begin output */
- output_headers(3);
+ output_headers(1, 1, 0, 0, 0, 0, 0);
do_template("beginbox_nt");
wprintf("<h3> <IMG ALIGN=CENTER SRC=\"/static/vcalendar.gif\">"
" Add or edit an event</h3>\n");
if (p != NULL) {
escputs((char *)icalproperty_get_comment(p));
}
- wprintf("<BR>\n");
- wprintf("SEQUENCE == %d<BR>\n", sequence);
+ wprintf("<br />\n");
+ wprintf("SEQUENCE == %d<br />\n", sequence);
*************************************************************/
wprintf("<FORM NAME=\"EventForm\" METHOD=\"POST\" ACTION=\"/save_event\">\n");
}
}
else {
- memcpy(&tm_now, localtime(&now), sizeof(struct tm));
+ localtime_r(&now, &tm_now);
tm_now.tm_year = atoi(bstr("year")) - 1900;
tm_now.tm_mon = atoi(bstr("month")) - 1;
tm_now.tm_mday = atoi(bstr("day"));
t_start = icaltime_from_timet_with_zone(
mktime(&tm_now),
((!strcasecmp(bstr("alldayevent"), "yes")) ? 1 : 0),
- icaltimezone_get_utc_timezone
+ icaltimezone_get_utc_timezone()
);
t_start.is_utc = 1;
display_icaltimetype_as_webform(&t_start, "dtstart");
wprintf("<INPUT TYPE=\"checkbox\" NAME=\"alldayevent\" "
- "VALUE=\"yes\" onClick=\"
-
- if (this.checked) {
- this.form.dtstart_hour.value='0';
- this.form.dtstart_hour.disabled = true;
- this.form.dtstart_minute.value='0';
- this.form.dtstart_minute.disabled = true;
- this.form.dtend_hour.value='0';
- this.form.dtend_hour.disabled = true;
- this.form.dtend_minute.value='0';
- this.form.dtend_minute.disabled = true;
- this.form.dtend_month.disabled = true;
- this.form.dtend_day.disabled = true;
- this.form.dtend_year.disabled = true;
- }
- else {
- this.form.dtstart_hour.disabled = false;
- this.form.dtstart_minute.disabled = false;
- this.form.dtend_hour.disabled = false;
- this.form.dtend_minute.disabled = false;
- this.form.dtend_month.disabled = false;
- this.form.dtend_day.disabled = false;
- this.form.dtend_year.disabled = false;
- }
-
-
- \" %s >All day event",
+ "VALUE=\"yes\" onClick=\""
+""
+" if (this.checked) { "
+" this.form.dtstart_hour.value='0'; "
+" this.form.dtstart_hour.disabled = true; "
+" this.form.dtstart_minute.value='0'; "
+" this.form.dtstart_minute.disabled = true; "
+" this.form.dtend_hour.value='0'; "
+" this.form.dtend_hour.disabled = true; "
+" this.form.dtend_minute.value='0'; "
+" this.form.dtend_minute.disabled = true; "
+" this.form.dtend_month.disabled = true; "
+" this.form.dtend_day.disabled = true; "
+" this.form.dtend_year.disabled = true; "
+" } "
+" else { "
+" this.form.dtstart_hour.disabled = false; "
+" this.form.dtstart_minute.disabled = false; "
+" this.form.dtend_hour.disabled = false; "
+" this.form.dtend_minute.disabled = false; "
+" this.form.dtend_month.disabled = false; "
+" this.form.dtend_day.disabled = false; "
+" this.form.dtend_year.disabled = false; "
+" } "
+" "
+" "
+" \" %s >All day event",
(t_start.is_date ? "CHECKED" : "" )
);
wprintf("</TD></TR>\n");
/* Attendees */
- wprintf("<TR><TD><B>Attendees</B><BR>"
+ wprintf("<TR><TD><B>Attendees</B><br />"
"<FONT SIZE=-2>(One per line)"
"</FONT></TD><TD>"
"<TEXTAREA %s NAME=\"attendees\" wrap=soft "
wprintf("</FORM>\n");
- wprintf("<SCRIPT language=\"javascript\">
- <!--
- if (document.EventForm.alldayevent.checked) {
- document.EventForm.dtstart_hour.value='0';
- document.EventForm.dtstart_hour.disabled = true;
- document.EventForm.dtstart_minute.value='0';
- document.EventForm.dtstart_minute.disabled = true;
- document.EventForm.dtend_hour.value='0';
- document.EventForm.dtend_hour.disabled = true;
- document.EventForm.dtend_minute.value='0';
- document.EventForm.dtend_minute.disabled = true;
- document.EventForm.dtend_month.disabled = true;
- document.EventForm.dtend_day.disabled = true;
- document.EventForm.dtend_year.disabled = true;
- }
- else {
- document.EventForm.dtstart_hour.disabled = false;
- document.EventForm.dtstart_minute.disabled = false;
- document.EventForm.dtend_hour.disabled = false;
- document.EventForm.dtend_minute.disabled = false;
- document.EventForm.dtend_month.disabled = false;
- document.EventForm.dtend_day.disabled = false;
- document.EventForm.dtend_year.disabled = false;
- }
- //-->
- </SCRIPT>
- ");
+ wprintf("<script type=\"text/javascript\">"
+ "<!--"
+ "if (document.EventForm.alldayevent.checked) {"
+ "document.EventForm.dtstart_hour.value='0';"
+ "document.EventForm.dtstart_hour.disabled = true;"
+ "document.EventForm.dtstart_minute.value='0';"
+ "document.EventForm.dtstart_minute.disabled = true;"
+ "document.EventForm.dtend_hour.value='0';"
+ "document.EventForm.dtend_hour.disabled = true;"
+ "document.EventForm.dtend_minute.value='0';"
+ "document.EventForm.dtend_minute.disabled = true;"
+ "document.EventForm.dtend_month.disabled = true;"
+ "document.EventForm.dtend_day.disabled = true;"
+ "document.EventForm.dtend_year.disabled = true;"
+ "}"
+ "else {"
+ "document.EventForm.dtstart_hour.disabled = false;"
+ "document.EventForm.dtstart_minute.disabled = false;"
+ "document.EventForm.dtend_hour.disabled = false;"
+ "document.EventForm.dtend_minute.disabled = false;"
+ "document.EventForm.dtend_month.disabled = false;"
+ "document.EventForm.dtend_day.disabled = false;"
+ "document.EventForm.dtend_year.disabled = false;"
+ "}"
+ "//-->"
+ "</script>\n"
+ );
do_template("endbox");
wDumpContent(1);
lprintf(9, "Give this event a UID if it doesn't have one.\n");
if (icalcomponent_get_first_property(vevent,
ICAL_UID_PROPERTY) == NULL) {
- generate_new_uid(buf);
+ generate_uuid(buf);
icalcomponent_add_property(vevent,
icalproperty_new_uid(buf)
);
/* Or, check attendee availability if the user asked for that. */
if ( (encaps != NULL) && (!strcasecmp(bstr("sc"), "Check attendee availability")) ) {
- /* FIXME ... do the checking and annotating here, idiot */
+ /* Call this function, which does the real work */
+ check_attendee_availability(encaps);
/* This displays the form again, with our annotations */
display_edit_individual_event(encaps, msgnum);