X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2Findex_wr.php;h=5045a54af7c61bfb28b7c7c96a8b59d9498e1e3a;hb=07070d61b51e6521b1a93ecedeb2e694467d9c60;hp=22feb296fd384e6306f60a5523b8dbbed76ed163;hpb=bdb3cb2379f32bfb9279da661b1d4dbaf9712299;p=brisk.git diff --git a/web/briskin5/index_wr.php b/web/briskin5/index_wr.php index 22feb29..5045a54 100644 --- a/web/briskin5/index_wr.php +++ b/web/briskin5/index_wr.php @@ -2,7 +2,7 @@ /* * brisk - index_wr.php * - * Copyright (C) 2006-2009 Matteo Nastasi + * Copyright (C) 2006-2011 Matteo Nastasi * mailto: nastasi@alternativeoutput.it * matteo.nastasi@milug.org * web: http://www.alternativeoutput.it @@ -20,10 +20,11 @@ * not, write to the Free Software Foundation, Inc, 59 Temple Place - * Suite 330, Boston, MA 02111-1307, USA. * - * $Id$ - * */ + +$G_base = "../"; + require_once("../Obj/brisk.phh"); // require_once("../Obj/proxyscan.phh"); require_once("Obj/briskin5.phh"); @@ -480,13 +481,24 @@ else if ($user->stat == 'table') { $plist = "$table->table_token|$user->table_orig|$table->player_n"; $curtime = time(); + $ucodes = array(); for ($i = 0 ; $i < BRISKIN5_PLAYERS_N ; $i++) { $user_cur = &$bri->user[$table->player[$i]]; $plist .= '|'.xcapelt($user_cur->name).'|'.$pt_cur[$i]; + $ucodes[$i] = $user_cur->code_get(); + } + for ($i = 0 ; $i < BRISKIN5_PLAYERS_N ; $i++) { + $plist .= '|'.xcapelt($ucodes[$i]); } log_legal($curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist); - if ($user->table_orig < TABLES_AUTH_N) - log_points($curtime, xcapelt($user->name), "STAT:BRISKIN5:FINISH_GAME", $plist); + if ($user->table_orig < TABLES_AUTH_N) { + require_once("../Obj/dbase_".$G_dbasetype.".phh"); + + log_points($curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist); + $bdb = new BriskDB(); + $bdb->bin5_points_save($curtime, $table->table_token, $user->table_orig, $ucodes, $pt_cur); + unset($bdb); + } $table->game_next(); $table->game_init(&$bri->user);