From: Art Cancro Date: Fri, 22 Jul 2005 15:07:29 +0000 (+0000) Subject: * 'whobbs' is now 'who' X-Git-Tag: v7.86~4777 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=85661eeff8f6ca95984722b764bc208c2f9961e6 * 'whobbs' is now 'who' * Refactored the wholist code to have its inner div output by a separate function, in anticipation of possible ajax functionality being added --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 2830db543..0d6c9da0c 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,9 @@ $Log$ +Revision 619.31 2005/07/22 15:07:29 ajc +* 'whobbs' is now 'who' +* Refactored the wholist code to have its inner div output by a separate + function, in anticipation of possible ajax functionality being added + Revision 619.30 2005/07/22 04:03:30 ajc * HTML messages in foreign character sets are now converted to UTF-8 for display. @@ -2732,3 +2737,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/iconbar.c b/webcit/iconbar.c index 3faf9809d..65efed0bc 100644 --- a/webcit/iconbar.c +++ b/webcit/iconbar.c @@ -217,7 +217,7 @@ void do_iconbar(void) { if (ib_users) { wprintf("
  • " - "" ); if (ib_displayas != IB_TEXTONLY) { diff --git a/webcit/static/menubar.html b/webcit/static/menubar.html index 3ed56e55b..cd2c8ab76 100644 --- a/webcit/static/menubar.html +++ b/webcit/static/menubar.html @@ -1,7 +1,7 @@ diff --git a/webcit/webcit.c b/webcit/webcit.c index 3dc05c5fd..1d6b7be49 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -1157,8 +1157,8 @@ void session_loop(struct httprequest *req) display_aide_menu(); } else if (!strcasecmp(action, "display_main_menu")) { display_main_menu(); - } else if (!strcasecmp(action, "whobbs")) { - whobbs(); + } else if (!strcasecmp(action, "who")) { + who(); } else if (!strcasecmp(action, "knrooms")) { knrooms(); } else if (!strcasecmp(action, "gotonext")) { diff --git a/webcit/webcit.h b/webcit/webcit.h index 5fc1b2b56..1e761dd17 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -293,7 +293,7 @@ int uds_connectsock(char *); int tcp_connectsock(char *, char *); void serv_getln(char *strbuf, int bufsize); void serv_puts(char *string); -void whobbs(void); +void who(void); void fmout(FILE *fp, char *align); void wDumpContent(int); void serv_printf(const char *format,...); diff --git a/webcit/who.c b/webcit/who.c index f506e2d6b..d6fd0512a 100644 --- a/webcit/who.c +++ b/webcit/who.c @@ -27,14 +27,10 @@ - - - /* - * who is on? + * Display inner div of Wholist */ -void whobbs(void) -{ +void who_inner_div(void) { char buf[SIZ], user[SIZ], room[SIZ], host[SIZ], realroom[SIZ], realhost[SIZ]; int sess; @@ -42,28 +38,7 @@ void whobbs(void) time_t now; int bg = 0; - output_headers(1, 1, 2, 0, 1, 0, 0); - - wprintf("\n" - ); - - wprintf("
    \n"); - wprintf("
    "); - wprintf("\""); - wprintf(" Users currently on "); - escputs(serv_info.serv_humannode); - wprintf(""); - offer_start_page(); - wprintf("
    \n"); - wprintf("
    \n" - "
    \n"); - - wprintf("
    " - "" + wprintf("
    " "\n"); wprintf("\n"); wprintf("\n"); @@ -166,8 +141,42 @@ void whobbs(void) wprintf("\n"); } } - wprintf("
     User Name
    \n" - "
    " + wprintf(""); +} + + + +/* + * who is on? + */ +void who(void) +{ + output_headers(1, 1, 2, 0, 1, 0, 0); + + wprintf("\n" + ); + + wprintf("
    \n"); + wprintf("
    "); + wprintf("\""); + wprintf(" Users currently on "); + escputs(serv_info.serv_humannode); + wprintf(""); + offer_start_page(); + wprintf("
    \n"); + wprintf("
    \n"); + + wprintf("
    \n"); + + wprintf("
    "); + who_inner_div(); /* Actual data handled by another function */ + wprintf("
    \n"); + + wprintf("
    " "Click on a name to read user info. Click on " "\"(p)\" to send an instant message to that user.
    \n"); @@ -181,7 +190,7 @@ void terminate_session(void) serv_printf("TERM %s", bstr("which_session")); serv_getln(buf, sizeof buf); - whobbs(); + who(); } @@ -195,17 +204,17 @@ void edit_me(void) if (!strcasecmp(bstr("sc"), "Change room name")) { serv_printf("RCHG %s", bstr("fake_roomname")); serv_getln(buf, sizeof buf); - http_redirect("/whobbs"); + http_redirect("/who"); } else if (!strcasecmp(bstr("sc"), "Change host name")) { serv_printf("HCHG %s", bstr("fake_hostname")); serv_getln(buf, sizeof buf); - http_redirect("/whobbs"); + http_redirect("/who"); } else if (!strcasecmp(bstr("sc"), "Change user name")) { serv_printf("UCHG %s", bstr("fake_username")); serv_getln(buf, sizeof buf); - http_redirect("/whobbs"); + http_redirect("/who"); } else if (!strcasecmp(bstr("sc"), "Cancel")) { - http_redirect("/whobbs"); + http_redirect("/who"); } else { output_headers(1, 1, 0, 0, 0, 0, 0);