X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex.php;h=b0096e06ab17973b023b398abd0efc70c54e47a2;hb=509c28d644b55837dcddb5cf4610dba58446a451;hp=563bb3a72ca7a576e9f9b2ed4cd57395a1fa999e;hpb=8a1c0c18404ef3191b775fceef5ca03d1a237393;p=brisk.git diff --git a/web/index.php b/web/index.php index 563bb3a..b0096e0 100644 --- a/web/index.php +++ b/web/index.php @@ -20,13 +20,7 @@ * not, write to the Free Software Foundation, Inc, 59 Temple Place - * Suite 330, Boston, MA 02111-1307, USA. * - - -TODO: - - header - - setcookie - - gestire per intero la var globale di output -*/ + */ require_once("Obj/brisk.phh"); require_once("Obj/auth.phh"); @@ -88,6 +82,14 @@ $mlang_room = array( 'userpasserr' => array('it' => 'Utente e/o password errati 'en' => 'baby'), 'st_mop_desc' => array('it' => 'pulizie', 'en' => 'mop'), + 'st_babbo_desc' => array('it' => 'babbo', + 'en' => 'mop'), + 'st_renna_desc' => array('it' => 'renna', + 'en' => 'mop'), + 'st_pupaz_desc' => array('it' => 'pupazzo', + 'en' => 'mop'), + 'st_visch_desc' => array('it' => 'vischio', + 'en' => 'mop'), 'tit_ticker' => array('it' => 'scrivi un invito al tavolo e clicca', 'en' => 'write an invitation at the table and click'), @@ -213,7 +215,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 +235,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 +261,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 +294,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; } @@ -402,14 +407,18 @@ function index_main(&$room, &$header_out, $addr, $get, $post, $cookie) array ( 'id' => 'btn_foroli', 'url' => 'http://www.forumolimpia.it', 'content' => 'img/forumolimpia.gif', - 'content_big' => 'img/forumolimpia_big.png' ) ); + 'content_big' => 'img/forumolimpia_big.png' ), + array ( 'id'=> 'btn_niini', + 'url' => 'http://www.niinivirta.it', + 'content' => 'img/niinivirta.png', + 'content_big' => 'img/niinivirta_big.png') ); $altout_support = ""; $altout_support_big = ""; - for ($i = 0 ; $i < 3 ; $i++) { - $ii = ($i < 2 ? $i : 0); + for ($i = 0 ; $i < 4 ; $i++) { + $ii = ($i < 3 ? $i : 0); $altout_support .= sprintf('
', $i * 20, $altout_support_arr[$ii]['url'], @@ -557,7 +566,7 @@ google_color_url = "000000"; '.$mlang_room['itm_pro'][$G_lang].'
-about
@@ -568,15 +577,15 @@ google_color_url = "000000";
-'.$mlang_room['itm_cla'][$G_lang].'
-'.$mlang_room['itm_rmap'][$G_lang].'
@@ -634,92 +643,120 @@ google_color_url = "000000"; .$mlang_room['stat_desc'][$G_lang]. '