Thu Jan 28 20:30:08 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Made the frames stuff less dependent on the HTML TARGET= directive
and more dependent on the HTTP Window-target: directive.
+ * Made the system semi-navigable in noframes mode.
Sat Jan 23 19:36:10 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Brought over the new room listing code and <G>oto heuristics
int need_regi = 0;
- if (!strcasecmp(bstr("noframes"), "on")) noframes = 1;
+ if (!strcasecmp(bstr("noframes"), "on"))
+ noframes = 1;
+ else
+ noframes = 0;
if (!strcasecmp(bstr("action"), "Exit")) {
do_logout();
display_reg(1);
}
else {
- output_static("frameset.html");
+ do_welcome();
}
}
else {
}
void do_welcome(void) {
- printf("HTTP/1.0 200 OK\n");
- output_headers(1, "bottom");
- wprintf("<CENTER><H1>");
- escputs(wc_username);
- wprintf("</H1>\n");
- /* FIX add user stats here */
- wprintf("<HR>");
- /* FIX --- what should we put here? the main menu,
- * or new messages in the lobby?
- */
- embed_main_menu();
- wprintf("</BODY></HTML>\n");
- wDumpContent();
+ fprintf(stderr, "DO_WELCOME CALLED, NOFRAMES=%d\n", noframes);
+
+ if (noframes) {
+ printf("HTTP/1.0 200 OK\n");
+ output_headers(1, "_top");
+ wprintf("<CENTER><H1>");
+ escputs(wc_username);
+ wprintf("</H1>\n");
+ /* FIX add user stats here */
+
+ wprintf("<HR>");
+ embed_main_menu();
+
+ wprintf("</BODY></HTML>\n");
+ wDumpContent();
+ }
+
+ else {
+ output_static("frameset.html");
+ }
}
serv_puts("000");
if (atoi(bstr("during_login"))) {
- output_static("frameset.html");
+ do_welcome();
}
else {
display_error("Registration information has been saved.");
wprintf("<HTML><HEAD></HEAD>\n<BODY ");
/* automatically fire up a read-new-msgs in the bottom frame */
- wprintf("onload=location=\"/readnew\" ");
+ if (!noframes)
+ wprintf("onload=location=\"/readnew\" ");
wprintf("BACKGROUND=\"/image&name=background\" TEXT=\"#000000\" LINK=\"#004400\">\n");
}
wprintf("<TD VALIGN=TOP><A HREF=\"/gotonext\">");
wprintf("<IMG SRC=\"/static/forward.gif\" border=0></A></TD>");
wprintf("</TR></TABLE></CENTER>\n");
+
+ if (noframes) embed_main_menu();
+
wprintf("</BODY></HTML>\n");
wDumpContent();
}
<FRAME name="left" src="/static/menubar.html">
<FRAMESET rows="15%, 80%">
<FRAME name="top" src="/dotgoto&room=_BASEROOM_">
- <FRAME name="bottom" src="/do_welcome">
+ <FRAME name="bottom" src="/static/blankpage.html">
</FRAMESET>
<NOFRAMES>
Your browser doesn't support frames.<BR>
This site uses frames.<BR>
- Therefore, you cannot view this site.<BR>
- Perhaps you should telnet instead?<BR>
+ Please log in again, and check the "do not use
+ frames" option.<BR>
</NOFRAMES>
</FRAMESET>
</HTML>
wprintf("<B>%s</B>\n", titlebarmsg);
wprintf("</FONT></TD></TR></TABLE><BR>\n");
escputs(messagetext);
+
+ if (noframes) {
+ wprintf("<HR>\n");
+ embed_main_menu();
+ }
+
wprintf("</BODY></HTML>\n");
wDumpContent();
}