2011-08-09 21:03:28 +00:00
|
|
|
<?
|
|
|
|
|
|
|
|
if(!empty($_GET['userid'])) {
|
|
|
|
if(!check_perms('users_override_paranoia')) {
|
|
|
|
error(403);
|
|
|
|
}
|
|
|
|
$UserID = $_GET['userid'];
|
|
|
|
$Sneaky = ($UserID != $LoggedUser['ID']);
|
|
|
|
if(!is_number($UserID)) { error(404); }
|
|
|
|
$DB->query("SELECT Username FROM users_main WHERE ID='$UserID'");
|
|
|
|
list($Username) = $DB->next_record();
|
|
|
|
} else {
|
|
|
|
$UserID = $LoggedUser['ID'];
|
|
|
|
}
|
|
|
|
|
|
|
|
$Sneaky = ($UserID != $LoggedUser['ID']);
|
|
|
|
|
|
|
|
//$ArtistList = all_bookmarks('artist', $UserID);
|
|
|
|
|
|
|
|
$DB->query('SELECT ag.ArtistID, ag.Name
|
|
|
|
FROM bookmarks_artists AS ba
|
|
|
|
INNER JOIN artists_group AS ag ON ba.ArtistID = ag.ArtistID
|
2011-11-13 08:00:16 +00:00
|
|
|
WHERE ba.UserID = '.$UserID.'
|
|
|
|
ORDER BY ag.Name');
|
2011-08-09 21:03:28 +00:00
|
|
|
|
|
|
|
$ArtistList = $DB->to_array();
|
|
|
|
|
|
|
|
$Title = ($Sneaky)?"$Username's bookmarked artists":'Your bookmarked artists';
|
|
|
|
|
|
|
|
show_header($Title,'browse');
|
|
|
|
|
|
|
|
?>
|
|
|
|
<div class="thin">
|
2012-08-19 08:00:19 +00:00
|
|
|
<div class="header">
|
|
|
|
<h2><?=$Title?></h2>
|
|
|
|
<div class="linkbox">
|
|
|
|
<a href="bookmarks.php?type=torrents">[Torrents]</a>
|
|
|
|
<a href="bookmarks.php?type=artists">[Artists]</a>
|
|
|
|
<a href="bookmarks.php?type=collages">[Collages]</a>
|
|
|
|
<a href="bookmarks.php?type=requests">[Requests]</a>
|
|
|
|
</div>
|
2011-08-09 21:03:28 +00:00
|
|
|
</div>
|
|
|
|
<div class="box pad" align="center">
|
|
|
|
<? if (count($ArtistList) == 0) { ?>
|
2011-11-29 08:00:19 +00:00
|
|
|
<br /><h2>You have not bookmarked any artists.</h2>
|
2011-08-09 21:03:28 +00:00
|
|
|
</div>
|
2011-08-22 08:00:05 +00:00
|
|
|
</div><!--content-->
|
2011-08-09 21:03:28 +00:00
|
|
|
<?
|
|
|
|
show_footer();
|
|
|
|
die();
|
|
|
|
} ?>
|
2012-09-01 08:00:24 +00:00
|
|
|
<table width="100%" class="artist_table">
|
2011-08-09 21:03:28 +00:00
|
|
|
<tr class="colhead">
|
|
|
|
<td>Artist</td>
|
|
|
|
</tr>
|
|
|
|
<?
|
|
|
|
$Row = 'a';
|
|
|
|
foreach ($ArtistList as $Artist) {
|
|
|
|
$Row = ($Row == 'a') ? 'b' : 'a';
|
|
|
|
list($ArtistID, $Name) = $Artist;
|
|
|
|
?>
|
|
|
|
<tr class="row<?=$Row?> bookmark_<?=$ArtistID?>">
|
|
|
|
<td>
|
|
|
|
<a href="artist.php?id=<?=$ArtistID?>"><?=$Name?></a>
|
|
|
|
<span style="float: right">
|
|
|
|
<?
|
|
|
|
if (check_perms('site_torrents_notify')) {
|
|
|
|
if (($Notify = $Cache->get_value('notify_artists_'.$LoggedUser['ID'])) === FALSE) {
|
|
|
|
$DB->query("SELECT ID, Artists FROM users_notify_filters WHERE UserID='$LoggedUser[ID]' AND Label='Artist notifications' LIMIT 1");
|
|
|
|
$Notify = $DB->next_record(MYSQLI_ASSOC);
|
|
|
|
$Cache->cache_value('notify_artists_'.$LoggedUser['ID'], $Notify, 0);
|
|
|
|
}
|
|
|
|
if (stripos($Notify['Artists'], '|'.$Name.'|') === FALSE) {
|
|
|
|
?>
|
|
|
|
<a href="artist.php?action=notify&artistid=<?=$ArtistID?>&auth=<?=$LoggedUser['AuthKey']?>">[Notify of new uploads]</a>
|
|
|
|
<?
|
|
|
|
} else {
|
|
|
|
?>
|
|
|
|
<a href="artist.php?action=notifyremove&artistid=<?=$ArtistID?>&auth=<?=$LoggedUser['AuthKey']?>">[Do not notify of new uploads]</a>
|
|
|
|
<?
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<a href="#" id="bookmarklink_artist_<?=$ArtistID?>" onclick="Unbookmark('artist', <?=$ArtistID?>,'[Bookmark]');return false;">[Remove bookmark]</a>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?
|
|
|
|
show_footer();
|
|
|
|
$Cache->cache_value('bookmarks_'.$UserID, serialize(array(array($Username, $TorrentList, $CollageDataList))), 3600);
|
|
|
|
?>
|