if (do_htmlhead) {
begin_burst();
if (!access("static.local/webcit.css", R_OK)) {
- svprintf("CSSLOCAL", WCS_STRING,
+ svprintf(HKEY("CSSLOCAL"), WCS_STRING,
"<link href=\"static.local/webcit.css\" rel=\"stylesheet\" type=\"text/css\">"
);
}
va_list arg_list;
long i;
- svprintf("BOXTITLE", WCS_STRING, Title);
+ svput("BOXTITLE", WCS_STRING, Title);
do_template("beginbox");
wprintf("<ul class=\"%s\">", Class);
output_static(blank_gif);
}
+/**
+ * \brief Extract an embedded photo from a vCard for display on the client
+ *
+ * \param msgnum
+ */
+void display_vcard_photo_img(char *msgnum_as_string)
+{
+ long msgnum = 0L;
+ char *vcard;
+ struct vCard *v;
+ char *xferbuf;
+ char *photosrc;
+ int decoded;
+ const char *contentType;
+
+ msgnum = atol(msgnum_as_string);
+
+ vcard = load_mimepart(msgnum,"1");
+ v = vcard_load(vcard);
+
+ photosrc = vcard_get_prop(v, "PHOTO", 1,0,0);
+ xferbuf = malloc(strlen(photosrc));
+ if (xferbuf == NULL) {
+ lprintf(5, "xferbuf malloc failed\n");
+ return;
+ }
+ memset(xferbuf, 1, SIZ);
+ decoded = CtdlDecodeBase64(
+ xferbuf,
+ photosrc,
+ strlen(photosrc));
+ contentType = GuessMimeType(xferbuf, decoded);
+ http_transmit_thing(xferbuf, decoded, contentType, 0);
+ free(v);
+ free(photosrc);
+ free(xferbuf);
+}
+
/**
* \brief Generic function to output an arbitrary MIME part from an arbitrary
* message number on the server.
WC->upload_length = 0;
WC->upload = NULL;
- WC->vars = NULL;
WC->is_wap = 0;
hptr = req;
print_message(index[1]);
} else if (!strcasecmp(action, "msgheaders")) {
display_headers(index[1]);
+ } else if (!strcasecmp(action, "vcardphoto")) {
+ display_vcard_photo_img(index[1]);
} else if (!strcasecmp(action, "wiki")) {
display_wiki_page();
} else if (!strcasecmp(action, "display_enter")) {
dump_vars();
wprintf("</PRE><hr />\n");
wDumpContent(1);
- } else if (!strcasecmp(action, "updatenote")) {
- updatenote();
+ } else if (!strcasecmp(action, "add_new_note")) {
+ add_new_note();
} else if (!strcasecmp(action, "ajax_update_note")) {
ajax_update_note();
} else if (!strcasecmp(action, "display_room_directory")) {