if (!array_key_exists('error', $msg)) { $band_name = WEB::_post('band_name'); $band_formed_date = WEB::_post('band_formed_date'); $band_break_up_date = WEB::_post('band_break_up_date'); $band_cover = $msg['file_path']; $band_bio = WEB::_post('band_bio'); $label_id = WEB::_post('label_id'); // array($band_name, $band_formed_date, $band_break_up_date, $band_cover, $band_bio) $form_error = $bd->validateParams(array($band_name, $band_formed_date, $band_break_up_date, $band_cover, $band_bio, $label_id)); if (is_null($form_error) && !is_null($band_name) && !is_null($band_formed_date) && $bd->createBand($band_name, $band_formed_date, $band_break_up_date, $band_cover, $band_bio, $label_id)) { $status_message = WEB::_success('Band Successfully Created!'); } else { $status_message = WEB::_error('There is an error when you were creating the Band. Please review the form below!', $form_error); } // Handle adding multiple performers if ($b->updatePerformersWithBandId($bd->getBandId(), WEB::_select('performer_ids'))) { $bandmateList = $b->getBandmateAsSelectWithBandId($bd->getBandId()); $status_message = WEB::_success('Band Successfully Created!'); } else { $status_message = WEB::_error('There is an error when you were updating the Performers.', null); } } else { $status_message = WEB::_error('Unable to upload Band Cover. ' . $msg['error'], null); } } ?> <?php include __DIR__ . "/../bourbon/template/header.php"; ?>
<?php require_once __DIR__ . "/../bourbon/band.php"; require_once __DIR__ . "/../bourbon/bandmate.php"; $bd = new Band(); $bd->init(WEB::_get('id')); $b = new Bandmate(); $performerList = $b->getListOfPerformerWithBandId($bd->getBandId()); ?> <?php if (!$bd->valid()) { ?> <!-- // Invalid Record --> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Invalid Band</h4> </div> <div class="modal-body"> <p>It looks like you were trying to access a band that we no longer have.</p> </div> <?php } else { ?> <!-- // Valid Record --> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title"><strong><?php echo $bd->getBandName(); ?>