setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); //echo "Connected successfully"; } catch(PDOException $e) { echo "Database connection failed: " . $e->getMessage(); } //Hoofding include('layout/header.php'); include('layout/menu.php'); printmenu(4); ?>

Agenda

= $current_year AND month > $current_month) OR (year >= $current_year AND month = $current_month AND day >= $current_day) OR (year_end >= $current_year AND month_end = $current_month AND day_end >= $current_day) OR (year > $current_year) OR (year_show >= $current_year AND month_show > $current_month) OR (year_show >= $current_year AND month_show = $current_month AND day_show >= $current_day) OR (year_show > $current_year))"; $queryfrom .= $where; $queryfrom .= "AND (approved = '1') ORDER BY year, month, day "; $query .= $queryfrom; $query2 .= $queryfrom; $query .= "LIMIT ?, ?"; $selid=0; if (isset($_GET["id"])) {$selid = $_GET["id"];} //$result = $conn->query($query); $vorigemaand=0; $i=0; $vanaf=0; if (isset($_GET["p"])) { $vanaf = $_GET["p"]; } $i = $vanaf; $tot = $i+20; $stmt1 = $conn->prepare($query); $stmt1->bindParam(1, $i, PDO::PARAM_INT); $stmt1->bindParam(2, $tot, PDO::PARAM_INT); $stmt1->execute(); while ($row = $stmt1->fetch()) { $id=$row["id"]; $event=$row["event"]; $hour=$row["hour"]; $minute=$row["minute"]; $hour_end=$row["hour_end"]; $minute_end=$row["minute_end"]; $month=$row["month"]; $day=$row["day"]; $year=$row["year"]; $month_end=$row["month_end"]; $day_end=$row["day_end"]; $year_end=$row["year_end"]; $month_show=$row["month_show"]; $day_show=$row["day_show"]; $year_show=$row["year_show"]; $location=$row["location"]; $email=$row["email"]; $phone=$row["phone"]; $link=$row["link"]; $link_name=$row["link_name"]; $description=$row["description"]; $html=$row["html"]; $hl=$row["highlight"]; $contact=$row["contact"]; $plaats=$row["place"]; $land=$row["country"]; $zip=$row["zip"]; $org=$row["organization"]; if ($month != $oudemaand) { echo "

".$maanden[$month-1]." ".$year."

"; $oudemaand = $month; } //Link affiche ophalen $stmt = $conn->prepare("select * from uploads WHERE page_id = ?"); $stmt->execute([$id]); $affichelink=""; if ($stmt->rowCount()) { $row2=$stmt->fetch(); $affichelink = 'images/agenda/'.$row2["name"]; } //Begin- en einddatum weergeven $datumtekst = datumtekstzjaar($day.'-'.$month.'-'.$year,$day_end.'-'.$month_end.'-'.$year_end); //Geselecteerd evenement uitgebreid weergeven in de lijst if ($id == $selid) { echo ''; echo '
'.$datumtekst.'
'; echo '
'.convert_smart_quotes($event).'
'; echo '
'; if ($affichelink != "") { echo ''; } echo convert_smart_quotes($description).'
'; echo '
'; echo '

'; if ($contact) { echo convert_smart_quotes($contact);} if ($contact && $phone) { echo ' - ';} if ($phone) {echo $phone;} echo '

'; if ($email) {echo '

'.$email.'

';} if ($link && ($hl==0)) { echo "

Website: ".$link_name."

"; } if ($org) { echo "

Georganiseerd door: ".$org."

";} if ($hl == 1) { echo "

Voor meer info zie ook de rubriek: Clubactiviteiten

"; } else if ($hl > 1) { echo "

Voor meer info zie ook de rubriek: Clubactiviteiten

"; } echo '
'; if ($land != "") { echo '
'; if ($location) { echo $location.', '; } echo trim($zip.' '.$plaats).'
'; echo '
'; } else { $filter = ''; if ($reg != 'a') { $filter = 'reg='.$reg.'&'; } $pagina = 'p='.$vanaf.'&'; if ($hl) { echo '
'.$datumtekst.'
'; echo '
'.convert_smart_quotes($event).'
'; echo '
'; if ($affichelink != "") { echo ''; } echo convert_smart_quotes($description).'
'; if ($land != "") { echo '
'.$plaats.'
'; echo '
'; } $i++; } ?> query($query2)->fetch(); $num=$row["totaal"]; if ($num > 20) { echo '
'; $aantalpag = ceil($num / 20); if ($vanaf > 0) { echo 'Vorige'; } if (($vanaf+20) < ($aantalpag*20)) { echo 'Volgende'; } $j=0; echo "
    "; while ($j < $aantalpag) { if (($j*20) == $vanaf) { echo "
  • ".($j+1)."
  • "; } else { echo "
  • ".($j+1)."
  • "; } $j++; } echo "
"; } ?>