updateById($_POST['music_id'],
$_POST['artist_id'],
$_POST['artist_name'],
$_POST['album_name'],
$music->formatDateTime($_POST['album_day'], $_POST['album_month'], $_POST['album_year']),
$_POST['artist_url'],
$_POST['picture_url'],
$_POST['store_url'],
$_POST['download_id'],
(strcmp($_POST['free_download_enabled'], NULL)) ? TRUE : FALSE,
(strcmp($_POST['featured'], NULL)) ? TRUE : FALSE,
$_POST['description'],
(strcmp($_POST['enabled'], NULL)) ? TRUE : FALSE)) {
_e("The album was successfully updated in the database!
\n", $i18n_domain);
} else {
_e("A problem occurred while trying to update the album and the update information was lost!
\n", $i18n_domain);
}
}
else if (strcmp($_POST['edit'], NULL) && strcmp($_POST['edit'], '0')) {
if (!strcmp($_POST['update'], NULL)) {
$music->loadById($_POST['edit']);
if($music->getTotalRows() > 0) {
$music->display_manage_music_form ($music->id,
$music->artist_name,
$music->album_name,
$music->album_day, $music->album_month, $music->album_year,
$music->picture_url,
$music->artist_url,
$music->store_url,
$music->download_id,
$music->free_download_enabled,
$music->featured,
$music->description,
$music->enabled,
FALSE );
}
}
} else if (strcmp($_POST['new'], NULL) && strcmp($_POST['artist_name'], NULL)) {
if ($music->insert($_POST['artist_id'],
$_POST['artist_name'],
$_POST['album_name'],
$music->formatDateTime($_POST['album_day'], $_POST['album_month'], $_POST['album_year']),
$_POST['artist_url'],
$_POST['picture_url'],
$_POST['store_url'],
$_POST['download_id'],
(strcmp($_POST['free_download_enabled'], NULL)) ? TRUE : FALSE,
(strcmp($_POST['featured'], NULL)) ? TRUE : FALSE,
$_POST['description'],
(strcmp($_POST['enabled'], NULL)) ? TRUE : FALSE)) {
_e('The album was successfully entered into the database!', $i18n_domain);
}
}
if ($_POST['show']) {
$album_show = $_SESSION['album_show'] = true;
} else {
$album_show = $_SESSION['album_show'] = false;
echo '
| ID | \n" . "Art | \n" . "Album | \n" . "Free | \n" . "Featured | \n" . "Enabled | \n" . "Actions | \n" . "
|---|---|---|---|---|---|---|
| '; _e('No Albums Available in the Database!', $i18n_domain); echo ' | ||||||
| " .stripslashes($music->id). " |
|
" .stripslashes($music->artist_name). " " .stripslashes($music->album_name). " Released: "; echo $music->album_month. '.' .$music->album_day. '.' .$music->album_year. " | ";
/* Free Download Enabled */
echo "" .(($music->free_download_enabled) ? "YES" : "NO"). " | \n"; /* Featured */ echo "" .(($music->featured) ? "YES" : "NO"). " | \n"; /* Enabled */ echo "" .(($music->enabled) ? "YES" : "NO"). " | ";
/* Edit Button */
echo '';
/* Delete Button */
echo ' '
. " "
. ' ';
echo " |