X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex_rd_ifra.php;h=761d4cbba7f123e485269a584016db757bff3c86;hb=b34503c4b7b2a6be90f6a1b6559663a0388629cb;hp=7d4f4932af07a673daa14b0329b36fde815f4d65;hpb=c3ccbbd5bc7c8534127fa10b4f88b81cffc6029a;p=brisk.git diff --git a/web/index_rd_ifra.php b/web/index_rd_ifra.php index 7d4f493..761d4cb 100644 --- a/web/index_rd_ifra.php +++ b/web/index_rd_ifra.php @@ -130,6 +130,7 @@ function blocking_error($is_unrecoverable) return (sprintf(($is_unrecoverable ? 'hstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");')); } +// FIXME TO SUPPORT iframe function page_sync($sess, $page, $table_idx, $table_token) { GLOBAL $is_page_streaming; @@ -491,6 +492,33 @@ function maincheck(&$room, &$user, $cur_stat, $cur_subst, $cur_step, &$new_stat, return ($ret); } +function index_rd_ifra_fini($is_unrecoverable) +{ + GLOBAL $G_four_rnd_string; + + // IF IFRAME THEN: + $body = ""; + $body .= sprintf(" + + + + + +"); + $body .= sprintf("\n", $G_four_rnd_string); + $body .= sprintf("", 0, escpush(blocking_error($is_unrecoverable)) ); + // ELSE IF XHR THEN: + // return (blocking_error($is_unrecoverable)); + return ($body); +} + /* * MAIN */ @@ -505,6 +533,8 @@ function index_rd_ifra_init(&$room, &$user, &$header_out, &$body, $get, $post, $ { GLOBAL $G_four_rnd_string; + $curtime = time(); + $is_page_streaming = FALSE; // (webservers_exceeded() || stristr($HTTP_USER_AGENT, "Mozilla/5.0 (Windows NT 6.1; rv:5.0)") || stristr($HTTP_USER_AGENT, "MSIE") || stristr($HTTP_USER_AGENT, "CHROME") ? TRUE : FALSE); $header_out['Cache-Control'] = 'no-cache, must-revalidate'; // HTTP/1.1 @@ -522,7 +552,7 @@ function index_rd_ifra_init(&$room, &$user, &$header_out, &$body, $get, $post, $ if (($step = gpcs_var('step', $get, $post, $cookie)) === FALSE) unset($step); - $user->rd_data_set(time() + STREAM_TIMEOUT, $stat, $subst, $step, $from); + $user->rd_data_set($curtime, $stat, $subst, $step, $from); $body .= sprintf(" @@ -530,9 +560,8 @@ function index_rd_ifra_init(&$room, &$user, &$header_out, &$body, $get, $post, $ @@ -614,4 +643,13 @@ push(\"%s\"); return TRUE; } + +function index_rd_ifra_keepalive(&$user) +{ + return (sprintf("", $user->rd_scristp++)); + +} ?>