setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(PDOException $e) { echo "Webseite wird momentan überarbeitet"; } function fetch_text($id) { global $conn; $stmt = $conn->prepare('select text from text where id = :id LIMIT 1;'); $stmt->bindParam(':id', $id); $stmt->execute(); $result = $stmt->fetch(PDO::FETCH_ASSOC); return $result['text']; } function timeformat($time) { $t = strtotime($time); if(date('i', $t) != 0) { return strftime("%d.%m (%H.%M h)", $t); } return strftime("%d.%m (%H h)", $t); } $stmt = $conn->prepare('select DISTINCT LPAD( month(time), 2, \'0\') as `nr` from events_onwebsite'); $stmt->execute(); $first = true; $timetitle = ''; $sitetitle = ''; foreach($stmt->fetchAll() as $month) { if(!$first){ $timetitle .= '/'; $sitetitle .= '/'; } $timetitle .= ''.$month['nr'].''; $sitetitle .= $month['nr']; $first = false; } ?> Kartontage: <?=$sitetitle;?>
prepare('select * from places'); $stmt->execute(); $first = true; foreach($stmt->fetchAll() as $place) { ?>
prepare('select * from places'); if(isset($_GET["places_id"])){ $stmt = $conn->prepare('select * from places where id = :id'); $stmt->bindParam(':id', $_GET["places_id"]); } $stmt->execute(); // set the resulting array to associative foreach($stmt->fetchAll() as $place) { ?>
">

prepare('select * from events_onwebsite where places_id = :id'); $stmt->bindParam(':id', $place["id"]); $stmt->execute(); foreach($stmt->fetchAll() as $event) { ?>
1 ) { ?>   1 ) { ?>
1 ) { ?>

1 ) { ?>   1 ) { ?>   1 ) { ?>   1 ) { ?>