<?php require __DIR__ . "/bourbon/genre.php"; $status_message = ''; // Status messages, default to nothing // List View $g = new Genre(); // Handle Pagination of Bands $numOfGenres = $g->genreCount(); $page = WEB::_get('pg'); if ($page === null) { $page = 0; } // Get Band Data List (Used to display data in the table - see below) $genreList = $g->getGenreAsList($page); // Handle Deleteing from this view... if (WEB::_action('delete')) { if ($g->deleteGenreById(WEB::_get('delete'))) { $status_message = WEB::_success('Genre was deleted successfully!'); $genreList = $g->getGenreAsList($page); } else { $status_message = WEB::_error('Genre couldn\'t be deleted!', null); } } ?> <!-- // Begin Genre Template (List View) --> <?php include __DIR__ . "/bourbon/template/header.php"; ?>