X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Findex_wr.php;h=5a1eb884fa75256edfa5d7c8e0af8ea1c7a7526a;hb=1c864a7f5b393bddf3ef4ce94886703d2ac3b21c;hp=0f20a7b82451fd3b649c00858793005f326979ab;hpb=9c5779d8ac2bddb4da83ec1f2ae87b06ac007413;p=brisk.git diff --git a/web/index_wr.php b/web/index_wr.php index 0f20a7b..5a1eb88 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -36,7 +36,7 @@ log_wr($sess, 'COMM: '.$mesg); $sem = lock_data(); $bri = &load_data(); -if (($user = &get_user($bri, $sess, &$idx)) == FALSE) { +if (($user = &$bri->get_user($sess, &$idx)) == FALSE) { echo "Get User Error"; log_wr($sess, "Get User Error"); unlock_data($sem); @@ -60,7 +60,15 @@ if ($argz[0] == 'shutdown') { log_rd2($sess, "SHUTDOWN FROM WHAT ???"); } else if ($user->stat == 'room') { - if ($argz[0] == 'logout') { + if ($argz[0] == 'help') { + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; + $user->comm[$user->step % COMM_N] .= show_notify("bottom", $G_room_help, 0, "torna ai tavoli"); + + log_wr($sess, $user->comm[$user->step % COMM_N]); + $user->step++; + + } + else if ($argz[0] == 'logout') { $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; $user->comm[$user->step % COMM_N] .= sprintf('postact_logout();'); $user->the_end = TRUE; @@ -89,9 +97,7 @@ else if ($user->stat == 'room') { // set new status $user->subst = "sitdown"; $user->table = $table_idx; - $user->table_pos = $table->player_n; - $table->player[$table->player_n] = $idx; - $table->player_n++; + $user->table_pos = $table->user_add($idx); if ($table->player_n == PLAYERS_N) { // Start game for this table. @@ -154,10 +160,7 @@ else if ($user->stat == 'table' && $user->subst == 'asta') { log_wr($sess, "PER DI TABLEINFO"); $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; $user->comm[$user->step % COMM_N] .= show_table_info(&$bri, &$table, $user->table_pos); - log_wr($sess, $user->comm[$user->step % COMM_N]); - - $user->step++; } else if ($argz[0] == 'chatt') {