if (!check_perms('site_torrents_notify')) {
error(403);
}
View::show_header('Manage notifications');
?>
$DB->query("
SELECT ID, Label, Artists, ExcludeVA, NewGroupsOnly, Tags, NotTags, ReleaseTypes, Categories, Formats, Encodings, Media, FromYear, ToYear, RecordLabels
FROM users_notify_filters
WHERE UserID='$LoggedUser[ID]'
UNION ALL
SELECT NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL");
$i = 0;
$NumFilters = $DB->record_count() - 1;
$Notifications = $DB->to_array();
foreach ($Notifications as $N) { //$N stands for Notifications
$N['Artists'] = implode(', ', explode('|', substr($N['Artists'], 1, -1)));
$N['Tags'] = implode(', ', explode('|', substr($N['Tags'], 1, -1)));
$N['NotTags'] = implode(', ', explode('|', substr($N['NotTags'], 1, -1)));
$N['ReleaseTypes'] = explode('|', substr($N['ReleaseTypes'], 1, -1));
$N['Categories'] = explode('|', substr($N['Categories'], 1, -1));
$N['Formats'] = explode('|', substr($N['Formats'], 1, -1));
$N['Encodings'] = explode('|', substr($N['Encodings'], 1, -1));
$N['Media'] = explode('|', substr($N['Media'], 1, -1));
$N['RecordLabels'] = implode(', ', explode('|', substr($N['RecordLabels'], 1, -1)));
if ($N['FromYear'] == 0) {
$N['FromYear'] = '';
}
if ($N['ToYear'] == 0) {
$N['ToYear'] = '';
}
$i++;
if ($i > $NumFilters && $NumFilters > 0) { ?>
Create a new notification filter
} elseif ($NumFilters > 0) { ?>
=display_str($N['Label'])?>
Delete
Show
} ?>
if ($i == $NumFilters) { ?>
}
} ?>
View::show_footer(); ?>