mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-14 19:36:25 +00:00
6273679d49
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
95 lines
2.8 KiB
PHP
95 lines
2.8 KiB
PHP
<?
|
|
// Get list of FLAC uploads
|
|
|
|
if(!empty($_GET['userid']) && is_number($_GET['userid'])) {
|
|
if (check_perms('users_override_paranoia')) {
|
|
$UserID = $_GET['userid'];
|
|
} else {
|
|
error(403);
|
|
}
|
|
} else {
|
|
$UserID = $LoggedUser['ID'];
|
|
}
|
|
|
|
$DB->query("SELECT t.GroupID, t.ID
|
|
FROM torrents AS t
|
|
WHERE
|
|
t.Format='FLAC'
|
|
AND ((t.LogScore = '100' AND t.Media = 'CD')
|
|
OR t.Media = 'Vinyl')
|
|
AND t.UserID='$UserID'");
|
|
|
|
$UploadedGroupIDs = $DB->collect('GroupID');
|
|
$Uploads = $DB->to_array('GroupID');
|
|
|
|
if(count($UploadedGroupIDs) == 0) { error('You haven\'t uploaded any 100% flacs!'); }
|
|
// Create hash table
|
|
|
|
$DB->query("CREATE TEMPORARY TABLE temp_sections_better_upload
|
|
SELECT t.GroupID,
|
|
GROUP_CONCAT(t.Encoding SEPARATOR ' ') AS EncodingList
|
|
FROM torrents AS t
|
|
WHERE t.GroupID IN(".implode(',',$UploadedGroupIDs).")
|
|
GROUP BY t.GroupID");
|
|
|
|
//$DB->query('SELECT * FROM t');
|
|
|
|
$DB->query("SELECT GroupID FROM temp_sections_better_upload
|
|
WHERE EncodingList NOT LIKE '%V0 (VBR)%'
|
|
OR EncodingList NOT LIKE '%V2 (VBR)%'
|
|
OR EncodingList NOT LIKE '%320%'");
|
|
|
|
$GroupIDs = $DB->collect('GroupID');
|
|
|
|
if(count($GroupIDs) == 0) { error('No results found'); }
|
|
|
|
$Results = get_groups($GroupIDs);
|
|
|
|
show_header('Transcode Uploads');
|
|
?>
|
|
<div class="thin">
|
|
<table width="100%">
|
|
<tr class="colhead">
|
|
<td>Torrent</td>
|
|
<td>V2</td>
|
|
<td>V0</td>
|
|
<td>320</td>
|
|
</tr>
|
|
<?
|
|
$Results = $Results['matches'];
|
|
foreach ($Results as $GroupID=>$Group) {
|
|
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group);
|
|
$FlacID = $Uploads[$GroupID]['ID'];
|
|
|
|
$DisplayName = '';
|
|
if(count($Artists)>0) {
|
|
$DisplayName = display_artists(array('1'=>$Artists));
|
|
}
|
|
$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
|
|
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
|
|
|
|
$MissingEncodings = array('V0 (VBR)'=>1, 'V2 (VBR)'=>1, '320'=>1);
|
|
|
|
foreach($Torrents as $Torrent) {
|
|
if(!empty($MissingEncodings[$Torrent['Encoding']])) {
|
|
$MissingEncodings[$Torrent['Encoding']] = 0;
|
|
}
|
|
}
|
|
|
|
?>
|
|
<tr>
|
|
<td>
|
|
<?=$DisplayName?>
|
|
[<a href="torrents.php?action=download&id=<?=$FlacID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>]</td>
|
|
<td><strong><?=($MissingEncodings['V2 (VBR)'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td>
|
|
<td><strong><?=($MissingEncodings['V0 (VBR)'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td>
|
|
<td><strong><?=($MissingEncodings['320'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong>
|
|
</td>
|
|
</tr>
|
|
<? } ?>
|
|
</table>
|
|
</div>
|
|
<?
|
|
show_footer();
|
|
?>
|