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_save' => array('it' => 'Salva.',
76 'btn_reset' => array('it' => 'Annulla.',
78 'btn_close' => array('it' => 'Chiudi.',
80 'btn_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)
340 log_step("LOGIN: $name");
342 if (($pass_private = gpcs_var('pass_private', $get, $post, $cookie)) === FALSE)
343 unset ($pass_private);
344 if (($table_idx = gpcs_var('table_idx', $get, $post, $cookie)) === FALSE)
346 if (($table_token = gpcs_var('table_idx', $get, $post, $cookie)) === FALSE)
347 unset ($table_token);
350 $_cookie_law_3party = 'true';
351 if (isset($cookie['_cookie_law_3party']))
352 $_cookie_law_3party = $cookie['_cookie_law_3party'];
354 $remote_addr = addrtoipv4($remote_addr_full);
364 if (isset($BRISK_SHOWHTML) == FALSE) {
366 log_main("lock Brisk");
370 if (($ghost_sess = $brisk->ghost_sess->pop($sess)) != FALSE) {
371 switch ($ghost_sess->reas) {
372 case GHOST_SESS_REAS_LOUT:
373 $last_msg = $mlang_room['reas_lout'][$G_lang];
375 case GHOST_SESS_REAS_ANOT:
376 $last_msg = $mlang_room['reas_anot'][$G_lang];
378 case GHOST_SESS_REAS_TOUT:
379 $last_msg = $mlang_room['reas_tout'][$G_lang];
381 case GHOST_SESS_REAS_TTOT:
382 $last_msg = $mlang_room['reas_ttot'][$G_lang];
384 case GHOST_SESS_REAS_ANON:
385 $last_msg = $mlang_room['reas_anon'][$G_lang];
387 case GHOST_SESS_REAS_PROX:
388 $last_msg = $mlang_room['reas_prox'][$G_lang];
391 $last_msg = $mlang_room['reas_unkn'][$G_lang];
395 if ($brisk->cloud_check($remote_addr)) {
396 // TODO: find a way to add a nonblocking sleep(5) here
398 $last_msg = $mlang_room['reas_cloud'][$G_lang];
402 if (validate_sess($sess)) {
403 log_main("pre garbage_manager UNO");
404 $brisk->garbage_manager(TRUE);
405 log_main("post garbage_manager");
406 if (($user = &$brisk->get_user($sess, &$idx)) != FALSE) {
407 if ($user->the_end == FALSE) {
408 $brisk->sess_cur_set($user->sess);
409 log_main("user stat: ".$user->stat);
410 if ($user->stat == "table") {
411 $cookies = new Cookies();
412 $cookies->add("table_token", $user->table_token, $curtime + 31536000);
413 $cookies->add("table_idx", $user->table, $curtime + 31536000);
414 $header_out['cookies'] = $cookies;
415 $header_out['Location'] = "briskin5/index.php";
422 if (!$banned && $ACTION == "login" && isset($name)) {
423 log_main("pre garbage_manager DUE");
425 if (isset($pass_private) == FALSE || $pass_private == "") {
426 $pass_private = FALSE;
428 if ($brisk->ban_check($remote_addr)) {
429 // TODO: find a way to add a nonblocking sleep(5) here
435 $brisk->garbage_manager(TRUE);
438 if ($banned == FALSE &&
439 ($user = $brisk->add_user(&$sess, &$idx, $name, $pass_private,
440 $remote_addr, $header, $cookie)) != FALSE) {
441 $brisk->sess_cur_set($user->sess);
448 log_legal($curtime, $remote_addr, $user, "STAT:LOGIN", '');
450 // recovery lost game
451 if ($user->stat == "table") {
452 $cookies = new Cookies();
453 $cookies->add("table_token", $user->table_token, $curtime + 31536000);
454 $cookies->add("table_idx", $user->table, $curtime + 31536000);
455 $header_out['cookies'] = $cookies;
456 $header_out['Location'] = "briskin5/index.php";
461 fprintf(STDERR, "POST CHECK QUI\n");
462 /* Login Rendering */
480 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpass'.$sfx][$G_lang].'</b></div>';
486 if ($BRISK_SHOWHTML == "debugtable") {
489 else if ($BRISK_SHOWHTML == "debuglogin") {
493 if ($ACTION == "room") {
494 $tables .= '<div class="room_tab">';
495 $tables .= '<table class="room_tab">';
496 for ($ii = 0 ; $ii < TABLES_N ; $ii++) {
497 if ($user->is_auth())
500 $i = TABLES_N - $ii - 1;
503 $tables .= '<tr id = "tr_noauth'.$ii.'">';
505 if (TRUE || !($user->flags & USER_FLAG_ISOLAUTH) || $ii < TABLES_AUTH_N) {
506 $tables .= '<td id = "td_noauth'.$ii.'">';
508 $tables .= '<div class="room_div"><div class="room_tit"><b>'.$mlang_room['tit_tabl'][$G_lang].$i.'</b></div>';
509 $tables .= sprintf('<div class="proxhr" id="table%d"></div>', $i);
510 $tables .= sprintf('<div class="table_act" id="table_act%d"></div>', $i);
512 $tables .= '</td>'."\n";
518 $tables .= '</table></div>';
520 $standup .= '<table class="room_standup"><tr><td><div class="room_standup_orig" id="room_standup_orig"></div>';
521 $standup .= '<div class="room_ex_standup">';
522 /* MLANG: "Giocatori in piedi" */
523 // $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>';
524 $standup .= '<div id="room_tit"><span class="room_titin"><b>'.$mlang_room['standing'][$G_lang].'</b></span></div>';
526 $standup .= sprintf('<div id="standup" class="room_standup"></div>');
528 $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>';
529 $standup .= '</div></td></tr></table>';
532 $altout_sponsor_arr = array( array ( 'id' => 'btn_altout',
533 'url' => 'http://www.alternativeoutput.it',
534 'content' => 'img/altout80x15.png',
535 'content_big' => 'img/logotxt_banner.png'),
536 array ( 'id' => 'btn_virtualsky',
537 'url' => 'http://virtualsky.alternativeoutput.it',
538 'content' => 'img/virtualsky80x15a.gif',
539 'content_big' => 'img/virtualsky_big.png'),
540 array ( 'id' => 'btn_dynamica',
541 'url' => 'http://www.dynamica.it',
542 'content' => 'img/dynamica.png',
543 'content_big' => 'img/dynamica_big.png')
546 $altout_support_arr = array( array ( 'id' => 'btn_brichi',
547 'url' => 'http://www.briscolachiamata.it',
548 'content' => 'img/brichi.png',
549 'content_big' => 'img/brichi_big.png'),
550 array ( 'id' => 'btn_foroli',
551 'url' => 'http://www.forumolimpia.it',
552 'content' => 'img/forumolimpia.gif',
553 'content_big' => 'img/forumolimpia_big.png' ),
554 array ( 'id'=> 'btn_niini',
555 'url' => 'http://www.niinivirta.it',
556 'content' => 'img/niinivirta.png',
557 'content_big' => 'img/niinivirta_big.png') );
561 $altout_support = "";
562 $altout_support_big = "";
563 for ($i = 0 ; $i < 4 ; $i++) {
564 $ii = ($i < 3 ? $i : 0);
566 $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",
567 $i * 20, $altout_support_arr[$ii]['url'],
568 $altout_support_arr[$ii]['id'], $altout_support_arr[$ii]['content']);
570 $altout_support_big .= sprintf('<img style="position: absolute;" class="nobohide" id="%s_big" src="%s">',
571 $altout_support_arr[$ii]['id'], $altout_support_arr[$ii]['content_big']);
575 // seed with microseconds since last "whole" second
576 // srand ((double) microtime() * 1000000);
577 // $randval = rand(0,count($altout_sponsor_arr)-1);
578 $altout_sponsor = "";
579 $altout_sponsor_big = "";
580 for ($i = 0 ; $i < 4 ; $i++) {
581 $ii = ($i < 3 ? $i : 0);
583 $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",
584 $i * 20, $altout_sponsor_arr[$ii]['url'],
585 $altout_sponsor_arr[$ii]['id'], $altout_sponsor_arr[$ii]['content']);
587 $altout_sponsor_big .= sprintf('<img class="nobohide" id="%s_big" src="%s">',
588 $altout_sponsor_arr[$ii]['id'], $altout_sponsor_arr[$ii]['content_big']);
593 /* NOTE: Brisk donate or donate fake if local */
595 $brisk_donate = file_get_contents(FTOK_PATH."/brisk_donate.txt");
597 $brisk_donate = '<div style="background-color: #ff0; height: 27px; margin-top: 4px;">BRISK_DONATE</div>';
599 if ($brisk_donate == FALSE)
603 /* MLANG: "briscola chiamata in salsa ajax", */
605 mt_srand(make_seed());
606 if (!$G_is_local && $_cookie_law_3party == 'true') {
610 $banner_top_left = '<script type="text/javascript"><!--
611 google_ad_client = "pub-5246925322544303";
612 google_ad_width = 234;
613 google_ad_height = 60;
614 google_ad_format = "234x60_as";
615 google_ad_type = "text_image";
616 google_ad_channel = "";
617 google_color_border = "808080";
618 google_color_bg = "f6f6f6";
619 google_color_link = "ffae00";
620 google_color_text = "404040";
621 google_color_url = "000000";
624 <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';
625 $banner_top_right = carousel_top();
628 $banner_top_left = carousel_top();
629 $banner_top_right = '<script type="text/javascript"><!--
630 google_ad_client = "pub-5246925322544303";
631 google_ad_width = 234;
632 google_ad_height = 60;
633 google_ad_format = "234x60_as";
634 google_ad_type = "text_image";
635 google_ad_channel = "";
636 google_color_border = "808080";
637 google_color_bg = "f6f6f6";
638 google_color_link = "ffae00";
639 google_color_text = "404040";
640 google_color_url = "000000";
643 <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';
646 else { // !$G_is_local
647 $banner_top_left = carousel_top();
648 $banner_top_right = carousel_top();
651 $brisk_header_form = '<div class="container">
652 <!-- =========== header =========== -->
653 <div id="header" class="header">
654 <table width="100%%" border="0" cols="3"><tr>
655 <td align="left"><div style="padding-left: 8px;">'.$banner_top_left.'</div></td>
656 <td align="center">'.(($G_with_topbanner || $G_with_donors) ? '<table><tr><td>' : '').'<div style="text-align: center;">
657 <img class="nobo" src="img/brisk_logo64.png">
658 '.$mlang_room['headline'][$G_lang].'<br>
659 </div>'.( ($G_with_topbanner || $G_with_donors) ? sprintf('</td><td>%s</td></tr></table>',
660 ($G_with_topbanner ? $G_topbanner :
661 "<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>
662 <td align="right"><div style="padding-right: 8px;">
663 '.$banner_top_right.'</div></td>
667 /* MLANG: ALL THE VERTICAL MENU */
668 $brisk_vertical_menu = '
669 <!-- =========== vertical menu =========== -->
670 <div class="topmenu">
671 <!-- <a target="_blank" href="/briskhome.php"></a> -->
673 <div class="webstart_hilite">
674 <img class="nobo" style="cursor: pointer;" src="img/brisk_start.png" onmouseover="menu_hide(0,0); menu_show(\'menu_webstart\');">
675 <div class="webstart" id="menu_webstart" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
677 <a href="#" onmouseover="menu_hide(0,1);" title="'.$mlang_room['tit_help'][$G_lang].'" onclick="act_help();"
678 >'.$mlang_room['itm_help'][$G_lang].'</a><br>
680 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php"
681 onmouseover="menu_hide(0,1);"
682 title="'.$mlang_room['tit_hpage'][$G_lang].'">homepage</a><br>
684 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#cose"
685 onmouseover="menu_hide(0,1);"
686 title="'.$mlang_room['tit_what'][$G_lang].'">'.$mlang_room['itm_what'][$G_lang].'</a><br>
688 <a target="_blank" href="'.$mlang_room['url_rules'][$G_lang].'"
689 onmouseover="menu_hide(0,1);"
690 title="'.$mlang_room['tit_rules'][$G_lang].'">'.$mlang_room['itm_rules'][$G_lang].'</a><br>
692 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#shots"
693 onmouseover="menu_hide(0,1);"
694 title="'.$mlang_room['tit_shot'][$G_lang].'">screenshoots</a><br>
696 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#comp"
697 onmouseover="menu_hide(0,1);"
698 title="'.$mlang_room['tit_comp'][$G_lang].'">'.$mlang_room['itm_comp'][$G_lang].'</a><br>
700 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#sources"
701 onmouseover="menu_hide(0,1);"
702 title="'.$mlang_room['tit_src'][$G_lang].'">'.$mlang_room['itm_src'][$G_lang].'</a><br>
704 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#mailing"
705 onmouseover="menu_hide(0,1);"
706 title="'.$mlang_room['tit_ml'][$G_lang].'">'.$mlang_room['itm_ml'][$G_lang].'</a><br>
708 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#prop"
709 onmouseover="menu_hide(0,1);"
710 title="'.$mlang_room['tit_pro'][$G_lang].'">'.$mlang_room['itm_pro'][$G_lang].'</a><br>
712 onmouseover="menu_hide(0,1);"
713 title="credits" onclick="act_about();">about</a><br>
715 <a href="mailto:brisk@alternativeoutput.it"
716 onmouseover="menu_hide(0,1);"
717 title="'.$mlang_room['tit_mail'][$G_lang].'">'.$mlang_room['itm_mail'][$G_lang].'</a><br>
719 <a target="_blank" href="http://www.alternativeoutput.it/cookie.php"
720 onmouseover="menu_hide(0,1);"
721 title="'.$mlang_room['tit_cook'][$G_lang].'"
722 alt="'.$mlang_room['tit_cook'][$G_lang].'">'.$mlang_room['itm_cook'][$G_lang].'</a><br>
727 onmouseover="menu_hide(0,1);"
728 title="perché supportare brisk?" onclick="act_whysupport();">supportare?</a><br>
731 onmouseover="menu_hide(0,1);"
732 title="'.$mlang_room['tit_cla'][$G_lang].'" onclick="act_placing();">'.$mlang_room['itm_cla'][$G_lang].'</a><br>
734 <a target="_blank" href="briskin5/explain.php"
735 onmouseover="menu_hide(0,1);"
736 title="'.$mlang_room['tit_mnu'][$G_lang].'">'.$mlang_room['itm_mnu'][$G_lang].'</a><br>
739 onmouseover="menu_hide(0,1);"
740 title="'.$mlang_room['tit_rmap'][$G_lang].'" onclick="act_roadmap();">'.$mlang_room['itm_rmap'][$G_lang].'</a><br>
742 <a href="#" title="'.$mlang_room['tit_meet'][$G_lang].'"
743 onmouseover="menu_show(\'menu_meeting\');">'.$mlang_room['itm_meet'][$G_lang].'</a><br>
745 <div style="text-align: right;" id="menu_meeting" class="webstart">
746 <a href="http://it-it.facebook.com/event.php?eid=262482143080&index=1"
747 target="_blank" onmouseover="menu_hide(0,2);"
748 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>
750 <a href="http://it-it.facebook.com/event.php?eid=165523204539&index=1"
751 target="_blank" onmouseover="menu_hide(0,2);"
752 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>
754 <a href="http://it-it.facebook.com/event.php?eid=105699129890&index=1"
755 target="_blank" onmouseover="menu_hide(0,2);"
756 title="BriskMeeting di Parma del 13/09/2009" >Parma 09/09</a><br>
758 <a href="http://it-it.facebook.com/event.php?eid=97829048656&index=1"
759 target="_blank" onmouseover="menu_hide(0,2);"
760 title="BriskMeeting di Clusane d\'Iseo del 5/07/2009" >Clusane 07/09</a><br>
762 <a href="http://it-it.facebook.com/event.php?eid=103366692570&index=1"
763 target="_blank" onmouseover="menu_hide(0,2);"
764 title="BriskMeeting Siciliano del 14/06/2009" >Catania 06/09</a><br>
766 <a href="http://it-it.facebook.com/event.php?eid=81488770852&index=1"
767 target="_blank" onmouseover="menu_hide(0,2);"
768 title="BriskMeeting di Piacenza del 19/04/2009" >Piacenza 04/09</a><br>
770 <a href="http://it-it.facebook.com/event.php?eid=51159131399&index=1"
771 target="_blank" onmouseover="menu_hide(0,2);"
772 title="BriskMeeting di Parma del 22/02/2009" >Parma 02/09</a><br>
774 <a href="http://www.anomalia.it/mop/photoo?album=brisk_pc0806"
775 target="_blank" onmouseover="menu_hide(0,2);"
776 title="Raduno di Piacenza del del 15/06/2008" >Piacenza 06/08</a><br>
778 <a href="http://www.anomalia.it/mop/photoo"
779 target="_blank" onmouseover="menu_hide(0,2);"
780 title="Torneo di Milano del 17/05/2008" >Milano 05/08</a><br>
783 </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\');">
785 <div class="webstart" id="menu_commands" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
789 .$mlang_room['tit_stat'][$G_lang].
791 onmouseover="menu_hide(0,1); menu_show(\'menu_state\');">'
793 .$mlang_room['stat_desc'][$G_lang].
795 <div id="menu_state" class="webstart">
797 onmouseover="menu_hide(0,2);"
798 title="" onclick="act_chatt(\'/st normale\'); menu_over(-1,this);">'
800 .$mlang_room['st_norm_desc'][$G_lang].
804 onmouseover="menu_hide(0,2);"
805 title="" onclick="act_chatt(\'/st pausa\'); menu_over(-1,this);">'
807 .$mlang_room['st_paus_desc'][$G_lang].
808 ' <img class="unbo" src="img/st_pau.png"></a><br>
811 onmouseover="menu_hide(0,2);"
812 title="" onclick="act_chatt(\'/st fuori\'); menu_over(-1,this);">'
814 .$mlang_room['st_out_desc'][$G_lang].
815 ' <img class="unbo" src="img/st_out.png"></a><br>
818 onmouseover="menu_hide(0,2);"
819 title="" onclick="act_chatt(\'/st cane\'); menu_over(-1,this);">'
821 .$mlang_room['st_dog_desc'][$G_lang].
822 ' <img class="unbo" src="img/st_dog.png"></a><br>
825 onmouseover="menu_hide(0,2);"
826 title="" onclick="act_chatt(\'/st cibo\'); menu_over(-1,this);">'
828 .$mlang_room['st_food_desc'][$G_lang].
829 ' <img class="unbo" src="img/st_eat.png"></a><br>
832 onmouseover="menu_hide(0,2);"
833 title="" onclick="act_chatt(\'/st lavoro\'); menu_over(-1,this);">'
835 .$mlang_room['st_work_desc'][$G_lang].
836 ' <img class="unbo" src="img/st_wrk.png"></a><br>
839 onmouseover="menu_hide(0,2);"
840 title="" onclick="act_chatt(\'/st sigaretta\'); menu_over(-1,this);">'
842 .$mlang_room['st_smok_desc'][$G_lang].
843 ' <img class="unbo" src="img/st_smk.png"></a><br>
846 onmouseover="menu_hide(0,2);"
847 title="" onclick="act_chatt(\'/st presente\'); menu_over(-1,this);">'
849 .$mlang_room['st_pres_desc'][$G_lang].
850 ' <img class="unbo" src="img/st_eye.png"></a><br>
853 onmouseover="menu_hide(0,2);"
854 title="" onclick="act_chatt(\'/st coniglio\'); menu_over(-1,this);">'
856 .$mlang_room['st_rabb_desc'][$G_lang].
857 ' <img class="unbo" src="img/st_rabbit.png"></a><br>
860 onmouseover="menu_hide(0,2);"
861 title="" onclick="act_chatt(\'/st calcio\'); menu_over(-1,this);">'
863 .$mlang_room['st_socc_desc'][$G_lang].
864 ' <img class="unbo" src="img/st_soccer.png"></a><br>
867 onmouseover="menu_hide(0,2);"
868 title="" onclick="act_chatt(\'/st pupo\'); menu_over(-1,this);">'
870 .$mlang_room['st_baby_desc'][$G_lang].
871 ' <img class="unbo" src="img/st_baby.png"></a><br>
874 onmouseover="menu_hide(0,2);"
875 title="" onclick="act_chatt(\'/st pulizie\'); menu_over(-1,this);">'
877 .$mlang_room['st_mop_desc'][$G_lang].
878 ' <img class="unbo" src="img/st_mop.png"></a><br>
881 onmouseover="menu_hide(0,2);"
882 title="" onclick="act_chatt(\'/st babbo\'); menu_over(-1,this);">'
884 .$mlang_room['st_babbo_desc'][$G_lang].
885 ' <img class="unbo" src="img/st_babbo.png"></a><br>
888 onmouseover="menu_hide(0,2);"
889 title="" onclick="act_chatt(\'/st renna\'); menu_over(-1,this);">'
891 .$mlang_room['st_renna_desc'][$G_lang].
892 ' <img class="unbo" src="img/st_renna.png"></a><br>
895 onmouseover="menu_hide(0,2);"
896 title="" onclick="act_chatt(\'/st pupazzo\'); menu_over(-1,this);">'
898 .$mlang_room['st_pupaz_desc'][$G_lang].
899 ' <img class="unbo" src="img/st_pupaz.png"></a><br>
902 onmouseover="menu_hide(0,2);"
903 title="" onclick="act_chatt(\'/st vischio\'); menu_over(-1,this);">'
905 .$mlang_room['st_visch_desc'][$G_lang].
906 ' <img class="unbo" src="img/st_visch.png"></a><br>
910 <a href="#" title="avvia un ticker pubblicitario per il tuo tavolo"
911 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>
914 // MLANG garantisci per un tuo conoscente
915 .$mlang_room['warr_desc'][$G_lang].
917 onmouseover="menu_hide(0,1);" onclick="act_chatt(\'/authreq\'); menu_over(-1,this);">'
919 .$mlang_room['itm_warr'][$G_lang].
925 // MLANG garantisci per un tuo conoscente
926 .$mlang_room['splash_desc'][$G_lang].
928 onmouseover="menu_hide(0,1);" onclick="act_splash(); menu_over(-1,this);">'
930 .$mlang_room['tit_splash'][$G_lang].
932 '.($user->is_auth() ? '
934 // MLANG garantisci per un tuo conoscente
935 .$mlang_room['prefs_desc'][$G_lang].'"
936 onmouseover="menu_hide(0,1);" onclick="$(\'preferences\').style.visibility = \'visible\'; menu_over(-1,this);">'
938 .$mlang_room['tit_prefs'][$G_lang].'</a><br>' : '').'
940 </div>'.($G_with_poll ? '' : '<div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
941 <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();">').'
942 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
943 '.($user->flags & USER_FLAG_AUTH ? '
944 <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()
946 <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();">
952 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
954 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 4px; font-size: 1px;"></div>
955 <div id="spon_caro" style="overflow: hidden; height: 18px; /* border: 1px solid red; */ ">
956 <div style="/*background-color: green; */ text-align: left; position: relative; padding: 0px; margin: 0px; top: 0px; height: 80px;">'.$altout_sponsor.'<br>
958 <div style="position: absolute;">
959 '.$altout_sponsor_big.'
961 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
963 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 4px; font-size: 1px;"></div>
964 <div id="supp_caro" style="overflow: hidden; height: 18px; /* border: 1px solid red; */">
965 <div style="/* background-color: green; */ text-align: left; position: relative; padding: 0px; margin: 0px; top: 0px; height: 80px;">'.$altout_support.'<br>
969 <div style="position: absolute;">
970 '.$altout_support_big.'
972 <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>
973 ' . ( /* NOTE: here facebook or fake facebook */
974 (!$G_is_local && $_cookie_law_3party == 'true') ?
975 '<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>
976 ' : '' ) . '<div id="proflashext" class="proflashext"><div id="proflash" class="proflash"></div></div>
977 <img id="stm_stat" class="nobo" style="margin-top: 4px;" src="img/line-status_b.png">
983 if ($ACTION == 'login') {
984 $header_out['Content-type'] = "text/html; charset=\"utf-8\"";
989 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
990 <link rel="shortcut icon" href="img/brisk_ico.png">
991 <script type="text/javascript" src="commons.js"></script>
992 <script type="text/javascript" src="prefs.js"></script>
993 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
994 <script type="text/javascript" src="menu.js"></script>
995 <script type="text/javascript" src="heartbit.js"></script>
996 <script type="text/javascript" src="xynt-streaming.js"></script>
997 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
998 <script type="text/javascript" src="AC_OETags.js"></script>
999 <script type="text/javascript" src="room.js"></script>
1000 <script type="text/javascript" src="md5.js"></script>
1001 <script type="text/javascript" src="probrowser.js"></script>
1002 <script type="text/javascript" src="json2.js"></script>
1003 <script type="text/javascript" src="/cookie_law.js"></script>
1004 <link rel="stylesheet" type="text/css" href="/cookie_law.css">
1005 <link rel="stylesheet" type="text/css" href="brisk.css">
1006 <link rel="stylesheet" type="text/css" href="room.css">
1008 <script type="text/javascript"><!--
1010 var g_lang = "<? echo $G_lang; ?>";
1011 var g_lng = "<? echo $G_lng; ?>";
1012 var g_tables_n = <? echo TABLES_N; ?>;
1013 var g_tables_auth_n = <? echo TABLES_AUTH_N; ?>;
1014 var g_tables_cert_n = <? echo TABLES_CERT_N; ?>;
1015 var g_prefs, g_prefs_new = null;
1017 var g_withflash = false;
1021 var gst = new globst();
1022 var topbanner_sfx, topbanner_dx;
1024 var sess = "not_connected";
1025 var spo_slide, sup_slide;
1027 window.onload = function() {
1028 // alert(window.onbeforeunload);
1029 g_brow = get_browser_agent();
1031 g_prefs = new client_prefs(null);
1033 spo_slide = new sideslide($('spon_caro'), 80, 20);
1034 sup_slide = new sideslide($('supp_caro'), 80, 20);
1038 if ($G_with_topbanner) {
1039 printf(" topbanner_init();\n");
1041 sidebanners_init($G_sidebanner_idx);
1044 g_withflash = DetectFlashVer(6,0,0);
1045 if (g_withflash == false) {
1046 $("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>';
1049 $("proflashext").innerHTML = "";
1050 $("nameid").focus();
1056 if (!$G_is_local && $_cookie_law_3party == 'true') {
1058 <!-- if myconsole <body onunload="deconsole();"> -->
1059 <body xmlns:fb="http://ogp.me/ns/fb#">
1060 <div id="fb-root"></div>
1061 <script type="text/javascript"><!--
1062 (function(d, s, id) {
1063 var js, fjs = d.getElementsByTagName(s)[0];
1064 if (d.getElementById(id)) return;
1065 js = d.createElement(s); js.id = id;
1066 js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1";
1067 fjs.parentNode.insertBefore(js, fjs);
1068 }(document, 'script', 'facebook-jssdk'));</script>
1076 printf($brisk_header_form);
1077 printf("<table class=\"floaty\"><tr><td class=\"floatyleft\">\n");
1078 printf($brisk_vertical_menu, '', '');
1080 sidebanners_render($G_sidebanner, $G_sidebanner_idx);
1081 printf("</td><td>");
1084 <!-- =========== tables =========== -->
1087 /* 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)" */
1091 <div style="text-align: center;">
1093 <div class="bye_msg" id="bye_msg"><?php echo "$last_msg"; ?></div>
1095 <?php echo $mlang_room['welcome'][$G_lang];?>
1097 <form accept-charset="utf-8" method="post" action="" onsubmit="return j_login_manager(this);">
1098 <input id="passid_private" name="pass_private" type="hidden" value="">
1099 <table class="login">
1100 <tr><td>nickname:</td>
1101 <td><input id="nameid" class="input_text" name="name" type="text" size="24" maxlength="12" value=""></td></tr>
1102 <tr><td>password:</td>
1103 <td><input id="passid" class="input_text" name="pass" type="password" size="24" maxlength="64" value=""></td></tr>
1104 <tr><td colspan="2"><input id="sub" value="<?php echo $mlang_room['btn_enter'][$G_lang];?>" type="submit" class="button"></td></tr>
1108 <?php echo $mlang_room['passwarn'][$G_lang];?><br><br>
1110 <button onclick="$('apprentice_div').style.display = ($('apprentice_div').style.display == 'none' ? 'inline-block' : 'none');">Vuoi ottenere un accesso da apprendista ?</button><br><br>
1111 <div id="apprentice_div" style="display: none; background-color: #ffd780; border: 1px solid #ffae00; padding: 8px;">
1113 Inserisci il tuo nickname e il tuo indirizzo e-mail.<br>
1114 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>
1115 <form accept-charset="utf-8" method="post" action="" onsubmit="return j_new_apprentice(this);">
1116 <input type="hidden" name="realsub" value="666">
1117 <table class="login">
1118 <tr><td>nickname:</td>
1119 <td><input id="nameid" class="input_text" name="cli_name" type="text" size="24" maxlength="12" value=""></td></tr>
1120 <tr><td>e-mail:</td>
1121 <td><input id="emailid" class="input_text" name="cli_email" type="text" size="24" maxlength="512" value=""></td></tr>
1122 <tr><td colspan="2"><table style="margin: auto;"><tr><td><input id="send" onclick="submit_click(this);" value="<?php echo $mlang_room['btn_send'][$G_lang];?>" type="submit" class="button"></td>
1123 <td><input id="close" onclick="submit_click(this);" value="<?php echo $mlang_room['btn_close'][$G_lang];?>" type="submit" class="button"></td></tr></table></td></tr>
1127 <?php echo $mlang_room['browwarn'][$G_lang];?><br>
1130 <div id="imgct"></div>
1131 <div id="logz"></div>
1132 <div id="sandbox"></div>
1133 <div id="sandbox2"></div>
1134 <div id="response"></div>
1135 <div id="xhrstart"></div>
1137 <div id="xhrlog"></div>
1139 <div id="xhrdeltalog"></div>
1141 <script language="JavaScript">
1150 else if ($ACTION == 'room') {
1151 $header_out['Content-type'] = "text/html; charset=\"utf-8\"";
1155 <title>Brisk</title>
1156 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
1157 <link rel="shortcut icon" href="img/brisk_ico.png">
1158 <script type="text/javascript" src="commons.js"></script>
1159 <script type="text/javascript" src="prefs.js"></script>
1160 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
1161 <script type="text/javascript" src="menu.js"></script>
1162 <script type="text/javascript" src="ticker.js"></script>
1163 <script type="text/javascript" src="heartbit.js"></script>
1164 <script type="text/javascript" src="xynt-streaming.js"></script>
1165 <script type="text/javascript" src="room.js"></script>
1166 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
1167 <script type="text/javascript" src="AC_OETags.js"></script>
1168 <script type="text/javascript" src="probrowser.js"></script>
1169 <script type="text/javascript" src="json2.js"></script>
1170 <script type="text/javascript" src="/cookie_law.js"></script>
1171 <link rel="stylesheet" type="text/css" href="/cookie_law.css">
1172 <link rel="stylesheet" type="text/css" href="brisk.css">
1173 <link rel="stylesheet" type="text/css" href="room.css">
1174 <script type="text/javascript"><!--
1175 var sess = "not_connected";
1177 var g_lang = "<? echo $G_lang; ?>";
1178 var g_lng = "<? echo $G_lng; ?>";
1179 var g_tables_n = <? echo TABLES_N; ?>;
1180 var g_tables_auth_n = <? echo TABLES_AUTH_N; ?>;
1181 var g_tables_cert_n = <? echo TABLES_CERT_N; ?>;
1182 var g_prefs, g_prefs_new = null;
1185 var g_withflash = false;
1187 var g_imgtot = g_preload_img_arr.length;
1193 var gst = new globst();
1194 var topbanner_sfx, topbanner_dx;
1195 // var nonunload = false;
1196 var spo_slide, sup_slide;
1198 window.onload = function() {
1199 g_brow = get_browser_agent();
1201 g_prefs = new client_prefs(null);
1203 spo_slide = new sideslide($('spon_caro'), 80, 20);
1204 sup_slide = new sideslide($('supp_caro'), 80, 20);
1207 if ($BRISK_SHOWHTML == "debugtable") {
1209 room_checkspace(12, <?php echo TABLES_N; ?>, 50);
1214 // alert("INDEX START");
1217 if ($G_with_topbanner) {
1218 printf(" topbanner_init();\n");
1220 sidebanners_init($G_sidebanner_idx);
1222 sess = "<?php echo "$sess"; ?>";
1223 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);});
1224 xstm.hbit_set(heartbit);
1225 tra = new train($('room_tit'));
1226 window.onunload = onunload_cb;
1227 window.onbeforeunload = onbeforeunload_cb;
1228 g_withflash = DetectFlashVer(6,0,0);
1229 if (g_withflash == false) {
1230 $("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>';
1233 $("proflashext").innerHTML = "";
1235 // console.log("session from main: "+sess);
1237 // alert("ARR LENGTH "+g_preload_img_arr.length);
1238 // FIXME: preload image will be fired by stream instead here
1239 // setTimeout(preload_images, 0, g_preload_img_arr, g_imgct);
1240 $("txt_in").focus();
1243 /* 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" */
1244 echo show_notify($mlang_room['regwarn'][$G_lang], 0, $mlang_room['btn_rettabs'][$G_lang], 400, 150);
1253 if (!$G_is_local && $_cookie_law_3party == 'true') {
1255 <!-- if myconsole <body onunload="deconsole();"> -->
1256 <body xmlns:fb="http://ogp.me/ns/fb#">
1257 <div id="fb-root"></div>
1258 <script>(function(d, s, id) {
1259 var js, fjs = d.getElementsByTagName(s)[0];
1260 if (d.getElementById(id)) return;
1261 js = d.createElement(s); js.id = id;
1262 js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1";
1263 fjs.parentNode.insertBefore(js, fjs);
1264 }(document, 'script', 'facebook-jssdk'));</script>
1272 printf($brisk_header_form);
1273 printf("<table class=\"floaty\"><tr><td class=\"floatyleft\">\n");
1274 printf($brisk_vertical_menu, '', $brisk_donate);
1276 sidebanners_render($G_sidebanner, $G_sidebanner_idx);
1278 printf("</td><td>");
1280 <!-- =========== tables =========== -->
1281 <input name="sess" type="hidden" value="<?php echo "$user->sess"; ?>">
1282 <table class="macro"><tr><td>
1283 <?php echo "$tables";?>
1285 <?php echo "$standup";?>
1289 <!-- =========== bottom =========== -->
1290 <div id="bottom" class="bottom">
1291 <b>Chat</b> <span id="list_info" style="color: red;"></span><br>
1292 <div id="txt" class="chatt">
1294 <div style="text-align: center; ">
1295 <!-- MLANG: scrivi un invito al tavolo e clicca -->
1296 <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;">
1297 <div id="myname"></div>
1299 <input id="txt_in" maxlength="128" type="text" style="width: 100%;" onkeypress="chatt_checksend(this,event);">
1304 <div id="authbox" class="notify" style="text-align: center;">
1307 <!-- MLANG: Garantisci per un tuo conoscente: -->
1308 <?php echo $mlang_room['tit_warr'][$G_lang];?>
1312 <form id="auth_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_authbox(this);">
1313 <input type="hidden" name="realsub" value="666">
1314 <table class="login">
1315 <tr><td>nickname:</td>
1316 <td><input id="nameid" class="input_text" name="name" type="text" size="24" maxlength="12" value=""></td></tr>
1317 <tr><td>e-mail:</td>
1318 <td><input id="emailid" class="input_text" name="email" type="text" size="24" maxlength="1024" value=""></td></tr>
1319 <tr><td colspan="2" style="text-align: center;">
1320 <!-- MLANG: Garantisci per un tuo conoscente: -->
1321 <input id="subid" name="sub" value=
1322 "<?php echo $mlang_room['btn_send'][$G_lang]; ?>"
1323 type="submit" onclick="this.form.elements['realsub'].value = 'invia';" class="button">
1324 <!-- MLANG: Garantisci per un tuo conoscente: -->
1325 <input id="cloid" name="clo" value=
1326 "<?php echo $mlang_room['btn_close'][$G_lang]; ?>"
1327 type="submit" class="button" onclick="this.form.elements['realsub'].value = 'chiudi';"></td></tr>
1331 <div id="mesgtoadmbox" class="notify_opaque" style="text-align: center;">
1333 <!--MLANG: Invia un messaggio o una segnalazione all\'amministratore: -->
1334 <b><?php echo $mlang_room['mesgtoadm_tit'][$G_lang];?></b>
1336 <form id="mesgtoadm_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_mesgtoadmbox(this);">
1337 <input type="hidden" name="realsub" value="666">
1338 <table class="login">
1339 <!--MLANG: soggetto -->
1340 <tr><td><b><?php echo $mlang_room['mesgtoadm_sub'][$G_lang];?></b></td>
1341 <td><input id="subjid" class="input_text" name="subj" type="text" size="32" maxlength="255" value=""></td></tr></table>
1342 <table class="login">
1343 <tr><td><img title="messaggio" class="nobo" src="img/mesgtoadm_mesg<?php echo $G_lng;?>.png"></td>
1344 <td><textarea id="mesgid" class="input_text" name="mesg" cols="40" rows="8" wrap="soft"></textarea></td></tr>
1345 <tr><td colspan="2" style="text-align: center;">
1346 <input id="subid" name="sub" value="<?php echo $mlang_room['btn_send'][$G_lang];?>" type="submit" onclick="submit_click(this);" class="button">
1347 <input id="cloid" name="clo" value="<?php echo $mlang_room['btn_close'][$G_lang];?>" type="submit" class="button" onclick="submit_click(this);"></td></tr>
1351 <div id="heartbit"></div>
1352 <div id="sandbox"></div>
1353 <div id="imgct"></div>
1354 <div id="logz"></div>
1355 <div id="sandbox2"></div>
1356 <div id="response"></div>
1357 <div id="remark"></div>
1358 <div id="xhrstart"></div>
1359 <div id="xhrlog"></div>
1360 <div id="xhrdeltalog"></div>
1362 <div id="preferences" class="notify" style="z-index: 200; width: 600px; margin-left: -300px; height: 240px; top: 150px; visibility: hidden;">
1363 <div id="preferences_child" style="border-bottom: 1px solid gray; overflow: auto; height: 370px;">
1365 <h2><?php echo $mlang_room['tit_prefs'][$G_lang]; ?></h2>
1366 <table style="margin: auto;"><tr><td style="vertical-align: top;">
1370 <div style="float: left; padding: 8px;">
1371 <table style="border: 1px solid gray;"><tr><th style="background-color: #cccccc;">
1372 <?php echo $mlang_room['itm_list'][$G_lang];?>
1374 <tr><td><input style="vertical-align: bottom;" id="ra_listen_all" type="radio" name="listen" value="0" onclick="prefs_update('listen');" title="'
1375 <?php echo $mlang_room['listall_desc'][$G_lang];?>
1376 '"><span id="list_all">
1377 <?php echo $mlang_room['tit_listall'][$G_lang];?>
1379 <tr><td><input style="vertical-align: bottom;" id="ra_listen_auth" type="radio" name="listen" value="1" onclick="prefs_update('listen');" title="'
1380 <?php echo $mlang_room['listaut_desc'][$G_lang];?>
1381 '"><span id="list_auth">
1382 <?php echo $mlang_room['tit_listaut'][$G_lang];?>
1384 <tr><td><input style="vertical-align: bottom;" id="ra_listen_isol" type="radio" name="listen" value="2" onclick="prefs_update('listen');" title="'
1385 <?php echo $mlang_room['listisol_desc'][$G_lang];?>
1386 '"><span id="list_isol">
1387 <?php echo $mlang_room['tit_listisol'][$G_lang];?>
1392 if ($user->is_supp_custom()) {
1395 <td style="vertical-align: top;">
1399 <div style="float: left; padding: 8px;">
1400 <table style="border: 1px solid gray;"><tr><th colspan="4" style="background-color: #cccccc;">
1401 <?php echo $mlang_room['suppcomp_tit'][$G_lang];?>
1405 <?php echo $mlang_room['suppcomp_fg'][$G_lang];?>
1406 </th><td><input style="width: 3em;" id="s_fg_r" type="text" maxlength="3" size="3" name="s_fg_r"
1407 onchange="prefs_update('supp');" value="255"
1408 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1409 <span id="list_all"><?php echo $mlang_room['suppcomp_r'][$G_lang];?></span></td>
1410 <td><input style="width: 3em;" id="s_fg_g" type="text" maxlength="3" size="3" name="s_fg_g"
1411 onchange="prefs_update('supp');" value="255"
1412 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1413 <span id="list_all"><?php echo $mlang_room['suppcomp_g'][$G_lang];?></span></td>
1414 <td><input style="width: 3em;" id="s_fg_b" type="text" maxlength="3" size="3" name="s_fg_b"
1415 onchange="prefs_update('supp');" value="255"
1416 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1417 <span id="list_all"><?php echo $mlang_room['suppcomp_b'][$G_lang];?></span></td>
1421 <?php echo $mlang_room['suppcomp_bg'][$G_lang];?>
1423 <td><input style="width: 3em;" id="s_bg_r" type="text" maxlength="3" size="3" name="s_bg_r"
1424 onchange="prefs_update('supp');" value="255"
1425 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1426 <span id="list_all"><?php echo $mlang_room['suppcomp_r'][$G_lang];?></span></td>
1427 <td><input style="width: 3em;" id="s_bg_g" type="text" maxlength="3" size="3" name="s_bg_g"
1428 onchange="prefs_update('supp');" value="255"
1429 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1430 <span id="list_all"><?php echo $mlang_room['suppcomp_g'][$G_lang];?></span></td>
1431 <td><input style="width: 3em;" id="s_bg_b" type="text" maxlength="3" size="3" name="s_bg_b"
1432 onchange="prefs_update('supp');" value="255"
1433 title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
1434 <span id="list_all"><?php echo $mlang_room['suppcomp_b'][$G_lang];?></span></td>
1436 <tr><td colspan="4" style="text-align: center;">
1437 <img id="s_img" class="nobo" src="img/noimg.png">
1447 <input id="s_fg_r" type="hidden" name="s_fg_r">
1448 <input id="s_fg_g" type="hidden" name="s_fg_g">
1449 <input id="s_fg_b" type="hidden" name="s_fg_b">
1450 <input id="s_bg_r" type="hidden" name="s_bg_r">
1451 <input id="s_bg_g" type="hidden" name="s_bg_g">
1452 <input id="s_bg_b" type="hidden" name="s_bg_b">
1453 <input id="s_img" type="hidden" name="s_bg_b">
1458 <div style="width: 95%; /* background-color: red; */ margin: auto; text-align: left;">
1460 <!-- <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]; */ ?> -->
1463 <div class="notify_clo">
1464 <input type="submit" class="input_sub" style="bottom: 4px;" onclick="$('preferences').style.visibility = 'hidden';" value="<?php echo $mlang_room['btn_close'][$G_lang]; ?>"/>
1465 <input type="submit" class="input_sub" style="bottom: 4px;" onclick="prefs_reset();" value="<?php echo $mlang_room['btn_reset'][$G_lang]; ?>"/>
1466 <input type="submit" class="input_sub" style="bottom: 4px;" onclick="prefs_save();" value="<?php echo $mlang_room['btn_save'][$G_lang]; ?>"/>
1469 <script language="JavaScript">