char buf[256];
printf("HTTP/1.0 200 OK\n");
- output_headers(1);
+ output_headers(1, "_top");
/* Da banner */
wprintf("<CENTER><TABLE border=0 width=100%><TR><TD>\n");
wprintf("and <i>cookies</i>.\n");
wprintf("</EM></UL>\n");
- wprintf("</BODY></HTML>\n");
- wDumpContent();
+ wDumpContent(1);
}
char buf[256];
int need_regi = 0;
+
+ 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);
- 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();
+
+ wDumpContent(1);
+ }
+
+ else {
+ output_static("frameset.html");
+ }
}
strcpy(wc_roomname, "");
printf("HTTP/1.0 200 OK\n");
- output_headers(2); /* note the "2" which causes cookies to be unset */
+ output_headers(2, "_top"); /* note "2" causes cookies to be unset */
wprintf("<CENTER>");
serv_puts("MESG goodbye");
if (buf[0]=='1') fmout(NULL);
else wprintf("Goodbye\n");
- wprintf("<HR><A HREF=\"/\">Log in again</A>\n");
- wprintf("</CENTER></BODY></HTML>\n");
- wDumpContent();
+ wprintf("<HR><A HREF=\"/\">Log in again</A></CENTER>\n");
+ wDumpContent(1);
serv_puts("QUIT");
exit(0);
}
int a;
printf("HTTP/1.0 200 OK\n");
- output_headers(1);
+ output_headers(1, "bottom");
strcpy(buf,bstr("user"));
if (strlen(buf)>0) if (strlen(bstr("axlevel"))>0) {
serv_gets(buf);
if (buf[0]!='3') {
- wprintf("<EM>%s</EM><BR></BODY></HTML>\n", &buf[4]);
- wDumpContent();
+ wprintf("<EM>%s</EM><BR>\n", &buf[4]);
+ wDumpContent(1);
return;
}
urlesc(user), a, axdefs[a]);
}
wprintf("</TR></TABLE><CENTER><BR>\n");
- wDumpContent();
+ wDumpContent(1);
}
int a;
printf("HTTP/1.0 200 OK\n");
- output_headers(1);
+ output_headers(1, "bottom");
wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=007700><TR><TD>");
wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
}
wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"Register\">\n");
wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"Cancel\">\n");
- wprintf("</CENTER></BODY></HTML>\n");
- wDumpContent();
+ wprintf("</CENTER>\n");
+ wDumpContent(1);
}
/*
serv_puts("000");
if (atoi(bstr("during_login"))) {
- output_static("frameset.html");
+ do_welcome();
}
else {
display_error("Registration information has been saved.");
char buf[256];
printf("HTTP/1.0 200 OK\n");
- output_headers(1);
+ output_headers(1, "bottom");
wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=770000><TR><TD>");
wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");
wprintf("</TABLE>\n");
wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"Change\">\n");
wprintf("<INPUT type=\"submit\" NAME=\"action\" VALUE=\"Cancel\">\n");
- wprintf("</CENTER></BODY></HTML>\n");
- wDumpContent();
+ wprintf("</CENTER>\n");
+ wDumpContent(1);
}
/*