cms.alertes-emails.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. $paramAlert = cron::getParameter();
  3. ?>
  4. <header class="d-flex flex-column flex-md-row align-items-md-center p-3 bg-light ">
  5. <h2 class="bd-title" id="content">
  6. <span>Paramètrer l'envoie des alertes emails</span>
  7. </h2>
  8. </header>
  9. <?php
  10. echo core::filAriane(array(
  11. "current" => "Paramétrage des jours/heures",
  12. "arbo" => array(
  13. "Vos règles d'alertes" => NULL,
  14. "Paramétrage des jours/heures" => "/alertes.html"
  15. )
  16. ));
  17. ?>
  18. <style>
  19. .table thead th {
  20. text-align: center;
  21. }
  22. .table td, .table th {
  23. text-align: center;
  24. }
  25. .hour-column {
  26. font-weight: bold;
  27. }
  28. </style>
  29. <?php
  30. $callout = [
  31. "type" => "info",
  32. "h4" => "Description",
  33. "p" => "Cet espace permet de sélectionner les moments ou vous voulez générer et recevoir les alertes emails provenant du CMS. A ce jour cela ne concerne que les <a href=\"/documents-my-assign.html\">documents à traiter</a>.",
  34. ];
  35. callout::print($callout);
  36. ?>
  37. <div class="tab-content">
  38. <div class="form-group">
  39. <form method="post" action="/submit.php">
  40. <input type="hidden" name="from" value="alertes-emails">
  41. <table class="table table-bordered table-striped">
  42. <thead>
  43. <tr>
  44. <th></th>
  45. <th>Lundi</th>
  46. <th>Mardi</th>
  47. <th>Mercredi</th>
  48. <th>Jeudi</th>
  49. <th>Vendredi</th>
  50. <th>Samedi</th>
  51. <th>Dimanche</th>
  52. </tr>
  53. </thead>
  54. <tbody>
  55. <!-- Heures de 00:00 à 23:00 -->
  56. <?php for ($i = 0; $i < 24; $i++): ?>
  57. <tr>
  58. <td class="hour-column"><?= str_pad($i, 2, '0', STR_PAD_LEFT) ?>:00</td>
  59. <?php for ($j = 0; $j < 7; $j++): ?>
  60. <td>
  61. <input type="checkbox" name="heure[<?= $i ?>][<?= $j ?>]" value="1" <?php if(isset($paramAlert[$i][$j])){ echo "checked"; } ?>>
  62. </td>
  63. <?php endfor; ?>
  64. </tr>
  65. <?php endfor; ?>
  66. <tr>
  67. <td></td>
  68. <td class="fw-bold">Lundi</th>
  69. <th class="fw-bold">Mardi</td>
  70. <td class="fw-bold">Mercredi</td>
  71. <td class="fw-bold">Jeudi</td>
  72. <td class="fw-bold">Vendredi</td>
  73. <td class="fw-bold">Samedi</td>
  74. <td class="fw-bold">Dimanche</td>
  75. </tr>
  76. </tbody>
  77. </table>
  78. <button class="btn btn-primary btn-lg" style="width: 100%" type="submit">Enregistrer</button>
  79. </form>
  80. </div>
  81. </div>
  82. <br />