From 529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 24 Aug 2021 15:38:16 +0200 Subject: Update --- Neutron-trunk/cms-special/calendar/index.php | 159 +++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 Neutron-trunk/cms-special/calendar/index.php (limited to 'Neutron-trunk/cms-special/calendar') diff --git a/Neutron-trunk/cms-special/calendar/index.php b/Neutron-trunk/cms-special/calendar/index.php new file mode 100644 index 0000000..8843961 --- /dev/null +++ b/Neutron-trunk/cms-special/calendar/index.php @@ -0,0 +1,159 @@ + +events as $event) { + if (isset($event->timestamp)) { + (int)$currentDate = date("Ymd"); + if ($currentDate < $event->timestamp || $currentDate == $event->timestamp) { + array_push($eventlist, $event->timestamp); + } else { + array_push($eventlistpassed, $event->timestamp); + } + } + } + sort($eventlist); + sort($eventlistpassed); + $pos = 1; + $shown = 0; + buffer("

" . $lang["calendar"]["futureh"] . "

"); + foreach ($eventlist as $event) { + if (1 == 2) {} else { + foreach ($json->events as $el) { + if (isset($el->timestamp)) { + if ($el->timestamp == $event) { + (int)$currentDate = date("Ymd"); + if ($currentDate < $el->timestamp) { + $shown = $shown + 1; + buffer("

" . $el->datestr . "

"); + $pos = $pos + 1; + } + if ($currentDate == $el->timestamp) { + $shown = $shown + 1; + buffer("

" . $lang["calendar"]["today"] . "

"); + $pos = $pos + 1; + } + if ($currentDate > $el->timestamp) { + $shown = $shown + 1; + buffer("

" . $lang["calendar"]["pasth"] . " (" . $el->datestr . ")

"); + $pos = $pos + 1; + } + } + } + } + } + } + if ($shown == "0") { + buffer("
" . $lang["calendar"]["future"] . "
"); + } + buffer("

" . $lang["calendar"]["pasth"] . "

"); + $pos = 1; + $shown = 0; + foreach ($eventlistpassed as $event) { + if (1 == 2) {} else { + foreach ($json->events as $el) { + if (isset($el->timestamp)) { + if ($el->timestamp == $event) { + (int)$currentDate = date("Ymd"); + if ($currentDate < $el->timestamp) { + $shown = $shown + 1; + buffer("

" . $el->datestr . "

"); + $pos = $pos + 1; + } + if ($currentDate == $el->timestamp) { + $shown = $shown + 1; + buffer("

" . $lang["calendar"]["today"] . "

"); + $pos = $pos + 1; + } + if ($currentDate > $el->timestamp) { + $shown = $shown + 1; + buffer("

" . $el->datestr . "

"); + $pos = $pos + 1; + } + } + } + } + } + } + if ($shown == "0") { + buffer("
" . $lang["calendar"]["past"] . "
"); + } + } else { + buffer("" . $lang["calendar"]["corrupted"] . ""); + } + +renderSpecial($buffer, $lang["calendar"]["title"]); + +?> \ No newline at end of file -- cgit