Gazelle/sections/collages/manage.php
What.CD 6273679d49 86 changes from Wed Jul 27 01:50:24 2011 -0400 to Tue Aug 9 12:47:47 2011 -0400
fix typo I introduced in schedule.php
Print to LAB_CHAN if sphinx connection fails
nice bitcoin display
Corrects [#] tag for Mono  [hateradio]
bitcoin donation
Fix torrent unbookmarking
upgraded sphinxapi.php to r2876 as the site is running r2902
Added options to block Tor, Opera Turbo and Opera Mini
check for stale cache
vanity house  [clone00]
bookmark almost anything  [patapper]
new torrent edit flags  [rattvis]
permissions stuff from patappatch c
[BBCode] new [important] tag  [DutchDude]
Fixed images flowing past their boxes  [hateradio]
[BBCode] Tag for ordered lists.  [hateradio]
finally fixed that annoying textarea-resizing thing
renamed temporary tables

fixes http://what.cd/forums.php?action=viewthread&threadid=137432&page=1#post3408738
implements http://what.cd/forums.php?action=viewthread&threadid=122832
fixes http://what.cd/forums.php?action=viewthread&threadid=136553
fixes http://what.cd/forums.php?action=viewthread&threadid=112967
implements http://what.cd/forums.php?action=viewthread&threadid=110395
2011-08-09 21:03:28 +00:00

87 lines
2.5 KiB
PHP

<?
$CollageID = $_GET['collageid'];
if(!is_number($CollageID)) { error(0); }
$DB->query("SELECT Name, UserID, CategoryID FROM collages WHERE ID='$CollageID'");
list($Name, $UserID, $CategoryID) = $DB->next_record();
if($CategoryID == 0 && $UserID!=$LoggedUser['ID'] && !check_perms('site_collages_delete')) { error(403); }
$DB->query("SELECT ct.GroupID,
um.ID,
um.Username,
ct.Sort
FROM collages_torrents AS ct
JOIN torrents_group AS tg ON tg.ID=ct.GroupID
LEFT JOIN users_main AS um ON um.ID=ct.UserID
WHERE ct.CollageID='$CollageID'
ORDER BY ct.Sort");
$GroupIDs = $DB->collect('GroupID');
$CollageDataList=$DB->to_array('GroupID', MYSQLI_ASSOC);
if(count($GroupIDs)>0) {
$TorrentList = get_groups($GroupIDs);
$TorrentList = $TorrentList['matches'];
} else {
$TorrentList = array();
}
show_header('Manage collage '.$Name);
?>
<div class="thin">
<h2>Manage collage <a href="collages.php?id=<?=$CollageID?>"><?=$Name?></a></h2>
<table>
<tr class="colhead">
<td>Sort</td>
<td>Torrent</td>
<td>User</td>
<td>Submit</td>
</tr>
<?
$Number = 0;
foreach ($TorrentList as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists) = array_values($Group);
list($GroupID2, $UserID, $Username, $Sort) = array_values($CollageDataList[$GroupID]);
$Number++;
$DisplayName = $Number.' - ';
if(count($GroupArtists)>0) {
$DisplayName = display_artists(array('1'=>$GroupArtists));
}
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';}
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
?>
<tr>
<form action="collages.php" method="post">
<input type="hidden" name="action" value="manage_handle" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="collageid" value="<?=$CollageID?>" />
<input type="hidden" name="groupid" value="<?=$GroupID?>" />
<td>
<input type="text" name="sort" value="<?=$Sort?>" size="4" title="The collage is sorted order of this number" />
</td>
<td>
<?=$DisplayName?>
</td>
<td>
<?=format_username($UserID, $Username)?>
</td>
<td>
<input type="submit" name="submit" value="Edit" />
<input type="submit" name="submit" value="Remove" />
</td>
</form>
</tr>
<?
}
?>
</table>
</div>
<? show_footer() ?>