X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Findex.php;h=defcdf017927a9e5e9bbe1965166c84d76d90ffe;hb=ecf6a45e748c8b5c9fa731dbe364a7eb53cd59a7;hp=b5ed1e9673bb4a4f4b5b8da021e4fd8f4d081359;hpb=55e720e85cae9b2fb69fac06ebe57ea35119a440;p=brisk.git
diff --git a/web/index.php b/web/index.php
index b5ed1e9..defcdf0 100644
--- a/web/index.php
+++ b/web/index.php
@@ -3,7 +3,7 @@
* brisk - index.php
*
* Copyright (C) 2006-2012 Matteo Nastasi
- * mailto: nastasi@alternativeoutput.it
+ * mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
@@ -22,6 +22,7 @@
*
*/
+require_once("Obj/user.phh");
require_once("Obj/brisk.phh");
require_once("Obj/auth.phh");
require_once("Obj/proxyscan.phh");
@@ -38,8 +39,18 @@ $mlang_room = array( 'userpasserr' => array('it' => 'Utente e/o password errati
'en' => 'Standing players'),
'headline' => array('it' => 'briscola chiamata in salsa ajax',
'en' => 'declaration briscola in ajax sauce (Beta)'),
- 'welcome' => array('it' => 'Digita il tuo nickname per accedere ai tavoli della briscola',
- 'en' => 'Enter your nickname to access to the tables of briscola'),
+ 'welcome' => array('it' => 'Digita il tuo nickname per accedere ai tavoli della briscola.',
+ 'en' => 'Enter your nickname to access to the tables of briscola.'),
+ 'reas_unkn' => array('it' => 'Logout per motivi sconosciuti.',
+ 'en' => 'Logout with unknown reason.'),
+ 'reas_lout' => array('it' => 'Orevoire.',
+ 'en' => 'EN Orevoire.'),
+ 'reas_tout' => array('it' => 'Abbiamo perso le tue tracce, quindi ti abbiamo disconnesso.',
+ 'en' => 'EN Abbiamo perso le tue tracce, quindi ti abbiamo disconnesso.'),
+ 'reas_ttot' => array('it' => 'Abbiamo perso le tue tracce mentre stavi giocando, quindi ti abbiamo disconnesso.',
+ 'en' => 'EN Abbiamo perso le tue tracce mentre stavi giocando, quindi ti abbiamo disconnesso.'),
+ 'reas_anot' => array('it' => 'La tua sessione è stata assegnata ad un altro browser.',
+ 'en' => 'EN La tua sessione è stata assegnata ad un altro browser.'),
'btn_enter' => array('it' => 'entra',
'en' => 'enter'),
'passwarn' => array('it' => 'Se non hai ancora una password, lascia il campo in bianco ed entra.',
@@ -96,7 +107,7 @@ $mlang_room = array( 'userpasserr' => array('it' => 'Utente e/o password errati
'en' => 'mop'),
'st_visch_desc' => array('it' => 'vischio',
'en' => 'mop'),
-
+
'tit_ticker' => array('it' => 'scrivi un invito al tavolo e clicca',
'en' => 'write an invitation at the table and click'),
'itm_warr' => array('it' => 'garantisci',
@@ -185,6 +196,10 @@ $mlang_room = array( 'userpasserr' => array('it' => 'Utente e/o password errati
'en' => 'user\'s placings'),
'itm_cla' => array('it' => 'classifiche',
'en' => 'placings'),
+ 'tit_mnu' => array('it' => 'minuta giornaliera',
+ 'en' => 'daily report'),
+ 'itm_mnu' => array('it' => 'minuta',
+ 'en' => 'daily deport'),
'tit_rmap' => array('it' => 'prossime funzionalità implementate',
'en' => 'roadmap of next functionalities'),
'itm_rmap' => array('it' => 'roadmap',
@@ -233,23 +248,76 @@ function poll_dom() {
return '';
}
-function carousel_top()
+function sidebanners_init($sidebanner_idx)
{
- $rn = rand(1, 3);
- return (sprintf('', $rn));
+ for ($i = 0 ; $i < count($sidebanner_idx) ; $i++) {
+ printf(" sidebanner_init(%d);\n", $i);
+ }
+}
+
+function sidebanners_render($sidebanner, $sidebanner_idx)
+{
+ $sb_n = count($sidebanner_idx);
+ if ($sb_n == 0) {
+ return;
+ }
+
+ if ($sb_n == 1) {
+ printf("
");
+ }
+
+ for ($i = 0 ; $i < $sb_n ; $i++) {
+ $idx = $sidebanner_idx[$i];
+ $sb = $sidebanner[$idx];
+ if (!array_key_exists('link', $sb)
+ || !array_key_exists('title', $sb)
+ || !array_key_exists('icon_big', $sb)) {
+ continue;
+ }
+ $sb_type = (array_key_exists('type', $sb) ? $sb['type'] : 'meeting');
+ if (array_key_exists('icon', $sb)) {
+ $sb_icon = $sb['icon'];
+ }
+ else {
+ if ($sb_type == 'meeting') {
+ if ($sb_n < 3) {
+ $sb_icon = 'img/brisk_meeting60.gif';
+ }
+ else {
+ $sb_icon = 'img/brisk_meeting35.gif';
+ }
+ }
+ else {
+ // no standard icon for other type of events please add them
+ continue;
+ }
+ }
+ $sb_dx = (array_key_exists('dx', $sb) ? $sb['dx'] : 100);
+ $sb_dy = (array_key_exists('dy', $sb) ? $sb['dy'] : -230);
+
+ printf('
';
-
+
$tables .= ' '.$mlang_room['tit_tabl'][$G_lang].$i.' ';
$tables .= sprintf('', $i);
$tables .= sprintf('', $i);
@@ -398,14 +494,13 @@ function index_main(&$room, $transp_type, &$header_out, $addr, $get, $post, $coo
}
}
$tables .= ' |
';
$standup .= ' ';
/* MLANG: "Giocatori in piedi" */
// $standup .= '
-Giocatori in piedi - Come ottenere user e password - ';
$standup .= ''.$mlang_room['standing'][$G_lang].' ';
-
+
$standup .= sprintf('');
// MLANG Esco.
$standup .= '';
@@ -473,9 +568,12 @@ function index_main(&$room, $transp_type, &$header_out, $addr, $get, $post, $coo
-
-
- $brisk_donate = file_get_contents(FTOK_PATH."/brisk_donate.txt");
+ /* NOTE: Brisk donate or donate fake if local */
+ if (!$G_is_local)
+ $brisk_donate = file_get_contents(FTOK_PATH."/brisk_donate.txt");
+ else
+ $brisk_donate = 'BRISK_DONATE ';
+
if ($brisk_donate == FALSE)
$brisk_donate = "";
@@ -611,6 +709,10 @@ google_color_url = "000000";
onmouseover="menu_hide(0,1);"
title="'.$mlang_room['tit_cla'][$G_lang].'" onclick="act_placing();">'.$mlang_room['itm_cla'][$G_lang].'+'.$mlang_room['itm_mnu'][$G_lang].' + '.$mlang_room['itm_rmap'][$G_lang].' @@ -805,7 +907,7 @@ google_color_url = "000000"; // MLANG garantisci .$mlang_room['tit_splash'][$G_lang]. ' -'.($user->flags & USER_FLAG_AUTH ? ' +'.($user->is_auth() ? ' '.$altout_support_big.' -
- FACEBOOK HERE
+' ) . '
+
%s
%s
- -'; +'; /* Templates. */ if ($ACTION == 'login') { @@ -884,13 +988,15 @@ supported by: var g_lng = " echo $G_lng; ?>"; var g_tables_n = echo TABLES_N; ?>; var g_tables_auth_n = echo TABLES_AUTH_N; ?>; + var g_tables_cert_n = echo TABLES_CERT_N; ?>; var g_prefs, g_prefs_new = null; var g_listen; var g_withflash = false; var g_is_spawn = 0; + var g_nd = null; + var g_brow = null; var gst = new globst(); var topbanner_sfx, topbanner_dx; - var g_brow = null; var xstm = null; var sess = "not_connected"; var spo_slide, sup_slide; @@ -908,13 +1014,8 @@ supported by: g_withflash = DetectFlashVer(6,0,0); @@ -928,39 +1029,46 @@ supported by: //--> + + + + + + | |
\n");
printf($brisk_vertical_menu, '', '');
- if ($G_with_sidebanner xor $G_with_sidebanner2) {
- printf(" "); - } - - if ($G_with_sidebanner) { - printf("%s", $G_sidebanner); - if ($G_with_sidebanner2) { - printf(" "); - } - } - - - if ($G_with_sidebanner2) { - printf("%s", $G_sidebanner2); - } + sidebanners_render($G_sidebanner, $G_sidebanner_idx); printf(" | ");
?>
-
- + + + |