示例#1
0
                $updateStatus = $r->updateGenreId($genre_id);
            }
            if ($updateStatus && !is_null($record_artwork)) {
                $updateStatus = $r->updateRecordArtwork($record_artwork);
            }
            if ($updateStatus) {
                $r->refresh();
                $status_message = WEB::_success('Record Successfully updated!');
            } else {
                $status_message = WEB::_error('There is an error when you were updating the Record.', null);
            }
        } else {
            $status_message = WEB::_error('There is an error when you were updating the Record. Please review the form below!', $form_error);
        }
    } else {
        $status_message = WEB::_error('Unable to upload Artwork. ' . $msg['error'], null);
    }
}
?>


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

	
<div class="page-header">
	<h1>Update a Record<small></small></h1>
</div>

 	<?php 
示例#2
0

<?php 
require __DIR__ . "/bourbon/login.php";
$status_message = '';
// Status messages, default to nothing
// List View
$l = new Login();
if (isset($_GET['auth'])) {
    if (!$l->authAccount()) {
        $status_message = WEB::_error('Authentication Failed! Check Email or Password!', null);
    }
}
?>

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

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

	
	<div class="row">
    	<div class="col-md-6">
		
		<div class="page-header">
	  		<h1>Login<small></small></h1>
		</div>

     	<?php 
echo $status_message;
示例#3
0
        // Passed as: array($performer_name, performer_date_of_birth, performer_bio, performer_cover)
        $form_error = $p->validateParams(array($performer_name, $performer_date_of_birth, $performer_bio, $performer_cover));
        if (is_null($form_error) && !is_null($performer_name) && !is_null($performer_date_of_birth) && $p->createPerformer($performer_name, $performer_date_of_birth, $performer_bio, $performer_cover)) {
            $status_message = WEB::_success('Performer Successfully Created!');
        } else {
            $status_message = WEB::_error('There is an error when you were creating the Performer. Please review the form below!', $form_error);
        }
        // Handle adding multiple Bands
        if ($b->updateBandsWithPerformerId($p->getPerformerId(), WEB::_select('band_ids'))) {
            $bandmateList = $b->getBandmateAsSelectWithPerformerId($p->getPerformerId());
            $status_message = WEB::_success('Bands Updated Successfully!');
        } else {
            $status_message = WEB::_error('There is an error when you were updating the Bands.', null);
        }
    } else {
        $status_message = WEB::_error('Unable to upload Performer Cover. ' . $msg['error'], null);
    }
}
?>


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

	
<div class="page-header">
	<h1>Create a New Performer<small></small></h1>
</div>

 	<?php 
示例#4
0
$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>
	</div>

     	<?php 
echo $status_message;
示例#5
0
            $updateStatus = $u->updateUserEmail($user_email);
        }
        if ($updateStatus && !is_null($user_email)) {
            $updateStatus = $u->updateUserPassword($user_password);
        }
        if ($updateStatus) {
            $updateStatus = $u->updateUserNotify($user_notify);
        }
        if ($updateStatus) {
            $u->refresh();
            $status_message = WEB::_success('User Successfully updated!');
        } else {
            $status_message = WEB::_error('There was an error when you were updating the User.', null);
        }
    } else {
        $status_message = WEB::_error('There is an error when you were updating the User. Please review the form below!', $form_error);
    }
}
?>


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

	
<div class="page-header">
	<h1>Update a User<small></small></h1>
</div>

 	<?php 
示例#6
0
$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";
?>

	
	<div class="page-header">
  		<h1>Band<small>From The Beatles to Macklemore.</small></h1>
	</div>
示例#7
0
        // 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";
?>

	
<div class="page-header">
	<h1>Create a New Band<small></small></h1>
</div>

 	<?php 
示例#8
0
<?php

require __DIR__ . "/../bourbon/genre.php";
$status_message = '';
// Status messages, default to nothing
$g = new Genre();
$g->auth(null);
// Handle Post Request
if (WEB::_req('POST')) {
    $genre_name = WEB::_post('genre_name');
    // array($genre_name)
    $form_error = $g->validateParams(array($genre_name));
    if (is_null($form_error) && !is_null($genre_name) && $g->createGenre($genre_name)) {
        $status_message = WEB::_success('Genre Successfully Created!');
    } else {
        $status_message = WEB::_error('There is an error when you were creating the Genre. The Genre you are trying to create may already Exist. Please review the form below!', $form_error);
    }
}
?>

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

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

	
<div class="page-header">
	<h1>Create a New Genre<small>Add anything from Rock to Jazz.</small></h1>
</div>
示例#9
0
            // 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}"));
            $message->track_opens = false;
            $response = $mandrill->messages->send($message);
        }
    } catch (Exception $e) {
        $status_message = WEB::_error('Email failed to dispatch! Mandrill might be down.', null);
    }
    $status_message = WEB::_success('Email Dispatched Successfully!', null);
} else {
    $status_message = WEB::_error('Invalid Email Address! Try again!.', null);
}
?>


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

	
	<div class="page-header">
  		<h1>Inquiry</h1>
	</div>

     	<?php 
echo $status_message;
示例#10
0
$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";
?>

	
	<div class="page-header">
  		<h1>Records<small>The four building blocks of the universe are fire, water, gravel and vinyl.</small></h1>
	</div>