break;
}
for ($i = 0 ; $i < $n ; $i++) {
- $ord_sql = sprintf("INSERT INTO %sbin5_table_order (mcode, ucode, pos) VALUES (%d, %d, %d);",
+ $ord_sql = sprintf("INSERT INTO %sbin5_table_orders (mcode, ucode, pos) VALUES (%d, %d, %d);",
$G_dbpfx, $G_dbpfx, $sql_ttok, $ucode[$i], $i);
if (($ord_pg = $this->query($ord_sql)) == FALSE || pg_affected_rows($ord_pg) != 1 ) {
log_crit(sprintf("bin5_points_save: failed at insert table order [%s]", $ord_sql));
if ($buf == FALSE || mb_strlen($buf, "ASCII") == 0) {
// close socket case
if ($buf == FALSE) {
- printf("ERROR READING\n");
+ printf("INFO: read return false\n");
}
if ($sock === $this->list) {
printf("Arrivati %d bytes da list\n", mb_strlen($buf, "ASCII"));
else {
log_points($remote_addr, $curtime, $user, "STAT:BRISKIN5:FINISH_GAME", "DATABASE CONNECTION FAILED");
}
- log_points($curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist);
+ log_points($remote_addr, $curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist);
}
$this->game_init(&$bri->user);
/* $table->game_init(&$bri->user); */
- if ($table->rules_engine(&$bri, BIN5_RULES_ABANDON, $user)) {
+ if ($table->rules_engine(&$bri, $curtime, BIN5_RULES_ABANDON, $user)) {
for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
$user_cur = &$bri->user[$table->player[$i]];
else if ($table->asta_pla_n == 0) {
log_wr("PASSANO TUTTI!");
- if ($table->rules_engine(&$bri, BIN5_RULES_ALLPASS, $user)) {
+ if ($table->rules_engine(&$bri, $curtime, BIN5_RULES_ALLPASS, $user)) {
for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
$user_cur = &$bri->user[$table->player[$i]];
/* $table->game_init(&$bri->user); */
- if ($table->rules_engine(&$bri, BIN5_RULES_FINISH, $user)) {
+ if ($table->rules_engine(&$bri, $curtime, BIN5_RULES_FINISH, $user)) {
for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
$user_cur = &$bri->user[$table->player[$i]];
$retar[$i] .= show_table(&$bri,&$user_cur,$user_cur->step+1,TRUE, TRUE);