AGENDA

prepare("SELECT event_ID, event_title, event_start_date, event_start_time, event_performer, event_location FROM bnb_events WHERE event_start_date >= CURDATE() ORDER BY event_start_date ASC "); $events_q->execute(); $events_q->bind_result($id, $title, $start_date, $start_time, $performer, $location); $curdate = 0; $tableOpened = false; while($event = $events_q->fetch()) { $new_curdate = date('m', strtotime($start_date)); if (($curdate == $new_curdate) && ($tableOpened)) { echo ''.date('d-m-Y', strtotime($start_date)).''.$title.''.$location.''.$performer.'Aanvang: '.date('H:i', strtotime($start_time)).' uur'; } else if (($curdate == $new_curdate) && (!$tableOpened)) { echo '

'.strftime("%B",strtotime($start_date)).'

'; echo ''; echo ''; $tableOpened = true; $curdate = $new_curdate; } else if (($curdate != $new_curdate) && ($tableOpened)) { echo "
'.date('d-m-Y', strtotime($start_date)).''.$title.''.$location.''.$performer.'Aanvang: '.date('H:i', strtotime($start_time)).' uur
"; $tableOpened = false; echo '

'.strftime("%B",strtotime($start_date)).'

'; echo ''; echo ''; $tableOpened = true; $curdate = $new_curdate; } else if (($curdate != $new_curdate) && (!$tableOpened)) { echo '

'.strftime("%B",strtotime($start_date)).'

'; echo '
'.date('d-m-Y', strtotime($start_date)).''.$title.''.$location.''.$performer.'Aanvang: '.date('H:i', strtotime($start_time)).' uur
'; echo ''; $tableOpened = true; $curdate = $new_curdate; } // echo '

'.strftime("%B",strtotime($start_date)).'

'; // echo '
'.date('d-m-Y', strtotime($start_date)).''.$title.''.$location.''.$performer.'Aanvang: '.date('H:i', strtotime($start_time)).' uur
'; // $tableOpened = true; // $tableClosed = false; // $curdate = $new_curdate; // } // // // // if (!$tableClosed) { // echo "
"; // $tableClosed = true; // $tableOpened = false; // } } echo ""; $events_q->close(); ?>