mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 10:31:37 +00:00
Empty commit
This commit is contained in:
parent
d34618314d
commit
a868ce13ba
@ -454,7 +454,7 @@ function to_html($Array) {
|
|||||||
$Str.='<a href="artist.php?artistname='.urlencode(undisplay_str($Block['Val'])).'">'.$Block['Val'].'</a>';
|
$Str.='<a href="artist.php?artistname='.urlencode(undisplay_str($Block['Val'])).'">'.$Block['Val'].'</a>';
|
||||||
break;
|
break;
|
||||||
case 'torrent':
|
case 'torrent':
|
||||||
$Pattern = '/('.NONSSL_SITE_URL.'\/torrents\.php?.*id=)?(\d+)($|&|#)/';
|
$Pattern = '/('.NONSSL_SITE_URL.'\/torrents\.php?.*id=)?(\d+)($|&|#)/i';
|
||||||
$Matches = array();
|
$Matches = array();
|
||||||
if (preg_match($Pattern, $Block['Val'], $Matches)) {
|
if (preg_match($Pattern, $Block['Val'], $Matches)) {
|
||||||
if (isset($Matches[2])) {
|
if (isset($Matches[2])) {
|
||||||
|
@ -1861,6 +1861,7 @@ function get_requests($RequestIDs, $Return = true) {
|
|||||||
r.Image,
|
r.Image,
|
||||||
r.Description,
|
r.Description,
|
||||||
r.CatalogueNumber,
|
r.CatalogueNumber,
|
||||||
|
r.RecordLabel,
|
||||||
r.ReleaseType,
|
r.ReleaseType,
|
||||||
r.BitrateList,
|
r.BitrateList,
|
||||||
r.FormatList,
|
r.FormatList,
|
||||||
@ -1869,7 +1870,8 @@ function get_requests($RequestIDs, $Return = true) {
|
|||||||
r.FillerID,
|
r.FillerID,
|
||||||
filler.Username,
|
filler.Username,
|
||||||
r.TorrentID,
|
r.TorrentID,
|
||||||
r.TimeFilled
|
r.TimeFilled,
|
||||||
|
r.GroupID
|
||||||
FROM requests AS r
|
FROM requests AS r
|
||||||
LEFT JOIN users_main AS u ON u.ID=r.UserID
|
LEFT JOIN users_main AS u ON u.ID=r.UserID
|
||||||
LEFT JOIN users_main AS filler ON filler.ID=FillerID AND FillerID!=0
|
LEFT JOIN users_main AS filler ON filler.ID=FillerID AND FillerID!=0
|
||||||
@ -1896,13 +1898,13 @@ function update_sphinx_requests($RequestID) {
|
|||||||
|
|
||||||
$DB->query("REPLACE INTO sphinx_requests_delta (
|
$DB->query("REPLACE INTO sphinx_requests_delta (
|
||||||
ID, UserID, TimeAdded, LastVote, CategoryID, Title,
|
ID, UserID, TimeAdded, LastVote, CategoryID, Title,
|
||||||
Year, ReleaseType, CatalogueNumber, BitrateList,
|
Year, ReleaseType, RecordLabel, CatalogueNumber, BitrateList,
|
||||||
FormatList, MediaList, LogCue, FillerID, TorrentID,
|
FormatList, MediaList, LogCue, FillerID, TorrentID,
|
||||||
TimeFilled, Visible, Votes, Bounty)
|
TimeFilled, Visible, Votes, Bounty)
|
||||||
SELECT
|
SELECT
|
||||||
ID, r.UserID, UNIX_TIMESTAMP(TimeAdded) AS TimeAdded,
|
ID, r.UserID, UNIX_TIMESTAMP(TimeAdded) AS TimeAdded,
|
||||||
UNIX_TIMESTAMP(LastVote) AS LastVote, CategoryID,
|
UNIX_TIMESTAMP(LastVote) AS LastVote, CategoryID,
|
||||||
Title, Year, ReleaseType, CatalogueNumber, BitrateList,
|
Title, Year, ReleaseType, RecordLabel, CatalogueNumber, BitrateList,
|
||||||
FormatList, MediaList, LogCue, FillerID, TorrentID,
|
FormatList, MediaList, LogCue, FillerID, TorrentID,
|
||||||
UNIX_TIMESTAMP(TimeFilled) AS TimeFilled, Visible,
|
UNIX_TIMESTAMP(TimeFilled) AS TimeFilled, Visible,
|
||||||
COUNT(rv.UserID) AS Votes, SUM(rv.Bounty) >> 10 AS Bounty
|
COUNT(rv.UserID) AS Votes, SUM(rv.Bounty) >> 10 AS Bounty
|
||||||
|
19
gazelle.sql
19
gazelle.sql
@ -206,6 +206,12 @@ CREATE TABLE `drives` (
|
|||||||
KEY `Name` (`Name`)
|
KEY `Name` (`Name`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
CREATE TABLE `dupe_groups` (
|
||||||
|
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`Comments` text,
|
||||||
|
PRIMARY KEY (`ID`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE `email_blacklist` (
|
CREATE TABLE `email_blacklist` (
|
||||||
`ID` int(10) NOT NULL AUTO_INCREMENT,
|
`ID` int(10) NOT NULL AUTO_INCREMENT,
|
||||||
`UserID` int(10) NOT NULL,
|
`UserID` int(10) NOT NULL,
|
||||||
@ -531,6 +537,7 @@ CREATE TABLE `requests` (
|
|||||||
`TimeFilled` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`TimeFilled` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
`Visible` binary(1) NOT NULL DEFAULT '1',
|
`Visible` binary(1) NOT NULL DEFAULT '1',
|
||||||
`RecordLabel` varchar(80) DEFAULT NULL,
|
`RecordLabel` varchar(80) DEFAULT NULL,
|
||||||
|
`GroupID` int(10) DEFAULT NULL,
|
||||||
PRIMARY KEY (`ID`),
|
PRIMARY KEY (`ID`),
|
||||||
KEY `Userid` (`UserID`),
|
KEY `Userid` (`UserID`),
|
||||||
KEY `Name` (`Title`),
|
KEY `Name` (`Title`),
|
||||||
@ -539,7 +546,8 @@ CREATE TABLE `requests` (
|
|||||||
KEY `TimeAdded` (`TimeAdded`),
|
KEY `TimeAdded` (`TimeAdded`),
|
||||||
KEY `Year` (`Year`),
|
KEY `Year` (`Year`),
|
||||||
KEY `TimeFilled` (`TimeFilled`),
|
KEY `TimeFilled` (`TimeFilled`),
|
||||||
KEY `LastVote` (`LastVote`)
|
KEY `LastVote` (`LastVote`),
|
||||||
|
KEY `GroupID` (`GroupID`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE `requests_artists` (
|
CREATE TABLE `requests_artists` (
|
||||||
@ -1075,6 +1083,15 @@ CREATE TABLE `users_downloads` (
|
|||||||
KEY `TorrentID_2` (`TorrentID`)
|
KEY `TorrentID_2` (`TorrentID`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
CREATE TABLE `users_dupes` (
|
||||||
|
`GroupID` int(10) unsigned NOT NULL,
|
||||||
|
`UserID` int(10) unsigned NOT NULL,
|
||||||
|
UNIQUE KEY `UserID` (`UserID`),
|
||||||
|
KEY `GroupID` (`GroupID`),
|
||||||
|
CONSTRAINT `users_dupes_ibfk_1` FOREIGN KEY (`UserID`) REFERENCES `users_main` (`ID`) ON DELETE CASCADE,
|
||||||
|
CONSTRAINT `users_dupes_ibfk_2` FOREIGN KEY (`GroupID`) REFERENCES `dupe_groups` (`ID`) ON DELETE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE `users_freeleeches` (
|
CREATE TABLE `users_freeleeches` (
|
||||||
`UserID` int(10) NOT NULL,
|
`UserID` int(10) NOT NULL,
|
||||||
`TorrentID` int(10) NOT NULL,
|
`TorrentID` int(10) NOT NULL,
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
error(404);
|
error(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $ReleaseType,
|
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $RecordLabel,
|
||||||
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled) = $Request;
|
$ReleaseType, $BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled, $GroupID) = $Request;
|
||||||
$VoteArray = get_votes_array($RequestID);
|
$VoteArray = get_votes_array($RequestID);
|
||||||
$VoteCount = count($VoteArray['Voters']);
|
$VoteCount = count($VoteArray['Voters']);
|
||||||
|
|
||||||
@ -111,7 +111,9 @@
|
|||||||
JOIN torrents_tags AS tt ON tt.GroupID=tg.ID
|
JOIN torrents_tags AS tt ON tt.GroupID=tg.ID
|
||||||
JOIN tags AS t ON t.ID=tt.TagID
|
JOIN tags AS t ON t.ID=tt.TagID
|
||||||
WHERE tg.ID = ".$_GET['groupid']);
|
WHERE tg.ID = ".$_GET['groupid']);
|
||||||
list($Title, $Year, $ReleaseType, $Image, $Tags) = $DB->next_record();
|
if(list($Title, $Year, $ReleaseType, $Image, $Tags) = $DB->next_record()) {
|
||||||
|
$GroupID = trim($_REQUEST['groupid']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
show_header(($NewRequest ? "Create a request" : "Edit a request"), 'requests');
|
show_header(($NewRequest ? "Create a request" : "Edit a request"), 'requests');
|
||||||
@ -193,6 +195,12 @@
|
|||||||
<input type="text" name="title" size="45" value="<?=(!empty($Title) ? display_str($Title) : '')?>" />
|
<input type="text" name="title" size="45" value="<?=(!empty($Title) ? display_str($Title) : '')?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr id="cataloguenumber_tr">
|
||||||
|
<td class="label">Record Label</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="recordlabel" size="45" value="<?=(!empty($RecordLabel) ? display_str($RecordLabel) : '')?>" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr id="cataloguenumber_tr">
|
<tr id="cataloguenumber_tr">
|
||||||
<td class="label">Catalogue Number</td>
|
<td class="label">Catalogue Number</td>
|
||||||
<td>
|
<td>
|
||||||
@ -308,7 +316,29 @@
|
|||||||
<textarea name="description" cols="70" rows="7"><?=(!empty($Description) ? $Description : '')?></textarea> <br />
|
<textarea name="description" cols="70" rows="7"><?=(!empty($Description) ? $Description : '')?></textarea> <br />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? if($NewRequest) { ?>
|
<? if(check_perms('site_moderate_requests')) { ?>
|
||||||
|
<tr>
|
||||||
|
<td class="label">Torrent Group</td>
|
||||||
|
<td>
|
||||||
|
http://what.cd/torrents.php?id=<input type="text" name="groupid" value="<?=$GroupID?>" size="15"><br />
|
||||||
|
If this request matches a torrent group <span style="font-weight: bold;">already existing</span> on the site, please indicate that here.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<? } elseif ($GroupID) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="label">Torrent Group</td>
|
||||||
|
<td>
|
||||||
|
<a href="torrents.php?id=<?=$GroupID?>">http://what.cd/torrents.php?id=<?=$GroupID?></a><br />
|
||||||
|
This request <?=($NewRequest?'will be':'is')?> associated with the above torrent group.
|
||||||
|
<? if (!$NewRequest) { ?>
|
||||||
|
If this is incorrect, please <a href="reports.php?action=report&type=request&id=<?=$RequestID?>">report this request</a> so that staff can fix it.
|
||||||
|
<? } ?>
|
||||||
|
<input type="hidden" name="groupid" value="<?=$GroupID?>" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<? }
|
||||||
|
if($NewRequest) { ?>
|
||||||
<tr id="voting">
|
<tr id="voting">
|
||||||
<td class="label">Bounty (MB)</td>
|
<td class="label">Bounty (MB)</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
error(404);
|
error(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $ReleaseType,
|
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $RecordLabel, $ReleaseType,
|
||||||
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled) = $Request;
|
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled) = $Request;
|
||||||
|
|
||||||
//Convenience variables
|
//Convenience variables
|
||||||
@ -247,6 +247,14 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? if($CategoryName == "Music") {
|
<? if($CategoryName == "Music") {
|
||||||
|
if(!empty($RecordLabel)) { ?>
|
||||||
|
<tr>
|
||||||
|
<td class="label">Record Label</td>
|
||||||
|
<td>
|
||||||
|
<?=$RecordLabel?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<? }
|
||||||
if(!empty($CatalogueNumber)) { ?>
|
if(!empty($CatalogueNumber)) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">Catalogue Number</td>
|
<td class="label">Catalogue Number</td>
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
error(404);
|
error(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $ReleaseType,
|
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $RecordLabel,
|
||||||
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled) = $Request;
|
$ReleaseType, $BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled, $GroupID) = $Request;
|
||||||
$VoteArray = get_votes_array($RequestID);
|
$VoteArray = get_votes_array($RequestID);
|
||||||
$VoteCount = count($VoteArray['Voters']);
|
$VoteCount = count($VoteArray['Voters']);
|
||||||
|
|
||||||
@ -174,6 +174,23 @@
|
|||||||
$MinLogScore = false;
|
$MinLogScore = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GroupID
|
||||||
|
if (!empty($_POST['groupid'])) {
|
||||||
|
$GroupID = trim($_POST['groupid']);
|
||||||
|
$URLRegex = '/^https?:\/\/(www\.|ssl\.)?'.NONSSL_SITE_URL.'\/torrents\.php\?(page=[0-9]+&)?id=([0-9]+)/i';
|
||||||
|
if (preg_match($URLRegex, $GroupID, $Matches)) {
|
||||||
|
$GroupID = $Matches[3];
|
||||||
|
}
|
||||||
|
if (is_number($GroupID)) {
|
||||||
|
$DB->query("SELECT 1 FROM torrents_group WHERE ID = '$GroupID'");
|
||||||
|
if ($DB->record_count() == 0) {
|
||||||
|
$Err = "Torrent Group, if entered, must correspond to a group on the site.";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$Err = "Torrent Group, if entered, must correspond to a group on the site.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Not required
|
//Not required
|
||||||
if(!empty($_POST['editioninfo'])) {
|
if(!empty($_POST['editioninfo'])) {
|
||||||
$EditionInfo = trim($_POST['editioninfo']);
|
$EditionInfo = trim($_POST['editioninfo']);
|
||||||
@ -185,6 +202,11 @@
|
|||||||
} else {
|
} else {
|
||||||
$CatalogueNumber = "";
|
$CatalogueNumber = "";
|
||||||
}
|
}
|
||||||
|
if(!empty($_POST['recordlabel'])) {
|
||||||
|
$RecordLabel = trim($_POST['recordlabel']);
|
||||||
|
} else {
|
||||||
|
$RecordLabel = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($CategoryName == "Music" || $CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
if($CategoryName == "Music" || $CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||||
@ -302,11 +324,11 @@
|
|||||||
if($CategoryName == "Music") {
|
if($CategoryName == "Music") {
|
||||||
if($NewRequest) {
|
if($NewRequest) {
|
||||||
$DB->query("INSERT INTO requests (
|
$DB->query("INSERT INTO requests (
|
||||||
UserID, TimeAdded, LastVote, CategoryID, Title, Year, Image, Description,
|
UserID, TimeAdded, LastVote, CategoryID, Title, Year, Image, Description, RecordLabel,
|
||||||
CatalogueNumber, ReleaseType, BitrateList, FormatList, MediaList, LogCue, Visible)
|
CatalogueNumber, ReleaseType, BitrateList, FormatList, MediaList, LogCue, Visible, GroupID)
|
||||||
VALUES
|
VALUES
|
||||||
(".$LoggedUser['ID'].", '".sqltime()."', '".sqltime()."', ".$CategoryID.", '".db_string($Title)."', ".$Year.", '".db_string($Image)."', '".db_string($Description)."',
|
(".$LoggedUser['ID'].", '".sqltime()."', '".sqltime()."', ".$CategoryID.", '".db_string($Title)."', ".$Year.", '".db_string($Image)."', '".db_string($Description)."','".db_string($RecordLabel)."',
|
||||||
'".db_string($CatalogueNumber)."', ".$ReleaseType.", '".$BitrateList."','".$FormatList."', '".$MediaList."', '".$LogCue."', '1')");
|
'".db_string($CatalogueNumber)."', ".$ReleaseType.", '".$BitrateList."','".$FormatList."', '".$MediaList."', '".$LogCue."', '1', '$GroupID')");
|
||||||
|
|
||||||
$RequestID = $DB->inserted_id();
|
$RequestID = $DB->inserted_id();
|
||||||
} else {
|
} else {
|
||||||
@ -317,11 +339,13 @@
|
|||||||
Image = '".db_string($Image)."',
|
Image = '".db_string($Image)."',
|
||||||
Description = '".db_string($Description)."',
|
Description = '".db_string($Description)."',
|
||||||
CatalogueNumber = '".db_string($CatalogueNumber)."',
|
CatalogueNumber = '".db_string($CatalogueNumber)."',
|
||||||
|
RecordLabel = '".db_string($RecordLabel)."',
|
||||||
ReleaseType = ".$ReleaseType.",
|
ReleaseType = ".$ReleaseType.",
|
||||||
BitrateList = '".$BitrateList."',
|
BitrateList = '".$BitrateList."',
|
||||||
FormatList = '".$FormatList."',
|
FormatList = '".$FormatList."',
|
||||||
MediaList = '".$MediaList."',
|
MediaList = '".$MediaList."',
|
||||||
LogCue = '".$LogCue."'
|
LogCue = '".$LogCue."',
|
||||||
|
GroupID = '".$GroupID."'
|
||||||
WHERE ID = ".$RequestID);
|
WHERE ID = ".$RequestID);
|
||||||
|
|
||||||
//I almost didn't think of this, we need to be able to delete artists / tags
|
//I almost didn't think of this, we need to be able to delete artists / tags
|
||||||
@ -334,6 +358,10 @@
|
|||||||
$Cache->delete_value('request_artists_'.$RequestID);
|
$Cache->delete_value('request_artists_'.$RequestID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($GroupID) {
|
||||||
|
$Cache->delete_value('requests_group_'.$GroupID);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Multiple Artists!
|
* Multiple Artists!
|
||||||
* For the multiple artists system, we have 3 steps:
|
* For the multiple artists system, we have 3 steps:
|
||||||
|
@ -81,7 +81,7 @@ function compare($X, $Y){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start output
|
// Start output
|
||||||
show_header($Title,'browse,comments,torrent,bbcode');
|
show_header($Title,'browse,comments,torrent,bbcode,requests');
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
<h2><?=$DisplayName?></h2>
|
<h2><?=$DisplayName?></h2>
|
||||||
@ -565,6 +565,48 @@ function filelist($Str) {
|
|||||||
<? } ?>
|
<? } ?>
|
||||||
</table>
|
</table>
|
||||||
<?
|
<?
|
||||||
|
$Requests = get_group_requests($GroupID);
|
||||||
|
if (count($Requests) > 0) {
|
||||||
|
$i = 0;
|
||||||
|
?>
|
||||||
|
<div class="box">
|
||||||
|
<div class="head"><span style="font-weight: bold;">Requests (<?=count($Requests)?>)</span> <span style="float:right;"><a href="#" onClick="$('#requests').toggle(); this.innerHTML=(this.innerHTML=='(Hide)'?'(Show)':'(Hide)'); return false;">(Show)</a></span></div>
|
||||||
|
<table id="requests" class="hidden">
|
||||||
|
<tr class="colhead">
|
||||||
|
<td>Format / Bitrate / Media</td>
|
||||||
|
<td>Votes</td>
|
||||||
|
<td>Bounty</td>
|
||||||
|
</tr>
|
||||||
|
<? foreach($Requests as $Request) {
|
||||||
|
$RequestVotes = get_votes_array($Request['ID']);
|
||||||
|
|
||||||
|
if($Request['BitrateList'] != "") {
|
||||||
|
$BitrateString = implode(", ", explode("|", $Request['BitrateList']));
|
||||||
|
$FormatString = implode(", ", explode("|", $Request['FormatList']));
|
||||||
|
$MediaString = implode(", ", explode("|", $Request['MediaList']));
|
||||||
|
} else {
|
||||||
|
$BitrateString = "Unknown";
|
||||||
|
$FormatString = "Unknown";
|
||||||
|
$MediaString = "Unknown";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr class="requestrows <?=(++$i%2?'rowa':'rowb')?>">
|
||||||
|
<td><a href="requests.php?action=view&id=<?=$Request['ID']?>"><?=$FormatString?> / <?=$BitrateString?> / <?=$MediaString?></a></td>
|
||||||
|
<td>
|
||||||
|
<form id="form_<?=$Request['ID']?>">
|
||||||
|
<span id="vote_count_<?=$Request['ID']?>"><?=count($RequestVotes['Voters'])?></span>
|
||||||
|
<input type="hidden" id="requestid_<?=$Request['ID']?>" name="requestid" value="<?=$Request['ID']?>" />
|
||||||
|
<input type="hidden" id="auth" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
|
<a href="javascript:Vote(0, <?=$Request['ID']?>)"><strong>(+)</strong></a>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
<td><?=get_size($RequestVotes['TotalBounty'])?></td>
|
||||||
|
</tr>
|
||||||
|
<? } ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
$Collages = $Cache->get_value('torrent_collages_'.$GroupID);
|
$Collages = $Cache->get_value('torrent_collages_'.$GroupID);
|
||||||
if(!is_array($Collages)) {
|
if(!is_array($Collages)) {
|
||||||
$DB->query("SELECT c.Name, c.NumTorrents, c.ID FROM collages AS c JOIN collages_torrents AS ct ON ct.CollageID=c.ID WHERE ct.GroupID='$GroupID' AND Deleted='0' AND CategoryID!='0'");
|
$DB->query("SELECT c.Name, c.NumTorrents, c.ID FROM collages AS c JOIN collages_torrents AS ct ON ct.CollageID=c.ID WHERE ct.GroupID='$GroupID' AND Deleted='0' AND CategoryID!='0'");
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?
|
<?
|
||||||
|
include(SERVER_ROOT.'/sections/requests/functions.php'); // get_request_tags()
|
||||||
|
|
||||||
function get_group_info($GroupID, $Return = true, $RevisionID = 0) {
|
function get_group_info($GroupID, $Return = true, $RevisionID = 0) {
|
||||||
global $Cache, $DB;
|
global $Cache, $DB;
|
||||||
@ -149,3 +150,16 @@ function set_torrent_logscore($TorrentID) {
|
|||||||
global $DB;
|
global $DB;
|
||||||
$DB->query("UPDATE torrents SET LogScore = (SELECT FLOOR(AVG(Score)) FROM torrents_logs_new WHERE TorrentID = ".$TorrentID.") WHERE ID = ".$TorrentID);
|
$DB->query("UPDATE torrents SET LogScore = (SELECT FLOOR(AVG(Score)) FROM torrents_logs_new WHERE TorrentID = ".$TorrentID.") WHERE ID = ".$TorrentID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_group_requests($GroupID) {
|
||||||
|
global $DB, $Cache;
|
||||||
|
|
||||||
|
$Requests = $Cache->get_value('requests_group_'.$GroupID);
|
||||||
|
if ($Requests === FALSE) {
|
||||||
|
$DB->query("SELECT ID FROM requests WHERE GroupID = $GroupID");
|
||||||
|
$Requests = $DB->collect('ID');
|
||||||
|
$Cache->cache_value('requests_group_'.$GroupID, $Requests, 0);
|
||||||
|
}
|
||||||
|
$Requests = get_requests($Requests);
|
||||||
|
return $Requests['matches'];
|
||||||
|
}
|
@ -49,6 +49,7 @@
|
|||||||
r.CategoryID,
|
r.CategoryID,
|
||||||
r.Title AS Title,
|
r.Title AS Title,
|
||||||
r.Year,
|
r.Year,
|
||||||
|
r.RecordLabel,
|
||||||
r.CatalogueNumber,
|
r.CatalogueNumber,
|
||||||
r.ReleaseType,
|
r.ReleaseType,
|
||||||
r.Image
|
r.Image
|
||||||
|
Loading…
Reference in New Issue
Block a user