Пример #1
0
$nhl_team_as_gerant_name = $data["nhl_team_as_gerant_name"];
$nbre_periodes = $data[nbre_periodes];
$joueur_blesse_ballotage = $data["joueur_blesse_ballotage"];
$ballotage_hour_first_day = $pool->today . " " . $data["ballotage_hour_first_day"];
$salary_cap_enabled = $data["enable_salary_cap"];
$salary_cap = $data["salary_cap"];
$salary_floor = $data["salary_floor"];
$hour_max_last_day = $pool->today . " " . $data["ballotage_hour_last_day"];
$str = "";
// Traitement du formulaire
if (isset($_REQUEST["submit"])) {
    $ballotage_id = $_REQUEST["ballotage_id"];
    $reponseGerant = $_REQUEST["choixBallotage{$ballotage_id}"];
    if ($reponseGerant != "") {
        if ($reponseGerant == 2) {
            $pool->writeBallotageReponse($id_pool, $ballotage_id, "N", $gerant, $id_saison, $periode, -1, $salary_cap_enabled, $salary_cap, $salary_floor);
        } else {
            $id_player_retour = $_REQUEST["cb_ballotage{$ballotage_id}"];
            if ($id_player_retour != "") {
                $rtn = $pool->writeBallotageReponse($id_pool, $ballotage_id, "Y", $gerant, $id_saison, $periode, $id_player_retour, $salary_cap_enabled, $salary_cap, $salary_floor);
                if ($rtn == "non") {
                    $message = "La récupération d'un joueur au ballotage a été refusé, car le plafond ou le plancher salarial n'était pas respecté.";
                }
            }
        }
    }
}
if ($pool->isLastDayOfPeriod($id_pool, $periode, $id_saison) && $pool->todayDate->format('Y-m-d H:i:s') > $hour_max_last_day) {
    $disabled = "disabled";
}
// update du champ ballotage_vu de la table accounts_detail
Пример #2
0
if ($gerant_sel != $gerant) {
    $disabled = "disabled";
}
if ($periode_sel < $periode) {
    $disabled = "disabled";
}
if ($disabled == "disabled") {
    $cb_disable = "disabled";
}
// Traitement du formulaire
if (isset($_REQUEST["submit"])) {
    $ballotage_id = $_REQUEST["ballotage_id"];
    $reponseGerant = $_REQUEST["choixBallotage{$ballotage_id}"];
    if ($reponseGerant != "") {
        if ($reponseGerant == 2) {
            $pool->writeBallotageReponse($id_pool, $ballotage_id, "N", $gerant, $id_saison, $periode);
        } else {
            $id_player_retour = $_REQUEST["cb_ballotage{$ballotage_id}"];
            if ($id_player_retour != "") {
                $pool->writeBallotageReponse($id_pool, $ballotage_id, "Y", $gerant, $id_saison, $periode, $id_player_retour);
            }
        }
    }
}
// rיcupיrer certaines informations du pool
$data = $pool->getConfigPool($id_pool, $id_saison);
$nhl_team_as_gerant_name = $data["nhl_team_as_gerant_name"];
$nbre_periodes = $data[nbre_periodes];
$joueur_blesse_ballotage = $data["joueur_blesse_ballotage"];
$ballotage_hour_first_day = $data["ballotage_hour_first_day"];
$hourA = explode(":", $ballotage_hour_first_day);