<?php
$setup = array();
$setup['title'] = "Events";
$setup['headline'] = "Odense Track - Eventoversigt";
$setup['keywords'] = "event,events,oversigt,eventoversigt";
$setup['description'] = "Oversigt over events afviklet af eller i samarbejde med Odense Track";

Design::header($setup, 0);
?>

<div class="page">
    <h1>Eventoversigt</h1> <div class="newstitle pull_right"><a href="?page=events&older">Vis Tidligere Events</a></div>
    <div class="border"></div>
    <br />


    <?php
    if (isset($_GET['older'])) {
        $events = Get::publicOldEventList();
    } else {
        $events = Get::publicEventList();
    }
    foreach ($events as $row) {

    ?>
    <div class="eventslice">
        <div class="eventslice-top"><img src="<?php echo $row['img']; ?>" alt="" /></div>
        <div class="eventslice-middle"><?php echo $row['title']; ?></div>
        <div class="eventslice-bottom"><a href="?page=eventview&e=<?php echo $row['id']; ?>"><button>Læs Mere</button></a></div>
    </div>
    <?php
    }
    ?>


    <div class="clear"></div>
</div>

<?php
Design::footer(false);
