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"]);
?>