| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <?php
- $dataLottery = lottery::getInscriptionData(core::getGet("id"));
- $sortLottery = lottery::getCloture(core::getGet("id"));
- ?>
- <div class="card text-center">
- <div class="card-header" style="font-size: 1.3em;">
- Informations sur les inscrits
- </div>
- <div class="card-body">
- <div class="row">
- <div class="col">
- <label style="color: gray;">Nombre d'inscrits</label>
- <input type="text" value="<?php
- if (isset($dataLottery["inscrits"])) {
- echo $dataLottery["inscrits"];
- }
- ?>" class="form-control text-center" disabled>
- </div>
- <div class="col">
- <label style="color: gray;">Eligible(s)</label>
- <input type="text" value="<?php
- if (isset($dataLottery["eligible"])) {
- echo $dataLottery["eligible"];
- }
- ?>" style="background-color:#d4edda; color:green;" class="form-control text-center" disabled>
- </div>
- <div class="col">
- <label style="color: gray;">Non éligible(s)</label>
- <input type="text" value="<?php
- if (isset($dataLottery["ineligible"])) {
- echo $dataLottery["ineligible"];
- }
- ?>" style="background-color:#f8d7da; color:red;" class="form-control text-center" disabled>
- </div>
- </div>
- </div>
- </div>
- <br />
- <?php
- if($sortLottery["sortDate"] == NULL) {
- ?>
- <div class="card text-center">
- <div class="card-header" style="font-size: 1.3em;">
- Combien de personnes doivent être tirées au sort ?
- </div>
- <div class="card-body">
- <form method="post" action="/submit.php">
- <input type="hidden" name="from" value="lottery-winners">
- <input type="hidden" name="lottery" value="<?php echo core::getGet("id") ?>">
- <div class="form-group">
- <label>Saisissez un nombre entre 1 et <?php echo $dataLottery["eligible"] ?></label>
- <input type="number" pattern="\d*" min="1" max="<?php echo $dataLottery["eligible"] ?>" style="font-size:30px" value="" class="form-control text-center" name="nb_winners" required>
- </div>
- <br />
-
- <input class="btn btn-primary btn-lg" style="width: 100%" type="submit" value="Tirer au sort">
- </form>
- </div>
- </div>
- <?php
- } else {
- ?>
- <div class="card text-center" style="border-color:green;">
- <div class="card-header" style="font-size: 1.3em; background-color:#d4edda; color:green;">
- Résultat du tirage au sort
- </div>
- <div class="card-body">
- <div class="row">
- <div class="col">
- <label style="color: gray;">Date du tirage au sort</label>
- <input type="text" value="<?php
- if (isset($sortLottery["sortDate"])) {
- echo $sortLottery["sortDate"];
- }
- ?>" class="form-control text-center" disabled>
- </div>
- <div class="col">
- <label style="color: gray;">Réalisé par</label>
- <input type="text" value="<?php
- if (isset($sortLottery["sortBy"])) {
- echo $sortLottery["sortBy"];
- }
- ?>" class="form-control text-center" disabled>
- </div>
- <div class="col">
- <label style="color: gray;">Paramètre</label>
- <input type="text" value="<?php
- if (isset($sortLottery["sortNb"])) {
- if($sortLottery["sortNb"] > 1){ echo $sortLottery["sortNb"] . " gagnants"; }
- else { echo $sortLottery["sortNb"] . " gagnant"; }
- }
- ?>" class="form-control text-center" disabled>
- </div>
- </div>
- <br />
- <table
- id="table"
- class="table-striped table-hover table-sm"
- data-page-size="25"
- data-toggle="table"
- data-buttons-align="left"
- data-pagination="true"
- data-filter-control="true"
- data-flat="true"
- data-url="/json.php?jsonData=lottery-winners&id=<?php echo core::getGet("id") ?>">
- <thead>
- <tr>
- <th data-sortable="true" data-field="id_dossier" data-filter-control="input" data-width="50" data-formatter="selectDossier">Id Dossier</th>
- <th data-sortable="true" data-field="id_salarie" data-filter-control="input" data-width="50">Id Salarié</th>
- <th data-sortable="true" data-field="login" data-filter-control="input">Login</th>
- <th data-sortable="true" data-field="prenom" data-filter-control="input">Prénom</th>
- <th data-sortable="true" data-field="nom" data-filter-control="input">Nom</th>
- <th data-sortable="true" data-field="selected">Date du tirage</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <script>
- function selectDossier(value) {
- return '<a href="https://www.cse-invent.com/gestion/prestations/dossiers/' + value + '/edit?pagesize=20&page=1" target="_blank"><button type="submit" class="btn btn-outline-primary btn-sm">' + value + '</button></a>';
- }
- function selectPrestation(value, row) {
- return '<a href="https://www.cse-invent.com/gestion/prestations/' + value + '/edit?search=avance&page=1&pagesize=20" target="_blank"><button type="submit" class="btn btn-outline-primary btn-sm">' + value + '</button></a>';
- }
- </script>
- <?php
- }
- ?>
|