booking_agenda_event_details_view.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. $res = 0;
  3. // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
  4. if (!$res && !empty ($_SERVER["CONTEXT_DOCUMENT_ROOT"])) {
  5. $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"] . "/main.inc.php";
  6. }
  7. // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
  8. $tmp = empty ($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME'];
  9. $tmp2 = realpath(__FILE__);
  10. $i = strlen($tmp) - 1;
  11. $j = strlen($tmp2) - 1;
  12. while ($i > 0 && $j > 0 && isset ($tmp[$i]) && isset ($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
  13. $i--;
  14. $j--;
  15. }
  16. if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)) . "/main.inc.php")) {
  17. $res = @include substr($tmp, 0, ($i + 1)) . "/main.inc.php";
  18. }
  19. if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php")) {
  20. $res = @include dirname(substr($tmp, 0, ($i + 1))) . "/main.inc.php";
  21. }
  22. // Try main.inc.php using relative path
  23. if (!$res && file_exists("../main.inc.php")) {
  24. $res = @include "../main.inc.php";
  25. }
  26. if (!$res && file_exists("../../main.inc.php")) {
  27. $res = @include "../../main.inc.php";
  28. }
  29. if (!$res && file_exists("../../../main.inc.php")) {
  30. $res = @include "../../../main.inc.php";
  31. }
  32. if (!$res) {
  33. die ("Include of main fails");
  34. }
  35. $event = $_GET['event'];
  36. require_once DOL_DOCUMENT_ROOT . '/custom/booking/class/booking_agenda_helper.class.php';
  37. $bookingAgendaHelper = new BookingAgendaHelper($db);
  38. $bookingAgendaHelper->getSelectedEvents($event);
  39. ?>
  40. <style>
  41. .trheight {
  42. height: 50px;
  43. }
  44. .elvalaszto {
  45. background-color: grey;
  46. }
  47. .foglaltsag {
  48. color: red;
  49. }
  50. .location {
  51. color: black;
  52. }
  53. .firstcolumn {
  54. background-color: lightgrey;
  55. text-align: center;
  56. font-weight: bold;
  57. }
  58. </style>