/*
* 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
return (sprintf('<a target="_blank" href="http://shop.alternativeoutput.it"><img class="nobo" style="display: inline; border: 1px solid #808080;" src="img/briskshop%d.gif"></a>', $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;
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;
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;
}
$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;
// 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;
}
"<div style='background-color: #ffd780; border: 1px solid black; text-align: center;'><img class='nobo' src=\"donometer.php?c=".$G_donors_cur."&a=".$G_donors_all."\"><div style='padding: 1px; background-color: white;'><b>donatori</b></div></div>") ) : '').'</td>
<td align="right"><div style="padding-right: 8px;">
'.$banner_top_right.'</div></td>
-</td></table>
+</tr></table>
</div>';
/* MLANG: ALL THE VERTICAL MENU */
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="img/brisk_ico.png">
<script type="text/javascript" src="commons.js"></script>
-<!--<script type="text/javascript" src="myconsole.js"></script> -->
+<!-- <script type="text/javascript" src="myconsole.js"></script> -->
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript" src="heartbit.js"></script>
-<script type="text/javascript" src="xynt-http-streaming.js"></script>
+<script type="text/javascript" src="xynt-streaming.js"></script>
<script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
<script type="text/javascript" src="AC_OETags.js"></script>
<script type="text/javascript" src="room.js"></script>
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;
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="img/brisk_ico.png">
<script type="text/javascript" src="commons.js"></script>
- <!-- <script type="text/javascript" src="myconsole.js"></script> -->
+<!-- <script type="text/javascript" src="myconsole.js"></script> -->
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript" src="ticker.js"></script>
<script type="text/javascript" src="heartbit.js"></script>
-<script type="text/javascript" src="xynt-http-streaming.js"></script>
+<script type="text/javascript" src="xynt-streaming.js"></script>
<script type="text/javascript" src="room.js"></script>
<script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
<script type="text/javascript" src="AC_OETags.js"></script>
?>
sess = "<?php echo "$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, "<?php echo "$transp_type"; ?>", 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;
$("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();
<?php
if ($is_login) {