Empty commit

This commit is contained in:
Git 2012-02-05 08:00:20 +00:00
parent 0a6f90f451
commit fe9d522bd4
14 changed files with 190 additions and 33 deletions

View File

@ -44,7 +44,7 @@
<table> <table>
<? <?
foreach($TorrentsInfo as $TorrentID => $Info) { foreach($TorrentsInfo as $TorrentID => $Info) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Results[$Info['GroupID']]); list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Results[$Info['GroupID']]);
$DisplayName = ''; $DisplayName = '';
if(count($Artists)>0) { if(count($Artists)>0) {
@ -58,12 +58,25 @@
if($ExtraInfo) { if($ExtraInfo) {
$DisplayName.=' - '.$ExtraInfo; $DisplayName.=' - '.$ExtraInfo;
} }
$TagList=array();
if($TorrentTags!='') {
$TorrentTags=explode(' ',$TorrentTags);
foreach ($TorrentTags as $TagKey => $TagName) {
$TagName = str_replace('_','.',$TagName);
$TagList[]='<a href="torrents.php?searchtags='.$TagName.'">'.$TagName.'</a>';
}
$PrimaryTag = $TorrentTags[0];
$TagList = implode(', ', $TagList);
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?> ?>
<tr><td><?=$DisplayName?> <tr><td><?=$DisplayName?>
[<a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>] [<a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>]
<? if(check_perms('admin_reports')) { ?> <? if(check_perms('admin_reports')) { ?>
<a href="better.php?method=files&amp;remove=<?=$TorrentID?>">[X]</a> <a href="better.php?method=files&amp;remove=<?=$TorrentID?>">[X]</a>
<? } ?> <? } ?>
<?=$TorrentTags?>
</td></tr> </td></tr>
<? <?
} }

View File

@ -44,7 +44,7 @@
<table> <table>
<? <?
foreach($TorrentsInfo as $TorrentID => $Info) { foreach($TorrentsInfo as $TorrentID => $Info) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Results[$Info['GroupID']]); list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Results[$Info['GroupID']]);
$DisplayName = ''; $DisplayName = '';
if(count($Artists)>0) { if(count($Artists)>0) {
@ -58,12 +58,25 @@
if($ExtraInfo) { if($ExtraInfo) {
$DisplayName.=' - '.$ExtraInfo; $DisplayName.=' - '.$ExtraInfo;
} }
$TagList=array();
if($TorrentTags!='') {
$TorrentTags=explode(' ',$TorrentTags);
foreach ($TorrentTags as $TagKey => $TagName) {
$TagName = str_replace('_','.',$TagName);
$TagList[]='<a href="torrents.php?searchtags='.$TagName.'">'.$TagName.'</a>';
}
$PrimaryTag = $TorrentTags[0];
$TagList = implode(', ', $TagList);
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?> ?>
<tr><td><?=$DisplayName?> <tr><td><?=$DisplayName?>
[<a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>] [<a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>]
<? if(check_perms('admin_reports')) { ?> <? if(check_perms('admin_reports')) { ?>
<a href="better.php?method=folders&amp;remove=<?=$TorrentID?>">[X]</a> <a href="better.php?method=folders&amp;remove=<?=$TorrentID?>">[X]</a>
<? } ?> <? } ?>
<?=$TorrentTags?>
</td></tr> </td></tr>
<? <?
} }

View File

@ -25,7 +25,7 @@
<? <?
$Results = $Results['matches']; $Results = $Results['matches'];
foreach ($Results as $GroupID=>$Group) { foreach ($Results as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group); list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group);
$FlacID = $GroupIDs[$GroupID]['TorrentID']; $FlacID = $GroupIDs[$GroupID]['TorrentID'];
$DisplayName = ''; $DisplayName = '';
@ -35,11 +35,23 @@
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&amp;torrentid='.$FlacID.'" title="View Torrent">'.$GroupName.'</a>'; $DisplayName.='<a href="torrents.php?id='.$GroupID.'&amp;torrentid='.$FlacID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; } if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
$TagList=array();
if($TorrentTags!='') {
$TorrentTags=explode(' ',$TorrentTags);
foreach ($TorrentTags as $TagKey => $TagName) {
$TagName = str_replace('_','.',$TagName);
$TagList[]='<a href="torrents.php?searchtags='.$TagName.'">'.$TagName.'</a>';
}
$PrimaryTag = $TorrentTags[0];
$TagList = implode(', ', $TagList);
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?> ?>
<tr> <tr>
<td> <td>
<?=$DisplayName?> <?=$DisplayName?>
[<a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>] [<a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>]
<?=$TorrentTags?>
</td> </td>
</tr> </tr>
<? } ?> <? } ?>

View File

@ -71,7 +71,7 @@
<? <?
$Results = $Results['matches']; $Results = $Results['matches'];
foreach ($Results as $GroupID=>$Group) { foreach ($Results as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group); list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group);
$FlacID = $Snatches[$GroupID]['fid']; $FlacID = $Snatches[$GroupID]['fid'];
$DisplayName = ''; $DisplayName = '';
@ -89,15 +89,27 @@
} }
} }
$TagList=array();
if($TorrentTags!='') {
$TorrentTags=explode(' ',$TorrentTags);
foreach ($TorrentTags as $TagKey => $TagName) {
$TagName = str_replace('_','.',$TagName);
$TagList[]='<a href="torrents.php?searchtags='.$TagName.'">'.$TagName.'</a>';
}
$PrimaryTag = $TorrentTags[0];
$TagList = implode(', ', $TagList);
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?> ?>
<tr> <tr>
<td> <td>
<?=$DisplayName?> <?=$DisplayName?>
[<a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>]</td> [<a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>]
<td><strong><?=($MissingEncodings['V2 (VBR)'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td> <?=$TorrentTags?>
<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> </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> </tr>
<? } ?> <? } ?>
</table> </table>

View File

@ -44,7 +44,7 @@
<table> <table>
<? <?
foreach($TorrentsInfo as $TorrentID => $Info) { foreach($TorrentsInfo as $TorrentID => $Info) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Results[$Info['GroupID']]); list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Results[$Info['GroupID']]);
$DisplayName = ''; $DisplayName = '';
if(count($Artists)>0) { if(count($Artists)>0) {
$DisplayName = display_artists(array('1'=>$Artists)); $DisplayName = display_artists(array('1'=>$Artists));
@ -57,12 +57,25 @@
if($ExtraInfo) { if($ExtraInfo) {
$DisplayName.=' - '.$ExtraInfo; $DisplayName.=' - '.$ExtraInfo;
} }
$TagList=array();
if($TorrentTags!='') {
$TorrentTags=explode(' ',$TorrentTags);
foreach ($TorrentTags as $TagKey => $TagName) {
$TagName = str_replace('_','.',$TagName);
$TagList[]='<a href="torrents.php?searchtags='.$TagName.'">'.$TagName.'</a>';
}
$PrimaryTag = $TorrentTags[0];
$TagList = implode(', ', $TagList);
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?> ?>
<tr><td><?=$DisplayName?> <tr><td><?=$DisplayName?>
[<a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>] [<a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>]
<? if(check_perms('admin_reports')) { ?> <? if(check_perms('admin_reports')) { ?>
<a href="better.php?method=tags&amp;remove=<?=$TorrentID?>">[X]</a> <a href="better.php?method=tags&amp;remove=<?=$TorrentID?>">[X]</a>
<? } ?> <? } ?>
<?=$TorrentTags?>
</td></tr> </td></tr>
<? <?
} }

View File

@ -94,7 +94,7 @@
<? <?
foreach($Results as $GroupID=>$Data) { foreach($Results as $GroupID=>$Data) {
$Debug->log_var($Data); $Debug->log_var($Data);
list($Artists, $GroupCatalogueNumber, $ExtendedArtists, $GroupID2, $GroupName, $GroupRecordLabel, $ReleaseType, $TagList, $Torrents, $GroupVanityHouse, $GroupYear, $CategoryID, $FreeTorrent, $HasCue, $HasLog, $TotalLeechers, $LogScore, $ReleaseType, $ReleaseType, $TotalSeeders, $MaxSize, $TotalSnatched, $GroupTime) = array_values($Data); list($Artists, $GroupCatalogueNumber, $ExtendedArtists, $GroupID2, $GroupName, $GroupRecordLabel, $ReleaseType, $TorrentTags, $Torrents, $GroupVanityHouse, $GroupYear, $CategoryID, $FreeTorrent, $HasCue, $HasLog, $TotalLeechers, $LogScore, $ReleaseType, $ReleaseType, $TotalSeeders, $MaxSize, $TotalSnatched, $GroupTime) = array_values($Data);
$DisplayName = ''; $DisplayName = '';
if(count($Artists)>0) { if(count($Artists)>0) {
@ -118,15 +118,27 @@
continue; continue;
} }
$TagList=array();
if($TorrentTags!='') {
$TorrentTags=explode(' ',$TorrentTags);
foreach ($TorrentTags as $TagKey => $TagName) {
$TagName = str_replace('_','.',$TagName);
$TagList[]='<a href="torrents.php?searchtags='.$TagName.'">'.$TagName.'</a>';
}
$PrimaryTag = $TorrentTags[0];
$TagList = implode(', ', $TagList);
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?> ?>
<tr> <tr>
<td> <td>
<?=$DisplayName?> <?=$DisplayName?>
[<a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>]</td> [<a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>]
<td><strong><?=($MissingEncodings['V2 (VBR)'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td> <?=$TorrentTags?>
<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> </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> </tr>
<? } ?> <? } ?>
</table> </table>

View File

@ -58,7 +58,7 @@
<? <?
$Results = $Results['matches']; $Results = $Results['matches'];
foreach ($Results as $GroupID=>$Group) { foreach ($Results as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group); list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group);
$FlacID = $Uploads[$GroupID]['ID']; $FlacID = $Uploads[$GroupID]['ID'];
$DisplayName = ''; $DisplayName = '';
@ -76,15 +76,27 @@
} }
} }
$TagList=array();
if($TorrentTags!='') {
$TorrentTags=explode(' ',$TorrentTags);
foreach ($TorrentTags as $TagKey => $TagName) {
$TagName = str_replace('_','.',$TagName);
$TagList[]='<a href="torrents.php?searchtags='.$TagName.'">'.$TagName.'</a>';
}
$PrimaryTag = $TorrentTags[0];
$TagList = implode(', ', $TagList);
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?> ?>
<tr> <tr>
<td> <td>
<?=$DisplayName?> <?=$DisplayName?>
[<a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>]</td> [<a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a>]
<td><strong><?=($MissingEncodings['V2 (VBR)'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td> <?=$TorrentTags?>
<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> </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> </tr>
<? } ?> <? } ?>
</table> </table>

View File

@ -348,7 +348,8 @@
tr.GroupID, tr.GroupID,
tr.UserID, tr.UserID,
u.Username, u.Username,
tg.Name tg.Name,
tg.TagList
FROM torrents_recommended AS tr FROM torrents_recommended AS tr
JOIN torrents_group AS tg ON tg.ID=tr.GroupID JOIN torrents_group AS tg ON tg.ID=tr.GroupID
LEFT JOIN users_main AS u ON u.ID=tr.UserID LEFT JOIN users_main AS u ON u.ID=tr.UserID
@ -373,11 +374,24 @@
<table class="hidden" id="vanityhouse"> <table class="hidden" id="vanityhouse">
<? <?
foreach($Recommend as $Recommendations) { foreach($Recommend as $Recommendations) {
list($GroupID, $UserID, $Username, $GroupName) = $Recommendations; list($GroupID, $UserID, $Username, $GroupName, $TagList) = $Recommendations;
$TagsStr = '';
if ($TagList) {
// No vanity.house tag.
$Tags = explode(' ', str_replace('_', '.', str_replace('vanity_house', '', $TagList)));
$TagLinks = array();
foreach ($Tags as $Tag) {
$TagLinks[] = "<a href=\"torrents.php?action=basic&taglist=$Tag\">$Tag</a> ";
}
$TagStr = "<br />\n<div class=\"tags\">".implode(', ', $TagLinks).'</div>';
}
?> ?>
<tr> <tr>
<td><?=display_artists($Recommend_artists[$GroupID], true, false) ?></td> <td>
<td><a href="torrents.php?id=<?=$GroupID?>"><?=$GroupName?></a> (by <?=format_username($UserID, $Username)?>)</td> <?=display_artists($Recommend_artists[$GroupID]) ?>
<a href="torrents.php?id=<?=$GroupID?>"><?=$GroupName?></a> (by <?=format_username($UserID, $Username)?>)
<?=$TagStr?>
</td>
</tr> </tr>
<? } ?> <? } ?>
</table> </table>

View File

@ -11,10 +11,11 @@
$DB->query("SELECT UserID, $DB->query("SELECT UserID,
Title, Title,
CategoryID CategoryID,
GroupID
FROM requests FROM requests
WHERE ID = ".$RequestID); WHERE ID = ".$RequestID);
list($UserID, $Title, $CategoryID) = $DB->next_record(); list($UserID, $Title, $CategoryID, $GroupID) = $DB->next_record();
if($LoggedUser['ID'] != $UserID && !check_perms('site_moderate_requests')) { if($LoggedUser['ID'] != $UserID && !check_perms('site_moderate_requests')) {
error(403); error(403);
@ -52,6 +53,9 @@
$Cache->delete_value('request_'.$RequestID); $Cache->delete_value('request_'.$RequestID);
$Cache->delete_value('request_votes_'.$RequestID); $Cache->delete_value('request_votes_'.$RequestID);
if ($GroupID) {
$Cache->delete_value('requests_group_'.$GroupID);
}
update_sphinx_requests($RequestID); update_sphinx_requests($RequestID);
header('Location: requests.php'); header('Location: requests.php');

View File

@ -194,6 +194,9 @@
$Cache->delete_value('user_stats_'.$FillerID); $Cache->delete_value('user_stats_'.$FillerID);
$Cache->delete_value('request_'.$RequestID); $Cache->delete_value('request_'.$RequestID);
if ($GroupID) {
$Cache->delete_value('requests_group_'.$GroupID);
}

View File

@ -14,11 +14,12 @@
r.UserID, r.UserID,
r.FillerID, r.FillerID,
r.Title, r.Title,
u.Uploaded u.Uploaded,
r.GroupID
FROM requests AS r FROM requests AS r
LEFT JOIN users_main AS u ON u.ID=FillerID LEFT JOIN users_main AS u ON u.ID=FillerID
WHERE r.ID= ".$RequestID); WHERE r.ID= ".$RequestID);
list($CategoryID, $UserID, $FillerID, $Title, $Uploaded) = $DB->next_record(); list($CategoryID, $UserID, $FillerID, $Title, $Uploaded, $GroupID) = $DB->next_record();
if((($LoggedUser['ID'] != $UserID && $LoggedUser['ID'] != $FillerID) && !check_perms('site_moderate_requests')) || $FillerID == 0) { if((($LoggedUser['ID'] != $UserID && $LoggedUser['ID'] != $FillerID) && !check_perms('site_moderate_requests')) || $FillerID == 0) {
error(403); error(403);
@ -63,6 +64,9 @@
$Cache->delete_value('request_'.$RequestID); $Cache->delete_value('request_'.$RequestID);
$Cache->delete_value('request_artists_'.$RequestID); $Cache->delete_value('request_artists_'.$RequestID);
if ($GroupID) {
$Cache->delete_value('requests_group_'.$GroupID);
}
update_sphinx_requests($RequestID); update_sphinx_requests($RequestID);

View File

@ -81,7 +81,7 @@ function compare($X, $Y){
} }
// Start output // Start output
show_header($Title,'browse,comments,torrent,bbcode,requests'); show_header($Title,'browse,comments,torrent,bbcode');
?> ?>
<div class="thin"> <div class="thin">
<h2><?=$DisplayName?></h2> <h2><?=$DisplayName?></h2>

View File

@ -156,7 +156,7 @@ function get_group_requests($GroupID) {
$Requests = $Cache->get_value('requests_group_'.$GroupID); $Requests = $Cache->get_value('requests_group_'.$GroupID);
if ($Requests === FALSE) { if ($Requests === FALSE) {
$DB->query("SELECT ID FROM requests WHERE GroupID = $GroupID"); $DB->query("SELECT ID FROM requests WHERE GroupID = $GroupID AND TimeFilled = '0000-00-00 00:00:00'");
$Requests = $DB->collect('ID'); $Requests = $DB->collect('ID');
$Cache->cache_value('requests_group_'.$GroupID, $Requests, 0); $Cache->cache_value('requests_group_'.$GroupID, $Requests, 0);
} }

View File

@ -200,3 +200,48 @@ function ArtistManagerDelete() {
ArtistManagerSubmit(); ArtistManagerSubmit();
$('#manager_action').raw().value = 'manage'; $('#manager_action').raw().value = 'manage';
} }
function Vote(amount, requestid) {
if(typeof amount == 'undefined') {
amount = parseInt($('#amount').raw().value);
}
if(amount == 0) {
amount = 20 * 1024 * 1024;
}
var index;
var votecount;
if(!requestid) {
requestid = $('#requestid').raw().value;
votecount = $('#votecount').raw();
index = false;
} else {
votecount = $('#vote_count_' + requestid).raw();
bounty = $('#bounty_' + requestid).raw();
index = true;
}
ajax.get('requests.php?action=takevote&id=' + requestid + '&auth=' + $('#auth').raw().value + '&amount=' + amount, function (response) {
if(response == 'bankrupt') {
error_message("You do not have sufficient upload credit to add " + get_size(amount) + " to this request");
return;
} else if (response == 'dupesuccess') {
//No increment
} else if (response == 'success') {
votecount.innerHTML = (parseInt(votecount.innerHTML)) + 1;
}
if($('#total_bounty').results() > 0) {
totalBounty = parseInt($('#total_bounty').raw().value);
totalBounty += (amount * (1 - $('#request_tax').raw().value));
$('#total_bounty').raw().value = totalBounty;
$('#formatted_bounty').raw().innerHTML = get_size(totalBounty);
save_message("Your vote of " + get_size(amount) + ", adding a " + get_size(amount * (1 - $('#request_tax').raw().value)) + " bounty, has been added");
$('#button').raw().disabled = true;
} else {
save_message("Your vote of " + get_size(amount) + " has been added");
}
}
);
}