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)
34 strcpy(recp, bstr("recp"));
38 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
39 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
40 wprintf("<B>Page another user</B>\n");
41 wprintf("</FONT></TD></TR></TABLE>\n");
43 wprintf("This command sends a near-real-time message to any currently\n");
44 wprintf("logged in user.<BR><BR>\n");
46 wprintf("<FORM METHOD=\"POST\" ACTION=\"/page_user\">\n");
49 wprintf("<TABLE border=0 width=100%%><TR><TD>\n");
51 wprintf("<INPUT TYPE=\"hidden\" NAME=\"recp\" VALUE=\"");
55 wprintf("Enter message text:<BR>");
57 wprintf("<TEXTAREA NAME=\"msgtext\" wrap=soft ROWS=5 COLS=40 "
58 "WIDTH=40></TEXTAREA><P>\n");
60 wprintf("</TD></TR></TABLE><BR>\n");
62 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Send message\">");
63 wprintf("<BR><A HREF=\"javascript:window.close();\"Cancel</A>\n");
65 wprintf("</FORM></CENTER>\n");
80 strcpy(recp, bstr("recp"));
81 strcpy(sc, bstr("sc"));
83 if (strcmp(sc, "Send message")) {
84 wprintf("<EM>Message was not sent.</EM><BR>\n");
86 serv_printf("SEXP %s|-", recp);
90 text_to_server(bstr("msgtext"));
92 wprintf("<EM>Message has been sent to ");
94 wprintf(".</EM><BR>\n");
97 wprintf("<EM>%s</EM><BR>\n", &buf[4]);
113 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=000077><TR><TD>");
114 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
115 wprintf("<B>Real-time chat</B>\n");
116 wprintf("</FONT></TD></TR></TABLE>\n");
118 wprintf("A chat window should be appearing on your screen ");
119 wprintf("momentarily. When you're ");
120 wprintf("done, type <TT>/quit</TT> to exit. You can also ");
121 wprintf("type <TT>/help</TT> for more commands.\n");
123 wprintf("<applet codebase=\"/static\" ");
124 wprintf("code=\"wcchat\" width=2 height=2>\n");
125 wprintf("<PARAM NAME=username VALUE=\"%s\">\n", WC->wc_username);
126 wprintf("<PARAM NAME=password VALUE=\"%s\">\n", WC->wc_password);
127 wprintf("<PARAM NAME=roomname VALUE=\"%s\">\n", WC->wc_roomname);
128 wprintf("<H2>Oops!</H2>Looks like your browser doesn't support Java, ");
129 wprintf("so you won't be able to access Chat. Sorry.\n");
130 wprintf("</applet>\n");
138 void page_popup(void)
143 /* suppress express message check, do headers but no fake frames */
144 output_headers(0x08 | 0x03);
146 while (serv_puts("GEXP"), serv_gets(buf), buf[0]=='1') {
148 extract(pagefrom, &buf[4], 3);
150 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
151 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\""
152 "<B>Express message from ");
154 wprintf("</B></FONT></TD></TR></TABLE>\n");
160 "<A HREF=\"javascript:window.close();\">"
161 "[ close window ]</A></B>\n"
165 WC->HaveExpressMessages = 0;