Example #1
0
function loterie_interface_gain_enregistre($id_troll, $id_loterie)
{
    $loterie = new loterie($id_loterie);
    if ($_SESSION[admin] != 'authenticated') {
        if ($id_troll != $loterie->get_id_gagnant()) {
            afficher_contenu_tableau("Erreur. Vous n'êtes pas admin, ou vous n'avez pas gagné cette loterie, ou la loterie n'est pas close");
            die(' ');
        }
    }
    $loterie_participants = new loterie_participants($id_loterie);
    $list = $loterie_participants->get_list();
    for ($i = 1; $i <= count($list); $i++) {
        if ($_POST["remise_" . $list[$i][id_troll_loteriep]] == "oui") {
            $loterie_participant = new loterie_participant($list[$i][id_troll_loteriep], $id_loterie);
            $loterie_participant->set_date_remise_db();
        }
    }
    $text = "Mise &agrave; jour effectu&eacute;e.<br>";
    $text .= "<input type='button' value='Retour Liste' class='mh_form_submit'";
    $text .= " onClick='Javascript:document.location.href=\"/loteries/loterie.php?gain=liste\"'>";
    afficher_contenu_tableau($text);
}