$Log$
+Revision 504.5 2004/02/18 19:17:51 ajc
+* Force reload of frameset if someone tries to escape it. Not perfect
+ but it mostly works at this poing.
+
Revision 504.4 2004/02/17 03:37:11 ajc
* Indicate to Citadel that we want Server Generated Invitations when
calendar events are saved. (No longer the default in Citadel server.)
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
if ( (!strcasecmp(buf, "/"))
|| (!strcasecmp(buf, "/static/mainframeset.html"))
|| (!strcasecmp(buf, "/static/robots.txt"))
+ || (!strncasecmp(buf, "/page_popup", 11))
|| (!strncasecmp(buf, "/listsub", 8))
|| (!strncasecmp(buf, "/freebusy", 9))
|| (!strncasecmp(buf, "/termquit", 9)) ) {
char buf[SIZ];
char pagefrom[SIZ];
- /* suppress express message check, do headers but no fake frames */
+ /* suppress express message check, do headers but no frames */
output_headers(0x08 | 0x03);
while (serv_puts("GEXP"), serv_gets(buf), buf[0]=='1') {
extract(pagefrom, &buf[4], 3);
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>");
- wprintf("<SPAN CLASS=\"titlebar\">Express message from ");
+ wprintf("<SPAN CLASS=\"titlebar\">Instant message from ");
escputs(pagefrom);
wprintf("</SPAN></TD></TR></TABLE>\n");
int suppress_check = 0;
int cache = 0;
char httpnow[SIZ];
+ char onload_fcn[SIZ];
static int pageseq = 0;
print_standard_html_head = controlcode & 0x03;
refresh30 = ((controlcode & 0x04) >> 2);
else svprintf("REFRESHTAG", WCS_STRING,
"<META HTTP-EQUIV=\"refresh\" CONTENT=\"500363689;\">\n");
/* script for checking for pages (not always launched) */
+
+ sprintf(onload_fcn, "function onload_fcn() { \n");
+ if (!WC->outside_frameset_allowed) {
+ strcat(onload_fcn, " force_frameset(); \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 LANGUAGE=\"JavaScript\">\n"
"function launch_page_popup() {\n"
"'toolbar=no,location=no,copyhistory=no,status=no,"
"scrollbars=yes,resizable=no,height=250,width=400');\n"
"}\n"
+ "function force_frameset() { \n"
+ " if (top.frames.length == 0) { \n"
+ " top.location.replace('/static/mainframeset.html'); \n"
+ " } \n"
+ "} \n"
+ "%s\n"
"</SCRIPT>\n",
- ++pageseq
+ ++pageseq,
+ onload_fcn
);
/* end script */
- if (!WC->outside_frameset_allowed) {
- /* FIXME put this here */
- }
do_template("head");
clear_local_substs();
- if (!suppress_check) if (WC->HaveExpressMessages) {
- svprintf("extrabodyparms", WCS_STRING, "%s",
- "onload=\"launch_page_popup()\" ");
- WC->HaveExpressMessages = 0;
- }
+ svprintf("extrabodyparms", WCS_STRING, "%s",
+ "onload='onload_fcn();' ");
do_template("background");
clear_local_substs();