<?php require_once __DIR__ . "/../bourbon/user.php"; $u = new User(); $u->auth(null); $u->init(WEB::_get('id')); ?> <?php if (!$u->valid()) { ?> <!-- // Invalid Record --> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Invalid User. Check Id #!</h4> </div> <div class="modal-body"> <p>It looks like you were trying to access a user 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 $u->getUserName(); ?> </strong></h4> </div>
$status_message = ''; // Status messages, default to nothing // List View $u = new User(); $u->auth(null); // Handle Pagination of Bands $numOfUsers = $u->userCount(); $page = WEB::_get('pg'); if ($page === null) { $page = 0; } // Get Band Data List (Used to display data in the table - see below) $userList = $u->getUserAsList($page); // Handle Deleteing from this view... if (WEB::_action('delete')) { if ($u->deleteUserById(WEB::_get('delete'))) { $status_message = WEB::_success('User was deleted successfully!'); $userList = $u->getUserAsList($page); } else { $status_message = WEB::_error('User couldn\'t be deleted!', null); } } ?> <?php include __DIR__ . "/bourbon/template/header.php"; ?> <div class="page-header"> <h1>Users<small>From Admin to Editor manage it all.</small></h1>
WEB::_image(<?php require __DIR__ . "/bourbon/search.php"; $s = new Search(); $s->init(WEB::_get('s'), WEB::_get('r'), WEB::_get('g'), WEB::_get('a'), WEB::_get('p')); $status_message = ''; // Status messages, default to nothing $page = WEB::_get('pg'); if ($page === null) { $page = 0; } // Populate the List for displaying $recordList = $s->getRecordList($page); $numOfRec = $s->getRecordCount(); ?> <!-- // Begin Genre Template (List View) --> <?php include __DIR__ . "/bourbon/template/header.php"; ?> <div class="page-header"> <h1>Advanced Search<small></small></h1> </div> <?php echo $status_message; ?> <div class="row">
<?php require_once __DIR__ . "/bourbon/record.php"; require_once __DIR__ . "/bourbon/libs/Mandrill.php"; //Not required with Composer $b = new Bourbon(); $mandrill = new Mandrill('BNc02m60hJyYEe-ADC-aEg'); $r = new Record(); $r->init(WEB::_get('record_id')); $email = WEB::_get('email'); $name = WEB::_get('name'); // Dispatch Email using Mandrill if (filter_var($email, FILTER_VALIDATE_EMAIL) && $r->valid()) { $query = "SELECT user_email \n\t\t\t \t FROM user\n\t\t\t\t WHERE user_notify = TRUE;"; $result = mysqli_query($b->getDb(), $query); if ($result) { while ($data = $result->fetch_assoc()) { $users[] = $data; } } $recName = $r->getRecordName(); try { for ($i = 0; $i < count($users); $i++) { $user_email = "" . $users[$i]['user_email']; // Send Email $message = new stdClass(); $message->html = "Hi!<br><br><strong>{$name}</strong> just inquired about: <strong>{$recName}</strong>.<br><br>Email them at: {$email}."; $message->subject = "[Bourbon] New Record Inquiry - {$recName}"; $message->from_email = "{$email}"; $message->from_name = "{$name}"; $message->to = array(array("email" => "{$user_email}"));
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"; ?>
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"; ?>
require __DIR__ . "/bourbon/performer.php"; $status_message = ''; // Status messages, default to nothing // List View $p = new Performer(); // Handle Pagination of Performers $numOfPerformers = $p->performerCount(); $page = WEB::_get('pg'); if ($page === null) { $page = 0; } // Get Performer Data List (Used to display data in the table - see below) $performerList = $p->getPerformerAsList($page); // Handle Deleteing from this view... if (WEB::_action('delete')) { if ($p->deletePerformerById(WEB::_get('delete'))) { $status_message = WEB::_success('Performer was deleted successfully!'); $performerList = $p->getPerformerAsList($page); } else { $status_message = WEB::_error('Performer couldn\'t be deleted!', null); } } ?> <!-- // Begin Genre Template (List View) --> <?php include __DIR__ . "/bourbon/template/header.php"; ?>
require __DIR__ . "/bourbon/record.php"; $status_message = ''; // Status messages, default to nothing // List View $r = new Record(); // Handle Pagination of Records $numOfRec = $r->recordCount(); $page = WEB::_get('pg'); if ($page === null) { $page = 0; } // Populate the List for displaying $recordList = $r->getRecordAsList($page); // Handle Deleteing from this view... if (WEB::_action('delete')) { if ($r->deleteRecordById(WEB::_get('delete'))) { $status_message = WEB::_success('Record was deleted successfully!'); $recordList = $r->getRecordAsList($page); } else { $status_message = WEB::_error('Record couldn\'t be deleted!', null); } } ?> <!-- // Begin Genre Template (List View) --> <?php include __DIR__ . "/bourbon/template/header.php"; ?>
$status_message = ''; // Status messages, default to nothing // List View $l = new Label(); // Handle Pagination of Bands $numOfLabels = $l->LabelCount(); echo $numOfLabels; $page = WEB::_get('pg'); if ($page === null) { $page = 0; } // Get Label Data List (Used to display data in the table - see below) $labelList = $l->getLabelAsList($page); // Handle Deleteing from this view... if (WEB::_action('delete')) { if ($l->deleteLabelById(WEB::_get('delete'))) { $status_message = WEB::_success('Label was deleted successfully!'); $labelList = $l->getLabelAsList($page); } else { $status_message = WEB::_error('Label couldn\'t be deleted!', null); } } ?> <!-- // Begin Label Template (List View) --> <?php include __DIR__ . "/bourbon/template/header.php"; ?>
<?php require_once __DIR__ . "/../bourbon/libs/bourbon.php"; $details = WEB::_get('d'); $id = WEB::_get('id'); $path = WEB::_get('p'); $url = BOURBON_URL . $path . ".php?delete={$id}"; ?> <!-- // Delete Id --> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title"> <strong>Are You Sure?</strong> </h4> </div> <div class="modal-body delete-view"> <p><?php echo $details; ?> </p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default left" data-dismiss="modal">No, Close</button> <a href="<?php echo $url; ?> " class="btn btn-danger right" role="button">Yes, Delete</a> </div>