* Cleaned up a bunch of unused cruft from the old layout
authorArt Cancro <ajc@citadel.org>
Thu, 20 Jan 2005 04:10:45 +0000 (04:10 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 20 Jan 2005 04:10:45 +0000 (04:10 +0000)
* 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
webcit/auth.c
webcit/paging.c
webcit/static/background.html [deleted file]
webcit/static/head.html
webcit/webcit.c

index ca15a62fd7a96dcbc03ff7943a3dd81b4682b678..137cc07f1c674188ea2a71874fce3515c53027ce 100644 (file)
@@ -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 <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index 94f3014f7a0257dc1c267ed78aaf7735812898ba..3987ba394ce3c06e902c0fe39e08830efc9fd996 100644 (file)
@@ -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);
 }
 
 
index fe4a9141b9aecfd50ee31c8f2ffbbe6a618c1fb8..71a48ab8cc11236b348adc3335711f163fbb3518 100644 (file)
@@ -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("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
-               wprintf("<SPAN CLASS=\"titlebar\">Instant message from ");
+               wprintf("<table border=1 bgcolor=\"#880000\"><tr><td>");
+               wprintf("<span class=\"titlebar\">Instant message from ");
                escputs(pagefrom);
-               wprintf("</SPAN></TD></TR></TABLE>\n");
-               
+               wprintf("</span></td></tr><tr><td><font color=\"#FFFFFF\">");
                fmout(NULL, "LEFT");
+               wprintf("</font></td></tr></table>\n");
        }
 
-       wprintf("<CENTER>");
-       wprintf("<A HREF=\"/display_page&closewin=yes&recp=");
-       urlescputs(pagefrom);
-        wprintf("\">[ reply ]</A>&nbsp;&nbsp;&nbsp;\n");
-
-       wprintf("<A HREF=\"javascript:window.close();\">"
-               "[ close window ]</A></B>\n"
-               "</CENTER>");
-
-       wDumpContent(1);
        WC->HaveExpressMessages = 0;
 }
 
diff --git a/webcit/static/background.html b/webcit/static/background.html
deleted file mode 100644 (file)
index 3d5c5e2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<!-- static/background.html is used for the BODY heading of all
-     dynamically generated pages
- -->
-
-<body
-<?EXTRABODYPARMS>
->
index 7b987d493b9f20ad10fe6f652d2196c972058990..2e3b8f600925b30da7f3169119e575c003acd49d 100644 (file)
@@ -390,3 +390,4 @@ span.key {
 </style>
 <?PAGERSCRIPT>
 </head>
+<body>
index 67fa86bf6badaf07835ba5baf147b4db972b196e..d1f0df8e94ab0ec3a529163095adb9ba08b732d6 100644 (file)
@@ -176,13 +176,6 @@ void wDumpContent(int print_standard_html_footer)
 {
        if (print_standard_html_footer) {
                wprintf("</DIV>\n");    /* end of "text" div */
-       
-               /* NAVBAR 
-               wprintf("<div id=\"navbar\">");
-               wprintf("FIXME the navbar should go here, dude...\n");
-               wprintf("</div>\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
                                "<meta http-equiv=\"refresh\" content=\"500363689;\" />\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,
-                       "<script type=\"text/javascript\">\n"
-                       "function launch_page_popup() {\n"
-                       "pwin = window.open('/page_popup', 'CitaPage%d', "
-                       "'toolbar=no,location=no,copyhistory=no,status=no,"
-                       "scrollbars=yes,resizable=no,height=250,width=400');\n"
-                       "}\n"
-
-                       "%s\n"
-                       "</script>\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("<div style=\"position:absolute; width=600px; height=400px; "
+                               "background-color: #880000; z-index: 2; >\n");
+                       page_popup();
+                       wprintf("</div>\n");
+               }
                if ( (WC->logged_in) && (!unset_cookies) ) {
                        wprintf("<div id=\"iconbar\">");
                        do_iconbar();
@@ -449,20 +418,22 @@ void output_headers(      int do_httpheaders,     /* 1 = output HTTP headers
 
        if (do_room_banner != 2) {
                wprintf("<div id=\"content\">\n");
-       }
 
-       if (strlen(WC->ImportantMessage) > 0) {
-               do_template("beginbox_nt");
-               wprintf("<SPAN CLASS=\"errormsg\">"
-                       "%s</SPAN><br />\n", WC->ImportantMessage);
-               do_template("endbox");
-               strcpy(WC->ImportantMessage, "");
+
+               if (strlen(WC->ImportantMessage) > 0) {
+                       do_template("beginbox_nt");
+                       wprintf("<SPAN CLASS=\"errormsg\">"
+                               "%s</SPAN><br />\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")) {