X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=inline;f=web%2Findex.php;h=5ed0bd364645d9c64933c621d3de7e8543a42e76;hb=e03a177e1af12235850a9690552491849087e124;hp=563bb3a72ca7a576e9f9b2ed4cd57395a1fa999e;hpb=8a1c0c18404ef3191b775fceef5ca03d1a237393;p=brisk.git
diff --git a/web/index.php b/web/index.php
index 563bb3a..5ed0bd3 100644
--- a/web/index.php
+++ b/web/index.php
@@ -213,7 +213,7 @@ function carousel_top()
return (sprintf('', $rn));
}
-function index_main(&$room, &$header_out, $addr, $get, $post, $cookie)
+function index_main(&$room, $transp_type, &$header_out, $addr, $get, $post, $cookie)
{
GLOBAL $G_with_donors, $G_donors_cur, $G_donors_all;
GLOBAL $G_with_topbanner, $G_topbanner, $G_is_local;
@@ -233,8 +233,7 @@ function index_main(&$room, &$header_out, $addr, $get, $post, $cookie)
unset ($table_idx);
if (($table_token = gpcs_var('table_idx', $get, $post, $cookie)) === FALSE)
unset ($table_token);
-
-
+
// Use of proxies isn't allowed.
if (!$G_is_local && is_proxy($addr)) {
return FALSE;
@@ -260,8 +259,10 @@ function index_main(&$room, &$header_out, $addr, $get, $post, $cookie)
if (($user = &$room->get_user($sess, &$idx)) != FALSE) {
log_main("user stat: ".$user->stat);
if ($user->stat == "table") {
- setcookie("table_token", $user->table_token, $curtime + 31536000);
- setcookie("table_idx", $user->table, $curtime + 31536000);
+ $cookies = new Cookies();
+ $cookies->add("table_token", $user->table_token, $curtime + 31536000);
+ $cookies->add("table_idx", $user->table, $curtime + 31536000);
+ $header_out['cookies'] = $cookies;
$header_out['Location'] = "briskin5/index.php";
return TRUE;
}
@@ -291,9 +292,11 @@ function index_main(&$room, &$header_out, $addr, $get, $post, $cookie)
// recovery lost game
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";
+ $cookies = new Cookies();
+ $cookies->add("table_token", $user->table_token, $curtime + 31536000);
+ $cookies->add("table_idx", $user->table, $curtime + 31536000);
+ $header_out['cookies'] = $cookies;
+ $header_out['Location'] = "briskin5/index.php";
return TRUE;
}
@@ -858,10 +861,10 @@ supported by:
-
+
-
+
@@ -882,7 +885,7 @@ supported by:
var gst = new globst();
var topbanner_sfx, topbanner_dx;
var g_brow = null;
- var hstm = null;
+ var xstm = null;
var sess = "not_connected";
var spo_slide, sup_slide;
@@ -993,11 +996,11 @@ echo "$body"; ?>
-
+
-
+
@@ -1053,8 +1056,8 @@ else {
?>
sess = "";
-hstm = new http_streaming(window, null /* console*/ , gst, 'index_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);});
- hstm.hbit_set(heartbit);
+xstm = new xynt_streaming(window, "", null /* console */, gst, 'index_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);});
+ xstm.hbit_set(heartbit);
tra = new train($('room_tit'));
window.onunload = onunload_cb;
window.onbeforeunload = onbeforeunload_cb;
@@ -1066,7 +1069,7 @@ hstm = new http_streaming(window, null /* console*/ , gst, 'index_php', 'sess',
$("proflashext").innerHTML = "";
// console.log("session from main: "+sess);
- hstm.start();
+ xstm.start();
// alert("ARR LENGTH "+g_preload_img_arr.length);
// FIXME: preload image will be fired by stream instead here
// setTimeout(preload_images, 0, g_preload_img_arr, g_imgct);