From: Matteo Nastasi (mop) Date: Wed, 1 Apr 2009 07:37:45 +0000 (+0000) Subject: return bug fixed, sidebanner, bg updated X-Git-Tag: 3.0.0~124 X-Git-Url: http://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=f62bcf4727b440b940afee728b58be12a8d2620e return bug fixed, sidebanner, bg updated --- diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 63656ed..14c071d 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -27,7 +27,7 @@ define(BRISK_CONF, "brisk.conf.pho"); define(FTOK_PATH, "/var/lib/brisk"); define(LEGAL_PATH, "/tmp/legal_brisk"); define(PROXY_PATH, "/var/lib/brisk_proxy"); -define(TABLES_N, 32); +define(TABLES_N, 36); define(PLAYERS_N, 3); define(MAX_POINTS, 5); define(MAX_PLAYERS, (20 + (PLAYERS_N * TABLES_N))); @@ -80,10 +80,10 @@ $G_lng = ""; // $G_lng = "_en"; $G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 ); -$G_brisk_version = "2.1.6 - trusty"; +$G_brisk_version = "2.1.7 - trusty"; /* MLANG: ALL THE INFO STRINGS IN brisk.phh */ -$root_wellarr = Array ( 'Brisk (Ver. '.$G_brisk_version.'), NOVITA\': menu comandi e filtro sui non autenticati.', +$root_wellarr = Array ( 'Brisk (Ver. '.$G_brisk_version.'), NOVITA\': menu comandi, filtro opzionale sui non autenticati e "return bug" corretto.', 'Se vuoi iscriverti alla Mailing List, cliccala!' ); $G_room_help= ' @@ -144,6 +144,14 @@ function xcapelt($s) return (str_replace($from, $to, $s)); } +function xcapemesg($s) +{ + $from = array ( "\n"); + $to = array ( "\\n"); + + return (str_replace($from, $to, $s)); +} + class Table { var $idx; @@ -691,7 +699,7 @@ class Room { $this->table[$i]->auth_only = FALSE; } */ - if ($i < 16) + if ($i < 12) $this->table[$i]->auth_only = TRUE; else $this->table[$i]->auth_only = FALSE; diff --git a/web/brisk.css b/web/brisk.css index e586175..76dfd5b 100644 --- a/web/brisk.css +++ b/web/brisk.css @@ -24,7 +24,7 @@ */ body { - background-image: url('img/wip_bg.jpg'); + background-image: url('img/brisk2bg.jpg'); background-color: #fafafa; background-repeat: no-repeat; background-position: top center; diff --git a/web/commons.js b/web/commons.js index c5eba32..63bb79b 100644 --- a/web/commons.js +++ b/web/commons.js @@ -890,6 +890,25 @@ function topbanner_cb() // console.log("A: "+a+" B: "+b); } +function sidebanner_init() +{ + setInterval(sidebanner_cb, 666); +; +} + +function sidebanner_cb() +{ + var a, b; + + a = $('sidebanner').style.backgroundColor; + b = $('sidebanner').style.borderLeftColor; + + $('sidebanner').style.backgroundColor = b; + $('sidebanner').style.borderColor = a+" "+a+" "+a+" "+a; + + // console.log("A: "+a+" B: "+b); +} + function langtolng(lang) { diff --git a/web/index.php b/web/index.php index bc0735f..effe155 100644 --- a/web/index.php +++ b/web/index.php @@ -46,6 +46,7 @@ log_load("index.php"); function main() { GLOBAL $G_with_topbanner, $G_topbanner, $G_is_local; + GLOBAL $G_with_sidebanner, $G_sidebanner; GLOBAL $sess, $name, $pass_private, $table_idx, $table_token, $BRISK_SHOWHTML, $BRISK_DEBUG, $_SERVER; GLOBAL $G_lang, $G_lng, $mlang_room; $is_login = FALSE; @@ -465,6 +466,9 @@ supported by:

if ($G_with_topbanner) { printf(" topbanner_init();\n"); } + if ($G_with_sidebanner) { + printf(" sidebanner_init();\n"); + } ?> g_withflash = DetectFlashVer(6,0,0); @@ -484,6 +488,9 @@ supported by:

printf($brisk_header_form); printf("
\n"); printf($brisk_vertical_menu, '', ''); + if ($G_with_sidebanner) { + printf("

%s", $G_sidebanner); + } printf("
"); ?> @@ -577,6 +584,10 @@ else { if ($G_with_topbanner) { printf(" topbanner_init();\n"); } + if ($G_with_sidebanner) { + printf(" sidebanner_init();\n"); + } + ?> xhr_rd = createXMLHttpRequest(); // xhr_rd.setRequestHeader("Content-type", "text/html; charset=utf-8"); @@ -613,8 +624,14 @@ if ($is_login) {
\n"); - printf($brisk_vertical_menu, '



', + /* printf($brisk_vertical_menu, '



', + $brisk_donate);*/ + printf($brisk_vertical_menu, '

', $brisk_donate); + + if ($G_with_sidebanner) { + printf("

%s", $G_sidebanner); + } printf("
"); ?> diff --git a/web/index_wr.php b/web/index_wr.php index f1e55f1..80c7edd 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -52,7 +52,7 @@ if (array_search($_SERVER['REMOTE_ADDR'], $G_black_list) !== FALSE) { $is_spawn = FALSE; -log_wr('COMM: '.$mesg); +log_wr('COMM: '.xcapemesg($mesg)); $sem = Room::lock_data(); if (($room = &Room::load_data()) == FALSE) { @@ -63,7 +63,7 @@ if (($room = &Room::load_data()) == FALSE) { } if (($user = &$room->get_user($sess, &$idx)) == FALSE) { Room::unlock_data($sem); - $argz = explode('|', $mesg); + $argz = explode('|', xcapemesg($mesg)); if ($argz[0] == 'getchallenge') { GLOBAL $cli_name; @@ -119,7 +119,7 @@ if (($user = &$room->get_user($sess, &$idx)) == FALSE) { } exit; } -$argz = explode('|', $mesg); +$argz = explode('|', xcapemesg($mesg)); log_wr('POSTSPLIT: '.$argz[0]); @@ -261,7 +261,7 @@ else if ($user->stat == 'room') { } else if ($argz[0] == 'chatt') { - $room->chatt_send(&$user,$mesg); + $room->chatt_send(&$user, xcapemesg($mesg)); } /********************** * *