<?php
$setup = array();
$setup['title'] = "Nyheder";
$setup['headline'] = "Odense Track - Nyheder";
$setup['keywords'] = "nyheder,news,nyhed,banenyt,nyt";
$setup['description'] = "Oversigt over nyheder vedr. Odense Track";

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

<div class="page">
    <h1>Nyhedsoversigt</h1>
    <div class="border"></div>
    <br />

    <?php
    
    foreach (Get::publicNewsList() as $row) {
        ?>
        <div class="newsitem">
            <div class="newsitemimg pull_left"><img src="img/fbanner/track.png" alt="" /></div>

            <div class="newsitemcont pull_left">
                <div class="newsitemauthor"><h2><?php echo $row['title']; ?></h2> <p><?php echo date('H:i d/m-Y', $row['time']); ?></p></div>
                <p><?php echo strip_tags(substr($row['content'],0,400)); ?></p>
            </div>

            <div class="newsitemread pull_left"><a href="?page=readnews&n=<?php echo $row['id']; ?>"><button>Læs nyhed</button></a></div>
        </div>

        <?php
    }
    ?>

</div>

<?php
Design::footer(false);
