X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;h=19e8cb0752216821c7e376ebd60ebd0fbb8e5e2c;hb=f7dc9ccf7ceef5b2fa796f713dc8851c6473f5e0;hp=4dd36c9ea8901b6d8b9d700ce6f942857c26bb86;hpb=7770ac45929f7815028a4f2955f8b93e806af506;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 4dd36c9..19e8cb0 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -74,7 +74,7 @@ define(DBG_LMOP, 0x0800); define(DBG_TRAC, 0x1000); define(DBG_SHME, 0x2000); // NOTE: BRISK DEBUG must be a numerical constant, not the result of operations on symbols -define(BRISK_DEBUG, 0xffffffbf); +define(BRISK_DEBUG, 0x0800); define(BRISK_SINGLE_DEBUG,0); define(BRISK_SINGLE_SESS, ""); @@ -136,10 +136,10 @@ $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 = "3.6.0"; +$G_brisk_version = "3.6.3"; /* MLANG: ALL THE INFO STRINGS IN brisk.phh */ -$root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), NOVITA\': (tecnica) utilizzo di locking tipo lettori/scrittori al posto del locking esclusivo generico.', +$root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), NOVITA\': nuovo sistema di evidenziazione degli utenti registrati.', 'Se vuoi iscriverti alla Mailing List, cliccala!' ), 'en' => array ( 'Brisk (Ver. '.$G_brisk_version.'), NEWS: usage of reader/writer locking instead of generic exclusive locking.', 'If you want to subscribe our Mailing List, click it!' ) ); @@ -292,7 +292,7 @@ function mop_flush() function file_lock($fname, $is_exclusive) { - if (($res = fopen($fname, "r+")) == FALSE) { + if (($res = @fopen($fname, "r+")) == FALSE) { return (FALSE); } @@ -348,6 +348,15 @@ function webservers_check() return ($ct); } +$escpush_from = array("\\", "\""); +$escpush_to = array("\\\\", "\\\""); +function escpush($s) +{ + GLOBAL $escpush_from, $escpush_to; + + return str_replace($escpush_from, $escpush_to, $s); +} + $escinp_from = array( "\"" ); $escinp_to = array( """ ); @@ -886,7 +895,7 @@ class User { if (validate_sess($this->sess)) { if (file_exists(PROXY_PATH) == FALSE) mkdir(PROXY_PATH, 0775, TRUE); - $fp = fopen(PROXY_PATH."/".$this->sess.".stat", 'w'); + $fp = @fopen(PROXY_PATH."/".$this->sess.".stat", 'w'); fwrite($fp, sprintf("%s\n",$this->stat)); fclose($fp); } @@ -1087,6 +1096,13 @@ class User { return (FALSE); } + function myname_innerHTML() + { + $class_id = ($this->flags & USER_FLAG_AUTH) + 1; + + return (sprintf('$("myname").innerHTML = "%s";', $class_id, + xcape($this->name,ENT_COMPAT,"UTF-8"))); + } } // end class User @@ -1335,9 +1351,8 @@ class Room { } $ret .= sprintf('subst = "%s";', $user->subst); - $itin = ($user->flags & USER_FLAG_AUTH ? "" : ""); - $itou = ($user->flags & USER_FLAG_AUTH ? "" : ""); - $ret .= sprintf('$("myname").innerHTML = "%s%s%s";', $itin, xcape($user->name), $itou); + $ret .= $user->myname_innerHTML(); + for ($i = 0 ; $i < TABLES_N ; $i++) { $ret .= $this->table_content($user, $i); @@ -1410,7 +1425,7 @@ class Room { $ret = "gst.st = ".($user_cur->step+1)."; ".($remove_wagon ? sprintf("tra.rem(%d);",$table_idx) : ""); if ($from_table && ($user_cur->table == $table_idx || $user->idx_get() == $i)) { - $ret .= 'gst.st_loc++; the_end=true; window.onunload = null; window.onbeforeunload = null; document.location.assign("index.php");|'; + $ret .= 'gst.st_loc++; hstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("index.php");|'; // $ret .= 'gst.st_loc++; document.location.assign("index.php");|'; log_main("DOCUMENT.index.php: from table"); } @@ -1578,9 +1593,7 @@ class Room { $ret .= $this->table_content($user_cur, $table_idx); if ($user->idx_get() == $i) { - $itin = ($user->flags & USER_FLAG_AUTH ? "" : ""); - $itou = ($user->flags & USER_FLAG_AUTH ? "" : ""); - $ret .= sprintf('$("myname").innerHTML = "%s%s%s: ";', $itin, xcape($user->name), $itou); + $ret .= $user->myname_innerHTML(); } $user_cur->comm[$user_cur->step % COMM_N] = $ret; $user_cur->step_inc(); @@ -2301,11 +2314,7 @@ class Room { if ($user_cur->stat == 'room') { $user_cur->comm[$user_cur->step % COMM_N] = "gst.st = ".($user_cur->step+1)."; ".$this->standup_content($user_cur); if ($user->idx_get() == $i) { - $itin = ($user->flags & USER_FLAG_AUTH ? "" : ""); - $itou = ($user->flags & USER_FLAG_AUTH ? "" : ""); - - $user_cur->comm[$user_cur->step % COMM_N] .= sprintf('$("myname").innerHTML = "%s%s%s: ";', - $itin, xcape($user->name), $itou); + $user_cur->comm[$user_cur->step % COMM_N] .= $user->myname_innerHTML(); } log_main("FROM STANDUP: NAME: ".$user_cur->name." SENDED: ".$user_cur->comm[$user_cur->step % COMM_N]);