list.html.php 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <div style="text-align:right">
  2. <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#addForm" aria-expanded="false" aria-controls="addForm">
  3. Ajouter
  4. </button>
  5. </div>
  6. <form class="collapse" id="addForm">
  7. <div class="well">
  8. <div class="form-group">
  9. <label for="promo">Promotion :</label>
  10. <select id="promo">
  11. <?php foreach($promos as $promo)
  12. {
  13. ?>
  14. <option value="<?php echo $promo["id_promo"]; ?>"><?php echo $promo["libelle"]; ?></option>
  15. <?php
  16. }
  17. ?>
  18. <option value=""></option>
  19. </select>
  20. </div>
  21. <div class="form-group">
  22. <label for="rang">Rang :</label>
  23. <input type="number" class="form-control" id="rang" />
  24. </div>
  25. <div class="form-group">
  26. <label for="libelle">Libellé : </label>
  27. <input type="text" class="form-control" id="libelle" placeholder="Libellé" />
  28. </div>
  29. <div class="form-group">
  30. <label for="file">Fichier :</label>
  31. <input type="file" id="file" />
  32. </div>
  33. <div class="form-group">
  34. <input type="submit" class="form-control" value="Ajouter le document" id="formsubmit" />
  35. </div>
  36. </div>
  37. </form>
  38. <table class="table tablesorter table-striped" id="mainTable">
  39. <thead>
  40. <?php foreach ($data[0] as $key => $value) {
  41. ?>
  42. <th class="th-inner sortable both"><?php echo $key; ?></th>
  43. <?php
  44. }
  45. ?>
  46. <th>Opérations</th>
  47. </thead>
  48. <tbody>
  49. <?php foreach ($data as $student) {
  50. ?>
  51. <tr>
  52. <?php
  53. foreach ($student as $field => $value) {
  54. if (is_array($value)) {
  55. ?>
  56. <td id="<?php echo $value["id"]; ?>"><?php echo $value["libelle"]; ?></td>
  57. <?php
  58. } else {
  59. ?>
  60. <td><?php echo $value; ?></td>
  61. <?php
  62. }
  63. }
  64. ?>
  65. </tr>
  66. <?php
  67. }
  68. ?>
  69. </tbody>
  70. </table>