Пример #1
0
 $accessCode = trim($_POST['AccessCode']);
 if (empty($accessCode)) {
     $error = "Fill in the Access Code";
 } else {
     if ($signup->AccessCode != $accessCode) {
         $error = "Invalid access code";
     }
 }
 $RequestedTime = $_POST['RequestedTime'];
 for ($i = 0; $i < count($players); ++$i) {
     if ($t->TeamSize == 2 && $t->SCGAQualifier) {
         if ($i == 0 || $i == 1) {
             $teamFlightIndex = GetTeamFlightIndex(1);
             $Extra[$i] = $_POST[$teamFlightIndex];
         } else {
             $teamFlightIndex = GetTeamFlightIndex(2);
             $Extra[$i] = $_POST[$teamFlightIndex];
         }
         if (empty($_POST[$teamFlightIndex])) {
             $flightErrorList[$i] = "Select Flight";
         }
     } else {
         if ($t->SrClubChampionship) {
             $playerFlightIndex = GetPlayerFlightIndex($i + 1);
             $Extra[$i] = $_POST[$playerFlightIndex];
             if (empty($_POST[$playerFlightIndex])) {
                 $flightErrorList[$i] = "Select Flight";
             }
         }
     }
 }
Пример #2
0
function AddSCGQQualifier($t, $teamNumber, $flightErrorList, $extra)
{
    $teamFlightIndex = GetTeamFlightIndex($teamNumber);
    echo '<br><input  type="radio" name="' . $teamFlightIndex . '" value="Flight1"';
    if ($extra[2 * ($teamNumber - 1)] == 'Flight1') {
        echo ' checked';
    }
    echo '>Flight 1' . PHP_EOL;
    echo '<br><input  type="radio" name="' . $teamFlightIndex . '" value="Flight2"';
    if ($extra[2 * ($teamNumber - 1)] == 'Flight2') {
        echo ' checked';
    }
    echo '>Flight 2' . PHP_EOL;
    if ($teamNumber == 1 && !empty($flightErrorList[0])) {
        echo '<br><p style="color:red">' . $flightErrorList[0] . '</p>';
    } else {
        if ($teamNumber == 2 && !empty($flightErrorList[2])) {
            echo '<br><p style="color:red">' . $flightErrorList[2] . '</p>';
        }
    }
}