X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex.php;h=b3126e30fd62ed0a88061c9015fdf6e834893c34;hb=95fab8a421e10d8ed1174a76971bb585e81cc8a0;hp=1294ad6b69808d797deee2c1aa7a452b61d6b424;hpb=123416d979e44c2cf3403fffc23fe99c8d6d80d5;p=brisk.git diff --git a/web/index.php b/web/index.php index 1294ad6..b3126e3 100644 --- a/web/index.php +++ b/web/index.php @@ -2,7 +2,7 @@ /* * brisk - index.php * - * Copyright (C) 2006-2011 Matteo Nastasi + * Copyright (C) 2006-2012 Matteo Nastasi * mailto: nastasi@alternativeoutput.it * matteo.nastasi@milug.org * web: http://www.alternativeoutput.it @@ -260,9 +260,11 @@ 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); - $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; } $ACTION = "room"; @@ -280,7 +282,7 @@ function index_main(&$room, &$header_out, $addr, $get, $post, $cookie) $room->garbage_manager(TRUE); /* try login */ - if (($user = $room->add_user(&$sess, &$idx, $name, $pass_private, $addr)) != FALSE) { + if (($user = $room->add_user(&$sess, &$idx, $name, $pass_private, $addr, $cookie)) != FALSE) { $ACTION = "room"; if ($idx < 0) { $idx = -$idx - 1; @@ -291,8 +293,10 @@ 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); + $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'] = "Location: briskin5/index.php"; return TRUE; } @@ -510,7 +514,7 @@ google_color_url = "000000"; "
donatori
") ) : '').'
'.$banner_top_right.'
- + '; /* MLANG: ALL THE VERTICAL MENU */ @@ -861,7 +865,7 @@ supported by:
- + @@ -882,7 +886,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; @@ -997,7 +1001,7 @@ echo "$body"; ?> - + @@ -1053,8 +1057,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, 'iframe', 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,9 +1070,10 @@ 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); - setTimeout(preload_images, 0, g_preload_img_arr, g_imgct); + // FIXME: preload image will be fired by stream instead here + // setTimeout(preload_images, 0, g_preload_img_arr, g_imgct); $("txt_in").focus();