cms.lottery-inscrits.php 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. $lottery = lottery::getFiche(core::getGet("id"));
  3. $dataLottery = lottery::getInscriptionData(core::getGet("id"));
  4. ?>
  5. <div style="float:right; margin-top: -60px;">
  6. <?php
  7. if ($lottery["sortDate"] == NULL) {
  8. ?>
  9. <a href="/?p=lottery-upload-excel&id=<?php echo core::getGet("id") ?>"><button type="submit" class="btn btn-outline-success btn-sm"><span data-feather="download"></span> Importer les inscrits</button></a>
  10. <?php } ?>
  11. </div>
  12. <?php
  13. if($dataLottery["inscrits"] > 0) {
  14. ?>
  15. <div class="card text-center">
  16. <div class="card-header" style="font-size: 1.3em;">
  17. Informations sur les inscrits
  18. </div>
  19. <div class="card-body">
  20. <div class="row">
  21. <div class="col">
  22. <label style="color: gray;">Nombre d'inscrits</label>
  23. <input type="text" value="<?php
  24. if (isset($dataLottery["inscrits"])) {
  25. echo $dataLottery["inscrits"];
  26. }
  27. ?>" class="form-control text-center" disabled>
  28. </div>
  29. <div class="col">
  30. <label style="color: gray;">Eligible(s)</label>
  31. <input type="text" value="<?php
  32. if (isset($dataLottery["eligible"])) {
  33. echo $dataLottery["eligible"];
  34. } else { echo "0";}
  35. ?>" style="background-color:#d4edda; color:green;" class="form-control text-center" disabled>
  36. </div>
  37. <div class="col">
  38. <label style="color: gray;">Non éligible(s)</label>
  39. <input type="text" value="<?php
  40. if (isset($dataLottery["ineligible"])) {
  41. echo $dataLottery["ineligible"];
  42. } else { echo "0";}
  43. ?>" style="background-color:#f8d7da; color:red;" class="form-control text-center" disabled>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. <br />
  49. <?php
  50. }
  51. ?>
  52. <div class="card text-center">
  53. <div class="card-header" style="font-size: 1.3em;">
  54. Liste des inscrits
  55. </div>
  56. <div class="card-body">
  57. <table id="table" class="table-striped table-hover table-sm" data-page-size="25" data-toggle="table" data-show-columns="true" data-search="true" data-buttons-align="left" data-pagination="true" data-filter-control="true" data-flat="true" data-url="/json.php?jsonData=lottery-inscrits&id=<?php echo core::getGet("id") ?>">
  58. <thead>
  59. <tr>
  60. <th data-sortable="true" data-field="id_presta" data-width="50" data-formatter="selectPrestation">Prestation</th>
  61. <th data-sortable="true" data-field="id_dossier" data-filter-control="input" data-width="50" data-formatter="selectDossier">Dossier</th>
  62. <th data-sortable="true" data-field="id_salarie" data-filter-control="input" data-width="50">Id Salarié</th>
  63. <th data-sortable="true" data-field="actif" data-filter-control="select" data-width="50">Base RH</th>
  64. <th data-sortable="true" data-field="valide" data-filter-control="select" data-width="50">Eligible</th>
  65. <th data-sortable="true" data-field="login" data-filter-control="input" data-width="150">Login</th>
  66. <th data-sortable="true" data-field="prenom" data-filter-control="input" data-width="150">Prénom</th>
  67. <th data-sortable="true" data-field="nom" data-filter-control="input" data-width="150">Nom</th>
  68. <th data-sortable="true" data-field="lieu" data-filter-control="input" data-width="175">Rattachement</th>
  69. <th data-sortable="true" data-field="admin" data-filter-control="select">Chargé par</th>
  70. <th data-sortable="true" data-field="cree" data-width="175">Le</th>
  71. </tr>
  72. </thead>
  73. </table>
  74. </div>
  75. </div>
  76. <script>
  77. function selectDossier(value) {
  78. 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>';
  79. }
  80. function selectPrestation(value, row) {
  81. 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>';
  82. }
  83. </script>