<div class="topright">
					*zoekbalk*
				</div>
			</div>

			<table class='table table-striped table-bordered table-hover table-responsive'>
				<!-- http://www.w3schools.com/bootstrap/bootstrap_tables.asp --> 
				<tr><th>ID</th><th>Afbeelding</th><th>Titel</th><?php 
if (isset($_SESSION['isLoggedIn']) && $user->getRank() >= 6) {
    echo "<th style='width:50px'>Bewerken</th><th style='width:50px'>Verwijderen</th>";
}
?>
</tr>
				<?php 
$db = new Database();
$result = $db->getAllComics();
if ($result) {
    foreach ($result as $comic) {
        $owned = $comic->getOwned();
        if ($owned >= 1) {
            $bgColor = "#6CE65E";
        } else {
            $bgColor = "#E65E5E";
        }
        echo '<tr style="background:' . $bgColor . ';"><th>' . $comic->getNumber() . '</th><th width="120"><img src="' . $comic->getImage() . '" height="100" width="100" /></th><th><a href="viewcomic.php/id/' . $comic->getId() . '">' . $comic->getName() . '</a></th>';
        if (isset($_SESSION['isLoggedIn']) && $user->getRank() >= 6) {
            // user is logged in as admin
            echo "<th style='width:50px'><a href='editcomic.php?id=" . $comic->getId() . "' class='btn btn-primary'>Bewerken</a></th><th style='width:50px'><a href='deletecomic.php/id/" . $comic->getId() . "' class='btn btn-danger'>Verwijderen</a></th>";
        }
        echo '</tr>';
    }