$Log$
+Revision 323.44 2002/07/09 04:21:12 ajc
+* 'idle' icon
+
Revision 323.43 2002/07/06 03:10:26 ajc
* Enable a "make this my start page" link that works in lots of places.
Configures a user's preference of where to go after login.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
{
char buf[SIZ], sess, user[SIZ], room[SIZ], host[SIZ],
realroom[SIZ], realhost[SIZ];
+ time_t last_activity;
+ time_t now;
output_headers(7);
wprintf("<TH>User Name</TH>\n");
wprintf("<TH>Room</TH>");
wprintf("<TH>From host</TH>\n</TR>\n");
+
+ serv_puts("TIME");
+ serv_gets(buf);
+ if (buf[0] == '2') {
+ now = extract_long(&buf[4], 0);
+ }
+ else {
+ now = time(NULL);
+ }
+
serv_puts("RWHO");
serv_gets(buf);
if (buf[0] == '1') {
extract(host, buf, 3);
extract(realroom, buf, 9);
extract(realhost, buf, 10);
+ last_activity = extract_long(buf, 5);
wprintf("<TR>\n\t<TD ALIGN=center>%d", sess);
if ((WC->is_aide) &&
wprintf("<A HREF=\"/display_page&recp=");
urlescputs(user);
wprintf("\">"
- "<IMG ALIGN=MIDDLE SRC=\"/static/page.gif\" "
+ "<IMG ALIGN=MIDDLE WIDTH=20 HEIGHT=15 "
+ "SRC=\"/static/page.gif\" "
"ALT=\"(p)\""
" BORDER=0></A> ");
escputs(user);
wprintf("</A>");
+ if ((now - last_activity) > 900L) {
+ wprintf(" "
+ "<IMG ALIGN=MIDDLE "
+ "SRC=\"/static/idle.gif\" "
+ "ALT=\"[idle]\" BORDER=0>");
+ }
+
/* room */
wprintf("</TD>\n\t<TD>");
escputs(room);