11 #include <sys/socket.h>
14 #include <netinet/in.h>
26 * display the form for paging (x-messaging) another user
28 void display_page(void)
35 wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=007700><TR><TD>");
36 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
37 wprintf("<B>Page another user</B>\n");
38 wprintf("</FONT></TD></TR></TABLE>\n");
40 wprintf("This command sends a near-real-time message to any currently\n");
41 wprintf("logged in user.<BR><BR>\n");
43 wprintf("<FORM METHOD=\"POST\" ACTION=\"/page_user\">\n");
45 wprintf("Select a user to send a message to: <BR>");
47 wprintf("<SELECT NAME=\"recp\" SIZE=10>\n");
51 while (serv_gets(buf), strcmp(buf, "000")) {
52 extract(user, buf, 1);
58 wprintf("</SELECT>\n");
61 wprintf("Enter message text:<BR>");
62 wprintf("<INPUT TYPE=\"text\" NAME=\"msgtext\" MAXLENGTH=80 SIZE=80>\n");
63 wprintf("<BR><BR>\n");
65 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Send message\">");
66 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\"><BR>\n");
68 wprintf("</FORM></CENTER>\n");
84 strcpy(recp, bstr("recp"));
85 strcpy(msgtext, bstr("msgtext"));
86 strcpy(sc, bstr("sc"));
88 if (strcmp(sc, "Send message")) {
89 wprintf("<EM>Message was not sent.</EM><BR>\n");
91 serv_printf("SEXP %s|%s", recp, msgtext);
95 wprintf("<EM>Message has been sent to ");
97 wprintf(".</EM><BR>\n");
99 wprintf("<EM>%s</EM><BR>\n", &buf[4]);
115 wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=000077><TR><TD>");
116 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
117 wprintf("<B>Real-time chat</B>\n");
118 wprintf("</FONT></TD></TR></TABLE>\n");
120 wprintf("A chat window should be appearing on your screen ");
121 wprintf("momentarily. When you're ");
122 wprintf("done, type <TT>/quit</TT> to exit. You can also ");
123 wprintf("type <TT>/help</TT> for more commands.\n");
125 wprintf("<applet codebase=\"/static\" ");
126 wprintf("code=\"wcchat\" width=2 height=2>\n");
127 wprintf("<PARAM NAME=username VALUE=\"%s\">\n", WC->wc_username);
128 wprintf("<PARAM NAME=password VALUE=\"%s\">\n", WC->wc_password);
129 wprintf("<PARAM NAME=roomname VALUE=\"%s\">\n", WC->wc_roomname);
130 wprintf("<H2>Oops!</H2>Looks like your browser doesn't support Java, ");
131 wprintf("so you won't be able to access Chat. Sorry.\n");
132 wprintf("</applet>\n");