return(len);
}
-void wDumpContent(void) {
+void wDumpContent(int print_standard_html_footer) {
struct webcontent *wptr;
+ if (print_standard_html_footer) {
+ if (noframes) {
+ wprintf("<BR>");
+ embed_main_menu();
+ }
+ wprintf("</BODY></HTML>\n");
+ }
+
printf("Content-type: text/html\n");
printf("Content-length: %d\n", wContentLength());
printf("\n");
printf("Cache-Control: no-store\n");
}
- stuff_to_cookie(cookie, wc_session, wc_username, wc_password, wc_roomname);
+ stuff_to_cookie(cookie, wc_session, wc_username, wc_password,
+ wc_roomname, noframes);
if (print_standard_html_head==2) {
printf("X-WebCit-Session: close\n");
printf("Set-cookie: webcit=%s\n", unset);
embed_main_menu();
}
- wprintf("</BODY></HTML>\n");
- wDumpContent();
+ wDumpContent(1);
}
void display_error(char *errormessage) {
if (!strncasecmp(buf, "Cookie: webcit=", 15)) {
strcpy(cookie, &buf[15]);
cookie_to_stuff(cookie, NULL,
- c_username, c_password, c_roomname);
+ c_username, c_password, c_roomname,
+ &noframes);
}
if (!strncasecmp(buf, "Content-length: ", 16)) {
wprintf("Variables: <BR><PRE>\n");
dump_vars();
wprintf("</PRE><HR>\n");
- wprintf("</BODY></HTML>\n");
- wDumpContent();
+ wDumpContent(1);
}
fflush(stdout);