Exemple #1
0
<?php

require __DIR__ . "/bourbon/band.php";
$status_message = '';
// Status messages, default to nothing
// List View
$bd = new Band();
// Handle Pagination of Bands
$numOfBands = $bd->bandCount();
$page = WEB::_get('pg');
if ($page === null) {
    $page = 0;
}
// Get Band Data List (Used to display data in the table - see below)
$bandList = $bd->getBandAsList($page);
// Handle Deleteing from this view...
if (WEB::_action('delete')) {
    if ($bd->deleteBandById(WEB::_get('delete'))) {
        $status_message = WEB::_success('Band was deleted successfully!');
        $bandList = $bd->getBandAsList($page);
    } else {
        $status_message = WEB::_error('Band couldn\'t be deleted! Make sure you are not trying to delete an Band who has associated Performers!', null);
    }
}
?>

<!-- // Begin Genre Template (List View) -->

<?php 
include __DIR__ . "/bourbon/template/header.php";
?>