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)
32 strcpy(recp, bstr("recp"));
36 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
37 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
38 wprintf("<B>Page another user</B>\n");
39 wprintf("</FONT></TD></TR></TABLE>\n");
41 wprintf("<CENTER>This will send a page (instant message) "
42 "to %s.<BR><BR>\n", recp);
44 wprintf("<FORM METHOD=\"POST\" ACTION=\"/page_user\">\n");
47 wprintf("<TABLE border=0 width=100%%><TR><TD>\n");
49 wprintf("<INPUT TYPE=\"hidden\" NAME=\"recp\" VALUE=\"");
53 wprintf("Enter message text:<BR>");
55 wprintf("<TEXTAREA NAME=\"msgtext\" wrap=soft ROWS=5 COLS=40 "
56 "WIDTH=40></TEXTAREA><P>\n");
58 wprintf("</TD></TR></TABLE><BR>\n");
60 wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Send message\">");
61 wprintf("<BR><A HREF=\"javascript:window.close();\"Cancel</A>\n");
63 wprintf("</FORM></CENTER>\n");
78 strcpy(recp, bstr("recp"));
79 strcpy(sc, bstr("sc"));
81 if (strcmp(sc, "Send message")) {
82 wprintf("<EM>Message was not sent.</EM><BR>\n");
84 serv_printf("SEXP %s|-", recp);
88 text_to_server(bstr("msgtext"));
90 wprintf("<EM>Message has been sent to ");
92 wprintf(".</EM><BR>\n");
95 wprintf("<EM>%s</EM><BR>\n", &buf[4]);
111 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=000077><TR><TD>");
112 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
113 wprintf("<B>Real-time chat</B>\n");
114 wprintf("</FONT></TD></TR></TABLE>\n");
116 wprintf("A chat window should be appearing on your screen ");
117 wprintf("momentarily. When you're ");
118 wprintf("done, type <TT>/quit</TT> to exit. You can also ");
119 wprintf("type <TT>/help</TT> for more commands.\n");
121 wprintf("<applet codebase=\"/static\" ");
122 wprintf("code=\"wcchat\" width=2 height=2>\n");
123 wprintf("<PARAM NAME=username VALUE=\"%s\">\n", WC->wc_username);
124 wprintf("<PARAM NAME=password VALUE=\"%s\">\n", WC->wc_password);
125 wprintf("<PARAM NAME=roomname VALUE=\"%s\">\n", WC->wc_roomname);
126 wprintf("<H2>Oops!</H2>Looks like your browser doesn't support Java, ");
127 wprintf("so you won't be able to access Chat. Sorry.\n");
128 wprintf("</applet>\n");
136 void page_popup(void)
141 /* suppress express message check, do headers but no fake frames */
142 output_headers(0x08 | 0x03);
144 while (serv_puts("GEXP"), serv_gets(buf), buf[0]=='1') {
146 extract(pagefrom, &buf[4], 3);
148 wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=007700><TR><TD>");
149 wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\""
150 "<B>Express message from ");
152 wprintf("</B></FONT></TD></TR></TABLE>\n");
158 "<A HREF=\"javascript:window.close();\">"
159 "[ close window ]</A></B>\n"
163 WC->HaveExpressMessages = 0;