5 * Copyright (C) 2006-2015 Matteo Nastasi
6 * mailto: nastasi@alternativeoutput.it
7 * matteo.nastasi@milug.org
8 * web: http://www.alternativeoutput.it
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details. You should have received a
19 * copy of the GNU General Public License along with this program; if
20 * not, write to the Free Software Foundation, Inc, 59 Temple Place -
21 * Suite 330, Boston, MA 02111-1307, USA.
25 require_once("Obj/user.phh");
26 require_once("Obj/brisk.phh");
27 require_once("Obj/auth.phh");
29 $mlang_room = array( 'userpassuse' => array('it' => 'Il tuo nickname è già in uso.',
30 'en' => 'Your nickname is already in use.'),
31 'userpassend' => array('it' => 'Spiacenti, non ci sono più posti liberi. Riprova più tardi.',
32 'en' => 'We are sorry, there aren\'t free place. Try again later.'),
33 'userpassmust' => array('it' => 'Il nickname deve contenere almeno una lettera o una cifra.',
34 'en' => 'The nickname have to contain at least one letter or one number.'),
35 'userpasserr' => array('it' => 'Utente e/o password errati.',
36 'en' => 'Wrong user and/or password.'),
37 'userpassban' => array('it' => 'Il tuo indirizzo IP è stato bannato perché precedentemente utilizzato da qualche molestatore.',
38 'en' => 'Your IP address is banned because trolling activity was detected from it.'),
39 'standing' => array('it' => 'Giocatori in piedi',
40 'en' => 'Standing players'),
41 'headline' => array('it' => 'briscola chiamata in salsa ajax',
42 'en' => 'declaration briscola in ajax sauce <b>(Beta)</b>'),
43 'welcome' => array('it' => 'Digita il tuo nickname per accedere ai tavoli della briscola.',
44 'en' => 'Enter your nickname to access to the tables of briscola.'),
45 'reas_unkn' => array('it' => 'Logout per motivi sconosciuti.',
46 'en' => 'Logout with unknown reason.'),
47 'reas_lout' => array('it' => 'Orevoire.',
48 'en' => 'EN Orevoire.'),
49 'reas_tout' => array('it' => 'Abbiamo perso le tue tracce, quindi ti abbiamo disconnesso.',
50 'en' => 'EN Abbiamo perso le tue tracce, quindi ti abbiamo disconnesso.'),
51 'reas_ttot' => array('it' => 'Abbiamo perso le tue tracce mentre stavi giocando, quindi ti abbiamo disconnesso.',
52 'en' => 'EN Abbiamo perso le tue tracce mentre stavi giocando, quindi ti abbiamo disconnesso.'),
53 'reas_anon' => array('it' => 'L\' accesso attraverso sistemi di anonimizzazione non è consentito.',
54 'en' => 'EN L\' accesso attraverso sistemi di anonimizzazione non è consentito.'),
55 'reas_prox' => array('it' => 'L\' accesso attraverso proxy non è consentito, se lo usi solo tu e pochi altri utenti comunica il suo indirizzo IP all\' <a href="mailto: brisk@alternativeoutput.it">amministratore</a> per aggiungerlo alle eccezioni.',
56 'en' => 'EN L\' accesso attraverso proxy non è consentito, se lo usi solo tu e pochi altri utenti comunica il suo indirizzo IP all\' <a href="mailto: brisk@alternativeoutput.it">amministratore</a> per aggiungerlo alle eccezioni.'),
57 'reas_anot' => array('it' => 'La tua sessione è stata assegnata ad un altro browser.',
58 'en' => 'EN La tua sessione è stata assegnata ad un altro browser.'),
59 'reas_cloud' => array('it' => 'La connessione dai computer di una cloud non è ammessa.',
60 'en' => 'Connection from cloud computers is not allowed.'),
62 'btn_enter' => array('it' => 'Entra.',
64 'passwarn' => array('it' => 'Se non hai ancora una password, lascia il campo in bianco ed entra.',
65 'en' => 'If you don\'t have a password, leave blank the field and enter.'),
66 'browwarn' => array('it' => 'Se qualcosa non funziona prova a ricaricare la pagina con <b>Ctrl + F5</b><br><br>Se non riesci più ad entrare nel nuovo Brisk e prima ci riuscivi potrebbe essere un problema di antivirus,<br>guarda la <a class=\'flat\' style=\'background-color: white; font-weight: bold;\' target=\'_blank\' href=\'http://www.alternativeoutput.it/blog/doku.php?id=brisk:guida_agli_antivirus\'>pagina sugli antivirus</a> per maggiori informazioni su come configurarlo.<br><br>Se ancora non funziona nulla contatta <a class=\'flat\' style=\'background-color: white; font-weight: bold;\' href=\'mailto:brisk@alternativeoutput.it\'>l\'amministratore del sito</a>.',
67 'en' => '(if something don\'t work<br>try to reload the current page with <b>Ctrl + F5</b>)'),
68 'regwarn' => array('it' => '<br>Il nickname che stai usando è già registrato,<br><br>se il suo proprietario si autentificherà<br><br>verrai rinominato d\'ufficio come ghost<i>N</i>.',
69 'en' => '<br>The nickname you are using it\'s already registered, <br><br>if its proprietary authenticates<br><br>you will named ghost<i>N</i>.'),
70 'btn_rettabs' => array('it' => 'torna ai tavoli',
71 'en' => 'back to tables'),
72 'btn_exit' => array('it' => 'Esco.',
74 'btn_prefs_save' => array('it' => 'Salva.',
76 'btn_prefs_reset' => array('it' => 'Annulla.',
78 'btn_prefs_close' => array('it' => 'Chiudi.',
80 'btn_prefs_send' => array('it' => 'Invia.',
82 'tit_tabl' => array('it' => 'Tavolo ',
84 'tit_stat' => array('it' => 'imposta lo stato del tuo utente',
85 'en' => 'set the status of the user'),
86 'stat_desc' => array('it' => 'stato',
88 'st_norm_desc' => array('it' => 'normale',
90 'st_paus_desc' => array('it' => 'pausa',
92 'st_out_desc' => array('it' => 'fuori',
94 'st_dog_desc' => array('it' => 'cane',
96 'st_food_desc' => array('it' => 'cibo',
98 'st_work_desc' => array('it' => 'lavoro',
100 'st_smok_desc' => array('it' => 'sigaretta',
102 'st_pres_desc' => array('it' => 'presente',
104 'st_rabb_desc' => array('it' => 'coniglio',
106 'st_socc_desc' => array('it' => 'calcio',
108 'st_baby_desc' => array('it' => 'pupo',
110 'st_mop_desc' => array('it' => 'pulizie',
112 'st_babbo_desc' => array('it' => 'babbo',
114 'st_renna_desc' => array('it' => 'renna',
116 'st_pupaz_desc' => array('it' => 'pupazzo',
118 'st_visch_desc' => array('it' => 'vischio',
121 'tit_ticker' => array('it' => 'scrivi un invito al tavolo e clicca',
122 'en' => 'write an invitation at the table and click'),
123 'itm_warr' => array('it' => 'garantisci',
124 'en' => 'guarantee'),
125 'warr_desc' => array('it' => 'garantisci per un tuo conoscente',
126 'en' => 'guarantee for a friend'),
127 'tit_warr' => array('it' => 'Garantisci per un tuo conoscente.',
128 'en' => 'Guarantee for a friend.'),
129 'itm_list' => array('it' => 'ascolta',
131 'list_desc' => array('it' => 'imposta le regole di ascolto',
132 'en' => 'set the listen rules'),
133 'tit_listall' => array('it' => 'tutti',
134 'en' => 'everybody'),
135 'listall_desc' => array('it' => 'leggi tutti i messaggi di tutti gli utenti collegati',
136 'en' => 'listen all messages from each user connected'),
137 'tit_listaut' => array('it' => 'solo autenticati',
138 'en' => 'only authorized'),
139 'tit_listisol' => array('it' => 'isolamento',
140 'en' => 'isolation'),
141 'listaut_desc' => array('it' => 'leggi soltanto i messaggi degli utenti con password',
142 'en' => 'listen messages only from authenticated users'),
143 'listisol_desc'=> array('it' => 'visualizza Brisk come se fosse solo per utenti con password',
144 'en' => 'show Brisk like an authenticated user only site'),
145 'suppcomp_tit' => array('it' => 'personalizza la tua S',
146 'en' => 'customize your S'),
147 'suppcomp_r' => array('it' => 'rosso',
149 'suppcomp_g' => array('it' => 'verde',
151 'suppcomp_b' => array('it' => 'blu',
153 'suppcomp_fg' => array('it' => 'colore',
155 'suppcomp_bg' => array('it' => 'sfondo',
156 'en' => 'background'),
157 'suppcomp_range' => array('it' => '(0-255)',
159 'tit_splash' => array('it' => 'splash',
161 'splash_desc' => array('it' => 'attiva la finestra di splash',
162 'en' => 'show the splash window'),
163 'tit_prefs' => array('it' => 'preferenze',
164 'en' => 'preferences'),
165 'prefs_desc' => array('it' => 'preferenze dell\' utente',
166 'en' => 'user\'s preferences'),
167 'tit_help' => array('it' => 'informazioni utili su Brisk',
168 'en' => 'usefull information about Brisk'),
169 'itm_help' => array('it' => 'aiuto',
171 'tit_hpage' => array('it' => 'homepage del progetto',
172 'en' => 'project homepage (ita)'),
173 'tit_what' => array('it' => 'di cosa si tratta',
174 'en' => 'what is the project'),
175 'itm_what' => array('it' => 'cos\'è',
176 'en' => 'what is it'),
177 'url_rules' => array('it' => 'http://it.wikipedia.org/wiki/Briscola#Gioco_a_5',
178 'en' => 'http://it.wikipedia.org/wiki/Briscola#Gioco_a_5&EN=true'),
179 'itm_rules' => array('it' => 'regole',
181 'tit_rules' => array('it' => 'come si gioca',
182 'en' => 'how to play'),
183 'tit_shot' => array('it' => 'screenshots dell\'applicazione',
184 'en' => 'screenshots of the web-application'),
185 'tit_comp' => array('it' => 'compatibilità con i browser',
186 'en' => 'browsers compatibility'),
187 'itm_comp' => array('it' => 'compatibilità',
188 'en' => 'compatibility'),
189 'tit_src' => array('it' => 'sorgenti dell\'applicazione web',
190 'en' => 'sources of the web-application'),
191 'itm_src' => array('it' => 'sorgenti',
193 'tit_ml' => array('it' => 'come iscriversi alla mailing list',
194 'en' => 'how to subscribe the mailing list'),
195 'itm_ml' => array('it' => 'mailing list',
196 'en' => 'mailing list'),
197 'tit_pro' => array('it' => 'come fare pubblicità a Brisk!',
198 'en' => 'how to spread Brisk!'),
199 'itm_pro' => array('it' => 'propaganda',
200 'en' => 'propaganda'),
201 'tit_mail' => array('it' => 'contatti',
203 'itm_mail' => array('it' => 'contatti',
205 'tit_cook' => array('it' => 'policy sui cookie',
206 'en' => 'cookie policy'),
207 'itm_cook' => array('it' => 'cookie',
209 'tit_cla' => array('it' => 'classifiche degli utenti',
210 'en' => 'user\'s placings'),
211 'itm_cla' => array('it' => 'classifiche',
213 'tit_mnu' => array('it' => 'minuta giornaliera',
214 'en' => 'daily report'),
215 'itm_mnu' => array('it' => 'minuta',
216 'en' => 'daily deport'),
217 'tit_rmap' => array('it' => 'prossime funzionalità implementate',
218 'en' => 'roadmap of next functionalities'),
219 'itm_rmap' => array('it' => 'roadmap',
221 'tit_meet' => array('it' => 'foto dei raduni di briskisti (serve Facebook)',
222 'en' => 'photos of brisk meetings'),
223 'itm_meet' => array('it' => 'BriskMeeting',
224 'en' => 'BriskMeeting'),
225 'tit_mesg' => array('it' => 'manda un messaggio o una segnalazione all\'amministratore del sito',
226 'en' => 'send a message or a signalling to the administrator' ),
227 'mesgtoadm_tit'=> array('it' => 'Invia un messaggio o una segnalazione all\'amministratore:',
228 'en' => 'Send a message to the administrator:'),
229 'mesgtoadm_sub'=> array('it' => 'soggetto:',
233 require_once("briskin5/Obj/briskin5.phh");
237 GLOBAL $G_with_poll, $G_poll_title, $G_poll_entries;
240 $ret = sprintf('<div style="padding: 0px;margin: 0px; height: 8px; font-size: 1px;"></div>
242 <img class="nobo" src="img/brisk_poll.png" onmouseover="menu_hide(0,0); menu_show(\'menu_poll\');">
244 <div style="width: 300px;" class="webstart" id="menu_poll" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
246 <form id="poll_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_pollbox(this);">
247 <input type="hidden" name="realsub" value="666">', $G_poll_title);
248 for ($i = 0 ; $i < count($G_poll_entries) ; $i++) {
249 $ret .= sprintf('<INPUT TYPE="radio" NAME="category" VALUE="%s">%s<hr><br>', $G_poll_entries[$i]['id'],
250 $G_poll_entries[$i]['cont']);
252 $ret .= sprintf('<div style="text-align: center;"><input type="submit" class="input_sub" onclick="this.form.elements[\'realsub\'].value = this.value;" value="invia" name="sub" id="subid"/></div>
260 function sidebanners_init($sidebanner_idx)
262 for ($i = 0 ; $i < count($sidebanner_idx) ; $i++) {
263 printf(" sidebanner_init(%d);\n", $i);
267 function sidebanners_render($sidebanner, $sidebanner_idx)
269 $sb_n = count($sidebanner_idx);
278 for ($i = 0 ; $i < $sb_n ; $i++) {
279 $idx = $sidebanner_idx[$i];
280 $sb = $sidebanner[$idx];
281 if (!array_key_exists('link', $sb)
282 || !array_key_exists('title', $sb)
283 || !array_key_exists('icon_big', $sb)) {
286 $sb_type = (array_key_exists('type', $sb) ? $sb['type'] : 'meeting');
287 if (array_key_exists('icon', $sb)) {
288 $sb_icon = $sb['icon'];
291 if ($sb_type == 'meeting') {
293 $sb_icon = 'img/brisk_meeting60.gif';
296 $sb_icon = 'img/brisk_meeting35.gif';
300 // no standard icon for other type of events please add them
304 $sb_dx = (array_key_exists('dx', $sb) ? $sb['dx'] : 100);
305 $sb_dy = (array_key_exists('dy', $sb) ? $sb['dy'] : -230);
307 printf('<div class="sidebanner" style="background: #ffd780; border: solid 1px #ffae00; width: 60px;" id="sidebanner%d">', $i);
308 printf('<a target="_blank" href="%s">', $sb['link']);
309 printf('<img style="position: static; border: solid 0px black;" src="%s"', $sb_icon);
310 printf(' onMouseOver="show_bigpict($(\'sidebanner%d\'), \'over\', %d, %d, \'\');"', $i, $sb_dx, $sb_dy);
311 printf(' onMouseOut="show_bigpict($(\'sidebanner%d\'), \'out\', 0, 0, \'\');"', $i);
312 $tit = eschtml($sb['title']);
313 printf(' alt="%s" title="%s"></a></div>', $tit, $tit);
317 if (array_key_exists('icon_big_class', $sb)) {
318 $ib_class = $sb['icon_big_class'];
321 printf('<img class="nobohide bordergray %s" style="z-index: 255;" id="sidebanner%d_big" src="%s">', $ib_class, $i, $sb['icon_big']);
326 function index_main(&$brisk, $transp_type, $header, &$header_out, $remote_addr_full, $get, $post, $cookie)
328 GLOBAL $G_with_donors, $G_donors_cur, $G_donors_all;
329 GLOBAL $G_with_topbanner, $G_topbanner, $G_is_local;
330 GLOBAL $G_sidebanner, $G_sidebanner_idx;
332 GLOBAL $G_lang, $G_lng, $mlang_room;
333 GLOBAL $BRISK_SHOWHTML, $BRISK_DEBUG, $_SERVER, $_COOKIE;
335 if (($sess = gpcs_var('sess', $get, $post, $cookie)) === FALSE)
337 if (($name = gpcs_var('name', $get, $post, $cookie)) === FALSE)
339 if (($pass_private = gpcs_var('pass_private', $get, $post, $cookie)) === FALSE)
340 unset ($pass_private);
341 if (($table_idx = gpcs_var('table_idx', $get, $post, $cookie)) === FALSE)
343 if (($table_token = gpcs_var('table_idx', $get, $post, $cookie)) === FALSE)
344 unset ($table_token);
346 log_step("LOGIN: $name");
349 $_cookie_law_3party = 'true';
350 if (isset($cookie['_cookie_law_3party']))
351 $_cookie_law_3party = $cookie['_cookie_law_3party'];
353 $remote_addr = addrtoipv4($remote_addr_full);
363 if (isset($BRISK_SHOWHTML) == FALSE) {
365 log_main("lock Brisk");
369 if (($ghost_sess = $brisk->ghost_sess->pop($sess)) != FALSE) {
370 switch ($ghost_sess->reas) {
371 case GHOST_SESS_REAS_LOUT:
372 $last_msg = $mlang_room['reas_lout'][$G_lang];
374 case GHOST_SESS_REAS_ANOT:
375 $last_msg = $mlang_room['reas_anot'][$G_lang];
377 case GHOST_SESS_REAS_TOUT:
378 $last_msg = $mlang_room['reas_tout'][$G_lang];
380 case GHOST_SESS_REAS_TTOT:
381 $last_msg = $mlang_room['reas_ttot'][$G_lang];
383 case GHOST_SESS_REAS_ANON:
384 $last_msg = $mlang_room['reas_anon'][$G_lang];
386 case GHOST_SESS_REAS_PROX:
387 $last_msg = $mlang_room['reas_prox'][$G_lang];
390 $last_msg = $mlang_room['reas_unkn'][$G_lang];
394 if ($brisk->cloud_check($remote_addr)) {
395 // TODO: find a way to add a nonblocking sleep(5) here
397 $last_msg = $mlang_room['reas_cloud'][$G_lang];
401 if (validate_sess($sess)) {
402 log_main("pre garbage_manager UNO");
403 $brisk->garbage_manager(TRUE);
404 log_main("post garbage_manager");
405 if (($user = &$brisk->get_user($sess, &$idx)) != FALSE) {
406 if ($user->the_end == FALSE) {
407 $brisk->sess_cur_set($user->sess);
408 log_main("user stat: ".$user->stat);
409 if ($user->stat == "table") {
410 $cookies = new Cookies();
411 $cookies->add("table_token", $user->table_token, $curtime + 31536000);
412 $cookies->add("table_idx", $user->table, $curtime + 31536000);
413 $header_out['cookies'] = $cookies;
414 $header_out['Location'] = "briskin5/index.php";
421 if (!$banned && $ACTION == "login" && isset($name)) {
422 log_main("pre garbage_manager DUE");
424 if (isset($pass_private) == FALSE || $pass_private == "") {
425 $pass_private = FALSE;
427 if ($brisk->ban_check($remote_addr)) {
428 // TODO: find a way to add a nonblocking sleep(5) here
434 $brisk->garbage_manager(TRUE);
437 if ($banned == FALSE &&
438 ($user = $brisk->add_user(&$sess, &$idx, $name, $pass_private,
439 $remote_addr, $header, $cookie)) != FALSE) {
440 $brisk->sess_cur_set($user->sess);
447 log_legal($curtime, $remote_addr, $user, "STAT:LOGIN", '');
449 // recovery lost game
450 if ($user->stat == "table") {
451 $cookies = new Cookies();
452 $cookies->add("table_token", $user->table_token, $curtime + 31536000);
453 $cookies->add("table_idx", $user->table, $curtime + 31536000);
454 $header_out['cookies'] = $cookies;
455 $header_out['Location'] = "briskin5/index.php";
460 fprintf(STDERR, "POST CHECK QUI\n");
461 /* Login Rendering */
479 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpass'.$sfx][$G_lang].'</b></div>';
485 if ($BRISK_SHOWHTML == "debugtable") {
488 else if ($BRISK_SHOWHTML == "debuglogin") {
492 if ($ACTION == "room") {
493 $tables .= '<div class="room_tab">';
494 $tables .= '<table class="room_tab">';
495 for ($ii = 0 ; $ii < TABLES_N ; $ii++) {
496 if ($user->is_auth())
499 $i = TABLES_N - $ii - 1;
502 $tables .= '<tr id = "tr_noauth'.$ii.'">';
504 if (TRUE || !($user->flags & USER_FLAG_ISOLAUTH) || $ii < TABLES_AUTH_N) {
505 $tables .= '<td id = "td_noauth'.$ii.'">';
507 $tables .= '<div class="room_div"><div class="room_tit"><b>'.$mlang_room['tit_tabl'][$G_lang].$i.'</b></div>';
508 $tables .= sprintf('<div class="proxhr" id="table%d"></div>', $i);
509 $tables .= sprintf('<div class="table_act" id="table_act%d"></div>', $i);
511 $tables .= '</td>'."\n";
517 $tables .= '</table></div>';
519 $standup .= '<table class="room_standup"><tr><td><div class="room_standup_orig" id="room_standup_orig"></div>';
520 $standup .= '<div class="room_ex_standup">';
521 /* MLANG: "Giocatori in piedi" */
522 // $standup .= '<div id="room_tit"><span class="room_titin"><b>Giocatori in piedi</b> - <a target="_blank" href="weboftrust.php">Come ottenere user e password</a> - </span></div>';
523 $standup .= '<div id="room_tit"><span class="room_titin"><b>'.$mlang_room['standing'][$G_lang].'</b></span></div>';
525 $standup .= sprintf('<div id="standup" class="room_standup"></div>');
527 $standup .= '<div id="esco" class="esco"><input type="button" class="button" name="xreload" value="Reload." onclick="act_reloadroom();"><input class="button" name="logout" value="'.$mlang_room['btn_exit'][$G_lang].'" onclick="esco_cb();" type="button"></div>';
528 $standup .= '</div></td></tr></table>';
531 $altout_sponsor_arr = array( array ( 'id' => 'btn_altout',
532 'url' => 'http://www.alternativeoutput.it',
533 'content' => 'img/altout80x15.png',
534 'content_big' => 'img/logotxt_banner.png'),
535 array ( 'id' => 'btn_virtualsky',
536 'url' => 'http://virtualsky.alternativeoutput.it',
537 'content' => 'img/virtualsky80x15a.gif',
538 'content_big' => 'img/virtualsky_big.png'),
539 array ( 'id' => 'btn_dynamica',
540 'url' => 'http://www.dynamica.it',
541 'content' => 'img/dynamica.png',
542 'content_big' => 'img/dynamica_big.png')
545 $altout_support_arr = array( array ( 'id' => 'btn_brichi',
546 'url' => 'http://www.briscolachiamata.it',
547 'content' => 'img/brichi.png',
548 'content_big' => 'img/brichi_big.png'),
549 array ( 'id' => 'btn_foroli',
550 'url' => 'http://www.forumolimpia.it',
551 'content' => 'img/forumolimpia.gif',
552 'content_big' => 'img/forumolimpia_big.png' ),
553 array ( 'id'=> 'btn_niini',
554 'url' => 'http://www.niinivirta.it',
555 'content' => 'img/niinivirta.png',
556 'content_big' => 'img/niinivirta_big.png') );
560 $altout_support = "";
561 $altout_support_big = "";
562 for ($i = 0 ; $i < 4 ; $i++) {
563 $ii = ($i < 3 ? $i : 0);
565 $altout_support .= sprintf('<a style="position: absolute; top: %dpx; left: 7px;" target="_blank" href="%s"><img class="nobo" id="%s" src="%s" onMouseOver="show_bigpict(this, \'over\',100,10);" onMouseOut="show_bigpict(this, \'out\',0,0);"></a><br>'."\n",
566 $i * 20, $altout_support_arr[$ii]['url'],
567 $altout_support_arr[$ii]['id'], $altout_support_arr[$ii]['content']);
569 $altout_support_big .= sprintf('<img style="position: absolute;" class="nobohide" id="%s_big" src="%s">',
570 $altout_support_arr[$ii]['id'], $altout_support_arr[$ii]['content_big']);
574 // seed with microseconds since last "whole" second
575 // srand ((double) microtime() * 1000000);
576 // $randval = rand(0,count($altout_sponsor_arr)-1);
577 $altout_sponsor = "";
578 $altout_sponsor_big = "";
579 for ($i = 0 ; $i < 4 ; $i++) {
580 $ii = ($i < 3 ? $i : 0);
582 $altout_sponsor .= sprintf('<a style="position: absolute; top: %dpx; left: 7px;" target="_blank" href="%s"><img class="nobo" id="%s" src="%s" onMouseOver="show_bigpict(this, \'over\',100,10);" onMouseOut="show_bigpict(this, \'out\',0,0);"></a><br>'."\n",
583 $i * 20, $altout_sponsor_arr[$ii]['url'],
584 $altout_sponsor_arr[$ii]['id'], $altout_sponsor_arr[$ii]['content']);
586 $altout_sponsor_big .= sprintf('<img class="nobohide" id="%s_big" src="%s">',
587 $altout_sponsor_arr[$ii]['id'], $altout_sponsor_arr[$ii]['content_big']);
592 /* NOTE: Brisk donate or donate fake if local */
594 $brisk_donate = file_get_contents(FTOK_PATH."/brisk_donate.txt");
596 $brisk_donate = '<div style="background-color: #ff0; height: 27px; margin-top: 4px;">BRISK_DONATE</div>';
598 if ($brisk_donate == FALSE)
602 /* MLANG: "briscola chiamata in salsa ajax", */
604 mt_srand(make_seed());
605 if (!$G_is_local && $_cookie_law_3party == 'true') {
609 $banner_top_left = '<script type="text/javascript"><!--
610 google_ad_client = "pub-5246925322544303";
611 google_ad_width = 234;
612 google_ad_height = 60;
613 google_ad_format = "234x60_as";
614 google_ad_type = "text_image";
615 google_ad_channel = "";
616 google_color_border = "808080";
617 google_color_bg = "f6f6f6";
618 google_color_link = "ffae00";
619 google_color_text = "404040";
620 google_color_url = "000000";
623 <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';
624 $banner_top_right = carousel_top();
627 $banner_top_left = carousel_top();
628 $banner_top_right = '<script type="text/javascript"><!--
629 google_ad_client = "pub-5246925322544303";
630 google_ad_width = 234;
631 google_ad_height = 60;
632 google_ad_format = "234x60_as";
633 google_ad_type = "text_image";
634 google_ad_channel = "";
635 google_color_border = "808080";
636 google_color_bg = "f6f6f6";
637 google_color_link = "ffae00";
638 google_color_text = "404040";
639 google_color_url = "000000";
642 <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';
645 else { // !$G_is_local
646 $banner_top_left = carousel_top();
647 $banner_top_right = carousel_top();
650 $brisk_header_form = '<div class="container">
651 <!-- =========== header =========== -->
652 <div id="header" class="header">
653 <table width="100%%" border="0" cols="3"><tr>
654 <td align="left"><div style="padding-left: 8px;">'.$banner_top_left.'</div></td>
655 <td align="center">'.(($G_with_topbanner || $G_with_donors) ? '<table><tr><td>' : '').'<div style="text-align: center;">
656 <img class="nobo" src="img/brisk_logo64.png">
657 '.$mlang_room['headline'][$G_lang].'<br>
658 </div>'.( ($G_with_topbanner || $G_with_donors) ? sprintf('</td><td>%s</td></tr></table>',
659 ($G_with_topbanner ? $G_topbanner :
660 "<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>
661 <td align="right"><div style="padding-right: 8px;">
662 '.$banner_top_right.'</div></td>
666 /* MLANG: ALL THE VERTICAL MENU */
667 $brisk_vertical_menu = '
668 <!-- =========== vertical menu =========== -->
669 <div class="topmenu">
670 <!-- <a target="_blank" href="/briskhome.php"></a> -->
672 <div class="webstart_hilite">
673 <img class="nobo" style="cursor: pointer;" src="img/brisk_start.png" onmouseover="menu_hide(0,0); menu_show(\'menu_webstart\');">
674 <div class="webstart" id="menu_webstart" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
676 <a href="#" onmouseover="menu_hide(0,1);" title="'.$mlang_room['tit_help'][$G_lang].'" onclick="act_help();"
677 >'.$mlang_room['itm_help'][$G_lang].'</a><br>
679 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php"
680 onmouseover="menu_hide(0,1);"
681 title="'.$mlang_room['tit_hpage'][$G_lang].'">homepage</a><br>
683 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#cose"
684 onmouseover="menu_hide(0,1);"
685 title="'.$mlang_room['tit_what'][$G_lang].'">'.$mlang_room['itm_what'][$G_lang].'</a><br>
687 <a target="_blank" href="'.$mlang_room['url_rules'][$G_lang].'"
688 onmouseover="menu_hide(0,1);"
689 title="'.$mlang_room['tit_rules'][$G_lang].'">'.$mlang_room['itm_rules'][$G_lang].'</a><br>
691 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#shots"
692 onmouseover="menu_hide(0,1);"
693 title="'.$mlang_room['tit_shot'][$G_lang].'">screenshoots</a><br>
695 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#comp"
696 onmouseover="menu_hide(0,1);"
697 title="'.$mlang_room['tit_comp'][$G_lang].'">'.$mlang_room['itm_comp'][$G_lang].'</a><br>
699 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#sources"
700 onmouseover="menu_hide(0,1);"
701 title="'.$mlang_room['tit_src'][$G_lang].'">'.$mlang_room['itm_src'][$G_lang].'</a><br>
703 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#mailing"
704 onmouseover="menu_hide(0,1);"
705 title="'.$mlang_room['tit_ml'][$G_lang].'">'.$mlang_room['itm_ml'][$G_lang].'</a><br>
707 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#prop"
708 onmouseover="menu_hide(0,1);"
709 title="'.$mlang_room['tit_pro'][$G_lang].'">'.$mlang_room['itm_pro'][$G_lang].'</a><br>
711 onmouseover="menu_hide(0,1);"
712 title="credits" onclick="act_about();">about</a><br>
714 <a href="mailto:brisk@alternativeoutput.it"
715 onmouseover="menu_hide(0,1);"
716 title="'.$mlang_room['tit_mail'][$G_lang].'">'.$mlang_room['itm_mail'][$G_lang].'</a><br>
718 <a target="_blank" href="http://www.alternativeoutput.it/cookie.php"
719 onmouseover="menu_hide(0,1);"
720 title="'.$mlang_room['tit_cook'][$G_lang].'"
721 alt="'.$mlang_room['tit_cook'][$G_lang].'">'.$mlang_room['itm_cook'][$G_lang].'</a><br>
726 onmouseover="menu_hide(0,1);"
727 title="perché supportare brisk?" onclick="act_whysupport();">supportare?</a><br>
730 onmouseover="menu_hide(0,1);"
731 title="'.$mlang_room['tit_cla'][$G_lang].'" onclick="act_placing();">'.$mlang_room['itm_cla'][$G_lang].'</a><br>
733 <a target="_blank" href="briskin5/explain.php"
734 onmouseover="menu_hide(0,1);"
735 title="'.$mlang_room['tit_mnu'][$G_lang].'">'.$mlang_room['itm_mnu'][$G_lang].'</a><br>
738 onmouseover="menu_hide(0,1);"
739 title="'.$mlang_room['tit_rmap'][$G_lang].'" onclick="act_roadmap();">'.$mlang_room['itm_rmap'][$G_lang].'</a><br>
741 <a href="#" title="'.$mlang_room['tit_meet'][$G_lang].'"
742 onmouseover="menu_show(\'menu_meeting\');">'.$mlang_room['itm_meet'][$G_lang].'</a><br>
744 <div style="text-align: right;" id="menu_meeting" class="webstart">
745 <a href="http://it-it.facebook.com/event.php?eid=262482143080&index=1"
746 target="_blank" onmouseover="menu_hide(0,2);"
747 title="1° Torneo-Meeting di Lodi del 21/02/2010" ><img style="display: inline;" class="nobo" src="img/coppa16.png">Lodi 02/10</a><br>
749 <a href="http://it-it.facebook.com/event.php?eid=165523204539&index=1"
750 target="_blank" onmouseover="menu_hide(0,2);"
751 title="1° Torneo-Meeting di Parma del 22/11/2009" <img style="display: inline;" class="nobo" src="img/coppa16.png">Parma 11/09</a><br>
753 <a href="http://it-it.facebook.com/event.php?eid=105699129890&index=1"
754 target="_blank" onmouseover="menu_hide(0,2);"
755 title="BriskMeeting di Parma del 13/09/2009" >Parma 09/09</a><br>
757 <a href="http://it-it.facebook.com/event.php?eid=97829048656&index=1"
758 target="_blank" onmouseover="menu_hide(0,2);"
759 title="BriskMeeting di Clusane d\'Iseo del 5/07/2009" >Clusane 07/09</a><br>
761 <a href="http://it-it.facebook.com/event.php?eid=103366692570&index=1"
762 target="_blank" onmouseover="menu_hide(0,2);"
763 title="BriskMeeting Siciliano del 14/06/2009" >Catania 06/09</a><br>
765 <a href="http://it-it.facebook.com/event.php?eid=81488770852&index=1"
766 target="_blank" onmouseover="menu_hide(0,2);"
767 title="BriskMeeting di Piacenza del 19/04/2009" >Piacenza 04/09</a><br>
769 <a href="http://it-it.facebook.com/event.php?eid=51159131399&index=1"
770 target="_blank" onmouseover="menu_hide(0,2);"
771 title="BriskMeeting di Parma del 22/02/2009" >Parma 02/09</a><br>
773 <a href="http://www.anomalia.it/mop/photoo?album=brisk_pc0806"
774 target="_blank" onmouseover="menu_hide(0,2);"
775 title="Raduno di Piacenza del del 15/06/2008" >Piacenza 06/08</a><br>
777 <a href="http://www.anomalia.it/mop/photoo"
778 target="_blank" onmouseover="menu_hide(0,2);"
779 title="Torneo di Milano del 17/05/2008" >Milano 05/08</a><br>
782 </div>'. ($ACTION == "room" ? '<div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div><img class="nobo" style="cursor: pointer;" src="img/brisk_commands'.langtolng($G_lang).'.png" onmouseover="menu_hide(0,0); menu_show(\'menu_commands\');">
784 <div class="webstart" id="menu_commands" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
788 .$mlang_room['tit_stat'][$G_lang].
790 onmouseover="menu_hide(0,1); menu_show(\'menu_state\');">'
792 .$mlang_room['stat_desc'][$G_lang].
794 <div id="menu_state" class="webstart">
796 onmouseover="menu_hide(0,2);"
797 title="" onclick="act_chatt(\'/st normale\'); menu_over(-1,this);">'
799 .$mlang_room['st_norm_desc'][$G_lang].
803 onmouseover="menu_hide(0,2);"
804 title="" onclick="act_chatt(\'/st pausa\'); menu_over(-1,this);">'
806 .$mlang_room['st_paus_desc'][$G_lang].
807 ' <img class="unbo" src="img/st_pau.png"></a><br>
810 onmouseover="menu_hide(0,2);"
811 title="" onclick="act_chatt(\'/st fuori\'); menu_over(-1,this);">'
813 .$mlang_room['st_out_desc'][$G_lang].
814 ' <img class="unbo" src="img/st_out.png"></a><br>
817 onmouseover="menu_hide(0,2);"
818 title="" onclick="act_chatt(\'/st cane\'); menu_over(-1,this);">'
820 .$mlang_room['st_dog_desc'][$G_lang].
821 ' <img class="unbo" src="img/st_dog.png"></a><br>
824 onmouseover="menu_hide(0,2);"
825 title="" onclick="act_chatt(\'/st cibo\'); menu_over(-1,this);">'
827 .$mlang_room['st_food_desc'][$G_lang].
828 ' <img class="unbo" src="img/st_eat.png"></a><br>
831 onmouseover="menu_hide(0,2);"
832 title="" onclick="act_chatt(\'/st lavoro\'); menu_over(-1,this);">'
834 .$mlang_room['st_work_desc'][$G_lang].
835 ' <img class="unbo" src="img/st_wrk.png"></a><br>
838 onmouseover="menu_hide(0,2);"
839 title="" onclick="act_chatt(\'/st sigaretta\'); menu_over(-1,this);">'
841 .$mlang_room['st_smok_desc'][$G_lang].
842 ' <img class="unbo" src="img/st_smk.png"></a><br>
845 onmouseover="menu_hide(0,2);"
846 title="" onclick="act_chatt(\'/st presente\'); menu_over(-1,this);">'
848 .$mlang_room['st_pres_desc'][$G_lang].
849 ' <img class="unbo" src="img/st_eye.png"></a><br>
852 onmouseover="menu_hide(0,2);"
853 title="" onclick="act_chatt(\'/st coniglio\'); menu_over(-1,this);">'
855 .$mlang_room['st_rabb_desc'][$G_lang].
856 ' <img class="unbo" src="img/st_rabbit.png"></a><br>
859 onmouseover="menu_hide(0,2);"
860 title="" onclick="act_chatt(\'/st calcio\'); menu_over(-1,this);">'
862 .$mlang_room['st_socc_desc'][$G_lang].
863 ' <img class="unbo" src="img/st_soccer.png"></a><br>
866 onmouseover="menu_hide(0,2);"
867 title="" onclick="act_chatt(\'/st pupo\'); menu_over(-1,this);">'
869 .$mlang_room['st_baby_desc'][$G_lang].
870 ' <img class="unbo" src="img/st_baby.png"></a><br>
873 onmouseover="menu_hide(0,2);"
874 title="" onclick="act_chatt(\'/st pulizie\'); menu_over(-1,this);">'
876 .$mlang_room['st_mop_desc'][$G_lang].
877 ' <img class="unbo" src="img/st_mop.png"></a><br>
880 onmouseover="menu_hide(0,2);"
881 title="" onclick="act_chatt(\'/st babbo\'); menu_over(-1,this);">'
883 .$mlang_room['st_babbo_desc'][$G_lang].
884 ' <img class="unbo" src="img/st_babbo.png"></a><br>
887 onmouseover="menu_hide(0,2);"
888 title="" onclick="act_chatt(\'/st renna\'); menu_over(-1,this);">'
890 .$mlang_room['st_renna_desc'][$G_lang].
891 ' <img class="unbo" src="img/st_renna.png"></a><br>
894 onmouseover="menu_hide(0,2);"
895 title="" onclick="act_chatt(\'/st pupazzo\'); menu_over(-1,this);">'
897 .$mlang_room['st_pupaz_desc'][$G_lang].
898 ' <img class="unbo" src="img/st_pupaz.png"></a><br>
901 onmouseover="menu_hide(0,2);"
902 title="" onclick="act_chatt(\'/st vischio\'); menu_over(-1,this);">'
904 .$mlang_room['st_visch_desc'][$G_lang].
905 ' <img class="unbo" src="img/st_visch.png"></a><br>
909 <a href="#" title="avvia un ticker pubblicitario per il tuo tavolo"
910 onmouseover="menu_hide(0,1);" onclick="act_chatt(\'/tav \'+$(\'txt_in\').value); menu_over(-1,this);">ticker <img class="unbo" src="img/train.png"></a><br>
913 // MLANG garantisci per un tuo conoscente
914 .$mlang_room['warr_desc'][$G_lang].
916 onmouseover="menu_hide(0,1);" onclick="act_chatt(\'/authreq\'); menu_over(-1,this);">'
918 .$mlang_room['itm_warr'][$G_lang].
924 // MLANG garantisci per un tuo conoscente
925 .$mlang_room['splash_desc'][$G_lang].
927 onmouseover="menu_hide(0,1);" onclick="act_splash(); menu_over(-1,this);">'
929 .$mlang_room['tit_splash'][$G_lang].
931 '.($user->is_auth() ? '
933 // MLANG garantisci per un tuo conoscente
934 .$mlang_room['prefs_desc'][$G_lang].'"
935 onmouseover="menu_hide(0,1);" onclick="$(\'preferences\').style.visibility = \'visible\'; menu_over(-1,this);">'
937 .$mlang_room['tit_prefs'][$G_lang].'</a><br>' : '').'
939 </div>'.($G_with_poll ? '' : '<div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
940 <img style="cursor: pointer;" class="nobo" src="img/brisk_help'.langtolng($G_lang).'.png" title="'.$mlang_room['tit_help'][$G_lang].'" onmouseover="menu_hide(0,0);" onclick="act_help();">').'
941 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
942 '.($user->flags & USER_FLAG_AUTH ? '
943 <img style="cursor: pointer;" class="nobo" src="img/brisk_signal'.langtolng($G_lang).'.png" title="'.$mlang_room['tit_mesg'][$G_lang].'" onmouseover="menu_hide(0,0);" onclick="act_chatt(\'/mesgtoadm\');">'.poll_dom()
945 <img style="cursor: pointer;" class="nobo" src="img/brisk_password.png" title="Come ottenere una password su Brisk." onmouseover="menu_hide(0,0);" onclick="act_passwdhowto();">
951 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
953 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 4px; font-size: 1px;"></div>
954 <div id="spon_caro" style="overflow: hidden; height: 18px; /* border: 1px solid red; */ ">
955 <div style="/*background-color: green; */ text-align: left; position: relative; padding: 0px; margin: 0px; top: 0px; height: 80px;">'.$altout_sponsor.'<br>
957 <div style="position: absolute;">
958 '.$altout_sponsor_big.'
960 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
962 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 4px; font-size: 1px;"></div>
963 <div id="supp_caro" style="overflow: hidden; height: 18px; /* border: 1px solid red; */">
964 <div style="/* background-color: green; */ text-align: left; position: relative; padding: 0px; margin: 0px; top: 0px; height: 80px;">'.$altout_support.'<br>
968 <div style="position: absolute;">
969 '.$altout_support_big.'
971 <a style="/* position: absolute; top: 40px; left: 6px;" */ target="_blank" href="http://it-it.facebook.com/group.php?gid=59742820791"><img class="nobo" id="btn_facebook" src="img/facebook_btn.png" title="unisciti al gruppo \'quelli della brisk\'"></a>
972 ' . ( /* NOTE: here facebook or fake facebook */
973 (!$G_is_local && $_cookie_law_3party == 'true') ?
974 '<div class="fb-like" style="margin-top: 4px;" data-href="https://www.facebook.com/pages/Brisk-briscola-chiamata-in-salsa-ajax/716026558416911" data-share="false" data-send="true" data-width="70" data-show-faces="false" data-colorscheme="dark" layout="button_count"></div>
975 ' : '' ) . '<div id="proflashext" class="proflashext"><div id="proflash" class="proflash"></div></div>
976 <img id="stm_stat" class="nobo" style="margin-top: 4px;" src="img/line-status_b.png">
982 if ($ACTION == 'login') {
983 $header_out['Content-type'] = "text/html; charset=\"utf-8\"";
988 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
989 <link rel="shortcut icon" href="img/brisk_ico.png">
990 <script type="text/javascript" src="commons.js"></script>
991 <script type="text/javascript" src="prefs.js"></script>
992 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
993 <script type="text/javascript" src="menu.js"></script>
994 <script type="text/javascript" src="heartbit.js"></script>
995 <script type="text/javascript" src="xynt-streaming.js"></script>
996 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
997 <script type="text/javascript" src="AC_OETags.js"></script>
998 <script type="text/javascript" src="room.js"></script>
999 <script type="text/javascript" src="md5.js"></script>
1000 <script type="text/javascript" src="probrowser.js"></script>
1001 <script type="text/javascript" src="json2.js"></script>
1002 <script type="text/javascript" src="/cookie_law.js"></script>
1003 <link rel="stylesheet" type="text/css" href="/cookie_law.css">
1004 <link rel="stylesheet" type="text/css" href="brisk.css">
1005 <link rel="stylesheet" type="text/css" href="room.css">
1007 <script type="text/javascript"><!--
1009 var g_lang = "<? echo $G_lang; ?>";
1010 var g_lng = "<? echo $G_lng; ?>";
1011 var g_tables_n = <? echo TABLES_N; ?>;
1012 var g_tables_auth_n = <? echo TABLES_AUTH_N; ?>;
1013 var g_tables_cert_n = <? echo TABLES_CERT_N; ?>;
1014 var g_prefs, g_prefs_new = null;
1016 var g_withflash = false;
1020 var gst = new globst();
1021 var topbanner_sfx, topbanner_dx;
1023 var sess = "not_connected";
1024 var spo_slide, sup_slide;
1026 window.onload = function() {
1027 // alert(window.onbeforeunload);
1028 g_brow = get_browser_agent();
1030 g_prefs = new client_prefs(null);
1032 spo_slide = new sideslide($('spon_caro'), 80, 20);
1033 sup_slide = new sideslide($('supp_caro'), 80, 20);
1037 if ($G_with_topbanner) {
1038 printf(" topbanner_init();\n");
1040 sidebanners_init($G_sidebanner_idx);
1043 g_withflash = DetectFlashVer(6,0,0);
1044 if (g_withflash == false) {
1045 $("proflash").innerHTML = 'Audio con Flash.<br><a href="http://www.macromedia.com/"><img class="nobo" style="padding: 4px; width:73; height: 19;" src="img/download_now_flash.gif"></a>';
1048 $("proflashext").innerHTML = "";
1049 $("nameid").focus();
1055 if (!$G_is_local && $_cookie_law_3party == 'true') {
1057 <!-- if myconsole <body onunload="deconsole();"> -->
1058 <body xmlns:fb="http://ogp.me/ns/fb#">
1059 <div id="fb-root"></div>
1060 <script type="text/javascript"><!--
1061 (function(d, s, id) {
1062 var js, fjs = d.getElementsByTagName(s)[0];
1063 if (d.getElementById(id)) return;
1064 js = d.createElement(s); js.id = id;
1065 js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1";
1066 fjs.parentNode.insertBefore(js, fjs);
1067 }(document, 'script', 'facebook-jssdk'));</script>
1075 printf($brisk_header_form);
1076 printf("<table class=\"floaty\"><tr><td class=\"floatyleft\">\n");
1077 printf($brisk_vertical_menu, '', '');
1079 sidebanners_render($G_sidebanner, $G_sidebanner_idx);
1080 printf("</td><td>");
1083 <!-- =========== tables =========== -->
1086 /* MLANG: "Digita il tuo nickname per accedere ai tavoli della briscola.", "entra", "Se non hai ancora una password, lascia il campo in bianco ed entra." ,"(se usi firefox e qualcosa non funziona prova a ricaricare la pagina con Ctrl + F5)" */
1090 <div style="text-align: center;">
1092 <div class="bye_msg" id="bye_msg"><?php echo "$last_msg"; ?></div>
1094 <?php echo $mlang_room['welcome'][$G_lang];?>
1096 <form accept-charset="utf-8" method="post" action="" onsubmit="return j_login_manager(this);">
1097 <input id="passid_private" name="pass_private" type="hidden" value="">
1098 <table class="login">
1099 <tr><td>nickname:</td>
1100 <td><input id="nameid" class="input_text" name="name" type="text" size="24" maxlength="12" value=""></td></tr>
1101 <tr><td>password:</td>
1102 <td><input id="passid" class="input_text" name="pass" type="password" size="24" maxlength="64" value=""></td></tr>
1103 <tr><td colspan="2"><input id="sub" value="<?php echo $mlang_room['btn_enter'][$G_lang];?>" type="submit" class="button"></td></tr>
1107 <?php echo $mlang_room['passwarn'][$G_lang];?><br><br>
1109 <button onclick="$('apprentice_div').style.display = ($('apprentice_div').style.display == 'none' ? 'inline-block' : 'none');">Vuoi ottenere un accesso da apprendista ?</button><br><br>
1110 <div id="apprentice_div" style="display: none; background-color: #ffd780; border: 1px solid #ffae00; padding: 8px;">
1112 Inserisci il tuo nickname e il tuo indirizzo e-mail.<br>
1113 Il tuo nickname non può essere più lungo di 12 caratteri,<br>deve essere composto soltanto da lettere non accentate e numeri,<br>senza ripetere lo stesso carattere per più di 3 volte consecutive.<br><br>
1114 <form accept-charset="utf-8" method="post" action="" onsubmit="return j_new_apprentice(this);">
1115 <input type="hidden" name="realsub" value="666">
1116 <table class="login">
1117 <tr><td>nickname:</td>
1118 <td><input id="nameid" class="input_text" name="cli_name" type="text" size="24" maxlength="12" value=""></td></tr>
1119 <tr><td>e-mail:</td>
1120 <td><input id="emailid" class="input_text" name="cli_email" type="text" size="24" maxlength="512" value=""></td></tr>
1121 <tr><td colspan="2"><table style="margin: auto;"><tr><td><input id="send" onclick="submit_click(this);" value="<?php echo $mlang_room['btn_prefs_send'][$G_lang];?>" type="submit" class="button"></td>
1122 <td><input id="close" onclick="submit_click(this);" value="<?php echo $mlang_room['btn_prefs_close'][$G_lang];?>" type="submit" class="button"></td></tr></table></td></tr>
1126 <?php echo $mlang_room['browwarn'][$G_lang];?><br>
1129 <div id="imgct"></div>
1130 <div id="logz"></div>
1131 <div id="sandbox"></div>
1132 <div id="sandbox2"></div>
1133 <div id="response"></div>
1134 <div id="xhrstart"></div>
1136 <div id="xhrlog"></div>
1138 <div id="xhrdeltalog"></div>
1140 <script language="JavaScript">
1149 else if ($ACTION == 'room') {
1150 $header_out['Content-type'] = "text/html; charset=\"utf-8\"";
1154 <title>Brisk</title>
1155 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
1156 <link rel="shortcut icon" href="img/brisk_ico.png">
1157 <script type="text/javascript" src="commons.js"></script>
1158 <script type="text/javascript" src="prefs.js"></script>
1159 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
1160 <script type="text/javascript" src="menu.js"></script>
1161 <script type="text/javascript" src="ticker.js"></script>
1162 <script type="text/javascript" src="heartbit.js"></script>
1163 <script type="text/javascript" src="xynt-streaming.js"></script>
1164 <script type="text/javascript" src="room.js"></script>
1165 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
1166 <script type="text/javascript" src="AC_OETags.js"></script>
1167 <script type="text/javascript" src="probrowser.js"></script>
1168 <script type="text/javascript" src="json2.js"></script>
1169 <script type="text/javascript" src="/cookie_law.js"></script>
1170 <link rel="stylesheet" type="text/css" href="/cookie_law.css">
1171 <link rel="stylesheet" type="text/css" href="brisk.css">
1172 <link rel="stylesheet" type="text/css" href="room.css">
1173 <script type="text/javascript"><!--
1174 var sess = "not_connected";
1176 var g_lang = "<? echo $G_lang; ?>";
1177 var g_lng = "<? echo $G_lng; ?>";
1178 var g_tables_n = <? echo TABLES_N; ?>;
1179 var g_tables_auth_n = <? echo TABLES_AUTH_N; ?>;
1180 var g_tables_cert_n = <? echo TABLES_CERT_N; ?>;
1181 var g_prefs, g_prefs_new = null;
1184 var g_withflash = false;
1186 var g_imgtot = g_preload_img_arr.length;
1192 var gst = new globst();
1193 var topbanner_sfx, topbanner_dx;
1194 // var nonunload = false;
1195 var spo_slide, sup_slide;
1197 window.onload = function() {
1198 g_brow = get_browser_agent();
1200 g_prefs = new client_prefs(null);
1202 spo_slide = new sideslide($('spon_caro'), 80, 20);
1203 sup_slide = new sideslide($('supp_caro'), 80, 20);
1206 if ($BRISK_SHOWHTML == "debugtable") {
1208 room_checkspace(12, <?php echo TABLES_N; ?>, 50);
1213 // alert("INDEX START");
1216 if ($G_with_topbanner) {
1217 printf(" topbanner_init();\n");
1219 sidebanners_init($G_sidebanner_idx);
1221 sess = "<?php echo "$sess"; ?>";
1222 xstm = new xynt_streaming(window, "<?php echo "$transp_type"; ?>", 80, 2, null /* console */, gst, 'index_php', 'sess', sess, $('sandbox'), 'index_rd.php', function(com){eval(com);});
1223 xstm.hbit_set(heartbit);
1224 tra = new train($('room_tit'));
1225 window.onunload = onunload_cb;
1226 window.onbeforeunload = onbeforeunload_cb;
1227 g_withflash = DetectFlashVer(6,0,0);
1228 if (g_withflash == false) {
1229 $("proflash").innerHTML = 'Audio con Flash.<br><a href="http://www.macromedia.com/"><img class="nobo" style="padding: 4px; width:73; height: 19;" src="img/download_now_flash.gif"></a>';
1232 $("proflashext").innerHTML = "";
1234 // console.log("session from main: "+sess);
1236 // alert("ARR LENGTH "+g_preload_img_arr.length);
1237 // FIXME: preload image will be fired by stream instead here
1238 // setTimeout(preload_images, 0, g_preload_img_arr, g_imgct);
1239 $("txt_in").focus();
1242 /* MLANG: "<br>Il nickname che stai usando è già registrato,<br><br>se il suo proprietario si autentificherà<br><br>verrai rinominato d'ufficio come ghost<i>N</i>.", "torna ai tavoli" */
1243 echo show_notify($mlang_room['regwarn'][$G_lang], 0, $mlang_room['btn_rettabs'][$G_lang], 400, 150);
1252 if (!$G_is_local && $_cookie_law_3party == 'true') {
1254 <!-- if myconsole <body onunload="deconsole();"> -->
1255 <body xmlns:fb="http://ogp.me/ns/fb#">
1256 <div id="fb-root"></div>
1257 <script>(function(d, s, id) {
1258 var js, fjs = d.getElementsByTagName(s)[0];
1259 if (d.getElementById(id)) return;
1260 js = d.createElement(s); js.id = id;
1261 js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1";
1262 fjs.parentNode.insertBefore(js, fjs);
1263 }(document, 'script', 'facebook-jssdk'));</script>
1271 printf($brisk_header_form);
1272 printf("<table class=\"floaty\"><tr><td class=\"floatyleft\">\n");
1273 printf($brisk_vertical_menu, '', $brisk_donate);
1275 sidebanners_render($G_sidebanner, $G_sidebanner_idx);
1277 printf("</td><td>");
1279 <!-- =========== tables =========== -->
1280 <input name="sess" type="hidden" value="<?php echo "$user->sess"; ?>">
1281 <table class="macro"><tr><td>
1282 <?php echo "$tables";?>
1284 <?php echo "$standup";?>
1288 <!-- =========== bottom =========== -->
1289 <div id="bottom" class="bottom">
1290 <b>Chat</b> <span id="list_info" style="color: red;"></span><br>
1291 <div id="txt" class="chatt">
1293 <div style="text-align: center; ">
1294 <!-- MLANG: scrivi un invito al tavolo e clicca -->
1295 <table style="width: 98%; margin: auto;"><tr><td id="tickbut" class="tickbut"><img class="tickbut" src="img/train.png" onclick="act_tav();" title="<?php echo $mlang_room['tit_ticker'][$G_lang];?>"></td><td style="width:1%; text-align: center;">
1296 <div id="myname"></div>
1298 <input id="txt_in" maxlength="128" type="text" style="width: 100%;" onkeypress="chatt_checksend(this,event);">
1303 <div id="authbox" class="notify" style="text-align: center;">
1306 <!-- MLANG: Garantisci per un tuo conoscente: -->
1307 <?php echo $mlang_room['tit_warr'][$G_lang];?>
1311 <form id="auth_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_authbox(this);">
1312 <input type="hidden" name="realsub" value="666">
1313 <table class="login">
1314 <tr><td>nickname:</td>
1315 <td><input id="nameid" class="input_text" name="name" type="text" size="24" maxlength="12" value=""></td></tr>
1316 <tr><td>e-mail:</td>
1317 <td><input id="emailid" class="input_text" name="email" type="text" size="24" maxlength="1024" value=""></td></tr>
1318 <tr><td colspan="2" style="text-align: center;">
1319 <!-- MLANG: Garantisci per un tuo conoscente: -->
1320 <input id="subid" name="sub" value=
1321 "<?php echo $mlang_room['btn_prefs_send'][$G_lang]; ?>"
1322 type="submit" onclick="this.form.elements['realsub'].value = 'invia';" class="button">
1323 <!-- MLANG: Garantisci per un tuo conoscente: -->
1324 <input id="cloid" name="clo" value=
1325 "<?php echo $mlang_room['btn_prefs_close'][$G_lang]; ?>"
1326 type="submit" class="button" onclick="this.form.elements['realsub'].value = 'chiudi';"></td></tr>
1330 <div id="mesgtoadmbox" class="notify_opaque" style="text-align: center;">
1332 <!--MLANG: Invia un messaggio o una segnalazione all\'amministratore: -->
1333 <b><?php echo $mlang_room['mesgtoadm_tit'][$G_lang];?></b>
1335 <form id="mesgtoadm_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_mesgtoadmbox(this);">
1336 <input type="hidden" name="realsub" value="666">
1337 <table class="login">
1338 <!--MLANG: soggetto -->
1339 <tr><td><b><?php echo $mlang_room['mesgtoadm_sub'][$G_lang];?></b></td>
1340 <td><input id="subjid" class="input_text" name="subj" type="text" size="32" maxlength="255" value=""></td></tr></table>
1341 <table class="login">
1342 <tr><td><img title="messaggio" class="nobo" src="img/mesgtoadm_mesg<?php echo $G_lng;?>.png"></td>
1343 <td><textarea id="mesgid" class="input_text" name="mesg" cols="40" rows="8" wrap="soft"></textarea></td></tr>
1344 <tr><td colspan="2" style="text-align: center;">
1345 <input id="subid" name="sub" value="<?php echo $mlang_room['btn_prefs_send'][$G_lang];?>" type="submit" onclick="submit_click(this);" class="button">
1346 <input id="cloid" name="clo" value="<?php echo $mlang_room['btn_prefs_close'][$G_lang];?>" type="submit" class="button" onclick="submit_click(this);"></td></tr>
1350 <div id="heartbit"></div>
1351 <div id="sandbox"></div>
1352 <div id="imgct"></div>
1353 <div id="logz"></div>
1354 <div id="sandbox2"></div>
1355 <div id="response"></div>
1356 <div id="remark"></div>
1357 <div id="xhrstart"></div>
1358 <div id="xhrlog"></div>
1359 <div id="xhrdeltalog"></div>
1361 <div id="preferences" class="notify" style="z-index: 200; width: 600px; margin-left: -300px; height: 240px; top: 150px; visibility: hidden;">
1362 <div id="preferences_child" style="border-bottom: 1px solid gray; overflow: auto; height: 370px;">
1364 <h2><?php echo $mlang_room['tit_prefs'][$G_lang]; ?></h2>
1365 <table style="margin: auto;"><tr><td style="vertical-align: top;">
1369 <div style="float: left; padding: 8px;">
1370 <table style="border: 1px solid gray;"><tr><th style="background-color: #cccccc;">
1371 <?php echo $mlang_room['itm_list'][$G_lang];?>
1373 <tr><td><input style="vertical-align: bottom;" id="ra_listen_all" type="radio" name="listen" value="0" onclick="prefs_update('listen');" title="'
1374 <?php echo $mlang_room['listall_desc'][$G_lang];?>
1375 '"><span id="list_all">
1376 <?php echo $mlang_room['tit_listall'][$G_lang];?>
1378 <tr><td><input style="vertical-align: bottom;" id="ra_listen_auth" type="radio" name="listen" value="1" onclick="prefs_update('listen');" title="'
1379 <?php echo $mlang_room['listaut_desc'][$G_lang];?>
1380 '"><span id="list_auth">
1381 <?php echo $mlang_room['tit_listaut'][$G_lang];?>
1383 <tr><td><input style="vertical-align: bottom;" id="ra_listen_isol" type="radio" name="listen" value="2" onclick="prefs_update('listen');" title="'
1384 <?php echo $mlang_room['listisol_desc'][$G_lang];?>
1385 '"><span id="list_isol">
1386 <?php echo $mlang_room['tit_listisol'][$G_lang];?>
1391 if ($user->is_supp_custom()) {
1394 <td style="vertical-align: top;">
1398 <div style="float: left; padding: 8px;">
1399 <table style="border: 1px solid gray;"><tr><th colspan="4" style="background-color: #cccccc;">
1400 <?php echo $mlang_room['suppcomp_tit'][$G_lang];?>
1404 <?php echo $mlang_room['suppcomp_fg'][$G_lang];?>
1405 </th><td><input style="width: 3em;" id="s_fg_r" type="text" maxlength="3" size="3" name="s_fg_r"
1406 onchange="prefs_update('supp');" value="255"
1407 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1408 <span id="list_all"><?php echo $mlang_room['suppcomp_r'][$G_lang];?></span></td>
1409 <td><input style="width: 3em;" id="s_fg_g" type="text" maxlength="3" size="3" name="s_fg_g"
1410 onchange="prefs_update('supp');" value="255"
1411 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1412 <span id="list_all"><?php echo $mlang_room['suppcomp_g'][$G_lang];?></span></td>
1413 <td><input style="width: 3em;" id="s_fg_b" type="text" maxlength="3" size="3" name="s_fg_b"
1414 onchange="prefs_update('supp');" value="255"
1415 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1416 <span id="list_all"><?php echo $mlang_room['suppcomp_b'][$G_lang];?></span></td>
1420 <?php echo $mlang_room['suppcomp_bg'][$G_lang];?>
1422 <td><input style="width: 3em;" id="s_bg_r" type="text" maxlength="3" size="3" name="s_bg_r"
1423 onchange="prefs_update('supp');" value="255"
1424 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1425 <span id="list_all"><?php echo $mlang_room['suppcomp_r'][$G_lang];?></span></td>
1426 <td><input style="width: 3em;" id="s_bg_g" type="text" maxlength="3" size="3" name="s_bg_g"
1427 onchange="prefs_update('supp');" value="255"
1428 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1429 <span id="list_all"><?php echo $mlang_room['suppcomp_g'][$G_lang];?></span></td>
1430 <td><input style="width: 3em;" id="s_bg_b" type="text" maxlength="3" size="3" name="s_bg_b"
1431 onchange="prefs_update('supp');" value="255"
1432 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1433 <span id="list_all"><?php echo $mlang_room['suppcomp_b'][$G_lang];?></span></td>
1435 <tr><td colspan="4" style="text-align: center;">
1436 <img id="s_img" class="nobo" src="img/noimg.png">
1446 <input id="s_fg_r" type="hidden" name="s_fg_r">
1447 <input id="s_fg_g" type="hidden" name="s_fg_g">
1448 <input id="s_fg_b" type="hidden" name="s_fg_b">
1449 <input id="s_bg_r" type="hidden" name="s_bg_r">
1450 <input id="s_bg_g" type="hidden" name="s_bg_g">
1451 <input id="s_bg_b" type="hidden" name="s_bg_b">
1452 <input id="s_img" type="hidden" name="s_bg_b">
1457 <div style="width: 95%; /* background-color: red; */ margin: auto; text-align: left;">
1459 <!-- <input type="checkbox" name="pref_ring_endauct" id="pref_ring_endauct" onclick="pref_ring_endauct_set(this);"><?php /* echo $mlang_room['itm_ringauc'][$G_lang]; */ ?> -->
1462 <div class="notify_clo">
1463 <input type="submit" class="input_sub" style="bottom: 4px;" onclick="$('preferences').style.visibility = 'hidden';" value="<?php echo $mlang_room['btn_prefs_close'][$G_lang]; ?>"/>
1464 <input type="submit" class="input_sub" style="bottom: 4px;" onclick="prefs_reset();" value="<?php echo $mlang_room['btn_prefs_reset'][$G_lang]; ?>"/>
1465 <input type="submit" class="input_sub" style="bottom: 4px;" onclick="prefs_save();" value="<?php echo $mlang_room['btn_prefs_save'][$G_lang]; ?>"/>
1468 <script language="JavaScript">