prepare("SELECT * FROM main_collection WHERE main_collection_setup_id = :main_collection_setup_id ORDER BY sorting ASC");
$select_collection->execute(array(':main_collection_setup_id' => '6'));
$res_collection = $select_collection->fetchALL(PDO::FETCH_ASSOC);
$arr = array();
foreach ($res_collection as $key => $value) {
$date = new DateTime(getData($value['id'], '27'));
$time = getData($value['id'], '28');
$link = getData($value['id'], '29');
$addon = getData($value['id'], '30');+
$type = getCollectionGroup($value['id']);
$title = $type;
$weekday = array("Mo", "Di", "Mi", "Do", "Fr", "Sa", "So");
if($type == 'Gastspiel'){
$title = $addon;
}
$description =
"".$addon."
".$weekday[$date->format('N')-1]. ". " .$date->format('d.m.Y')."
".$time." Uhr
";
$fullviewLinkEvent = $link . '" target="_blank';
$linkTitle = $GLOBALS['tc']['learn_more'];
$arr[] = [
'id' => "event-".$value['id'],
'name' => $title,
'description' => $description,
'link' => $fullviewLinkEvent,
'link_title' => $linkTitle,
'date' => $date->format('Y.m.d'),
'type' => "event",
'color' => "var(--main-color)",
'everyYear' => false
];
}
// $select_collection2 = $GLOBALS['pdo_conn']->prepare("SELECT * FROM main_collection WHERE main_collection_setup_id = :main_collection_setup_id ORDER BY sorting ASC");
// $select_collection2->execute(array(':main_collection_setup_id' => '3'));
// $res_collection2 = $select_collection2->fetchALL(PDO::FETCH_ASSOC);
// foreach ($res_collection2 as $key => $value) {
// $date = new DateTime(getData($value['id'], '27'));
// $time = getData($value['id'], '28');
// $title = getData($value['id'], '30');
// $desc = getData($value['id'], '30');
// $description =
// "".$addon."
// ".$weekday[$date->format('N')-1]. ". " .$date->format('d.m.Y')."
// ".$time." Uhr
// ";
// $fullviewLinkEvent = get_link_to_navigation($GLOBALS["navigation"]['id']) . get_collection_rewrite($collectionData['description'], $collectionData['id']);
// $linkTitle = $GLOBALS['tc']['learn_more'];
// $arr[] = [
// 'id' => "event-".$value['id'],
// 'name' => $title,
// 'description' => $description,
// 'link' => $fullviewLinkEvent,
// 'link_title' => $linkTitle,
// 'date' => $date->format('Y.m.d'),
// 'type' => "event",
// 'color' => "var(--main-color)",
// 'everyYear' => false
// ];
// }
?>