*/
/*@{*/
#include "webcit.h"
-#include "vcard.h"
/**
* \brief Edit the vCard component of a MIME message.
/** Display the form */
output_headers(1, 1, 1, 0, 0, 0);
- svprintf("BOXTITLE", WCS_STRING, _("Edit contact information"));
- do_template("beginbox");
+ svput("BOXTITLE", WCS_STRING, _("Edit contact information"));
+ do_template("beginbox", NULL);
wprintf("<form method=\"POST\" action=\"submit_vcard\">\n");
- wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
+ wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
if (force_room != NULL) {
wprintf("<input type=\"hidden\" name=\"force_room\" value=\"");
);
wprintf("</td></tr></table>\n");
- do_template("endbox");
+ do_template("endbox", NULL);
wDumpContent(1);
}
long msgnum;
char *partnum;
- msgnum = atol(bstr("msgnum"));
+ msgnum = lbstr("msgnum");
partnum = bstr("partnum");
do_edit_vcard(msgnum, partnum, "", NULL);
}
char buf[SIZ];
int i;
- if (IsEmptyStr(bstr("ok_button"))) {
+ if (!havebstr("ok_button")) {
readloop("readnew");
return;
}
- if (!IsEmptyStr(bstr("force_room"))) {
+ if (havebstr("force_room")) {
gotoroom(bstr("force_room"));
}
+void
+InitModule_VCARD
+(void)
+{
+ WebcitAddUrlHandler(HKEY("edit_vcard"), edit_vcard, 0);
+ WebcitAddUrlHandler(HKEY("submit_vcard"), submit_vcard, 0);
+}
+
/*@}*/