save_school_calendar.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. // not used??
  4. exit;
  5. require_once '../inc/global.inc.php';
  6. $allow = api_get_configuration_value('extra');
  7. if (empty($allow)) {
  8. exit;
  9. }
  10. Display::display_header($nameTools, "Tracking");
  11. foreach ($_POST as $index => $valeur) {
  12. $$index = Database::escape_string(trim($valeur));
  13. }
  14. ?>
  15. <form action="upgrade_school_calendar.php" method="post" name="upgrade_cal">
  16. <th colspan="6">
  17. <?php echo get_lang('edit_save'); ?>
  18. </th>
  19. <tr>
  20. </th>
  21. </tr>
  22. <?php
  23. echo "<table border='1'><tr>";
  24. if ($i % $nbcol == 0) {
  25. $sqlexam = "SELECT * FROM set_module
  26. WHERE cal_name = '$d_title'";
  27. }
  28. $resultexam = Database::query($sqlexam);
  29. while ($a_exam = Database::fetch_array($resultexam)) {
  30. $name = $a_exam['cal_name'];
  31. $id = $a_exam['id'];
  32. $num = $a_exam['cal_day_num'];
  33. $c_date = $a_exam['cal_date'];
  34. echo "
  35. <td><input type=text name=d_cal_date size=8 value=".$c_date."></td>
  36. <td><input type=text name=d_number size=5 value=".$num."></td>
  37. <td><input type=text name=d_title size=8 value=".$name."></td>
  38. <td><input name=d_id size=8 value=".$id."></td>";
  39. if ($i % $nbcol == ($nbcol - 1)) {
  40. echo "</tr>";
  41. }
  42. }
  43. $nb = count($d_number);
  44. $nbcol = 2;
  45. ?>
  46. </td>
  47. </tr>
  48. <input type=hidden name=aaa value=<?= serialize(Database::fetch_array($resultexam)); ?>/>
  49. <input type="submit" value="Sauvegarder" name="B1">
  50. <?php
  51. echo $id, $tableau;
  52. ?>
  53. </form>
  54. </table>
  55. <?php
  56. Display::display_footer();