+/* $Id$ */
+
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "webcit.h"
+#include "child.h"
struct whouser {
struct whouser *next;
/*
* who is on?
*/
-void whobbs() {
+void whobbs(void) {
struct whouser *wlist = NULL;
struct whouser *wptr = NULL;
char buf[256],sess,user[256],room[256],host[256];
printf("HTTP/1.0 200 OK\n");
output_headers();
- wprintf("<HTML><HEAD><TITLE>Who is online?</TITLE></HEAD><BODY>\n");
+ wprintf("<HTML><HEAD><TITLE>Who is online?</TITLE>\n");
+
+ /* Uncomment this line to cause the wholist to auto-refresh */
+ /* wprintf("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"60\">\n"); */
+
+ wprintf("</HEAD><BODY>\n");
wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=007700><TR><TD>");
wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"<B>Users currently on ");
for (wptr = wlist; wptr != NULL; wptr = wptr -> next) {
if (wptr->sessionnum == sess) {
foundit = 1;
- if (strcasecmp(user, &wptr->username)) {
+ if (strcasecmp(user, wptr->username)) {
sprintf(buf, "%cBR%c%s",
LB, RB, user);
strcat(wptr->username, buf);
}
- if (strcasecmp(room, &wptr->roomname)) {
+ if (strcasecmp(room, wptr->roomname)) {
sprintf(buf, "%cBR%c%s",
LB, RB, room);
strcat(wptr->roomname, buf);
}
- if (strcasecmp(host, &wptr->hostname)) {
+ if (strcasecmp(host, wptr->hostname)) {
sprintf(buf, "%cBR%c%s",
LB, RB, host);
strcat(wptr->hostname, buf);
}
}
wprintf("</TABLE></CENTER>\n");
- printf("</BODY></HTML>\n");
+ wprintf("</BODY></HTML>\n");
wDumpContent();
}