From adeadeebd92a59e7a639a0fbba826515350524a9 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 20 Jan 2005 04:10:45 +0000 Subject: [PATCH] * Cleaned up a bunch of unused cruft from the old layout * Instant messages are now displayed in a div that layers itself over the rest of the site. It would be nice if we could figure out a way to make a clickable "hide" box... --- webcit/ChangeLog | 7 ++++ webcit/auth.c | 5 +-- webcit/paging.c | 21 +++-------- webcit/static/background.html | 7 ---- webcit/static/head.html | 1 + webcit/webcit.c | 65 +++++++++-------------------------- 6 files changed, 30 insertions(+), 76 deletions(-) delete mode 100644 webcit/static/background.html diff --git a/webcit/ChangeLog b/webcit/ChangeLog index ca15a62fd..137cc07f1 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,10 @@ $Log$ +Revision 528.13 2005/01/20 04:10:41 ajc +* Cleaned up a bunch of unused cruft from the old layout +* Instant messages are now displayed in a div that layers itself + over the rest of the site. It would be nice if we could figure out + a way to make a clickable "hide" box... + Revision 528.12 2005/01/17 04:38:14 ajc * Navbar is now dynamic, in an attempt to make only the relevant controls appear on any given page. @@ -2193,3 +2199,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/auth.c b/webcit/auth.c index 94f3014f7..3987ba394 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -158,10 +158,7 @@ void do_welcome(void) set_preference("startpage", startpage); } - svprintf("STARTPAGE", WCS_STRING, startpage); - - /* FIXME ... go to my start page, not to the summary */ - summary(); + http_redirect(startpage); } diff --git a/webcit/paging.c b/webcit/paging.c index fe4a9141b..71a48ab8c 100644 --- a/webcit/paging.c +++ b/webcit/paging.c @@ -151,31 +151,18 @@ void page_popup(void) char buf[SIZ]; char pagefrom[SIZ]; - /* suppress express message check, do headers but no banner */ - output_headers(1, 1, 0, 0, 0, 1, 0); - while (serv_puts("GEXP"), serv_gets(buf), buf[0]=='1') { extract(pagefrom, &buf[4], 3); - wprintf("
"); - wprintf("Instant message from "); + wprintf("
"); + wprintf("Instant message from "); escputs(pagefrom); - wprintf("
\n"); - + wprintf("
"); fmout(NULL, "LEFT"); + wprintf("
\n"); } - wprintf("
"); - wprintf("[ reply ]   \n"); - - wprintf("" - "[ close window ]\n" - "
"); - - wDumpContent(1); WC->HaveExpressMessages = 0; } diff --git a/webcit/static/background.html b/webcit/static/background.html deleted file mode 100644 index 3d5c5e2bc..000000000 --- a/webcit/static/background.html +++ /dev/null @@ -1,7 +0,0 @@ - - - -> diff --git a/webcit/static/head.html b/webcit/static/head.html index 7b987d493..2e3b8f600 100644 --- a/webcit/static/head.html +++ b/webcit/static/head.html @@ -390,3 +390,4 @@ span.key { + diff --git a/webcit/webcit.c b/webcit/webcit.c index 67fa86bf6..d1f0df8e9 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -176,13 +176,6 @@ void wDumpContent(int print_standard_html_footer) { if (print_standard_html_footer) { wprintf("\n"); /* end of "text" div */ - - /* NAVBAR - wprintf("
"); - wprintf("FIXME the navbar should go here, dude...\n"); - wprintf("
\n"); - */ - do_template("trailing"); } @@ -360,8 +353,6 @@ void output_headers( int do_httpheaders, /* 1 = output HTTP headers ) { char cookie[SIZ]; char httpnow[SIZ]; - char onload_fcn[SIZ]; - static int pageseq = 0; wprintf("HTTP/1.0 200 OK\n"); httpdate(httpnow, time(NULL)); @@ -401,40 +392,18 @@ void output_headers( int do_httpheaders, /* 1 = output HTTP headers "\n"); } - /* script for checking for pages (not always launched) */ - - sprintf(onload_fcn, "function onload_fcn() { \n"); - if (!suppress_check) if (WC->HaveExpressMessages) { - strcat(onload_fcn, " launch_page_popup(); \n"); - WC->HaveExpressMessages = 0; - } - strcat(onload_fcn, "} \n"); - - svprintf("PAGERscript", WCS_STRING, - "\n", - ++pageseq, - onload_fcn - ); - /* end script */ - do_template("head"); - - svprintf("extrabodyparms", WCS_STRING, "%s", - "onload='onload_fcn();' "); - - do_template("background"); } /* ICONBAR */ if (do_htmlhead) { + + if (WC->HaveExpressMessages) { + wprintf("
\n"); + page_popup(); + wprintf("
\n"); + } if ( (WC->logged_in) && (!unset_cookies) ) { wprintf("
"); do_iconbar(); @@ -449,20 +418,22 @@ void output_headers( int do_httpheaders, /* 1 = output HTTP headers if (do_room_banner != 2) { wprintf("
\n"); - } - if (strlen(WC->ImportantMessage) > 0) { - do_template("beginbox_nt"); - wprintf("" - "%s
\n", WC->ImportantMessage); - do_template("endbox"); - strcpy(WC->ImportantMessage, ""); + + if (strlen(WC->ImportantMessage) > 0) { + do_template("beginbox_nt"); + wprintf("" + "%s
\n", WC->ImportantMessage); + do_template("endbox"); + strcpy(WC->ImportantMessage, ""); + } + } } /* - * + * Generic function to do an HTTP redirect. Easy and fun. */ void http_redirect(char *whichpage) { wprintf("HTTP/1.0 302 Moved Temporarily\n"); @@ -1218,8 +1189,6 @@ void session_loop(struct httprequest *req) chat_recv(); } else if (!strcasecmp(action, "chat_send")) { chat_send(); - } else if (!strcasecmp(action, "page_popup")) { - page_popup(); } else if (!strcasecmp(action, "siteconfig")) { siteconfig(); } else if (!strcasecmp(action, "display_generic")) { -- 2.39.2