resembling a window.
* Allow editing of address book entries wherever possible.
* Anything that was a (link) is now a [link]
$Log$
+Revision 603.9 2005/03/07 04:03:28 ajc
+* auth.c: shrink the margins on the login screen so the user sees something
+ resembling a window.
+* Allow editing of address book entries wherever possible.
+* Anything that was a (link) is now a [link]
+
Revision 603.8 2005/03/07 01:45:30 ajc
* Rolled back to the old RTE because the new one doesn't work in Safari.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
-
-
output_headers(1, 1, 2, 0, 0, 0, 0);
//wprintf("<div id=\"content\">\n");
- wprintf("<div>\n");
+ wprintf("<div style=\"position:absolute; top:20px; left:20px; right:20px\">\n");
if (mesg != NULL) if (strlen(mesg) > 0) {
stresc(buf, mesg, 0, 0);
if (storename != NULL) {
fetchname_parsed_vcard(v, storename);
}
- else if ( (alpha == 0)
- || ((isalpha(alpha)) && (tolower(alpha) == tolower(this_alpha)) )
- || ((!isalpha(alpha)) && (!isalpha(this_alpha))) ) {
+ else if ( (alpha == 0)
+ || ((isalpha(alpha)) && (tolower(alpha) == tolower(this_alpha)) )
+ || ((!isalpha(alpha)) && (!isalpha(this_alpha)))
+ ) {
display_parsed_vcard(v, full);
}
if (part_source != NULL) {
/* If it's my vCard I can edit it */
- if ( (!strcasecmp(WC->wc_roomname, USERCONFIGROOM))
- || (!strcasecmp(&WC->wc_roomname[11], USERCONFIGROOM))) {
+ if ( (!strcasecmp(WC->wc_roomname, USERCONFIGROOM))
+ || (!strcasecmp(&WC->wc_roomname[11], USERCONFIGROOM))
+ || (WC->wc_view == VIEW_ADDRESSBOOK)
+ ) {
wprintf("<A HREF=\"/edit_vcard?"
"msgnum=%ld&partnum=%s\">",
msgnum, vcard_partnum);
- wprintf("(edit)</A>");
+ wprintf("[edit]</A>");
}
/* In all cases, display the full card */
display_vcard(vcard_source, alpha, 0, NULL);
/* If it's my vCard I can edit it */
- if ( (!strcasecmp(WC->wc_roomname, USERCONFIGROOM))
- || (!strcasecmp(&WC->wc_roomname[11], USERCONFIGROOM))) {
+ if ( (!strcasecmp(WC->wc_roomname, USERCONFIGROOM))
+ || (!strcasecmp(&WC->wc_roomname[11], USERCONFIGROOM))
+ || (WC->wc_view == VIEW_ADDRESSBOOK)
+ ) {
wprintf("<A HREF=\"/edit_vcard?"
"msgnum=%ld&partnum=%s\">",
msgnum, vcard_partnum);
- wprintf("(edit)</A>");
+ wprintf("[edit]</A>");
}
free(vcard_source);
*
* vCard data type implementation for Citadel/UX
*
- * Copyright (C) 1999-2004 by Art Cancro
+ * Copyright (C) 1999-2005 by Art Cancro
* This code is freely redistributable under the terms of the GNU General
* Public License. All other rights reserved.
*/
int i;
int colonpos, nlpos;
+ if (vtext == NULL) return vcard_new();
mycopy = strdup(vtext);
if (mycopy == NULL) return NULL;
strncpy(valuebuf, &ptr[colonpos+1], nlpos-colonpos-1);
valuebuf[nlpos-colonpos-1] = 0;
- if ( (!strcasecmp(namebuf, "end"))
- && (!strcasecmp(valuebuf, "vcard")) ) valid = 0;
- if ( (!strcasecmp(namebuf, "begin"))
- && (!strcasecmp(valuebuf, "vcard")) ) valid = 1;
+ if (!strcasecmp(namebuf, "end")) {
+ valid = 0;
+ }
+ if ( (!strcasecmp(namebuf, "begin"))
+ && (!strcasecmp(valuebuf, "vcard"))
+ ) {
+ valid = 1;
+ }
if ( (valid) && (strcasecmp(namebuf, "begin")) ) {
++v->numprops;
v->prop = realloc(v->prop,
- (v->numprops * sizeof(char *) * 2) );
+ (v->numprops * sizeof(struct vCardProp))
+ );
v->prop[v->numprops-1].name = namebuf;
v->prop[v->numprops-1].value = valuebuf;
}
/* Otherwise, append it */
++v->numprops;
v->prop = realloc(v->prop,
- (v->numprops * sizeof(char *) * 2) );
+ (v->numprops * sizeof(struct vCardProp)) );
v->prop[v->numprops-1].name = strdup(name);
v->prop[v->numprops-1].value = strdup(value);
}
}
total_len = atoi(&buf[4]);
- serialized_vcard = malloc(total_len + 1);
+ serialized_vcard = malloc(total_len + 2);
read_server_binary(serialized_vcard, total_len);
serv_puts("CLOS");
serv_gets(buf);
- serialized_vcard[total_len + 1] = 0;
+ serialized_vcard[total_len] = 0;
v = vcard_load(serialized_vcard);
free(serialized_vcard);
wprintf(" <A HREF=\"/terminate_session&which_session=%d&session_owner=", sess);
urlescputs(user);
wprintf("\" onClick=\"return ConfirmKill();\" "
- ">(kill)</A>");
+ ">[kill]</A>");
}
if (sess == WC->ctdl_pid) {
wprintf(" <A HREF=\"/edit_me\" "
- ">(edit)</A>");
+ ">[edit]</A>");
}
wprintf("</TD>");