$Log$
+Revision 323.11 2002/03/10 06:07:09 ajc
+* Handle multiple Internet e-mail addresses in vCard editor
+
Revision 323.10 2002/03/07 04:56:09 ajc
* Final polish for initial round of vCard editing functions. Only show "edit"
link when editing user's own vCard in the My Citadel Config> room.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
char country[SIZ];
char hometel[SIZ];
char worktel[SIZ];
+ char inetemail[SIZ];
char extrafields[SIZ];
lastname[0] = 0;
country[0] = 0;
hometel[0] = 0;
worktel[0] = 0;
+ inetemail[0] = 0;
extrafields[0] = 0;
output_headers(1);
extract_token(worktel, value, 0, ';');
}
+ else if (!strcasecmp(key, "email;internet")) {
+ if (inetemail[0] != 0) {
+ strcat(inetemail, "\n");
+ }
+ strcat(inetemail, value);
+ }
+
else {
strcat(extrafields, key);
strcat(extrafields, ":");
"VALUE=\"%s\" MAXLENGTH=\"29\"></TD></TR></TABLE>\n",
worktel);
+ wprintf("<TABLE border=0><TR><TD>Internet e-mail addresses:<BR>"
+ "<FONT size=-2>For addresses in the Citadel directory, "
+ "the topmost address will be used in outgoing mail."
+ "</FONT></TD><TD>"
+ "<TEXTAREA NAME=\"inetemail\" ROWS=5 COLS=40 WIDTH=40>");
+ escputs(inetemail);
+ wprintf("</TEXTAREA></TD></TR></TABLE><BR>\n");
+
wprintf("<INPUT TYPE=\"hidden\" NAME=\"extrafields\" VALUE=\"");
escputs(extrafields);
wprintf("\">\n");
void submit_vcard(void) {
char buf[SIZ];
+ int i;
if (strcmp(bstr("sc"), "OK")) {
readloop("readnew");
bstr("country") );
serv_printf("tel;home:%s", bstr("hometel") );
serv_printf("tel;work:%s", bstr("worktel") );
+
+ for (i=0; i<num_tokens(bstr("inetemail"), '\n'); ++i) {
+ extract_token(buf, bstr("inetemail"), i, '\n');
+ if (strlen(buf) > 0) {
+ serv_printf("email;internet:%s", buf);
+ }
+ }
+
serv_printf("%s", bstr("extrafields") );
serv_puts("end:vcard");
serv_puts("000");