X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;h=2042aec24221cac7111c26a02dbc34b3414680a9;hb=dd8ea26db05952301b2f52c10f5cf0c17338fca3;hp=56e75566b99c4acd8da8fa023feb0e98ff3322c4;hpb=536da22ebde5fa66e0f7524e9efc0316391f1afd;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 56e7556..2042aec 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -141,7 +141,7 @@ $mlang_brisk = array( 'btn_backstand'=> array( 'it' => 'torna in piedi', $G_lng = langtolng($G_lang); $G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 ); -$G_brisk_version = "4.10.0"; +$G_brisk_version = "4.10.1"; /* MLANG: ALL THE INFO STRINGS IN brisk.phh */ $root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), NOVITA\': aggiunto il comando /cont per proseguire le partite.', @@ -290,6 +290,36 @@ Copyright 2006-2012 Matteo Nasta
version '.$G_brisk_version.'

Copyright 2006-2012
Matteo Nastasi (aka mop)

'); +// return values +// -1 v1 < v2 +// 0 equal +// 1 v1 > v2 +function versions_cmp($v1, $v2) +{ + // printf("V1: [%s]\nV2: [%s]\n", $v1, $v2); + if ($v1 == $v2) + return 0; + + $v1_ar = split('\.', $v1); + $v2_ar = split('\.', $v2); + + $v2_ct = count($v2_ar); + + for ($i = 0 ; $i < count($v1_ar) ; $i++) { + if (($v2_ct - 1) < $i) { + break; + } + // printf("here [%s] [%s]\n", $v1_ar[$i], $v2_ar[$i]); + if ($v1_ar[$i] != $v2_ar[$i]) { + if (strval($v1_ar[$i]) < strval($v2_ar[$i])) + return -1; + else + return 1; + } + } + return 0; +} + function addrtoipv4($addr) { $ipv4addr_arr = explode(':' , $addr); @@ -365,10 +395,9 @@ function eschtml($s) function esclfhtml($s) { - return str_replace("\n", "
\n", htmlentities($s)); + return str_replace("\n", "
", htmlspecialchars($s)); } - function langtolng($lang) { GLOBAL $G_lang; @@ -729,7 +758,7 @@ class Client_prefs { fprintf(STDERR, "QQ %s: %x\n", __FUNCTION__, $user->flags); $this->listen = ($user->flags & USER_FLAG_MAP_AUTH) >> 2; if ($user->rec != FALSE) { - $this->supp_comp = $user->rec->supp_comp; + $this->supp_comp = $user->rec->supp_comp_get(); } else { $this->supp_comp = "000000000000"; @@ -781,10 +810,10 @@ class Client_prefs { fprintf(STDERR, "QQ %s::%s %x\n", __CLASS__, __FUNCTION__, $user->flags); if ($user->is_supp_custom()) { - $user->rec->supp_comp = $this->supp_comp; + $user->rec->supp_comp_set($this->supp_comp); } if ($is_save) - $user->store_set(); + $user->prefs_store(); } } @@ -2232,7 +2261,7 @@ class Room // sql record exists AND last donate > 2013-01-01 if ($this->user[$i]->is_supp_custom()) { - $supp_comp_s = sprintf(', "%s"', $this->user[$i]->rec->supp_comp); + $supp_comp_s = sprintf(', "%s"', $this->user[$i]->rec->supp_comp_get()); } else { $supp_comp_s = ''; @@ -2280,7 +2309,7 @@ class Room log_main($user_cur->name. sprintf(" IN TABLE [%d]", $table_idx)); if ($user_cur->is_supp_custom()) - $supp_comp_s = sprintf(', "%s"', $user_cur->rec->supp_comp); + $supp_comp_s = sprintf(', "%s"', $user_cur->rec->supp_comp_get()); else $supp_comp_s = ''; @@ -2344,7 +2373,7 @@ class Room return TRUE; break; - case "index_rd_ifra.php": + case "index_rd.php": if (($transp = gpcs_var('transp', $get, $post, $cookie)) === FALSE) $transp = "iframe"; if ($transp == 'websocket') @@ -2851,6 +2880,19 @@ function show_notify_ex($text, $tout, $butt, $w, $h, $is_opaque, $block_time) return sprintf('var noti = new notify_ex(gst,"%s",%d,"%s",%d,%d, %s, %d);', $text, $tout, $butt, $w, $h, ($is_opaque ? "true" : "false"), $block_time); } +function show_notify_document($text, $tout, $butt_arr, $confirm_func, $w, $h, $is_opaque, $block_time) +{ + log_main("SHOW_NOTIFY OPAQUE: ".$text); + + $butts = ""; + for ($i = 0 ; $i < count($butt_arr) ; $i++) { + $butts .= sprintf("%s'%s'", ($i == 0 ? "" : ","), $butt_arr[$i]); + } + + return sprintf('g_nd = new notify_document(gst, "%s", %d, [ %s ], %s, %d, %d, %s, %d);|', + escpush($text), $tout, $butts, ($confirm_func == NULL ? "null" : $confirm_func), $w, $h, ($is_opaque ? "true" : "false"), $block_time); +} + function root_welcome($user) {