X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fsummary.c;h=ed5bb61e81b7aacb3fe4f6a055c08a8cb59bb01f;hb=aa8ca3b0af3efdabd8559b886efb3164319bdce1;hp=f6e884aefe08a88805dcc502d3c071065e12bf9c;hpb=7836de1a004d9353cadb71885e360715884d1601;p=citadel.git diff --git a/webcit/summary.c b/webcit/summary.c index f6e884aef..ed5bb61e8 100644 --- a/webcit/summary.c +++ b/webcit/summary.c @@ -4,26 +4,6 @@ * Displays the "Summary Page" */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "webcit.h" /* @@ -85,12 +65,12 @@ void new_messages_section(void) { wprintf("\n"); for (i=0; i
"); @@ -117,9 +97,9 @@ void wholist_section(void) { svprintf("BOXTITLE", WCS_STRING, "Who's online now"); do_template("beginbox"); serv_puts("RWHO"); - serv_gets(buf); - if (buf[0] == '1') while(serv_gets(buf), strcmp(buf, "000")) { - extract(user, buf, 1); + serv_getln(buf, sizeof buf); + if (buf[0] == '1') while(serv_getln(buf, sizeof buf), strcmp(buf, "000")) { + extract_token(user, buf, 1, '|', sizeof user); escputs(user); wprintf("
\n"); } @@ -139,12 +119,12 @@ void tasks_section(void) { svprintf("BOXTITLE", WCS_STRING, "Tasks"); do_template("beginbox"); #ifdef WEBCIT_WITH_CALENDAR_SERVICE - gotoroom("Tasks"); - if (strcasecmp(WC->wc_roomname, "Tasks")) { + gotoroom("_TASKS_"); + if (WC->wc_view != VIEW_TASKS) { num_msgs = 0; } else { - num_msgs = load_msg_ptrs("MSGS ALL"); + num_msgs = load_msg_ptrs("MSGS ALL", 0); } if (num_msgs < 1) { @@ -177,12 +157,12 @@ void calendar_section(void) { svprintf("BOXTITLE", WCS_STRING, "Today on your calendar"); do_template("beginbox"); #ifdef WEBCIT_WITH_CALENDAR_SERVICE - gotoroom("Calendar"); - if (strcasecmp(WC->wc_roomname, "Calendar")) { + gotoroom("_CALENDAR_"); + if (WC->wc_view != VIEW_CALENDAR) { num_msgs = 0; } else { - num_msgs = load_msg_ptrs("MSGS ALL"); + num_msgs = load_msg_ptrs("MSGS ALL", 0); } if (num_msgs < 1) { @@ -212,6 +192,8 @@ void server_info_section(void) { escputs(serv_info.serv_humannode); wprintf(", running "); escputs(serv_info.serv_software); + wprintf(" with "); + escputs(SERVER); wprintf(", and located in "); escputs(serv_info.serv_bbs_city); wprintf(".
\nYour system administrator is "); @@ -229,7 +211,7 @@ void summary(void) { output_headers(1, 1, 2, 0, 1, 0, 0); wprintf("
\n"); wprintf("" - "
" + "" "" "Summary page for "); escputs(WC->wc_username); @@ -249,7 +231,8 @@ void summary(void) { * not people I consider worthwhile, I still want them to use WebCit. */ - wprintf(""); + wprintf("
" + "
"); /* * Column One @@ -276,7 +259,6 @@ void summary(void) { /* * End of columns */ - wprintf("
\n"); - + wprintf("
\n"); wDumpContent(1); }