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_ticker' => array('it' => 'scrivi un invito al tavolo e clicca',
61 'en' => 'write an invitation at the table and click'),
62 'itm_warr' => array('it' => 'garantisci',
64 'warr_desc' => array('it' => 'garantisci per un tuo conoscente',
65 'en' => 'guarantee for a friend'),
66 'tit_warr' => array('it' => 'Garantisci per un tuo conoscente.',
67 'en' => 'Guarantee for a friend.'),
68 'itm_list' => array('it' => 'ascolta',
70 'list_desc' => array('it' => 'imposta le regole di ascolto',
71 'en' => 'set the listen rules'),
72 'tit_listall' => array('it' => 'tutti',
74 'listall_desc' => array('it' => 'leggi tutti i messaggi di tutti gli utenti collegati',
75 'en' => 'listen all messages from each user connected'),
76 'tit_listaut' => array('it' => 'solo autenticati',
77 'en' => 'only authorized'),
78 'listaut_desc' => array('it' => 'leggi soltanto i messaggi degli utenti con password',
79 'en' => 'listen messages only from authenticated users'),
80 'tit_help' => array('it' => 'informazioni utili su Brisk',
81 'en' => 'usefull information about Brisk'),
82 'itm_help' => array('it' => 'aiuto',
84 'tit_hpage' => array('it' => 'homepage del progetto',
85 'en' => 'project homepage (ita)'),
86 'tit_what' => array('it' => 'di cosa si tratta',
87 'en' => 'what is the project'),
88 'itm_what' => array('it' => 'cos\'è',
89 'en' => 'what is it'),
90 'url_rules' => array('it' => 'http://it.wikipedia.org/wiki/Briscola#Gioco_a_5',
91 'en' => 'http://it.wikipedia.org/wiki/Briscola#Gioco_a_5&EN=true'),
92 'itm_rules' => array('it' => 'regole',
94 'tit_rules' => array('it' => 'come si gioca',
95 'en' => 'how to play'),
96 'tit_shot' => array('it' => 'screenshots dell\'applicazione',
97 'en' => 'screenshots of the web-application'),
98 'tit_comp' => array('it' => 'compatibilità con i browser',
99 'en' => 'browsers compatibility'),
100 'itm_comp' => array('it' => 'compatibilità',
101 'en' => 'compatibility'),
102 'tit_src' => array('it' => 'sorgenti dell\'applicazione web',
103 'en' => 'sources of the web-application'),
104 'itm_src' => array('it' => 'sorgenti',
106 'tit_ml' => array('it' => 'come iscriversi alla mailing list',
107 'en' => 'how to subscribe the mailing list'),
108 'itm_ml' => array('it' => 'mailing list',
109 'en' => 'mailing list'),
110 'tit_pro' => array('it' => 'come fare pubblicità a Brisk!',
111 'en' => 'how to spread Brisk!'),
112 'itm_pro' => array('it' => 'propaganda',
113 'en' => 'propaganda'),
114 'tit_mail' => array('it' => 'contatti',
116 'itm_mail' => array('it' => 'contatti',
118 'tit_rmap' => array('it' => 'prossime funzionalità implementate',
119 'en' => 'roadmap of next functionalities'),
120 'itm_rmap' => array('it' => 'roadmap',
122 'tit_meet' => array('it' => 'foto dei raduni di briskisti',
123 'en' => 'photos of brisk meetings'),
124 'itm_meet' => array('it' => 'raduni',
126 'tit_mesg' => array('it' => 'manda un messaggio o una segnalazione all\'amministratore del sito',
127 'en' => 'send a message or a signalling to the administrator' ),
128 'mesgtoadm_tit'=> array('it' => 'Invia un messaggio o una segnalazione all\'amministratore:',
129 'en' => 'Send a message to the administrator:'),
130 'mesgtoadm_sub'=> array('it' => 'soggetto:',
132 'btn_send' => array('it' => 'Invia.',
134 'btn_close' => array('it' => 'Chiudi.',
138 // Use of proxies isn't allowed.
139 if (!$G_is_local && is_proxy())
142 require_once("briskin5/Obj/briskin5.phh");
143 if (DEBUGGING == "local" && $_SERVER['REMOTE_ADDR'] != '127.0.0.1') {
144 echo "Debugging time!";
148 log_load("index.php");
151 function poll_dom() {
152 GLOBAL $G_with_poll, $G_poll_title, $G_poll_entries;
155 $ret = sprintf('<div style="padding: 0px;margin: 0px; height: 8px; font-size: 1px;"></div>
157 <img class="nobo" src="img/brisk_poll.png" onmouseover="menu_hide(0,0); menu_show(\'menu_poll\');">
159 <div style="width: 300px;" class="webstart" id="menu_poll" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
161 <form id="poll_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_pollbox(this);">
162 <input type="hidden" name="realsub" value="666">', $G_poll_title);
163 for ($i = 0 ; $i < count($G_poll_entries) ; $i++) {
164 $ret .= sprintf('<INPUT TYPE="radio" NAME="category" VALUE="%s">%s<hr><br>', $G_poll_entries[$i]['id'],
165 $G_poll_entries[$i]['cont']);
167 $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>
177 GLOBAL $G_with_topbanner, $G_topbanner, $G_is_local;
178 GLOBAL $G_with_sidebanner, $G_sidebanner;
179 GLOBAL $G_with_sidebanner2, $G_sidebanner2;
181 GLOBAL $sess, $name, $pass_private, $table_idx, $table_token, $BRISK_SHOWHTML, $BRISK_DEBUG, $_SERVER;
182 GLOBAL $G_lang, $G_lng, $mlang_room;
189 if (isset($BRISK_SHOWHTML) == FALSE) {
191 $sem = Room::lock_data();
192 log_main("lock Room");
193 $room = &Room::load_data();
198 if (validate_sess($sess)) {
199 log_main("pre garbage_manager UNO");
200 $room->garbage_manager(TRUE);
201 log_main("post garbage_manager");
202 if (($user = &$room->get_user($sess, &$idx)) != FALSE) {
203 log_main("user stat: ".$user->stat);
204 if ($user->stat == "table") {
205 if (Room::save_data(&$room) == FALSE) {
206 echo "ERRORE SALVATAGGIO\n";
209 log_main("unlock Room");
210 Room::unlock_data($sem);
211 setcookie("table_token", $user->table_token, $curtime + 31536000);
212 setcookie("table_idx", $user->table, $curtime + 31536000);
213 header ("Location: briskin5/index.php");
219 if (Room::save_data(&$room) == FALSE) {
220 echo "ERRORE SALVATAGGIO\n";
225 if ($ACTION == "login" && isset($name)) {
227 log_main("pre garbage_manager DUE");
229 if (isset($pass_private) == FALSE) {
230 $pass_private = FALSE;
233 $room->garbage_manager(TRUE);
235 if (($user = &$room->add_user(&$sess, &$idx, $name, $pass_private, $_SERVER['REMOTE_ADDR'])) != FALSE) {
242 log_legal($curtime, $user, "STAT:LOGIN", '');
244 // recovery lost game
245 if ($user->stat == "table") {
246 if (Room::save_data(&$room) == FALSE) {
247 echo "ERRORE SALVATAGGIO\n";
250 log_main("unlock Room");
251 Room::unlock_data($sem);
252 setcookie("table_token", $user->table_token, $curtime + 31536000);
253 setcookie("table_idx", $user->table, $curtime + 31536000);
254 header ("Location: briskin5/index.php");
259 // setcookie ("sess", "", time() + 180);
260 $room->standup_update(&$user);
262 if (Room::save_data(&$room) == FALSE) {
263 echo "ERRORE SALVATAGGIO\n";
268 /* Login Rendering */
269 /* 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." */
272 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpasserr'][$G_lang].'</b></div>';
274 // $body .= '<div class="urgmsg"><b>Il nickname deve contenere almeno una lettera o una cifra.</b></div>';
275 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpassmust'][$G_lang].'</b></div>';
277 // $body .= '<div class="urgmsg"><b>Spiacenti, non ci sono più posti liberi. Riprova più tardi.</b></div>';
278 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpassend'][$G_lang].'</b></div>';
280 // $body .= '<div class="urgmsg"><b>Il tuo nickname è già in uso.</b></div>';
281 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpassuse'][$G_lang].'</b></div>';
293 $body .= '<div class="urgmsg"><b>'.$mlang_room['userpass'.$sfx][$G_lang].'</b></div>';
296 Room::unlock_data($sem);
300 if ($BRISK_SHOWHTML == "debugtable") {
303 else if ($BRISK_SHOWHTML == "debuglogin") {
307 if ($ACTION == "room") {
308 $tables .= '<div class="room_tab">';
309 $tables .= '<table class="room_tab">';
310 for ($ii = 0 ; $ii < TABLES_N ; $ii++) {
311 if ($user->flags & USER_FLAG_AUTH)
314 $i = TABLES_N - $ii - 1;
319 $tables .= '<div class="room_div"><div class="room_tit"><b>'.$mlang_room['tit_tabl'][$G_lang].$i.'</b></div>';
320 $tables .= sprintf('<div class="proxhr" id="table%d"></div>', $i);
321 $tables .= sprintf('<div class="table_act" id="table_act%d"></div>', $i);
323 $tables .= '</td>'."\n";
327 $tables .= '</table></div>';
330 $standup .= '<table class="room_standup"><tr><td><div class="room_standup_orig" id="room_standup_orig"></div>';
331 $standup .= '<div class="room_ex_standup">';
332 /* MLANG: "Giocatori in piedi" */
333 // $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>';
334 $standup .= '<div id="room_tit"><span class="room_titin"><b>'.$mlang_room['standing'][$G_lang].'</b></span></div>';
336 $standup .= sprintf('<div id="standup" class="room_standup"></div>');
338 $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>';
339 $standup .= '</div></td></tr></table>';
342 $altout_sponsor_arr = array( array ( 'id' => 'btn_altout',
343 'url' => 'http://www.alternativeoutput.it',
344 'content' => 'img/altout80x15.png',
345 'content_big' => 'img/logotxt_banner.png'),
346 array ( 'id' => 'btn_virtualsky',
347 'url' => 'http://virtualsky.alternativeoutput.it',
348 'content' => 'img/virtualsky80x15a.gif',
349 'content_big' => 'img/virtualsky_big.png'),
350 array ( 'id' => 'btn_dynamica',
351 'url' => 'http://www.dynamica.it',
352 'content' => 'img/dynamica.png',
353 'content_big' => 'img/dynamica_big.png')
356 $altout_support_arr = array( array ( 'id' => 'btn_brichi',
357 'url' => 'http://www.briscolachiamata.it',
358 'content' => 'img/brichi.png',
359 'content_big' => 'img/brichi_big.png'),
360 array ( 'id' => 'btn_foroli',
361 'url' => 'http://www.forumolimpia.it',
362 'content' => 'img/forumolimpia.gif',
363 'content_big' => 'img/forumolimpia_big.png' ) );
367 $altout_support = "";
368 $altout_support_big = "";
369 for ($i = 0 ; $i < 3 ; $i++) {
370 $ii = ($i < 2 ? $i : 0);
372 $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>',
373 $i * 20, $altout_support_arr[$ii]['url'],
374 $altout_support_arr[$ii]['id'], $altout_support_arr[$ii]['content']);
376 $altout_support_big .= sprintf('<img style="position: absolute;" class="nobohide" id="%s_big" src="%s">',
377 $altout_support_arr[$ii]['id'], $altout_support_arr[$ii]['content_big']);
381 // seed with microseconds since last "whole" second
382 // srand ((double) microtime() * 1000000);
383 // $randval = rand(0,count($altout_sponsor_arr)-1);
384 $altout_sponsor = "";
385 $altout_sponsor_big = "";
386 for ($i = 0 ; $i < 4 ; $i++) {
387 $ii = ($i < 3 ? $i : 0);
389 $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>',
390 $i * 20, $altout_sponsor_arr[$ii]['url'],
391 $altout_sponsor_arr[$ii]['id'], $altout_sponsor_arr[$ii]['content']);
393 $altout_sponsor_big .= sprintf('<img class="nobohide" id="%s_big" src="%s">',
394 $altout_sponsor_arr[$ii]['id'], $altout_sponsor_arr[$ii]['content_big']);
401 $brisk_donate = file_get_contents(FTOK_PATH."/brisk_donate.txt");
402 if ($brisk_donate == FALSE)
406 /* MLANG: "briscola chiamata in salsa ajax", */
408 $brisk_header_form = '<div class="container">
409 <!-- =========== header =========== -->
410 <div id="header" class="header">
411 <table width="100%%" border="0" cols="3"><tr>
412 <td align="left"><div style="padding-left: 8px;">'.($G_is_local ? '' :
413 '<script type="text/javascript"><!--
414 google_ad_client = "pub-5246925322544303";
415 google_ad_width = 234;
416 google_ad_height = 60;
417 google_ad_format = "234x60_as";
418 google_ad_type = "text_image";
419 google_ad_channel = "";
420 google_color_border = "808080";
421 google_color_bg = "f6f6f6";
422 google_color_link = "ffae00";
423 google_color_text = "404040";
424 google_color_url = "000000";
427 <script type="text/javascript"
428 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
431 <td align="center">'.($G_with_topbanner ? '<table><tr><td>' : '').'<div style="text-align: center;">
432 <img class="nobo" src="img/brisk_logo64.png">
433 '.$mlang_room['headline'][$G_lang].'<br>
434 </div>'.($G_with_topbanner ? sprintf('</td><td>%s</td></tr></table>', $G_topbanner) : '').'</td>
435 <td align="right"><div style="padding-right: 8px;">
436 '.($G_is_local ? '' :
437 '<script type="text/javascript"><!--
438 google_ad_client = "pub-5246925322544303";
439 google_ad_width = 234;
440 google_ad_height = 60;
441 google_ad_format = "234x60_as";
442 google_ad_type = "text_image";
443 google_ad_channel = "";
444 google_color_border = "808080";
445 google_color_bg = "f6f6f6";
446 google_color_link = "ffae00";
447 google_color_text = "404040";
448 google_color_url = "000000";
451 <script type="text/javascript"
452 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
458 /* MLANG: ALL THE VERTICAL MENU */
459 $brisk_vertical_menu = '
460 <!-- =========== vertical menu =========== -->
461 <div class="topmenu">
462 <!-- <a target="_blank" href="/briskhome.php"></a> -->
464 <div class="webstart_hilite">
465 <img class="nobo" src="img/brisk_start.png" onmouseover="menu_hide(0,0); menu_show(\'menu_webstart\');">
466 <div class="webstart" id="menu_webstart" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
468 <a href="#" onmouseover="menu_hide(0,1);" title="'.$mlang_room['tit_help'][$G_lang].'" onclick="act_help();"
469 >'.$mlang_room['itm_help'][$G_lang].'</a><br>
471 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php"
472 onmouseover="menu_hide(0,1);"
473 title="'.$mlang_room['tit_hpage'][$G_lang].'">homepage</a><br>
475 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#cose"
476 onmouseover="menu_hide(0,1);"
477 title="'.$mlang_room['tit_what'][$G_lang].'">'.$mlang_room['itm_what'][$G_lang].'</a><br>
479 <a target="_blank" href="'.$mlang_room['url_rules'][$G_lang].'"
480 onmouseover="menu_hide(0,1);"
481 title="'.$mlang_room['tit_rules'][$G_lang].'">'.$mlang_room['itm_rules'][$G_lang].'</a><br>
483 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#shots"
484 onmouseover="menu_hide(0,1);"
485 title="'.$mlang_room['tit_shot'][$G_lang].'">screenshoots</a><br>
487 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#comp"
488 onmouseover="menu_hide(0,1);"
489 title="'.$mlang_room['tit_comp'][$G_lang].'">'.$mlang_room['itm_comp'][$G_lang].'</a><br>
491 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#sources"
492 onmouseover="menu_hide(0,1);"
493 title="'.$mlang_room['tit_src'][$G_lang].'">'.$mlang_room['itm_src'][$G_lang].'</a><br>
495 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#mailing"
496 onmouseover="menu_hide(0,1);"
497 title="'.$mlang_room['tit_ml'][$G_lang].'">'.$mlang_room['itm_ml'][$G_lang].'</a><br>
499 <a target="_blank" href="http://www.alternativeoutput.it/briskhome.php#prop"
500 onmouseover="menu_hide(0,1);"
501 title="'.$mlang_room['tit_pro'][$G_lang].'">'.$mlang_room['itm_pro'][$G_lang].'</a><br>
503 onmouseover="menu_hide(0,1);"
504 title="credits" onclick="act_about();">about</a><br>
506 <a href="mailto:brisk@alternativeoutput.it"
507 onmouseover="menu_hide(0,1);"
508 title="'.$mlang_room['tit_mail'][$G_lang].'">'.$mlang_room['itm_mail'][$G_lang].'</a><br>
514 onmouseover="menu_hide(0,1);"
515 title="perché supportare brisk?" onclick="act_whysupport();">supportare?</a><br>
518 onmouseover="menu_hide(0,1);"
519 title="'.$mlang_room['tit_rmap'][$G_lang].'" onclick="act_roadmap();">'.$mlang_room['itm_rmap'][$G_lang].'</a><br>
521 <a href="#" title="'.$mlang_room['tit_meet'][$G_lang].'"
522 onmouseover="menu_show(\'menu_meeting\');">'.$mlang_room['itm_meet'][$G_lang].'</a><br>
524 <div id="menu_meeting" class="webstart">
525 <a href="http://www.anomalia.it/mop/photoo"
526 target="_blank" onmouseover="menu_hide(0,2);"
527 title="Torneo di Milano del 17/05/2008" >Milano 05/08</a><br>
529 <a href="http://www.anomalia.it/mop/photoo?album=brisk_pc0806"
530 target="_blank" onmouseover="menu_hide(0,2);"
531 title="Raduno di Piacenza del del 15/06/2008" >Piacenza 06/08</a><br>
533 </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\');">
535 <div class="webstart" id="menu_commands" onmouseover="menu_over(1,this);" onmouseout="menu_over(-1,this);">
537 <a href="#" title="imposta lo stato del tuo utente"
538 onmouseover="menu_hide(0,1); menu_show(\'menu_state\');">stato</a><br>
539 <div id="menu_state" class="webstart">
541 onmouseover="menu_hide(0,2);"
542 title="" onclick="act_chatt(\'/st normale\'); menu_over(-1,this);">normale</a><br>
545 onmouseover="menu_hide(0,2);"
546 title="" onclick="act_chatt(\'/st pausa\'); menu_over(-1,this);">pausa <img class="unbo" src="img/st_pau.png"></a><br>
549 onmouseover="menu_hide(0,2);"
550 title="" onclick="act_chatt(\'/st fuori\'); menu_over(-1,this);">fuori <img class="unbo" src="img/st_out.png"></a><br>
553 onmouseover="menu_hide(0,2);"
554 title="" onclick="act_chatt(\'/st cane\'); menu_over(-1,this);">cane <img class="unbo" src="img/st_dog.png"></a><br>
557 onmouseover="menu_hide(0,2);"
558 title="" onclick="act_chatt(\'/st cibo\'); menu_over(-1,this);">cibo <img class="unbo" src="img/st_eat.png"></a><br>
561 onmouseover="menu_hide(0,2);"
562 title="" onclick="act_chatt(\'/st lavoro\'); menu_over(-1,this);">lavoro <img class="unbo" src="img/st_wrk.png"></a><br>
565 onmouseover="menu_hide(0,2);"
566 title="" onclick="act_chatt(\'/st sigaretta\'); menu_over(-1,this);">sigaretta <img class="unbo" src="img/st_smk.png"></a><br>
569 onmouseover="menu_hide(0,2);"
570 title="" onclick="act_chatt(\'/st presente\'); menu_over(-1,this);">presente <img class="unbo" src="img/st_eye.png"></a><br>
574 <a href="#" title="avvia un ticker pubblicitario per il tuo tavolo"
575 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>
578 // MLANG garantisci per un tuo conoscente
579 .$mlang_room['warr_desc'][$G_lang].
581 onmouseover="menu_hide(0,1);" onclick="act_chatt(\'/authreq\'); menu_over(-1,this);">'
583 .$mlang_room['itm_warr'][$G_lang].
588 // MLANG imposta le regole di ascolto
589 .$mlang_room['list_desc'][$G_lang].
590 '" onmouseover="menu_hide(0,1); menu_show(\'menu_listen\');">'
592 .$mlang_room['itm_list'][$G_lang].
594 <div id="menu_listen" class="webstart">
596 onmouseover="menu_hide(0,2);"
598 // MLANG leggo i messaggi di tutti gli utenti collegati
599 .$mlang_room['listall_desc'][$G_lang].
600 '" onclick="act_chatt(\'/listen all\'); menu_over(-1,this);"><span id="list_all">'
602 .$mlang_room['tit_listall'][$G_lang].
605 onmouseover="menu_hide(0,2);"
607 // MLANG leggo soltanto i messaggi degli utenti con password
608 .$mlang_room['listaut_desc'][$G_lang].
609 '" onclick="act_chatt(\'/listen auth\'); menu_over(-1,this);"><span id="list_auth">'
610 // MLANG solo autenticati
611 .$mlang_room['tit_listaut'][$G_lang].
616 </div>'.($G_with_poll ? '' : '<div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
617 <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();">').'
618 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
619 '.($user->flags & USER_FLAG_AUTH ? '
620 <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()
622 <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();">
628 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
630 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 4px; font-size: 1px;"></div>
631 <div id="spon_caro" style="overflow: hidden; height: 18px; /* border: 1px solid red; */ ">
632 <div style="/*background-color: green; */ text-align: left; position: relative; padding: 0px; margin: 0px; top: 0px; height: 80px;">'.$altout_sponsor.'<br>
634 <div style="position: absolute;">
635 '.$altout_sponsor_big.'
637 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 8px; font-size: 1px;"></div>
639 <div style="padding: 0px; margin: 0px; witdh: 50px; height: 4px; font-size: 1px;"></div>
640 <div id="supp_caro" style="overflow: hidden; height: 18px; /* border: 1px solid red; */">
641 <div style="/* background-color: green; */ text-align: left; position: relative; padding: 0px; margin: 0px; top: 0px; height: 80px;">'.$altout_support.'<br>
645 <div style="position: absolute;">
646 '.$altout_support_big.'
648 <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>
650 <div id="proflashext" class="proflashext"><div id="proflash" class="proflash">
657 if ($ACTION == 'login') {
658 header('Content-type: text/html; charset="utf-8"',true);
663 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
664 <link rel="shortcut icon" href="img/brisk_ico.png">
665 <script type="text/javascript" src="menu.js"></script>
666 <!-- <script type="text/javascript" src="dnd.js"></script>
667 <script type="text/javascript" src="dom-drag.js"></script> -->
668 <script type="text/javascript" src="commons.js"></script>
669 <script type="text/javascript" src="xhr.js"></script>
670 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
671 <script type="text/javascript" src="AC_OETags.js"></script>
672 <script type="text/javascript" src="room.js"></script>
673 <script type="text/javascript" src="md5.js"></script>
674 <script type="text/javascript" src="probrowser.js"></script>
675 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
676 <link rel="stylesheet" type="text/css" href="brisk.css">
677 <link rel="stylesheet" type="text/css" href="room.css">
679 <SCRIPT type="text/javascript"><!--
680 var g_lang = "<? echo $G_lang; ?>";
681 var g_lng = "<? echo $G_lng; ?>";
682 var g_withflash = false;
684 var gst = new globst();
685 var topbanner_sfx, topbanner_dx;
687 var sess = "not_connected";
688 var spo_slide, sup_slide;
690 window.onload = function() {
691 // alert(window.onbeforeunload);
692 g_brow = get_browser_agent();
693 spo_slide = new sideslide($('spon_caro'), 80, 20);
694 sup_slide = new sideslide($('supp_caro'), 60, 20);
698 if ($G_with_topbanner) {
699 printf(" topbanner_init();\n");
701 if ($G_with_sidebanner) {
702 printf(" sidebanner_init();\n");
704 if ($G_with_sidebanner2) {
705 printf(" sidebanner2_init();\n");
709 g_withflash = DetectFlashVer(6,0,0);
710 if (g_withflash == false) {
711 $("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>';
714 $("proflashext").innerHTML = "";
720 <!-- if myconsole <body onunload="deconsole();"> -->
723 printf($brisk_header_form);
724 printf("<table class=\"floaty\"><tr><td class=\"floatyleft\">\n");
725 printf($brisk_vertical_menu, '', '');
727 if ($G_with_sidebanner xor $G_with_sidebanner2) {
731 if ($G_with_sidebanner) {
732 printf("%s", $G_sidebanner);
733 if ($G_with_sidebanner2) {
739 if ($G_with_sidebanner2) {
740 printf("%s", $G_sidebanner2);
745 <!-- =========== tables =========== -->
748 /* 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)" */
751 <div style="text-align: center;">
753 <?php echo $mlang_room['wellcome'][$G_lang];?>
755 <form accept-charset="utf-8" method="post" action="" onsubmit="return j_login_manager(this);">
756 <input id="passid_private" name="pass_private" type="hidden" value="">
757 <table class="login">
759 <td><input id="nameid" class="input_text" name="name" type="text" size="24" maxlength="12" value=""></td></tr>
761 <td><input id="passid" class="input_text" name="pass" type="password" size="24" maxlength="64" value=""></td></tr>
762 <tr><td colspan="2"><input id="sub" value="<?php echo $mlang_room['btn_enter'][$G_lang];?>" type="submit" class="button"></td></tr>
765 <b><?php echo $mlang_room['passwarn'][$G_lang];?></b><br><br>
766 <?php echo $mlang_room['browwarn'][$G_lang];?><br>
770 <div id="imgct"></div>
771 <div id="logz"></div>
772 <div id="sandbox"></div>
773 <div id="sandbox2"></div>
774 <div id="response"></div>
775 <div id="xhrstart"></div>
777 <div id="xhrlog"></div>
779 <div id="xhrdeltalog"></div>
784 else if ($ACTION == 'room') {
785 header('Content-type: text/html; charset="utf-8"',true);
790 <link rel="shortcut icon" href="img/brisk_ico.png">
791 <script type="text/javascript" src="menu.js"></script>
792 <!-- <script type="text/javascript" src="dnd.js"></script>
793 <script type="text/javascript" src="dom-drag.js"></script> -->
794 <script type="text/javascript" src="commons.js"></script>
795 <script type="text/javascript" src="ticker.js"></script>
796 <script type="text/javascript" src="xhr.js"></script>
797 <script type="text/javascript" src="room.js"></script>
798 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
799 <script type="text/javascript" src="AC_OETags.js"></script>
800 <script type="text/javascript" src="probrowser.js"></script>
801 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
802 <link rel="stylesheet" type="text/css" href="brisk.css">
803 <link rel="stylesheet" type="text/css" href="room.css">
804 <SCRIPT type="text/javascript"><!--
806 var g_lang = "<? echo $G_lang; ?>";
807 var g_lng = "<? echo $G_lng; ?>";
811 var gst = new globst();
813 var topbanner_sfx, topbanner_dx;
814 // var nonunload = false;
815 var g_withflash = false;
817 var g_imgtot = g_preload_img_arr.length;
818 var myfrom = "index_php";
820 var spo_slide, sup_slide;
822 window.onload = function() {
823 g_brow = get_browser_agent();
824 spo_slide = new sideslide($('spon_caro'), 80, 20);
825 sup_slide = new sideslide($('supp_caro'), 60, 20);
828 if ($BRISK_SHOWHTML == "debugtable") {
830 room_checkspace(12, <?php echo TABLES_N; ?>, 50);
835 // alert("INDEX START");
838 if ($G_with_topbanner) {
839 printf(" topbanner_init();\n");
841 if ($G_with_sidebanner) {
842 printf(" sidebanner_init();\n");
844 if ($G_with_sidebanner2) {
845 printf(" sidebanner2_init();\n");
849 xhr_rd = createXMLHttpRequest();
850 // xhr_rd.setRequestHeader("Content-type", "text/html; charset=utf-8");
851 sess = "<?php echo "$sess"; ?>";
852 tra = new train($('room_tit'));
853 window.onunload = onunload_cb;
854 window.onbeforeunload = onbeforeunload_cb;
855 g_withflash = DetectFlashVer(6,0,0);
856 if (g_withflash == false) {
857 $("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>';
860 $("proflashext").innerHTML = "";
862 setTimeout(xhr_rd_poll, 0, sess);
863 // alert("ARR LENGTH "+g_preload_img_arr.length);
864 setTimeout(preload_images, 0, g_preload_img_arr, g_imgct);
868 /* 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" */
869 echo show_notify($mlang_room['regwarn'][$G_lang], 0, $mlang_room['btn_rettabs'][$G_lang], 400, 150);
879 <!-- if myconsole <body onunload="deconsole();"> -->
882 printf($brisk_header_form);
883 printf("<table class=\"floaty\"><tr><td class=\"floatyleft\">\n");
884 /* 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>',
886 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>',
888 printf($brisk_vertical_menu, '<!-- <br><input type="button" class="button" name="xabout" value="About." onclick="act_about();">--><br>',
892 if ($G_with_sidebanner xor $G_with_sidebanner2) {
896 if ($G_with_sidebanner) {
897 printf("%s", $G_sidebanner);
898 if ($G_with_sidebanner2) {
904 if ($G_with_sidebanner2) {
905 printf("%s", $G_sidebanner2);
910 <!-- =========== tables =========== -->
911 <input name="sess" type="hidden" value="<?php echo "$user->sess"; ?>">
912 <table class="macro"><tr><td>
913 <?php echo "$tables"; ?>
915 <?php echo "$standup"; ?>
919 <!-- =========== bottom =========== -->
920 <div id="bottom" class="bottom">
921 <b>Chat</b> <span id="list_info" style="color: red;"></span><br>
922 <div id="txt" class="chatt">
924 <div style="text-align: center; ">
925 <!-- MLANG: scrivi un invito al tavolo e clicca -->
926 <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;">
927 <div id="myname"></div>
929 <input id="txt_in" maxlength="128" type="text" style="width: 100%;" onkeypress="chatt_checksend(this,event);">
934 <div id="authbox" class="notify" style="text-align: center;">
937 <!-- MLANG: Garantisci per un tuo conoscente: -->
938 <?php echo $mlang_room['tit_warr'][$G_lang]; ?>
942 <form id="auth_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_authbox(this);">
943 <input type="hidden" name="realsub" value="666">
944 <table class="login">
945 <tr><td>nickname:</td>
946 <td><input id="nameid" class="input_text" name="name" type="text" size="24" maxlength="12" value=""></td></tr>
948 <td><input id="emailid" class="input_text" name="email" type="text" size="24" maxlength="1024" value=""></td></tr>
949 <tr><td colspan="2" style="text-align: center;">
950 <!-- MLANG: Garantisci per un tuo conoscente: -->
951 <input id="subid" name="sub" value=
952 "<?php echo $mlang_room['btn_send'][$G_lang]; ?>"
953 type="submit" onclick="this.form.elements['realsub'].value = 'invia';" class="button">
954 <!-- MLANG: Garantisci per un tuo conoscente: -->
955 <input id="cloid" name="clo" value=
956 "<?php echo $mlang_room['btn_close'][$G_lang]; ?>"
957 type="submit" class="button" onclick="this.form.elements['realsub'].value = 'chiudi';"></td></tr>
961 <div id="mesgtoadmbox" class="notify_opaque" style="text-align: center;">
963 <!--MLANG: Invia un messaggio o una segnalazione all'amministratore: -->
964 <b><?php echo $mlang_room['mesgtoadm_tit'][$G_lang];?></b>
966 <form id="mesgtoadm_form" accept-charset="utf-8" method="post" action="" onsubmit="return j_mesgtoadmbox(this);">
967 <input type="hidden" name="realsub" value="666">
968 <table class="login">
969 <!--MLANG: soggetto -->
970 <tr><td><b><?php echo $mlang_room['mesgtoadm_sub'][$G_lang];?></b></td>
971 <td><input id="subjid" class="input_text" name="subj" type="text" size="32" maxlength="255" value=""></td></tr></table>
972 <table class="login">
973 <tr><td><img title="messaggio" class="nobo" src="img/mesgtoadm_mesg<?php echo $G_lng;?>.png"></td>
974 <td><textarea id="mesgid" class="input_text" name="mesg" cols="40" rows="8" wrap="soft"></textarea></td></tr>
975 <tr><td colspan="2" style="text-align: center;">
976 <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">
977 <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>
981 <div id="heartbit"></div>
982 <div id="sandbox"></div>
983 <div id="imgct"></div>
984 <div id="logz"></div>
985 <div id="sandbox2"></div>
986 <div id="response"></div>
987 <div id="remark"></div>
988 <div id="xhrstart"></div>
989 <div id="xhrlog"></div>
990 <div id="xhrdeltalog"></div>