/* $Id$ */
+
+
+
+#include <ctype.h>
#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <stdio.h>
+#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
-#include <ctype.h>
+#include <sys/wait.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <limits.h>
+#include <netinet/in.h>
+#include <netdb.h>
#include <string.h>
+#include <pwd.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <pthread.h>
+#include <signal.h>
#include "webcit.h"
-#include "child.h"
+
+
+
+
+
+
struct whouser {
struct whouser *next;
char buf[256], sess, user[256], room[256], host[256];
int foundit;
- printf("HTTP/1.0 200 OK\n");
+ wprintf("HTTP/1.0 200 OK\n");
output_headers(1);
wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=007700><TR><TD>");
while (wlist != NULL) {
wprintf("<TR>\n\t<TD ALIGN=center><FONT FACE=\"Arial,Helvetica,sans-serif\">%d", wlist->sessionnum);
- if ((is_aide) &&
+ if ((WC->is_aide) &&
(wlist->sessionnum != serv_info.serv_pid)) {
wprintf(" <A HREF=\"/terminate_session&which_session=%d&session_owner=", wlist->sessionnum);
urlescputs(wlist->username);
}
/* username */
wprintf("</FONT></TD>\n\t<TD><FONT FACE=\"Arial,Helvetica,sans-serif\"><A HREF=\"/showuser?who=");
- escputs(wlist->username);
+ urlescputs(wlist->username);
wprintf("\" onMouseOver=\"window.status='View profile for ");
escputs(wlist->username);
wprintf("'; return true\">");
wprintf("<A HREF=\"/chat\" onMouseOver=\"window.status='Chat'; return true\"><chat></A>");
} else {
wprintf("<A HREF=\"/dotgoto&room=");
- escputs(wlist->roomname);
+ urlescputs(wlist->roomname);
wprintf("\" onMouseOver=\"window.status='Go to room ");
escputs(wlist->roomname);
wprintf("'; return true\">");
}
}
wprintf("</TABLE>\n<BR><BR>\n");
- wprintf("<TABLE BORDER=0 BGCOLOR=\"#003399\">\n<TR><TD ALIGN=center VALIGN=center CELLPADING=10>\n");
+ wprintf("<TABLE BORDER=0 BGCOLOR=\"#003399\">\n<TR><TD ALIGN=center VALIGN=center CELLPADING=20>\n");
wprintf("<FONT FACE=\"Arial,Helvetica,sans-serif\" SIZE=+2><B><A HREF=\"/whobbs\"><FONT COLOR=\"#FF0000\">Refresh</FONT></A></B></FONT>\n");
wprintf("</TD></TR>\n</TABLE>\n</CENTER>");
wDumpContent(1);
display_error(&buf[4]);
}
} else {
- printf("HTTP/1.0 200 OK\n");
+ wprintf("HTTP/1.0 200 OK\n");
output_headers(1);
wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=770000><TR><TD>");
wprintf("<FONT FACE=\"Arial,Helvetica,sans-serif\" SIZE=+1 COLOR=\"FFFFFF\"<B>Confirm session termination");
{
char buf[256];
- printf("HTTP/1.0 200 OK\n");
- output_headers(1);
-
if (!strcasecmp(bstr("sc"), "Change room name")) {
serv_printf("RCHG %s", bstr("fake_roomname"));
serv_gets(buf);
whobbs();
} else {
+ wprintf("HTTP/1.0 200 OK\n");
+ output_headers(1);
+
wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=000077><TR><TD>");
wprintf("<FONT FACE=\"Arial,Helvetica,sans-serif\" SIZE=+1 COLOR=\"FFFFFF\"><B>");
wprintf("Edit your session display");
wprintf("<FONT FACE=\"Arial,Helvetica,sans-serif\"><INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Change host name\">");
wprintf("</FONT></TD>\n</TR>\n");
- if (is_aide) {
+ if (WC->is_aide) {
wprintf("<TR><TD><FONT FACE=\"Arial,Helvetica,sans-serif\"><B>User name:</B></FONT></TD><TD>");
wprintf("<FONT FACE=\"Arial,Helvetica,sans-serif\"><INPUT TYPE=\"text\" NAME=\"fake_username\" MAXLENGTH=\"64\">\n");
wprintf("</FONT></TD>\n<TD ALIGN=center>");