int ib_inbox = 0; /* Inbox icon */
int ib_calendar = 0; /* Calendar icon */
int ib_contacts = 0; /* Contacts icon */
+ int ib_notes = 0; /* Notes icon */
int ib_tasks = 0; /* Tasks icon */
int ib_rooms = 1; /* Rooms icon */
int ib_users = 1; /* Users icon */
if (!strcasecmp(key, "ib_inbox")) ib_inbox = atoi(value);
if (!strcasecmp(key, "ib_calendar")) ib_calendar = atoi(value);
if (!strcasecmp(key, "ib_contacts")) ib_contacts = atoi(value);
+ if (!strcasecmp(key, "ib_notes")) ib_notes = atoi(value);
if (!strcasecmp(key, "ib_tasks")) ib_tasks = atoi(value);
if (!strcasecmp(key, "ib_rooms")) ib_rooms = atoi(value);
if (!strcasecmp(key, "ib_users")) ib_users = atoi(value);
wprintf("</A></P></SPAN>\n");
}
+ if (ib_notes) {
+ wprintf("<SPAN CLASS=\"iconbar_link\"><P>"
+ "<A HREF=\"/dotgoto?room=Notes\" "
+ "TITLE=\"Go to your personal notes\" "
+ "TARGET=\"workspace\">"
+ );
+ if (ib_displayas != IB_TEXTONLY) {
+ wprintf("<IMG BORDER=\"0\" WIDTH=\"32\" HEIGHT=\"32\" "
+ "SRC=\"/static/note.gif\"><BR>");
+ }
+ if (ib_displayas != IB_PICONLY) {
+ wprintf("Notes<BR>");
+ }
+ wprintf("</A></P></SPAN>\n");
+ }
+
if (ib_tasks) {
wprintf("<SPAN CLASS=\"iconbar_link\"><P>"
"<A HREF=\"/dotgoto?room=Tasks\" "
int ib_inbox = 0; /* Inbox icon */
int ib_calendar = 0; /* Calendar icon */
int ib_contacts = 0; /* Contacts icon */
+ int ib_notes = 0; /* Notes icon */
int ib_tasks = 0; /* Tasks icon */
int ib_rooms = 1; /* Rooms icon */
int ib_users = 1; /* Users icon */
if (!strcasecmp(key, "ib_inbox")) ib_inbox = atoi(value);
if (!strcasecmp(key, "ib_calendar")) ib_calendar = atoi(value);
if (!strcasecmp(key, "ib_contacts")) ib_contacts = atoi(value);
+ if (!strcasecmp(key, "ib_notes")) ib_notes = atoi(value);
if (!strcasecmp(key, "ib_tasks")) ib_tasks = atoi(value);
if (!strcasecmp(key, "ib_rooms")) ib_rooms = atoi(value);
if (!strcasecmp(key, "ib_users")) ib_users = atoi(value);
(ib_contacts ? "CHECKED" : "")
);
-#ifdef WEBCIT_WITH_CALENDAR_SERVICE
wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+ "<INPUT TYPE=\"checkbox\" NAME=\"ib_notes\" "
+ "VALUE=\"yes\" %s>"
+ "</TD><TD>"
+ "<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
+ "SRC=\"/static/note.gif\" ALT=\" \">"
+ "</TD><TD>"
+ "<B>Notes</B><BR>"
+ "Your personal notes."
+ "</TD></TR>\n",
+ (ib_notes ? "CHECKED" : "")
+ );
+
+#ifdef WEBCIT_WITH_CALENDAR_SERVICE
+ wprintf("<TR><TD>"
"<INPUT TYPE=\"checkbox\" NAME=\"ib_calendar\" "
"VALUE=\"yes\" %s>"
"</TD><TD>"
(ib_calendar ? "CHECKED" : "")
);
- wprintf("<TR><TD>"
+ wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
"<INPUT TYPE=\"checkbox\" NAME=\"ib_tasks\" VALUE=\"yes\" %s>"
"</TD><TD>"
"<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
);
#endif /* WEBCIT_WITH_CALENDAR_SERVICE */
- wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+ wprintf("<TR><TD>"
"<INPUT TYPE=\"checkbox\" NAME=\"ib_rooms\" VALUE=\"yes\" %s>"
"</TD><TD>"
"<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
(ib_rooms ? "CHECKED" : "")
);
- wprintf("<TR><TD>"
+ wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
"<INPUT TYPE=\"checkbox\" NAME=\"ib_users\" VALUE=\"yes\" %s>"
"</TD><TD>"
"<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
(ib_users ? "CHECKED" : "")
);
- wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+ wprintf("<TR><TD>"
"<INPUT TYPE=\"checkbox\" NAME=\"ib_chat\" VALUE=\"yes\" %s>"
"</TD><TD>"
"<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
(ib_chat ? "CHECKED" : "")
);
- wprintf("<TR><TD>"
+ wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
"<INPUT TYPE=\"checkbox\" NAME=\"ib_advanced\" "
"VALUE=\"yes\" %s>"
"</TD><TD>"
(ib_advanced ? "CHECKED" : "")
);
- wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+ wprintf("<TR><TD>"
"<INPUT TYPE=\"checkbox\" NAME=\"ib_logoff\" "
"VALUE=\"yes\" %s>"
"</TD><TD>"
"</TD></TR>\n",
(ib_logoff ? "CHECKED" : "")
);
- wprintf("<TR><TD>"
+ wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
"<INPUT TYPE=\"checkbox\" NAME=\"ib_citadel\" "
"VALUE=\"yes\" %s>"
"</TD><TD>"
"ib_inbox",
"ib_calendar",
"ib_contacts",
+ "ib_notes",
"ib_tasks",
"ib_rooms",
"ib_users",
#include "webserver.h"
void display_note(long msgnum) {
- wprintf("<TABLE border=2><TR><TD>\n");
- wprintf("FIXME note #%ld\n", msgnum);
- wprintf("</TD></TR></TABLE\n");
+ char buf[SIZ];
+ char notetext[SIZ];
+ char display_notetext[SIZ];
+ int in_text = 0;
+ int i;
+
+ wprintf("<IMG ALIGN=MIDDLE SRC=\"/static/note.gif\">\n");
+
+ serv_printf("MSG0 %ld", msgnum);
+ serv_gets(buf);
+ if (buf[0] != '1') {
+ wprintf("%s<BR>\n", &buf[4]);
+ return;
+ }
+
+ strcpy(notetext, "");
+ while (serv_gets(buf), strcmp(buf, "000")) {
+
+ /* Fill the buffer to at least 256 characters */
+ if ( (in_text) && (strlen(notetext) < 256) ) {
+ strcat(notetext, buf);
+ }
+
+ if ( (!in_text) && (!strcasecmp(buf, "text")) ) {
+ in_text = 1;
+ }
+ }
+
+ /* Now sanitize the buffer, and shorten it to just a small snippet */
+ for (i=0; i<strlen(notetext); ++i) {
+ if (isspace(notetext[i])) notetext[i] = ' ';
+ }
+ strcpy(¬etext[72], "...");
+
+ /* Make it HTML-happy and print it. */
+ stresc(display_notetext, notetext, 1, 1);
+ wprintf("%s<BR>\n", display_notetext);
}