$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.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
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> \n");
-
- wprintf("<A HREF=\"javascript:window.close();\">"
- "[ close window ]</A></B>\n"
- "</CENTER>");
-
- wDumpContent(1);
WC->HaveExpressMessages = 0;
}
{
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");
}
) {
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));
"<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();
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");
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")) {