コード例 #1
0
                                    UpdateSignupPlayer($connection, $signupKey, $players[$i]->GHIN, 'Position', 1, 'i');
                                }
                            }
                        }
                    }
                }
            } else {
                // Just update everyone's position to fill the missing spot
                $players = GetPlayersForSignUp($connection, $signupKey);
                for ($i = 0; $i < count($players); ++$i) {
                    UpdateSignupPlayer($connection, $signupKey, $players[$i]->GHIN, 'Position', $i, 'i');
                }
            }
            $players = GetPlayersForSignUp($connection, $signupKey);
            if (empty($players)) {
                DeleteSignup($connection, $signupKey);
                $allPlayersRemoved = true;
            }
        }
    }
}
echo '<div id="content-container" class="entry-content">' . PHP_EOL;
echo '<div id="content" role="main">' . PHP_EOL;
echo '<h2 class="entry-title" style="text-align:center">Remove Players</h2>' . PHP_EOL;
echo '<p>Use this form to remove players in your group. Use the checkbox to indicate which players to remove.  Multiple players can be removed in a single request.</p>';
if ($tournament->RequirePayment) {
    echo '<p>An email will be sent to the tournament director requesting a refund if you have paid your tournament fee.</p>';
}
echo PHP_EOL;
if (!empty($error)) {
    echo '<p style="color:red;">' . $error . '</p>' . PHP_EOL;
コード例 #2
0
ファイル: signup_add.php プロジェクト: palbitz1003/CMGC
     die("There are no players for added group signup code " . $signup2->SignUpKey);
 }
 // Update the signup position for the players merging into the
 // group. Position is 0 based.
 $position = count($players);
 for ($i = 0; $i < count($players2); ++$i) {
     UpdateSignupPlayer($connection, $signup2->SignUpKey, $players2[$i]->GHIN, 'Position', $position, 'i');
     ++$position;
     // Change the signup key to be the key for the 1st group
     UpdateSignupPlayer($connection, $signup2->SignUpKey, $players2[$i]->GHIN, 'SignUpKey', $signupKey, 'i');
 }
 // Update the payment and payment due to be the sum of the 2 groups
 UpdateSignup($connection, $signupKey, 'Payment', $signup->Payment + $signup2->Payment, 'd');
 UpdateSignup($connection, $signupKey, 'PaymentDue', $signup->PaymentDue + $signup2->PaymentDue, 'd');
 // Remove the 2nd signup
 DeleteSignup($connection, $signup2->SignUpKey);
 echo '<p>The new players have been added to your group.</p>' . PHP_EOL;
 $players = GetPlayersForSignUp($connection, $signupKey);
 if ($t->TeamSize == 2 && $t->SCGAQualifier) {
     if (count($players) >= 2) {
         if ($players[0]->Extra !== $players[1]->Extra) {
             echo '<p style="color:red;">The flight choices for players 1 & 2 do not match. Use the Modify action from the View Signups page to update the flight choice.' . PHP_EOL;
         }
     }
     if (count($players) == 4) {
         if ($players[2]->Extra !== $players[3]->Extra) {
             echo '<p style="color:red;">The flight choices for players 3 & 4 do not match. Use the Modify action from the View Signups page to update the flight choice.' . PHP_EOL;
         }
     }
 }
 echo '<p>New group:</p><p>' . PHP_EOL;