test.jpg.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. include "Schedule.php";
  3. $stations = [
  4. "EDWW_CTR",
  5. "EDWW_A_CTR",
  6. "EDWW_B_CTR",
  7. "EDWW_M_CTR",
  8. "EDWW_K_CTR",
  9. "EDWW_F_CTR",
  10. "EDMM_M_CTR",
  11. "EDMM_G_CTR",
  12. "EDUU_O_CTR",
  13. "EDUU_E_CTR",
  14. "--",
  15. "EDBB_S_APP",
  16. "EDBB_N_APP",
  17. "EDBB_U_APP",
  18. "EDBB_F_APP",
  19. "EDBB_S_DEP",
  20. "EDBB_N_DEP",
  21. "--",
  22. "EDDB_N_TWR",
  23. "EDDB_S_TWR",
  24. "EDDB_A_GND",
  25. "EDDB_E_GND",
  26. "EDDB_N_GND",
  27. "EDDB_S_GND",
  28. "EDDB_DEL",
  29. "--",
  30. "EDDP_S_APP",
  31. "EDDP_F_APP",
  32. "EDDP_N_APP",
  33. "EDDP_N_TWR",
  34. "EDDP_S_TWR",
  35. "EDDP_GND",
  36. "EDDP_DEL",
  37. "--",
  38. "EDDC_APP",
  39. "EDDC_TWR",
  40. "EDDC_GND",
  41. "EDDC_A_GND",
  42. "--",
  43. "EDDE_TWR",
  44. "EDDE_GND",
  45. "EDDE_A_GND"
  46. ];
  47. $optional = [
  48. "EDWW_CTR",
  49. "EDWW_A_CTR",
  50. "EDWW_M_CTR",
  51. "EDWW_K_CTR",
  52. "EDWW_F_CTR",
  53. "EDMM_M_CTR",
  54. "EDUU_O_CTR",
  55. "EDUU_E_CTR",
  56. "EDBB_N_APP",
  57. "EDBB_F_APP",
  58. "EDBB_N_DEP",
  59. "EDDB_S_TWR",
  60. "EDDB_E_GND",
  61. "EDDB_S_GND",
  62. "EDDP_F_APP",
  63. "EDDP_N_APP",
  64. "EDDP_S_TWR",
  65. "EDDP_GND",
  66. "EDDP_DEL",
  67. "EDDC_APP",
  68. "EDDC_GND",
  69. "EDDC_A_GND",
  70. "EDDE_GND",
  71. "EDDE_A_GND"
  72. ];
  73. $wantedstns = ['EDWW_B_CTR', 'EDMM_G_CTR', 'EDBB_S_APP', 'EDBB_U_APP', 'EDBB_S_DEP', 'EDDB_N_TWR', 'EDDB_A_GND', 'EDDB_DEL', 'EDDB_N_GND'];
  74. //echo "<pre>";
  75. //$sched = new Schedule(Schedule::EveryXDaysFromStartdate("26.02.2021", 4, 2), $stations);
  76. $wanted = Schedule::processWantedDays($wantedstns, Schedule::EveryWeekday("Tuesday", 5), $wantedstns, Schedule::EveryXWeeksFromStartdate("2021-10-08", 4, 2));
  77. //var_dump($wanted);
  78. //exit;
  79. $sched = new Schedule(Schedule::WholeWeek("today"), $stations, $optional, $wanted, false);
  80. $image = $sched->createImage();
  81. header("Content-Type: image/jpg");
  82. imagejpeg($image);
  83. //imagejpeg($image, __DIR__ . "/test.jpg");
  84. //?/> <br><img src="test.jpg">