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',
81 'tit_ticker' => array('it' => 'scrivi un invito al tavolo e clicca',
82 'en' => 'write an invitation at the table and click'),
83 'itm_warr' => array('it' => 'garantisci',
85 'warr_desc' => array('it' => 'garantisci per un tuo conoscente',
86 'en' => 'guarantee for a friend'),
87 'tit_warr' => array('it' => 'Garantisci per un tuo conoscente.',
88 'en' => 'Guarantee for a friend.'),
89 'itm_list' => array('it' => 'ascolta',
91 'list_desc' => array('it' => 'imposta le regole di ascolto',
92 'en' => 'set the listen rules'),
93 'tit_listall' => array('it' => 'tutti',
95 'listall_desc' => array('it' => 'leggi tutti i messaggi di tutti gli utenti collegati',
96 'en' => 'listen all messages from each user connected'),
97 'tit_listaut' => array('it' => 'solo autenticati',
98 'en' => 'only authorized'),
99 'listaut_desc' => array('it' => 'leggi soltanto i messaggi degli utenti con password',
100 'en' => 'listen messages only from authenticated users'),
101 'tit_help' => array('it' => 'informazioni utili su Brisk',
102 'en' => 'usefull information about Brisk'),
103 'itm_help' => array('it' => 'aiuto',
105 'tit_hpage' => array('it' => 'homepage del progetto',
106 'en' => 'project homepage (ita)'),
107 'tit_what' => array('it' => 'di cosa si tratta',
108 'en' => 'what is the project'),
109 'itm_what' => array('it' => 'cos\'è',
110 'en' => 'what is it'),
111 'url_rules' => array('it' => 'http://it.wikipedia.org/wiki/Briscola#Gioco_a_5',
112 'en' => 'http://it.wikipedia.org/wiki/Briscola#Gioco_a_5&EN=true'),
113 'itm_rules' => array('it' => 'regole',
115 'tit_rules' => array('it' => 'come si gioca',
116 'en' => 'how to play'),
117 'tit_shot' => array('it' => 'screenshots dell\'applicazione',
118 'en' => 'screenshots of the web-application'),
119 'tit_comp' => array('it' => 'compatibilità con i browser',
120 'en' => 'browsers compatibility'),
121 'itm_comp' => array('it' => 'compatibilità',
122 'en' => 'compatibility'),
123 'tit_src' => array('it' => 'sorgenti dell\'applicazione web',
124 'en' => 'sources of the web-application'),
125 'itm_src' => array('it' => 'sorgenti',
127 'tit_ml' => array('it' => 'come iscriversi alla mailing list',
128 'en' => 'how to subscribe the mailing list'),
129 'itm_ml' => array('it' => 'mailing list',
130 'en' => 'mailing list'),
131 'tit_pro' => array('it' => 'come fare pubblicità a Brisk!',
132 'en' => 'how to spread Brisk!'),
133 'itm_pro' => array('it' => 'propaganda',
134 'en' => 'propaganda'),
135 'tit_mail' => array('it' => 'contatti',
137 'itm_mail' => array('it' => 'contatti',
139 'tit_cla' => array('it' => 'classifiche degli utenti',
140 'en' => 'user\'s placings'),
141 'itm_cla' => array('it' => 'classifiche',
143 'tit_rmap' => array('it' => 'prossime funzionalità implementate',
144 'en' => 'roadmap of next functionalities'),
145 'itm_rmap' => array('it' => 'roadmap',
147 'tit_meet' => array('it' => 'foto dei raduni di briskisti',
148 'en' => 'photos of brisk meetings'),
149 'itm_meet' => array('it' => 'raduni',
151 'tit_mesg' => array('it' => 'manda un messaggio o una segnalazione all\'amministratore del sito',
152 'en' => 'send a message or a signalling to the administrator' ),
153 'mesgtoadm_tit'=> array('it' => 'Invia un messaggio o una segnalazione all\'amministratore:',
154 'en' => 'Send a message to the administrator:'),
155 'mesgtoadm_sub'=> array('it' => 'soggetto:',
157 'btn_send' => array('it' => 'Invia.',
159 'btn_close' => array('it' => 'Chiudi.',
163 // Use of proxies isn't allowed.
164 if (!$G_is_local && is_proxy())
167 require_once("briskin5/Obj/briskin5.phh");
168 if (DEBUGGING == "local" && $_SERVER['REMOTE_ADDR'] != '127.0.0.1') {
169 echo "Debugging time!";
173 log_load("index.php");
176 function poll_dom() {
177 GLOBAL $G_with_poll, $G_poll_title, $G_poll_entries;
180 $ret = sprintf('<div style="padding: 0px;margin: 0px; height: 8px; font-size: 1px;"></div>
182 <img class="nobo" src="img/brisk_poll.png" onmouseover="menu_hide(0,0); menu_show(\'menu_poll\');">
184 <div style="width: 300px;" class="webstart" id="menu_poll" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
186 <form id="poll_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_pollbox(this);">
187 <input type="hidden" name="realsub" value="666">', $G_poll_title);
188 for ($i = 0 ; $i < count($G_poll_entries) ; $i++) {
189 $ret .= sprintf('<INPUT TYPE="radio" NAME="category" VALUE="%s">%s<hr><br>', $G_poll_entries[$i]['id'],
190 $G_poll_entries[$i]['cont']);
192 $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>
202 GLOBAL $G_with_topbanner, $G_topbanner, $G_is_local;
203 GLOBAL $G_with_sidebanner, $G_sidebanner;
204 GLOBAL $G_with_sidebanner2, $G_sidebanner2;
206 GLOBAL $sess, $name, $pass_private, $table_idx, $table_token, $BRISK_SHOWHTML, $BRISK_DEBUG, $_SERVER;
207 GLOBAL $G_lang, $G_lng, $mlang_room;
214 if (isset($BRISK_SHOWHTML) == FALSE) {
216 $sem = Room::lock_data();
217 log_main("lock Room");
218 $room = &Room::load_data();
223 if (validate_sess($sess)) {
224 log_main("pre garbage_manager UNO");
225 $room->garbage_manager(TRUE);
226 log_main("post garbage_manager");
227 if (($user = &$room->get_user($sess, &$idx)) != FALSE) {
228 log_main("user stat: ".$user->stat);
229 if ($user->stat == "table") {
230 if (Room::save_data(&$room) == FALSE) {
231 echo "ERRORE SALVATAGGIO\n";
234 log_main("unlock Room");
235 Room::unlock_data($sem);
236 setcookie("table_token", $user->table_token, $curtime + 31536000);
237 setcookie("table_idx", $user->table, $curtime + 31536000);
238 header ("Location: briskin5/index.php");
244 if (Room::save_data(&$room) == FALSE) {
245 echo "ERRORE SALVATAGGIO\n";
250 if ($ACTION == "login" && isset($name)) {
252 log_main("pre garbage_manager DUE");
254 if (isset($pass_private) == FALSE) {
255 $pass_private = FALSE;
258 $room->garbage_manager(TRUE);
260 if (($user = &$room->add_user(&$sess, &$idx, $name, $pass_private, $_SERVER['REMOTE_ADDR'])) != FALSE) {
267 log_legal($curtime, $user, "STAT:LOGIN", '');
269 // recovery lost game
270 if ($user->stat == "table") {
271 if (Room::save_data(&$room) == FALSE) {
272 echo "ERRORE SALVATAGGIO\n";
275 log_main("unlock Room");
276 Room::unlock_data($sem);
277 setcookie("table_token", $user->table_token, $curtime + 31536000);
278 setcookie("table_idx", $user->table, $curtime + 31536000);
279 header ("Location: briskin5/index.php");
284 // setcookie ("sess", "", time() + 180);
285 $room->standup_update(&$user);
287 if (Room::save_data(&$room) == FALSE) {
288 echo "ERRORE SALVATAGGIO\n";
293 /* Login Rendering */
294 /* 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." */
297 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpasserr'][$G_lang].'</b></div>';
299 // $body .= '<div class="urgmsg"><b>Il nickname deve contenere almeno una lettera o una cifra.</b></div>';
300 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpassmust'][$G_lang].'</b></div>';
302 // $body .= '<div class="urgmsg"><b>Spiacenti, non ci sono più posti liberi. Riprova più tardi.</b></div>';
303 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpassend'][$G_lang].'</b></div>';
305 // $body .= '<div class="urgmsg"><b>Il tuo nickname è già in uso.</b></div>';
306 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpassuse'][$G_lang].'</b></div>';
318 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpass'.$sfx][$G_lang].'</b></div>';
321 Room::unlock_data($sem);
325 if ($BRISK_SHOWHTML == "debugtable") {
328 else if ($BRISK_SHOWHTML == "debuglogin") {
332 if ($ACTION == "room") {
333 $tables .= '<div class="room_tab">';
334 $tables .= '<table class="room_tab">';
335 for ($ii = 0 ; $ii < TABLES_N ; $ii++) {
336 if ($user->flags & USER_FLAG_AUTH)
339 $i = TABLES_N - $ii - 1;
344 $tables .= '<div class="room_div"><div class="room_tit"><b>'.$mlang_room['tit_tabl'][$G_lang].$i.'</b></div>';
345 $tables .= sprintf('<div class="proxhr" id="table%d"></div>', $i);
346 $tables .= sprintf('<div class="table_act" id="table_act%d"></div>', $i);
348 $tables .= '</td>'."\n";
352 $tables .= '</table></div>';
355 $standup .= '<table class="room_standup"><tr><td><div class="room_standup_orig" id="room_standup_orig"></div>';
356 $standup .= '<div class="room_ex_standup">';
357 /* MLANG: "Giocatori in piedi" */
358 // $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>';
359 $standup .= '<div id="room_tit"><span class="room_titin"><b>'.$mlang_room['standing'][$G_lang].'</b></span></div>';
361 $standup .= sprintf('<div id="standup" class="room_standup"></div>');
363 $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>';
364 $standup .= '</div></td></tr></table>';
367 $altout_sponsor_arr = array( array ( 'id' => 'btn_altout',
368 'url' => 'http://www.alternativeoutput.it',
369 'content' => 'img/altout80x15.png',
370 'content_big' => 'img/logotxt_banner.png'),
371 array ( 'id' => 'btn_virtualsky',
372 'url' => 'http://virtualsky.alternativeoutput.it',
373 'content' => 'img/virtualsky80x15a.gif',
374 'content_big' => 'img/virtualsky_big.png'),
375 array ( 'id' => 'btn_dynamica',
376 'url' => 'http://www.dynamica.it',
377 'content' => 'img/dynamica.png',
378 'content_big' => 'img/dynamica_big.png')
381 $altout_support_arr = array( array ( 'id' => 'btn_brichi',
382 'url' => 'http://www.briscolachiamata.it',
383 'content' => 'img/brichi.png',
384 'content_big' => 'img/brichi_big.png'),
385 array ( 'id' => 'btn_foroli',
386 'url' => 'http://www.forumolimpia.it',
387 'content' => 'img/forumolimpia.gif',
388 'content_big' => 'img/forumolimpia_big.png' ) );
392 $altout_support = "";
393 $altout_support_big = "";
394 for ($i = 0 ; $i < 3 ; $i++) {
395 $ii = ($i < 2 ? $i : 0);
397 $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>',
398 $i * 20, $altout_support_arr[$ii]['url'],
399 $altout_support_arr[$ii]['id'], $altout_support_arr[$ii]['content']);
401 $altout_support_big .= sprintf('<img style="position: absolute;" class="nobohide" id="%s_big" src="%s">',
402 $altout_support_arr[$ii]['id'], $altout_support_arr[$ii]['content_big']);
406 // seed with microseconds since last "whole" second
407 // srand ((double) microtime() * 1000000);
408 // $randval = rand(0,count($altout_sponsor_arr)-1);
409 $altout_sponsor = "";
410 $altout_sponsor_big = "";
411 for ($i = 0 ; $i < 4 ; $i++) {
412 $ii = ($i < 3 ? $i : 0);
414 $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>',
415 $i * 20, $altout_sponsor_arr[$ii]['url'],
416 $altout_sponsor_arr[$ii]['id'], $altout_sponsor_arr[$ii]['content']);
418 $altout_sponsor_big .= sprintf('<img class="nobohide" id="%s_big" src="%s">',
419 $altout_sponsor_arr[$ii]['id'], $altout_sponsor_arr[$ii]['content_big']);
426 $brisk_donate = file_get_contents(FTOK_PATH."/brisk_donate.txt");
427 if ($brisk_donate == FALSE)
431 /* MLANG: "briscola chiamata in salsa ajax", */
433 $brisk_header_form = '<div class="container">
434 <!-- =========== header =========== -->
435 <div id="header" class="header">
436 <table width="100%%" border="0" cols="3"><tr>
437 <td align="left"><div style="padding-left: 8px;">'.($G_is_local ? '' :
438 '<script type="text/javascript"><!--
439 google_ad_client = "pub-5246925322544303";
440 google_ad_width = 234;
441 google_ad_height = 60;
442 google_ad_format = "234x60_as";
443 google_ad_type = "text_image";
444 google_ad_channel = "";
445 google_color_border = "808080";
446 google_color_bg = "f6f6f6";
447 google_color_link = "ffae00";
448 google_color_text = "404040";
449 google_color_url = "000000";
452 <script type="text/javascript"
453 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
456 <td align="center">'.($G_with_topbanner ? '<table><tr><td>' : '').'<div style="text-align: center;">
457 <img class="nobo" src="img/brisk_logo64.png">
458 '.$mlang_room['headline'][$G_lang].'<br>
459 </div>'.($G_with_topbanner ? sprintf('</td><td>%s</td></tr></table>', $G_topbanner) : '').'</td>
460 <td align="right"><div style="padding-right: 8px;">
461 '.($G_is_local ? '' :
462 '<script type="text/javascript"><!--
463 google_ad_client = "pub-5246925322544303";
464 google_ad_width = 234;
465 google_ad_height = 60;
466 google_ad_format = "234x60_as";
467 google_ad_type = "text_image";
468 google_ad_channel = "";
469 google_color_border = "808080";
470 google_color_bg = "f6f6f6";
471 google_color_link = "ffae00";
472 google_color_text = "404040";
473 google_color_url = "000000";
476 <script type="text/javascript"
477 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
483 /* MLANG: ALL THE VERTICAL MENU */
484 $brisk_vertical_menu = '
485 <!-- =========== vertical menu =========== -->
486 <div class="topmenu">
487 <!-- <a target="_blank" href="/briskhome.php"></a> -->
489 <div class="webstart_hilite">
490 <img class="nobo" src="img/brisk_start.png" onmouseover="menu_hide(0,0); menu_show(\'menu_webstart\');">
491 <div class="webstart" id="menu_webstart" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
493 <a href="#" onmouseover="menu_hide(0,1);" title="'.$mlang_room['tit_help'][$G_lang].'" onclick="act_help();"
494 >'.$mlang_room['itm_help'][$G_lang].'</a><br>
496 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php"
497 onmouseover="menu_hide(0,1);"
498 title="'.$mlang_room['tit_hpage'][$G_lang].'">homepage</a><br>
500 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#cose"
501 onmouseover="menu_hide(0,1);"
502 title="'.$mlang_room['tit_what'][$G_lang].'">'.$mlang_room['itm_what'][$G_lang].'</a><br>
504 <a target="_blank" href="'.$mlang_room['url_rules'][$G_lang].'"
505 onmouseover="menu_hide(0,1);"
506 title="'.$mlang_room['tit_rules'][$G_lang].'">'.$mlang_room['itm_rules'][$G_lang].'</a><br>
508 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#shots"
509 onmouseover="menu_hide(0,1);"
510 title="'.$mlang_room['tit_shot'][$G_lang].'">screenshoots</a><br>
512 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#comp"
513 onmouseover="menu_hide(0,1);"
514 title="'.$mlang_room['tit_comp'][$G_lang].'">'.$mlang_room['itm_comp'][$G_lang].'</a><br>
516 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#sources"
517 onmouseover="menu_hide(0,1);"
518 title="'.$mlang_room['tit_src'][$G_lang].'">'.$mlang_room['itm_src'][$G_lang].'</a><br>
520 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#mailing"
521 onmouseover="menu_hide(0,1);"
522 title="'.$mlang_room['tit_ml'][$G_lang].'">'.$mlang_room['itm_ml'][$G_lang].'</a><br>
524 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#prop"
525 onmouseover="menu_hide(0,1);"
526 title="'.$mlang_room['tit_pro'][$G_lang].'">'.$mlang_room['itm_pro'][$G_lang].'</a><br>
528 onmouseover="menu_hide(0,1);"
529 title="credits" onclick="act_about();">about</a><br>
531 <a href="mailto:brisk@alternativeoutput.it"
532 onmouseover="menu_hide(0,1);"
533 title="'.$mlang_room['tit_mail'][$G_lang].'">'.$mlang_room['itm_mail'][$G_lang].'</a><br>
539 onmouseover="menu_hide(0,1);"
540 title="perché supportare brisk?" onclick="act_whysupport();">supportare?</a><br>
543 onmouseover="menu_hide(0,1);"
544 title="'.$mlang_room['tit_cla'][$G_lang].'" onclick="act_placing();">'.$mlang_room['itm_cla'][$G_lang].'</a><br>
547 onmouseover="menu_hide(0,1);"
548 title="'.$mlang_room['tit_rmap'][$G_lang].'" onclick="act_roadmap();">'.$mlang_room['itm_rmap'][$G_lang].'</a><br>
550 <a href="#" title="'.$mlang_room['tit_meet'][$G_lang].'"
551 onmouseover="menu_show(\'menu_meeting\');">'.$mlang_room['itm_meet'][$G_lang].'</a><br>
553 <div id="menu_meeting" class="webstart">
554 <a href="http://www.anomalia.it/mop/photoo"
555 target="_blank" onmouseover="menu_hide(0,2);"
556 title="Torneo di Milano del 17/05/2008" >Milano 05/08</a><br>
558 <a href="http://www.anomalia.it/mop/photoo?album=brisk_pc0806"
559 target="_blank" onmouseover="menu_hide(0,2);"
560 title="Raduno di Piacenza del del 15/06/2008" >Piacenza 06/08</a><br>
562 </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\');">
564 <div class="webstart" id="menu_commands" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
568 .$mlang_room['tit_stat'][$G_lang].
570 onmouseover="menu_hide(0,1); menu_show(\'menu_state\');">'
572 .$mlang_room['stat_desc'][$G_lang].
574 <div id="menu_state" class="webstart">
576 onmouseover="menu_hide(0,2);"
577 title="" onclick="act_chatt(\'/st normale\'); menu_over(-1,this);">'
579 .$mlang_room['st_norm_desc'][$G_lang].
583 onmouseover="menu_hide(0,2);"
584 title="" onclick="act_chatt(\'/st pausa\'); menu_over(-1,this);">'
586 .$mlang_room['st_paus_desc'][$G_lang].
587 ' <img class="unbo" src="img/st_pau.png"></a><br>
590 onmouseover="menu_hide(0,2);"
591 title="" onclick="act_chatt(\'/st fuori\'); menu_over(-1,this);">'
593 .$mlang_room['st_out_desc'][$G_lang].
594 ' <img class="unbo" src="img/st_out.png"></a><br>
597 onmouseover="menu_hide(0,2);"
598 title="" onclick="act_chatt(\'/st cane\'); menu_over(-1,this);">'
600 .$mlang_room['st_dog_desc'][$G_lang].
601 ' <img class="unbo" src="img/st_dog.png"></a><br>
604 onmouseover="menu_hide(0,2);"
605 title="" onclick="act_chatt(\'/st cibo\'); menu_over(-1,this);">'
607 .$mlang_room['st_food_desc'][$G_lang].
608 ' <img class="unbo" src="img/st_eat.png"></a><br>
611 onmouseover="menu_hide(0,2);"
612 title="" onclick="act_chatt(\'/st lavoro\'); menu_over(-1,this);">'
614 .$mlang_room['st_work_desc'][$G_lang].
615 ' <img class="unbo" src="img/st_wrk.png"></a><br>
618 onmouseover="menu_hide(0,2);"
619 title="" onclick="act_chatt(\'/st sigaretta\'); menu_over(-1,this);">'
621 .$mlang_room['st_smok_desc'][$G_lang].
622 ' <img class="unbo" src="img/st_smk.png"></a><br>
625 onmouseover="menu_hide(0,2);"
626 title="" onclick="act_chatt(\'/st presente\'); menu_over(-1,this);">'
628 .$mlang_room['st_pres_desc'][$G_lang].
629 ' <img class="unbo" src="img/st_eye.png"></a><br>
633 <a href="#" title="avvia un ticker pubblicitario per il tuo tavolo"
634 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>
637 // MLANG garantisci per un tuo conoscente
638 .$mlang_room['warr_desc'][$G_lang].
640 onmouseover="menu_hide(0,1);" onclick="act_chatt(\'/authreq\'); menu_over(-1,this);">'
642 .$mlang_room['itm_warr'][$G_lang].
647 // MLANG imposta le regole di ascolto
648 .$mlang_room['list_desc'][$G_lang].
649 '" onmouseover="menu_hide(0,1); menu_show(\'menu_listen\');">'
651 .$mlang_room['itm_list'][$G_lang].
653 <div id="menu_listen" class="webstart">
655 onmouseover="menu_hide(0,2);"
657 // MLANG leggo i messaggi di tutti gli utenti collegati
658 .$mlang_room['listall_desc'][$G_lang].
659 '" onclick="act_chatt(\'/listen all\'); menu_over(-1,this);"><span id="list_all">'
661 .$mlang_room['tit_listall'][$G_lang].
664 onmouseover="menu_hide(0,2);"
666 // MLANG leggo soltanto i messaggi degli utenti con password
667 .$mlang_room['listaut_desc'][$G_lang].
668 '" onclick="act_chatt(\'/listen auth\'); menu_over(-1,this);"><span id="list_auth">'
669 // MLANG solo autenticati
670 .$mlang_room['tit_listaut'][$G_lang].
675 </div>'.($G_with_poll ? '' : '<div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
676 <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();">').'
677 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
678 '.($user->flags & USER_FLAG_AUTH ? '
679 <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()
681 <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();">
687 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
689 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 4px; font-size: 1px;"></div>
690 <div id="spon_caro" style="overflow: hidden; height: 18px; /* border: 1px solid red; */ ">
691 <div style="/*background-color: green; */ text-align: left; position: relative; padding: 0px; margin: 0px; top: 0px; height: 80px;">'.$altout_sponsor.'<br>
693 <div style="position: absolute;">
694 '.$altout_sponsor_big.'
696 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
698 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 4px; font-size: 1px;"></div>
699 <div id="supp_caro" style="overflow: hidden; height: 18px; /* border: 1px solid red; */">
700 <div style="/* background-color: green; */ text-align: left; position: relative; padding: 0px; margin: 0px; top: 0px; height: 80px;">'.$altout_support.'<br>
704 <div style="position: absolute;">
705 '.$altout_support_big.'
707 <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>
709 <div id="proflashext" class="proflashext"><div id="proflash" class="proflash">
716 if ($ACTION == 'login') {
717 header('Content-type: text/html; charset="utf-8"',true);
722 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
723 <link rel="shortcut icon" href="img/brisk_ico.png">
724 <script type="text/javascript" src="menu.js"></script>
725 <!-- <script type="text/javascript" src="dnd.js"></script>
726 <script type="text/javascript" src="dom-drag.js"></script> -->
727 <script type="text/javascript" src="commons.js"></script>
728 <script type="text/javascript" src="xhr.js"></script>
729 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
730 <script type="text/javascript" src="AC_OETags.js"></script>
731 <script type="text/javascript" src="room.js"></script>
732 <script type="text/javascript" src="md5.js"></script>
733 <script type="text/javascript" src="probrowser.js"></script>
734 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
735 <link rel="stylesheet" type="text/css" href="brisk.css">
736 <link rel="stylesheet" type="text/css" href="room.css">
738 <SCRIPT type="text/javascript"><!--
739 var g_lang = "<? echo $G_lang; ?>";
740 var g_lng = "<? echo $G_lng; ?>";
741 var g_withflash = false;
743 var gst = new globst();
744 var topbanner_sfx, topbanner_dx;
746 var sess = "not_connected";
747 var spo_slide, sup_slide;
749 window.onload = function() {
750 // alert(window.onbeforeunload);
751 g_brow = get_browser_agent();
752 spo_slide = new sideslide($('spon_caro'), 80, 20);
753 sup_slide = new sideslide($('supp_caro'), 60, 20);
757 if ($G_with_topbanner) {
758 printf(" topbanner_init();\n");
760 if ($G_with_sidebanner) {
761 printf(" sidebanner_init();\n");
763 if ($G_with_sidebanner2) {
764 printf(" sidebanner2_init();\n");
768 g_withflash = DetectFlashVer(6,0,0);
769 if (g_withflash == false) {
770 $("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>';
773 $("proflashext").innerHTML = "";
779 <!-- if myconsole <body onunload="deconsole();"> -->
782 printf($brisk_header_form);
783 printf("<table class=\"floaty\"><tr><td class=\"floatyleft\">\n");
784 printf($brisk_vertical_menu, '', '');
786 if ($G_with_sidebanner xor $G_with_sidebanner2) {
790 if ($G_with_sidebanner) {
791 printf("%s", $G_sidebanner);
792 if ($G_with_sidebanner2) {
798 if ($G_with_sidebanner2) {
799 printf("%s", $G_sidebanner2);
804 <!-- =========== tables =========== -->
807 /* 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)" */
810 <div style="text-align: center;">
812 <?php echo $mlang_room['wellcome'][$G_lang];?>
814 <form accept-charset="utf-8" method="post" action="" onsubmit="return j_login_manager(this);">
815 <input id="passid_private" name="pass_private" type="hidden" value="">
816 <table class="login">
818 <td><input id="nameid" class="input_text" name="name" type="text" size="24" maxlength="12" value=""></td></tr>
820 <td><input id="passid" class="input_text" name="pass" type="password" size="24" maxlength="64" value=""></td></tr>
821 <tr><td colspan="2"><input id="sub" value="<?php echo $mlang_room['btn_enter'][$G_lang];?>" type="submit" class="button"></td></tr>
824 <b><?php echo $mlang_room['passwarn'][$G_lang];?></b><br><br>
825 <?php echo $mlang_room['browwarn'][$G_lang];?><br>
829 <div id="imgct"></div>
830 <div id="logz"></div>
831 <div id="sandbox"></div>
832 <div id="sandbox2"></div>
833 <div id="response"></div>
834 <div id="xhrstart"></div>
836 <div id="xhrlog"></div>
838 <div id="xhrdeltalog"></div>
843 else if ($ACTION == 'room') {
844 header('Content-type: text/html; charset="utf-8"',true);
849 <link rel="shortcut icon" href="img/brisk_ico.png">
850 <script type="text/javascript" src="menu.js"></script>
851 <!-- <script type="text/javascript" src="dnd.js"></script>
852 <script type="text/javascript" src="dom-drag.js"></script> -->
853 <script type="text/javascript" src="commons.js"></script>
854 <script type="text/javascript" src="ticker.js"></script>
855 <script type="text/javascript" src="xhr.js"></script>
856 <script type="text/javascript" src="room.js"></script>
857 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
858 <script type="text/javascript" src="AC_OETags.js"></script>
859 <script type="text/javascript" src="probrowser.js"></script>
860 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
861 <link rel="stylesheet" type="text/css" href="brisk.css">
862 <link rel="stylesheet" type="text/css" href="room.css">
863 <SCRIPT type="text/javascript"><!--
865 var g_lang = "<? echo $G_lang; ?>";
866 var g_lng = "<? echo $G_lng; ?>";
870 var gst = new globst();
872 var topbanner_sfx, topbanner_dx;
873 // var nonunload = false;
874 var g_withflash = false;
876 var g_imgtot = g_preload_img_arr.length;
877 var myfrom = "index_php";
879 var spo_slide, sup_slide;
881 window.onload = function() {
882 g_brow = get_browser_agent();
883 spo_slide = new sideslide($('spon_caro'), 80, 20);
884 sup_slide = new sideslide($('supp_caro'), 60, 20);
887 if ($BRISK_SHOWHTML == "debugtable") {
889 room_checkspace(12, <?php echo TABLES_N; ?>, 50);
894 // alert("INDEX START");
897 if ($G_with_topbanner) {
898 printf(" topbanner_init();\n");
900 if ($G_with_sidebanner) {
901 printf(" sidebanner_init();\n");
903 if ($G_with_sidebanner2) {
904 printf(" sidebanner2_init();\n");
908 xhr_rd = createXMLHttpRequest();
909 // xhr_rd.setRequestHeader("Content-type", "text/html; charset=utf-8");
910 sess = "<?php echo "$sess"; ?>";
911 tra = new train($('room_tit'));
912 window.onunload = onunload_cb;
913 window.onbeforeunload = onbeforeunload_cb;
914 g_withflash = DetectFlashVer(6,0,0);
915 if (g_withflash == false) {
916 $("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>';
919 $("proflashext").innerHTML = "";
921 setTimeout(xhr_rd_poll, 0, sess);
922 // alert("ARR LENGTH "+g_preload_img_arr.length);
923 setTimeout(preload_images, 0, g_preload_img_arr, g_imgct);
927 /* 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" */
928 echo show_notify($mlang_room['regwarn'][$G_lang], 0, $mlang_room['btn_rettabs'][$G_lang], 400, 150);
938 <!-- if myconsole <body onunload="deconsole();"> -->
941 printf($brisk_header_form);
942 printf("<table class=\"floaty\"><tr><td class=\"floatyleft\">\n");
943 /* 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>',
945 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>',
947 printf($brisk_vertical_menu, '<!-- <br><input type="button" class="button" name="xabout" value="About." onclick="act_about();">--><br>',
951 if ($G_with_sidebanner xor $G_with_sidebanner2) {
955 if ($G_with_sidebanner) {
956 printf("%s", $G_sidebanner);
957 if ($G_with_sidebanner2) {
963 if ($G_with_sidebanner2) {
964 printf("%s", $G_sidebanner2);
969 <!-- =========== tables =========== -->
970 <input name="sess" type="hidden" value="<?php echo "$user->sess"; ?>">
971 <table class="macro"><tr><td>
972 <?php echo "$tables"; ?>
974 <?php echo "$standup"; ?>
978 <!-- =========== bottom =========== -->
979 <div id="bottom" class="bottom">
980 <b>Chat</b> <span id="list_info" style="color: red;"></span><br>
981 <div id="txt" class="chatt">
983 <div style="text-align: center; ">
984 <!-- MLANG: scrivi un invito al tavolo e clicca -->
985 <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;">
986 <div id="myname"></div>
988 <input id="txt_in" maxlength="128" type="text" style="width: 100%;" onkeypress="chatt_checksend(this,event);">
993 <div id="authbox" class="notify" style="text-align: center;">
996 <!-- MLANG: Garantisci per un tuo conoscente: -->
997 <?php echo $mlang_room['tit_warr'][$G_lang]; ?>
1001 <form id="auth_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_authbox(this);">
1002 <input type="hidden" name="realsub" value="666">
1003 <table class="login">
1004 <tr><td>nickname:</td>
1005 <td><input id="nameid" class="input_text" name="name" type="text" size="24" maxlength="12" value=""></td></tr>
1006 <tr><td>e-mail:</td>
1007 <td><input id="emailid" class="input_text" name="email" type="text" size="24" maxlength="1024" value=""></td></tr>
1008 <tr><td colspan="2" style="text-align: center;">
1009 <!-- MLANG: Garantisci per un tuo conoscente: -->
1010 <input id="subid" name="sub" value=
1011 "<?php echo $mlang_room['btn_send'][$G_lang]; ?>"
1012 type="submit" onclick="this.form.elements['realsub'].value = 'invia';" class="button">
1013 <!-- MLANG: Garantisci per un tuo conoscente: -->
1014 <input id="cloid" name="clo" value=
1015 "<?php echo $mlang_room['btn_close'][$G_lang]; ?>"
1016 type="submit" class="button" onclick="this.form.elements['realsub'].value = 'chiudi';"></td></tr>
1020 <div id="mesgtoadmbox" class="notify_opaque" style="text-align: center;">
1022 <!--MLANG: Invia un messaggio o una segnalazione all'amministratore: -->
1023 <b><?php echo $mlang_room['mesgtoadm_tit'][$G_lang];?></b>
1025 <form id="mesgtoadm_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_mesgtoadmbox(this);">
1026 <input type="hidden" name="realsub" value="666">
1027 <table class="login">
1028 <!--MLANG: soggetto -->
1029 <tr><td><b><?php echo $mlang_room['mesgtoadm_sub'][$G_lang];?></b></td>
1030 <td><input id="subjid" class="input_text" name="subj" type="text" size="32" maxlength="255" value=""></td></tr></table>
1031 <table class="login">
1032 <tr><td><img title="messaggio" class="nobo" src="img/mesgtoadm_mesg<?php echo $G_lng;?>.png"></td>
1033 <td><textarea id="mesgid" class="input_text" name="mesg" cols="40" rows="8" wrap="soft"></textarea></td></tr>
1034 <tr><td colspan="2" style="text-align: center;">
1035 <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">
1036 <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>
1040 <div id="heartbit"></div>
1041 <div id="sandbox"></div>
1042 <div id="imgct"></div>
1043 <div id="logz"></div>
1044 <div id="sandbox2"></div>
1045 <div id="response"></div>
1046 <div id="remark"></div>
1047 <div id="xhrstart"></div>
1048 <div id="xhrlog"></div>
1049 <div id="xhrdeltalog"></div>