5 * Copyright (C) 2006-2009 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.
27 require_once("Obj/brisk.phh");
28 require_once("Obj/auth.phh");
29 require_once("Obj/proxyscan.phh");
32 $mlang_room = array( 'userpasserr' => array('it' => 'Utente e/o password errati.',
33 'en' => 'Wrong user and/or password.'),
34 'userpassmust' => array('it' => 'Il nickname deve contenere almeno una lettera o una cifra.',
35 'en' => 'The nickname have to contain at least one letter or one number.'),
36 'userpassend' => array('it' => 'Spiacenti, non ci sono più posti liberi. Riprova più tardi.',
37 'en' => 'We are sorry, there aren\'t free place. Try again later.'),
38 'userpassuse' => array('it' => 'Il tuo nickname è già in uso.',
39 'en' => 'Your nickname is already in use.'),
40 'standing' => array('it' => 'Giocatori in piedi',
41 'en' => 'Standing players'),
42 'headline' => array('it' => 'briscola chiamata in salsa ajax',
43 'en' => 'declaration briscola in ajax sauce <b>(Beta)</b>'),
44 'wellcome' => array('it' => 'Digita il tuo nickname per accedere ai tavoli della briscola',
45 'en' => 'Enter your nickname to access to the tables of briscola'),
46 'btn_enter' => array('it' => 'entra',
48 'passwarn' => array('it' => 'Se non hai ancora una password, lascia il campo in bianco ed entra.',
49 'en' => 'If you don\'t have a password, leave blank the field and enter.'),
50 'browwarn' => array('it' => '(se qualcosa non funziona<br>prova a ricaricare la pagina con <b>Ctrl + F5</b>)',
51 'en' => '(if something don\'t work<br>try to reload the current page with <b>Ctrl + F5</b>)'),
52 '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>.',
53 '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>.'),
54 'btn_rettabs' => array('it' => 'torna ai tavoli',
55 'en' => 'back to tables'),
56 'btn_exit' => array('it' => 'Esco.',
58 'tit_tabl' => array('it' => 'Tavolo ',
60 'tit_stat' => array('it' => 'imposta lo stato del tuo utente',
61 'en' => 'set the status of the user'),
62 'stat_desc' => array('it' => 'stato',
64 'st_norm_desc' => array('it' => 'normale',
66 'st_paus_desc' => array('it' => 'pausa',
68 'st_out_desc' => array('it' => 'fuori',
70 'st_dog_desc' => array('it' => 'cane',
72 'st_food_desc' => array('it' => 'cibo',
74 'st_work_desc' => array('it' => 'lavoro',
76 'st_smok_desc' => array('it' => 'sigaretta',
78 'st_pres_desc' => array('it' => 'presente',
80 'st_rabb_desc' => array('it' => 'coniglio',
83 'tit_ticker' => array('it' => 'scrivi un invito al tavolo e clicca',
84 'en' => 'write an invitation at the table and click'),
85 'itm_warr' => array('it' => 'garantisci',
87 'warr_desc' => array('it' => 'garantisci per un tuo conoscente',
88 'en' => 'guarantee for a friend'),
89 'tit_warr' => array('it' => 'Garantisci per un tuo conoscente.',
90 'en' => 'Guarantee for a friend.'),
91 'itm_list' => array('it' => 'ascolta',
93 'list_desc' => array('it' => 'imposta le regole di ascolto',
94 'en' => 'set the listen rules'),
95 'tit_listall' => array('it' => 'tutti',
97 'listall_desc' => array('it' => 'leggi tutti i messaggi di tutti gli utenti collegati',
98 'en' => 'listen all messages from each user connected'),
99 'tit_listaut' => array('it' => 'solo autenticati',
100 'en' => 'only authorized'),
101 'tit_listisol' => array('it' => 'isolamento',
102 'en' => 'isolation'),
103 'listaut_desc' => array('it' => 'leggi soltanto i messaggi degli utenti con password',
104 'en' => 'listen messages only from authenticated users'),
105 'listisol_desc'=> array('it' => 'visualizza Brisk come se fosse solo per utenti con password',
106 'en' => 'show Brisk like an authenticated user only site'),
107 'tit_splash' => array('it' => 'splash',
109 'splash_desc' => array('it' => 'attiva la finestra di splash',
110 'en' => 'show the splash window'),
111 'tit_help' => array('it' => 'informazioni utili su Brisk',
112 'en' => 'usefull information about Brisk'),
113 'itm_help' => array('it' => 'aiuto',
115 'tit_hpage' => array('it' => 'homepage del progetto',
116 'en' => 'project homepage (ita)'),
117 'tit_what' => array('it' => 'di cosa si tratta',
118 'en' => 'what is the project'),
119 'itm_what' => array('it' => 'cos\'è',
120 'en' => 'what is it'),
121 'url_rules' => array('it' => 'http://it.wikipedia.org/wiki/Briscola#Gioco_a_5',
122 'en' => 'http://it.wikipedia.org/wiki/Briscola#Gioco_a_5&EN=true'),
123 'itm_rules' => array('it' => 'regole',
125 'tit_rules' => array('it' => 'come si gioca',
126 'en' => 'how to play'),
127 'tit_shot' => array('it' => 'screenshots dell\'applicazione',
128 'en' => 'screenshots of the web-application'),
129 'tit_comp' => array('it' => 'compatibilità con i browser',
130 'en' => 'browsers compatibility'),
131 'itm_comp' => array('it' => 'compatibilità',
132 'en' => 'compatibility'),
133 'tit_src' => array('it' => 'sorgenti dell\'applicazione web',
134 'en' => 'sources of the web-application'),
135 'itm_src' => array('it' => 'sorgenti',
137 'tit_ml' => array('it' => 'come iscriversi alla mailing list',
138 'en' => 'how to subscribe the mailing list'),
139 'itm_ml' => array('it' => 'mailing list',
140 'en' => 'mailing list'),
141 'tit_pro' => array('it' => 'come fare pubblicità a Brisk!',
142 'en' => 'how to spread Brisk!'),
143 'itm_pro' => array('it' => 'propaganda',
144 'en' => 'propaganda'),
145 'tit_mail' => array('it' => 'contatti',
147 'itm_mail' => array('it' => 'contatti',
149 'tit_cla' => array('it' => 'classifiche degli utenti',
150 'en' => 'user\'s placings'),
151 'itm_cla' => array('it' => 'classifiche',
153 'tit_rmap' => array('it' => 'prossime funzionalità implementate',
154 'en' => 'roadmap of next functionalities'),
155 'itm_rmap' => array('it' => 'roadmap',
157 'tit_meet' => array('it' => 'foto dei raduni di briskisti',
158 'en' => 'photos of brisk meetings'),
159 'itm_meet' => array('it' => 'raduni',
161 'tit_mesg' => array('it' => 'manda un messaggio o una segnalazione all\'amministratore del sito',
162 'en' => 'send a message or a signalling to the administrator' ),
163 'mesgtoadm_tit'=> array('it' => 'Invia un messaggio o una segnalazione all\'amministratore:',
164 'en' => 'Send a message to the administrator:'),
165 'mesgtoadm_sub'=> array('it' => 'soggetto:',
167 'btn_send' => array('it' => 'Invia.',
169 'btn_close' => array('it' => 'Chiudi.',
173 // Use of proxies isn't allowed.
174 if (!$G_is_local && is_proxy())
177 require_once("briskin5/Obj/briskin5.phh");
178 if (DEBUGGING == "local" && $_SERVER['REMOTE_ADDR'] != '127.0.0.1') {
179 echo "Debugging time!";
183 log_load("index.php");
186 function poll_dom() {
187 GLOBAL $G_with_poll, $G_poll_title, $G_poll_entries;
190 $ret = sprintf('<div style="padding: 0px;margin: 0px; height: 8px; font-size: 1px;"></div>
192 <img class="nobo" src="img/brisk_poll.png" onmouseover="menu_hide(0,0); menu_show(\'menu_poll\');">
194 <div style="width: 300px;" class="webstart" id="menu_poll" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
196 <form id="poll_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_pollbox(this);">
197 <input type="hidden" name="realsub" value="666">', $G_poll_title);
198 for ($i = 0 ; $i < count($G_poll_entries) ; $i++) {
199 $ret .= sprintf('<INPUT TYPE="radio" NAME="category" VALUE="%s">%s<hr><br>', $G_poll_entries[$i]['id'],
200 $G_poll_entries[$i]['cont']);
202 $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>
212 GLOBAL $G_with_donors, $G_donors_cur, $G_donors_all;
213 GLOBAL $G_with_topbanner, $G_topbanner, $G_is_local;
214 GLOBAL $G_with_sidebanner, $G_sidebanner;
215 GLOBAL $G_with_sidebanner2, $G_sidebanner2;
217 GLOBAL $sess, $name, $pass_private, $table_idx, $table_token, $BRISK_SHOWHTML, $BRISK_DEBUG, $_SERVER;
218 GLOBAL $G_lang, $G_lng, $mlang_room;
225 if (isset($BRISK_SHOWHTML) == FALSE) {
227 $sem = Room::lock_data();
228 log_main("lock Room");
229 $room = &Room::load_data();
234 if (validate_sess($sess)) {
235 log_main("pre garbage_manager UNO");
236 $room->garbage_manager(TRUE);
237 log_main("post garbage_manager");
238 if (($user = &$room->get_user($sess, &$idx)) != FALSE) {
239 log_main("user stat: ".$user->stat);
240 if ($user->stat == "table") {
241 if (Room::save_data(&$room) == FALSE) {
242 echo "ERRORE SALVATAGGIO\n";
245 log_main("unlock Room");
246 Room::unlock_data($sem);
247 setcookie("table_token", $user->table_token, $curtime + 31536000);
248 setcookie("table_idx", $user->table, $curtime + 31536000);
249 header ("Location: briskin5/index.php");
255 if (Room::save_data(&$room) == FALSE) {
256 echo "ERRORE SALVATAGGIO\n";
261 if ($ACTION == "login" && isset($name)) {
263 log_main("pre garbage_manager DUE");
265 if (isset($pass_private) == FALSE) {
266 $pass_private = FALSE;
269 $room->garbage_manager(TRUE);
271 if (($user = &$room->add_user(&$sess, &$idx, $name, $pass_private, $_SERVER['REMOTE_ADDR'])) != FALSE) {
278 log_legal($curtime, $user, "STAT:LOGIN", '');
280 // recovery lost game
281 if ($user->stat == "table") {
282 if (Room::save_data(&$room) == FALSE) {
283 echo "ERRORE SALVATAGGIO\n";
286 log_main("unlock Room");
287 Room::unlock_data($sem);
288 setcookie("table_token", $user->table_token, $curtime + 31536000);
289 setcookie("table_idx", $user->table, $curtime + 31536000);
290 header ("Location: briskin5/index.php");
295 // setcookie ("sess", "", time() + 180);
296 $room->standup_update(&$user);
298 if (Room::save_data(&$room) == FALSE) {
299 echo "ERRORE SALVATAGGIO\n";
304 /* Login Rendering */
305 /* MLANG: "Utente e/o password errati.", "Il nickname deve contenere almeno una lettera o una cifra.", "Spiacenti, non ci sono più posti liberi. Riprova più tardi.", "Il tuo nickname è già in uso." */
308 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpasserr'][$G_lang].'</b></div>';
310 // $body .= '<div class="urgmsg"><b>Il nickname deve contenere almeno una lettera o una cifra.</b></div>';
311 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpassmust'][$G_lang].'</b></div>';
313 // $body .= '<div class="urgmsg"><b>Spiacenti, non ci sono più posti liberi. Riprova più tardi.</b></div>';
314 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpassend'][$G_lang].'</b></div>';
316 // $body .= '<div class="urgmsg"><b>Il tuo nickname è già in uso.</b></div>';
317 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpassuse'][$G_lang].'</b></div>';
329 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpass'.$sfx][$G_lang].'</b></div>';
332 Room::unlock_data($sem);
336 if ($BRISK_SHOWHTML == "debugtable") {
339 else if ($BRISK_SHOWHTML == "debuglogin") {
343 if ($ACTION == "room") {
344 $tables .= '<div class="room_tab">';
345 $tables .= '<table class="room_tab">';
346 for ($ii = 0 ; $ii < TABLES_N ; $ii++) {
347 if ($user->flags & USER_FLAG_AUTH)
350 $i = TABLES_N - $ii - 1;
353 $tables .= '<tr id = "tr_noauth'.$ii.'">';
355 if (TRUE || !($user->flags & USER_FLAG_ISOLAUTH) || $ii < TABLES_AUTH_N) {
356 $tables .= '<td id = "td_noauth'.$ii.'">';
358 $tables .= '<div class="room_div"><div class="room_tit"><b>'.$mlang_room['tit_tabl'][$G_lang].$i.'</b></div>';
359 $tables .= sprintf('<div class="proxhr" id="table%d"></div>', $i);
360 $tables .= sprintf('<div class="table_act" id="table_act%d"></div>', $i);
362 $tables .= '</td>'."\n";
368 $tables .= '</table></div>';
371 $standup .= '<table class="room_standup"><tr><td><div class="room_standup_orig" id="room_standup_orig"></div>';
372 $standup .= '<div class="room_ex_standup">';
373 /* MLANG: "Giocatori in piedi" */
374 // $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>';
375 $standup .= '<div id="room_tit"><span class="room_titin"><b>'.$mlang_room['standing'][$G_lang].'</b></span></div>';
377 $standup .= sprintf('<div id="standup" class="room_standup"></div>');
379 $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>';
380 $standup .= '</div></td></tr></table>';
383 $altout_sponsor_arr = array( array ( 'id' => 'btn_altout',
384 'url' => 'http://www.alternativeoutput.it',
385 'content' => 'img/altout80x15.png',
386 'content_big' => 'img/logotxt_banner.png'),
387 array ( 'id' => 'btn_virtualsky',
388 'url' => 'http://virtualsky.alternativeoutput.it',
389 'content' => 'img/virtualsky80x15a.gif',
390 'content_big' => 'img/virtualsky_big.png'),
391 array ( 'id' => 'btn_dynamica',
392 'url' => 'http://www.dynamica.it',
393 'content' => 'img/dynamica.png',
394 'content_big' => 'img/dynamica_big.png')
397 $altout_support_arr = array( array ( 'id' => 'btn_brichi',
398 'url' => 'http://www.briscolachiamata.it',
399 'content' => 'img/brichi.png',
400 'content_big' => 'img/brichi_big.png'),
401 array ( 'id' => 'btn_foroli',
402 'url' => 'http://www.forumolimpia.it',
403 'content' => 'img/forumolimpia.gif',
404 'content_big' => 'img/forumolimpia_big.png' ) );
408 $altout_support = "";
409 $altout_support_big = "";
410 for ($i = 0 ; $i < 3 ; $i++) {
411 $ii = ($i < 2 ? $i : 0);
413 $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>',
414 $i * 20, $altout_support_arr[$ii]['url'],
415 $altout_support_arr[$ii]['id'], $altout_support_arr[$ii]['content']);
417 $altout_support_big .= sprintf('<img style="position: absolute;" class="nobohide" id="%s_big" src="%s">',
418 $altout_support_arr[$ii]['id'], $altout_support_arr[$ii]['content_big']);
422 // seed with microseconds since last "whole" second
423 // srand ((double) microtime() * 1000000);
424 // $randval = rand(0,count($altout_sponsor_arr)-1);
425 $altout_sponsor = "";
426 $altout_sponsor_big = "";
427 for ($i = 0 ; $i < 4 ; $i++) {
428 $ii = ($i < 3 ? $i : 0);
430 $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>',
431 $i * 20, $altout_sponsor_arr[$ii]['url'],
432 $altout_sponsor_arr[$ii]['id'], $altout_sponsor_arr[$ii]['content']);
434 $altout_sponsor_big .= sprintf('<img class="nobohide" id="%s_big" src="%s">',
435 $altout_sponsor_arr[$ii]['id'], $altout_sponsor_arr[$ii]['content_big']);
442 $brisk_donate = file_get_contents(FTOK_PATH."/brisk_donate.txt");
443 if ($brisk_donate == FALSE)
447 /* MLANG: "briscola chiamata in salsa ajax", */
449 $brisk_header_form = '<div class="container">
450 <!-- =========== header =========== -->
451 <div id="header" class="header">
452 <table width="100%%" border="0" cols="3"><tr>
453 <td align="left"><div style="padding-left: 8px;">'.($G_is_local ? '' :
454 '<script type="text/javascript"><!--
455 google_ad_client = "pub-5246925322544303";
456 google_ad_width = 234;
457 google_ad_height = 60;
458 google_ad_format = "234x60_as";
459 google_ad_type = "text_image";
460 google_ad_channel = "";
461 google_color_border = "808080";
462 google_color_bg = "f6f6f6";
463 google_color_link = "ffae00";
464 google_color_text = "404040";
465 google_color_url = "000000";
468 <script type="text/javascript"
469 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
472 <td align="center">'.(($G_with_topbanner || $G_with_donors) ? '<table><tr><td>' : '').'<div style="text-align: center;">
473 <img class="nobo" src="img/brisk_logo64summer.png">
474 '.$mlang_room['headline'][$G_lang].'<br>
475 </div>'.( ($G_with_topbanner || $G_with_donors) ? sprintf('</td><td>%s</td></tr></table>',
476 ($G_with_topbanner ? $G_topbanner :
477 "<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>
478 <td align="right"><div style="padding-right: 8px;">
479 '.($G_is_local ? '' :
480 '<script type="text/javascript"><!--
481 google_ad_client = "pub-5246925322544303";
482 google_ad_width = 234;
483 google_ad_height = 60;
484 google_ad_format = "234x60_as";
485 google_ad_type = "text_image";
486 google_ad_channel = "";
487 google_color_border = "808080";
488 google_color_bg = "f6f6f6";
489 google_color_link = "ffae00";
490 google_color_text = "404040";
491 google_color_url = "000000";
494 <script type="text/javascript"
495 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
501 /* MLANG: ALL THE VERTICAL MENU */
502 $brisk_vertical_menu = '
503 <!-- =========== vertical menu =========== -->
504 <div class="topmenu">
505 <!-- <a target="_blank" href="/briskhome.php"></a> -->
507 <div class="webstart_hilite">
508 <img class="nobo" src="img/brisk_start.png" onmouseover="menu_hide(0,0); menu_show(\'menu_webstart\');">
509 <div class="webstart" id="menu_webstart" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
511 <a href="#" onmouseover="menu_hide(0,1);" title="'.$mlang_room['tit_help'][$G_lang].'" onclick="act_help();"
512 >'.$mlang_room['itm_help'][$G_lang].'</a><br>
514 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php"
515 onmouseover="menu_hide(0,1);"
516 title="'.$mlang_room['tit_hpage'][$G_lang].'">homepage</a><br>
518 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#cose"
519 onmouseover="menu_hide(0,1);"
520 title="'.$mlang_room['tit_what'][$G_lang].'">'.$mlang_room['itm_what'][$G_lang].'</a><br>
522 <a target="_blank" href="'.$mlang_room['url_rules'][$G_lang].'"
523 onmouseover="menu_hide(0,1);"
524 title="'.$mlang_room['tit_rules'][$G_lang].'">'.$mlang_room['itm_rules'][$G_lang].'</a><br>
526 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#shots"
527 onmouseover="menu_hide(0,1);"
528 title="'.$mlang_room['tit_shot'][$G_lang].'">screenshoots</a><br>
530 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#comp"
531 onmouseover="menu_hide(0,1);"
532 title="'.$mlang_room['tit_comp'][$G_lang].'">'.$mlang_room['itm_comp'][$G_lang].'</a><br>
534 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#sources"
535 onmouseover="menu_hide(0,1);"
536 title="'.$mlang_room['tit_src'][$G_lang].'">'.$mlang_room['itm_src'][$G_lang].'</a><br>
538 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#mailing"
539 onmouseover="menu_hide(0,1);"
540 title="'.$mlang_room['tit_ml'][$G_lang].'">'.$mlang_room['itm_ml'][$G_lang].'</a><br>
542 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#prop"
543 onmouseover="menu_hide(0,1);"
544 title="'.$mlang_room['tit_pro'][$G_lang].'">'.$mlang_room['itm_pro'][$G_lang].'</a><br>
546 onmouseover="menu_hide(0,1);"
547 title="credits" onclick="act_about();">about</a><br>
549 <a href="mailto:brisk@alternativeoutput.it"
550 onmouseover="menu_hide(0,1);"
551 title="'.$mlang_room['tit_mail'][$G_lang].'">'.$mlang_room['itm_mail'][$G_lang].'</a><br>
557 onmouseover="menu_hide(0,1);"
558 title="perché supportare brisk?" onclick="act_whysupport();">supportare?</a><br>
561 onmouseover="menu_hide(0,1);"
562 title="'.$mlang_room['tit_cla'][$G_lang].'" onclick="act_placing();">'.$mlang_room['itm_cla'][$G_lang].'</a><br>
565 onmouseover="menu_hide(0,1);"
566 title="'.$mlang_room['tit_rmap'][$G_lang].'" onclick="act_roadmap();">'.$mlang_room['itm_rmap'][$G_lang].'</a><br>
568 <a href="#" title="'.$mlang_room['tit_meet'][$G_lang].'"
569 onmouseover="menu_show(\'menu_meeting\');">'.$mlang_room['itm_meet'][$G_lang].'</a><br>
571 <div id="menu_meeting" class="webstart">
572 <a href="http://www.anomalia.it/mop/photoo"
573 target="_blank" onmouseover="menu_hide(0,2);"
574 title="Torneo di Milano del 17/05/2008" >Milano 05/08</a><br>
576 <a href="http://www.anomalia.it/mop/photoo?album=brisk_pc0806"
577 target="_blank" onmouseover="menu_hide(0,2);"
578 title="Raduno di Piacenza del del 15/06/2008" >Piacenza 06/08</a><br>
580 </div>'. ($ACTION == "room" ? '<div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div><img class="nobo" src="img/brisk_commands'.langtolng($G_lang).'.png" onmouseover="menu_hide(0,0); menu_show(\'menu_commands\');">
582 <div class="webstart" id="menu_commands" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
586 .$mlang_room['tit_stat'][$G_lang].
588 onmouseover="menu_hide(0,1); menu_show(\'menu_state\');">'
590 .$mlang_room['stat_desc'][$G_lang].
592 <div id="menu_state" class="webstart">
594 onmouseover="menu_hide(0,2);"
595 title="" onclick="act_chatt(\'/st normale\'); menu_over(-1,this);">'
597 .$mlang_room['st_norm_desc'][$G_lang].
601 onmouseover="menu_hide(0,2);"
602 title="" onclick="act_chatt(\'/st pausa\'); menu_over(-1,this);">'
604 .$mlang_room['st_paus_desc'][$G_lang].
605 ' <img class="unbo" src="img/st_pau.png"></a><br>
608 onmouseover="menu_hide(0,2);"
609 title="" onclick="act_chatt(\'/st fuori\'); menu_over(-1,this);">'
611 .$mlang_room['st_out_desc'][$G_lang].
612 ' <img class="unbo" src="img/st_out.png"></a><br>
615 onmouseover="menu_hide(0,2);"
616 title="" onclick="act_chatt(\'/st cane\'); menu_over(-1,this);">'
618 .$mlang_room['st_dog_desc'][$G_lang].
619 ' <img class="unbo" src="img/st_dog.png"></a><br>
622 onmouseover="menu_hide(0,2);"
623 title="" onclick="act_chatt(\'/st cibo\'); menu_over(-1,this);">'
625 .$mlang_room['st_food_desc'][$G_lang].
626 ' <img class="unbo" src="img/st_eat.png"></a><br>
629 onmouseover="menu_hide(0,2);"
630 title="" onclick="act_chatt(\'/st lavoro\'); menu_over(-1,this);">'
632 .$mlang_room['st_work_desc'][$G_lang].
633 ' <img class="unbo" src="img/st_wrk.png"></a><br>
636 onmouseover="menu_hide(0,2);"
637 title="" onclick="act_chatt(\'/st sigaretta\'); menu_over(-1,this);">'
639 .$mlang_room['st_smok_desc'][$G_lang].
640 ' <img class="unbo" src="img/st_smk.png"></a><br>
643 onmouseover="menu_hide(0,2);"
644 title="" onclick="act_chatt(\'/st presente\'); menu_over(-1,this);">'
646 .$mlang_room['st_pres_desc'][$G_lang].
647 ' <img class="unbo" src="img/st_eye.png"></a><br>
650 onmouseover="menu_hide(0,2);"
651 title="" onclick="act_chatt(\'/st coniglio\'); menu_over(-1,this);">'
653 .$mlang_room['st_rabb_desc'][$G_lang].
654 ' <img class="unbo" src="img/st_rabbit.png"></a><br>
658 <a href="#" title="avvia un ticker pubblicitario per il tuo tavolo"
659 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>
662 // MLANG garantisci per un tuo conoscente
663 .$mlang_room['warr_desc'][$G_lang].
665 onmouseover="menu_hide(0,1);" onclick="act_chatt(\'/authreq\'); menu_over(-1,this);">'
667 .$mlang_room['itm_warr'][$G_lang].
672 // MLANG imposta le regole di ascolto
673 .$mlang_room['list_desc'][$G_lang].
674 '" onmouseover="menu_hide(0,1); menu_show(\'menu_listen\');">'
676 .$mlang_room['itm_list'][$G_lang].
678 <div id="menu_listen" style="width: 120px;" class="webstart">
682 <input id="ra_listen_all" type="radio" name="listen" value="all" onclick="act_chatt(\'/listen all\');" title="'
683 .$mlang_room['listall_desc'][$G_lang].
684 '"><span id="list_all">'
685 .$mlang_room['tit_listall'][$G_lang].
687 <input id="ra_listen_auth" type="radio" name="listen" value="auth" onclick="act_chatt(\'/listen auth\');" title="'
688 .$mlang_room['listaut_desc'][$G_lang].
689 '"><span id="list_auth">'
690 .$mlang_room['tit_listaut'][$G_lang].
692 <input id="ra_listen_isol" type="radio" name="listen" value="isolation" onclick="act_chatt(\'/listen isolation\');" title="'
693 .$mlang_room['listisol_desc'][$G_lang].
694 '"><span id="list_isol">'
695 .$mlang_room['tit_listisol'][$G_lang].
700 onmouseover="menu_hide(0,2);"
702 // MLANG leggo i messaggi di tutti gli utenti collegati
703 .$mlang_room['listall_desc'][$G_lang].
704 '" onclick="act_chatt(\'/listen all\'); menu_over(-1,this);"><span id="list_all">'
706 .$mlang_room['tit_listall'][$G_lang].
709 onmouseover="menu_hide(0,2);"
711 // MLANG leggo soltanto i messaggi degli utenti con password
712 .$mlang_room['listaut_desc'][$G_lang].
713 '" onclick="act_chatt(\'/listen auth\'); menu_over(-1,this);"><span id="list_auth">'
714 // MLANG solo autenticati
715 .$mlang_room['tit_listaut'][$G_lang].
719 onmouseover="menu_hide(0,2);"
721 // MLANG leggo soltanto i messaggi degli utenti con password
722 .$mlang_room['isolaut_desc'][$G_lang].
723 '" onclick="act_chatt(\'/listen isolation\'); menu_over(-1,this);"><span id="list_isol">'
724 // MLANG solo autenticati
725 .$mlang_room['tit_isolaut'][$G_lang].
730 // MLANG garantisci per un tuo conoscente
731 .$mlang_room['splash_desc'][$G_lang].
733 onmouseover="menu_hide(0,1);" onclick="act_splash(); menu_over(-1,this);">'
735 .$mlang_room['tit_splash'][$G_lang].
738 </div>'.($G_with_poll ? '' : '<div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
739 <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();">').'
740 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
741 '.($user->flags & USER_FLAG_AUTH ? '
742 <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()
744 <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();">
750 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
752 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 4px; font-size: 1px;"></div>
753 <div id="spon_caro" style="overflow: hidden; height: 18px; /* border: 1px solid red; */ ">
754 <div style="/*background-color: green; */ text-align: left; position: relative; padding: 0px; margin: 0px; top: 0px; height: 80px;">'.$altout_sponsor.'<br>
756 <div style="position: absolute;">
757 '.$altout_sponsor_big.'
759 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
761 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 4px; font-size: 1px;"></div>
762 <div id="supp_caro" style="overflow: hidden; height: 18px; /* border: 1px solid red; */">
763 <div style="/* background-color: green; */ text-align: left; position: relative; padding: 0px; margin: 0px; top: 0px; height: 80px;">'.$altout_support.'<br>
767 <div style="position: absolute;">
768 '.$altout_support_big.'
770 <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>
772 <div id="proflashext" class="proflashext"><div id="proflash" class="proflash">
779 if ($ACTION == 'login') {
780 header('Content-type: text/html; charset="utf-8"',true);
785 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
786 <link rel="shortcut icon" href="img/brisk_ico.png">
787 <script type="text/javascript" src="menu.js"></script>
788 <!-- <script type="text/javascript" src="dnd.js"></script>
789 <script type="text/javascript" src="dom-drag.js"></script> -->
790 <script type="text/javascript" src="commons.js"></script>
791 <script type="text/javascript" src="xhr.js"></script>
792 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
793 <script type="text/javascript" src="AC_OETags.js"></script>
794 <script type="text/javascript" src="room.js"></script>
795 <script type="text/javascript" src="md5.js"></script>
796 <script type="text/javascript" src="probrowser.js"></script>
797 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
798 <link rel="stylesheet" type="text/css" href="brisk.css">
799 <link rel="stylesheet" type="text/css" href="room.css">
801 <SCRIPT type="text/javascript"><!--
802 var g_lang = "<? echo $G_lang; ?>";
803 var g_lng = "<? echo $G_lng; ?>";
804 var g_tables_n = <? echo TABLES_N; ?>;
805 var g_tables_auth_n = <? echo TABLES_AUTH_N; ?>;
807 var g_withflash = false;
809 var gst = new globst();
810 var topbanner_sfx, topbanner_dx;
812 var sess = "not_connected";
813 var spo_slide, sup_slide;
815 window.onload = function() {
816 // alert(window.onbeforeunload);
817 g_brow = get_browser_agent();
818 spo_slide = new sideslide($('spon_caro'), 80, 20);
819 sup_slide = new sideslide($('supp_caro'), 60, 20);
823 if ($G_with_topbanner) {
824 printf(" topbanner_init();\n");
826 if ($G_with_sidebanner) {
827 printf(" sidebanner_init();\n");
829 if ($G_with_sidebanner2) {
830 printf(" sidebanner2_init();\n");
834 g_withflash = DetectFlashVer(6,0,0);
835 if (g_withflash == false) {
836 $("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>';
839 $("proflashext").innerHTML = "";
845 <!-- if myconsole <body onunload="deconsole();"> -->
848 printf($brisk_header_form);
849 printf("<table class=\"floaty\"><tr><td class=\"floatyleft\">\n");
850 printf($brisk_vertical_menu, '', '');
852 if ($G_with_sidebanner xor $G_with_sidebanner2) {
856 if ($G_with_sidebanner) {
857 printf("%s", $G_sidebanner);
858 if ($G_with_sidebanner2) {
864 if ($G_with_sidebanner2) {
865 printf("%s", $G_sidebanner2);
870 <!-- =========== tables =========== -->
873 /* 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)" */
876 <div style="text-align: center;">
878 <?php echo $mlang_room['wellcome'][$G_lang];?>
880 <form accept-charset="utf-8" method="post" action="" onsubmit="return j_login_manager(this);">
881 <input id="passid_private" name="pass_private" type="hidden" value="">
882 <table class="login">
884 <td><input id="nameid" class="input_text" name="name" type="text" size="24" maxlength="12" value=""></td></tr>
886 <td><input id="passid" class="input_text" name="pass" type="password" size="24" maxlength="64" value=""></td></tr>
887 <tr><td colspan="2"><input id="sub" value="<?php echo $mlang_room['btn_enter'][$G_lang];?>" type="submit" class="button"></td></tr>
890 <b><?php echo $mlang_room['passwarn'][$G_lang];?></b><br><br>
891 <?php echo $mlang_room['browwarn'][$G_lang];?><br>
899 <div id="imgct"></div>
900 <div id="logz"></div>
901 <div id="sandbox"></div>
902 <div id="sandbox2"></div>
903 <div id="response"></div>
904 <div id="xhrstart"></div>
906 <div id="xhrlog"></div>
908 <div id="xhrdeltalog"></div>
913 else if ($ACTION == 'room') {
914 header('Content-type: text/html; charset="utf-8"',true);
919 <link rel="shortcut icon" href="img/brisk_ico.png">
920 <script type="text/javascript" src="menu.js"></script>
921 <!-- <script type="text/javascript" src="dnd.js"></script>
922 <script type="text/javascript" src="dom-drag.js"></script> -->
923 <script type="text/javascript" src="commons.js"></script>
924 <script type="text/javascript" src="ticker.js"></script>
925 <script type="text/javascript" src="xhr.js"></script>
926 <script type="text/javascript" src="room.js"></script>
927 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
928 <script type="text/javascript" src="AC_OETags.js"></script>
929 <script type="text/javascript" src="probrowser.js"></script>
930 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
931 <link rel="stylesheet" type="text/css" href="brisk.css">
932 <link rel="stylesheet" type="text/css" href="room.css">
933 <SCRIPT type="text/javascript"><!--
935 var g_lang = "<? echo $G_lang; ?>";
936 var g_lng = "<? echo $G_lng; ?>";
937 var g_tables_n = <? echo TABLES_N; ?>;
938 var g_tables_auth_n = <? echo TABLES_AUTH_N; ?>;
943 var gst = new globst();
945 var topbanner_sfx, topbanner_dx;
946 // var nonunload = false;
947 var g_withflash = false;
949 var g_imgtot = g_preload_img_arr.length;
950 var myfrom = "index_php";
952 var spo_slide, sup_slide;
954 window.onload = function() {
955 g_brow = get_browser_agent();
956 spo_slide = new sideslide($('spon_caro'), 80, 20);
957 sup_slide = new sideslide($('supp_caro'), 60, 20);
960 if ($BRISK_SHOWHTML == "debugtable") {
962 room_checkspace(12, <?php echo TABLES_N; ?>, 50);
967 // alert("INDEX START");
970 if ($G_with_topbanner) {
971 printf(" topbanner_init();\n");
973 if ($G_with_sidebanner) {
974 printf(" sidebanner_init();\n");
976 if ($G_with_sidebanner2) {
977 printf(" sidebanner2_init();\n");
981 xhr_rd = createXMLHttpRequest();
982 // xhr_rd.setRequestHeader("Content-type", "text/html; charset=utf-8");
983 sess = "<?php echo "$sess"; ?>";
984 tra = new train($('room_tit'));
985 window.onunload = onunload_cb;
986 window.onbeforeunload = onbeforeunload_cb;
987 g_withflash = DetectFlashVer(6,0,0);
988 if (g_withflash == false) {
989 $("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>';
992 $("proflashext").innerHTML = "";
994 setTimeout(xhr_rd_poll, 0, sess);
995 // alert("ARR LENGTH "+g_preload_img_arr.length);
996 setTimeout(preload_images, 0, g_preload_img_arr, g_imgct);
1000 /* 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" */
1001 echo show_notify($mlang_room['regwarn'][$G_lang], 0, $mlang_room['btn_rettabs'][$G_lang], 400, 150);
1011 <!-- if myconsole <body onunload="deconsole();"> -->
1014 printf($brisk_header_form);
1015 printf("<table class=\"floaty\"><tr><td class=\"floatyleft\">\n");
1016 /* printf($brisk_vertical_menu, '<input type="button" class="button" name="xhelp" value="Help." onclick="act_help();"><br><!-- <br><input type="button" class="button" name="xabout" value="About." onclick="act_about();">--><br><br><br>',
1018 printf($brisk_vertical_menu, '<input type="button" class="button" name="xhelp" value="Help." onclick="act_help();"><br><!-- <br><input type="button" class="button" name="xabout" value="About." onclick="act_about();">--><br>',
1020 printf($brisk_vertical_menu, '<!-- <br><input type="button" class="button" name="xabout" value="About." onclick="act_about();">--><br>',
1024 if ($G_with_sidebanner xor $G_with_sidebanner2) {
1028 if ($G_with_sidebanner) {
1029 printf("%s", $G_sidebanner);
1030 if ($G_with_sidebanner2) {
1036 if ($G_with_sidebanner2) {
1037 printf("%s", $G_sidebanner2);
1040 printf("</td><td>");
1042 <!-- =========== tables =========== -->
1043 <input name="sess" type="hidden" value="<?php echo "$user->sess"; ?>">
1044 <table class="macro"><tr><td>
1045 <?php echo "$tables"; ?>
1047 <?php echo "$standup"; ?>
1051 <!-- =========== bottom =========== -->
1052 <div id="bottom" class="bottom">
1053 <b>Chat</b> <span id="list_info" style="color: red;"></span><br>
1054 <div id="txt" class="chatt">
1056 <div style="text-align: center; ">
1057 <!-- MLANG: scrivi un invito al tavolo e clicca -->
1058 <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;">
1059 <div id="myname"></div>
1061 <input id="txt_in" maxlength="128" type="text" style="width: 100%;" onkeypress="chatt_checksend(this,event);">
1066 <div id="authbox" class="notify" style="text-align: center;">
1069 <!-- MLANG: Garantisci per un tuo conoscente: -->
1070 <?php echo $mlang_room['tit_warr'][$G_lang]; ?>
1074 <form id="auth_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_authbox(this);">
1075 <input type="hidden" name="realsub" value="666">
1076 <table class="login">
1077 <tr><td>nickname:</td>
1078 <td><input id="nameid" class="input_text" name="name" type="text" size="24" maxlength="12" value=""></td></tr>
1079 <tr><td>e-mail:</td>
1080 <td><input id="emailid" class="input_text" name="email" type="text" size="24" maxlength="1024" value=""></td></tr>
1081 <tr><td colspan="2" style="text-align: center;">
1082 <!-- MLANG: Garantisci per un tuo conoscente: -->
1083 <input id="subid" name="sub" value=
1084 "<?php echo $mlang_room['btn_send'][$G_lang]; ?>"
1085 type="submit" onclick="this.form.elements['realsub'].value = 'invia';" class="button">
1086 <!-- MLANG: Garantisci per un tuo conoscente: -->
1087 <input id="cloid" name="clo" value=
1088 "<?php echo $mlang_room['btn_close'][$G_lang]; ?>"
1089 type="submit" class="button" onclick="this.form.elements['realsub'].value = 'chiudi';"></td></tr>
1093 <div id="mesgtoadmbox" class="notify_opaque" style="text-align: center;">
1095 <!--MLANG: Invia un messaggio o una segnalazione all'amministratore: -->
1096 <b><?php echo $mlang_room['mesgtoadm_tit'][$G_lang];?></b>
1098 <form id="mesgtoadm_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_mesgtoadmbox(this);">
1099 <input type="hidden" name="realsub" value="666">
1100 <table class="login">
1101 <!--MLANG: soggetto -->
1102 <tr><td><b><?php echo $mlang_room['mesgtoadm_sub'][$G_lang];?></b></td>
1103 <td><input id="subjid" class="input_text" name="subj" type="text" size="32" maxlength="255" value=""></td></tr></table>
1104 <table class="login">
1105 <tr><td><img title="messaggio" class="nobo" src="img/mesgtoadm_mesg<?php echo $G_lng;?>.png"></td>
1106 <td><textarea id="mesgid" class="input_text" name="mesg" cols="40" rows="8" wrap="soft"></textarea></td></tr>
1107 <tr><td colspan="2" style="text-align: center;">
1108 <input id="subid" name="sub" value="<?php echo $mlang_room['btn_send'][$G_lang];?>" type="submit" onclick="this.form.elements['realsub'].value = 'invia';" class="button">
1109 <input id="cloid" name="clo" value="<?php echo $mlang_room['btn_close'][$G_lang];?>" type="submit" class="button" onclick="this.form.elements['realsub'].value = 'chiudi';"></td></tr>
1113 <div id="heartbit"></div>
1114 <div id="sandbox"></div>
1115 <div id="imgct"></div>
1116 <div id="logz"></div>
1117 <div id="sandbox2"></div>
1118 <div id="response"></div>
1119 <div id="remark"></div>
1120 <div id="xhrstart"></div>
1121 <div id="xhrlog"></div>
1122 <div id="xhrdeltalog"></div>