function headers_render($header, $len)
{
-
$s = "";
- $s .= "HTTP/1.1 200 OK\r\n";
+ if (isset($header['Location'])) {
+ return sprintf("HTTP/1.1 302 OK\r\nLocation: %s\r\n\r\n", $header['Location']);
+ }
+ else {
+ $s .= "HTTP/1.1 200 OK\r\n";
+ }
if (!isset($header['Date']))
$s .= sprintf("Date: %s\r\n", date(DATE_RFC822));
if (!isset($header['Connection']))
/* INDEX_RD_IFRA PORT */
- static function blocking_error($is_unrecoverable)
+ protected function blocking_error($is_unrecoverable)
{
GLOBAL $is_page_streaming;
return ($ret);
} // function maincheck (...
-static function stream_fini($is_unrecoverable)
+public static function stream_fini($is_unrecoverable)
{
GLOBAL $G_four_rnd_string;
return ($ret);
}
- static function blocking_error($is_unrecoverable)
+public static function stream_fini($is_unrecoverable)
+{
+ GLOBAL $G_four_rnd_string;
+
+ printf("xXx user::stream_fini\n");
+
+ // IF IFRAME THEN:
+ $body = "";
+ $body .= sprintf("<html>
+<head>
+<script type=\"text/javascript\" src=\"%scommons.js\"></script>
+<script type=\"text/javascript\" src=\"%sxynt-http-streaming-ifra.js\"></script>
+<script type=\"text/javascript\">
+var http_streaming = \"ready\";", self::base_get(), self::base_get());
+ $body .= sprintf("
+window.onload = function () { if (http_streaming != \"ready\") { http_streaming.reload(); } };
+</script>
+</head>
+<body>");
+ $body .= sprintf("<!-- \n%s -->\n", $G_four_rnd_string);
+ $body .= sprintf("<script id='hs%d' type='text/javascript'><!--
+push(\"%s\");
+// -->
+</script>", 0, escpush(self::blocking_error($is_unrecoverable)) );
+ // ELSE IF XHR THEN:
+ // return (self::blocking_error($is_unrecoverable));
+ return ($body);
+}
+
+
+ protected function blocking_error($is_unrecoverable)
{
GLOBAL $is_page_streaming;
if ($user->stat == "table") {
setcookie("table_token", $user->table_token, $curtime + 31536000);
setcookie("table_idx", $user->table, $curtime + 31536000);
- $header_out['Location'] = "Location: briskin5/index.php";
+ $header_out['Location'] = "briskin5/index.php";
return TRUE;
}
$ACTION = "room";