Example #1
0
			<td>Submit</td>
		</tr>
<?


$Number = 0;
foreach ($TorrentList as $GroupID=>$Group) {
	list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $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 .']';}
	
?>
		<tr>
			<form action="collages.php" method="post">
				<td>
					<input type="hidden" name="action" value="manage_handle" />
					<input type="hidden" name="collageid" value="<?php 
echo $CollageID;
?>
" />
					<input type="hidden" name="groupid" value="<?php 
echo $GroupID;
Example #2
0
function generate_torrent_json($Caption, $Tag, $Details, $Limit)
{
    global $LoggedUser, $Categories;
    $results = array();
    foreach ($Details as $Detail) {
        list($TorrentID, $GroupID, $GroupName, $GroupCategoryID, $TorrentTags, $Format, $Encoding, $Media, $Scene, $HasLog, $HasCue, $LogScore, $Year, $GroupYear, $RemasterTitle, $Snatched, $Seeders, $Leechers, $Data) = $Detail;
        $Artist = display_artists(get_artist($GroupID), false, true);
        $TruncArtist = substr($Artist, 0, strlen($Artist) - 3);
        $TagList = array();
        if ($TorrentTags != '') {
            $TorrentTags = explode(' ', $TorrentTags);
            foreach ($TorrentTags as $TagKey => $TagName) {
                $TagName = str_replace('_', '.', $TagName);
                $TagList[] = $TagName;
            }
        }
        // Append to the existing array.
        $results[] = array('torrentId' => $TorrentID, 'groupId' => $GroupID, 'artist' => $TruncArtist, 'groupName' => $GroupName, 'groupCategory' => $GroupCategoryID, 'groupYear' => $GroupYear, 'remasterTitle' => $RemasterTitle, 'format' => $Format, 'encoding' => $Encoding, 'hasLog' => $HasLog, 'hasCue' => $HasCue, 'media' => $Media, 'scene' => $Scene, 'year' => $Year, 'tags' => $TagList, 'snatched' => $Snatched, 'seeders' => $Seeders, 'leechers' => $Leechers, 'data' => $Data);
    }
    return array('caption' => $Caption, 'tag' => $Tag, 'limit' => $Limit, 'results' => $results);
}
Example #3
0
				VALUES 
					(".$TagID.", ".$RequestID.")");
}

if($NewRequest) {
	//Remove the bounty and create the vote
	$DB->query("INSERT INTO requests_votes 
					(RequestID, UserID, Bounty)
				VALUES
					(".$RequestID.", ".$LoggedUser['ID'].", ".($Bytes / 2).")");
	
	$DB->query("UPDATE users_main SET Uploaded = (Uploaded - ".$Bytes.") WHERE ID = ".$LoggedUser['ID']);
	$Cache->delete_value('user_stats_'.$LoggedUser['ID']);
	
	if($CategoryName == "Music") {
		$Announce = "'".$Title."' - ".display_artists($ArtistForm, false, false)." http://".NONSSL_SITE_URL."/requests.php?action=view&id=".$RequestID." - ".implode(" ", $Tags);
	} else {
		$Announce = "'".$Title."' - http://".NONSSL_SITE_URL."/requests.php?action=view&id=".$RequestID." - ".implode(" ", $Tags);
	}
	send_irc('PRIVMSG #'.NONSSL_SITE_URL.'-requests :'.$Announce);
	
} else {
	$Cache->delete_value('request_'.$RequestID);
	$Cache->delete_value('request_artists_'.$RequestID);
}

update_sphinx_requests($RequestID);

header('Location: requests.php?action=view&id='.$RequestID);
?>
Example #4
0
}

// Group details
list($WikiBody, $WikiImage, $GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $ReleaseType, $GroupCategoryID,
	$GroupTime, $TorrentTags, $TorrentTagIDs, $TorrentTagUserIDs, $TagPositiveVotes, $TagNegativeVotes) = array_shift($TorrentDetails);

$DisplayName=$GroupName;
$AltName=$GroupName; // Goes in the alt text of the image
$Title=$GroupName; // goes in <title>
$WikiBody = $Text->full_format($WikiBody);

$Artists = get_artist($GroupID);

if($Artists) {
	$DisplayName = display_artists($Artists, true).$DisplayName;
	$AltName = display_artists($Artists, false).$AltName;
	$Title = $AltName;
}

if($GroupYear>0) {
	$DisplayName.=' ['.$GroupYear.']';
	$AltName.=' ['.$GroupYear.']';
}
if($GroupCategoryID == 1) {
	$DisplayName.=' ['.$ReleaseTypes[$ReleaseType].']';
	$AltName.=' ['.$ReleaseTypes[$ReleaseType].']';
}

// Start output
show_header($Title,'browse,comments');
show_message();
Example #5
0
		<td><?php 
echo number_format((int) $Torrent['Leechers']);
?>
</td>
	</tr>
<?
	}
	$TorrentTable.=ob_get_clean();
	
	// Album art
	
	ob_start();
	
	$DisplayName = '';
	if(!empty($GroupArtists)) {
		$DisplayName.= display_artists(array('1'=>$GroupArtists), false);
	}
	$DisplayName .= $GroupName;
	if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';}
?>
		<td>
			<a href="#group_<?php 
echo $GroupID;
?>
">
<?	if($Image) { ?>
				<img src="<?php 
echo $Image;
?>
" alt="<?php 
echo $DisplayName;
Example #6
0
        }
        if ($Container) {
            $ExtraInfo .= $AddExtra . display_str($Container);
            $AddExtra = ' / ';
        }
        if ($Source) {
            $ExtraInfo .= $AddExtra . display_str($Source);
            $AddExtra = ' / ';
        }
        if ($Resolution) {
            $ExtraInfo .= $AddExtra . display_str($Resolution);
            $AddExtra = ' / ';
        }
        $Artists = get_artist($GroupID);
        if ($Artists) {
            $ArtistName = display_artists($Artists, true) . $DisplayName;
        }
        ?>
	<tr class="row<?php 
        echo $Row;
        ?>
">
		<td id="s_<?php 
        echo $TorrentID;
        ?>
_n"><?php 
        echo $ArtistName;
        ?>
 <a href="torrents.php?id=<?php 
        echo $GroupID;
        ?>
Example #7
0
			Title,
			CategoryID
			FROM requests
			WHERE ID = ".$RequestID);
list($UserID, $Title, $CategoryID) = $DB->next_record();

if($LoggedUser['ID'] != $UserID && !check_perms('site_moderate_requests')) { 
	error(403);
}

$CategoryName = $Categories[$CategoryID - 1];

//Do we need to get artists?
if($CategoryName == "Music") {
	$ArtistForm = get_request_artists($RequestID);
	$ArtistName = display_artists($ArtistForm, false, true);
	$FullName = $ArtistName.$Title;	
} else {
	$FullName = $Title;
}



// Delete request, votes and tags
$DB->query("DELETE FROM requests WHERE ID='$RequestID'");
$DB->query("DELETE FROM requests_votes WHERE RequestID='$RequestID'");
$DB->query("DELETE FROM requests_tags WHERE RequestID='$RequestID'");
$DB->query("SELECT ArtistID FROM requests_artists WHERE RequestID = ".$RequestID);
$RequestArtists = $DB->to_array();
foreach($RequestArtists as $RequestArtist) {
	$Cache->delete_value('artists_requests_'.$RequestArtist);
Example #8
0
//Convenience variables
$IsFilled = !empty($TorrentID);
$CanVote = (empty($TorrentID) && check_perms('site_vote'));

if($CategoryID == 0) {
	$CategoryName = "Unknown";
} else {
	$CategoryName = $Categories[$CategoryID - 1];
}

//Do we need to get artists?
if($CategoryName == "Music") {
	$ArtistForm = get_request_artists($RequestID);
	$ArtistName = display_artists($ArtistForm, false, true);
	$ArtistLink = display_artists($ArtistForm, true, true);
	
	if($IsFilled) {
		$DisplayLink = $ArtistLink."<a href='torrents.php?torrentid=".$TorrentID."'>".$Title."</a> [".$Year."]";
	} else {
		$DisplayLink = $ArtistLink.$Title." [".$Year."]";
	}
	$FullName = $ArtistName.$Title." [".$Year."]";
	
	if($BitrateList != "") {
		$BitrateString = implode(", ", explode("|", $BitrateList));
		$FormatString = implode(", ", explode("|", $FormatList));
		$MediaString = implode(", ", explode("|", $MediaList));
	} else {
		$BitrateString = "Unknown, please read the description.";
		$FormatString = "Unknown, please read the description.";
Example #9
0
		}

		$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>';
		}

		if ($GroupName=='') { $GroupName="- None -"; }
		$DisplayName = display_artists($Artists[$GroupID]);
		if((count($Torrents['id'])>1 || $GroupCategoryID==1) && !$DisableGrouping) {
			// These torrents are in a group
			$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
			if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
?>
	<tr class="group">
		<td class="center"><div title="<?php 
echo $ActionTitle;
?>
" id="showimg_<?php 
echo $GroupID;
?>
" class="<?php 
echo $ActionURL;
?>
Example #10
0
/images/leechers.png" alt="Leechers" title="Leechers" /></td>
	</tr>
<?
		unset($FilterResults['FilterLabel']);
		foreach($FilterResults as $Result) {
			list($TorrentID,$GroupID,$GroupName,$GroupCategoryID,$TorrentTags,
				$Size,$FileCount,$Format,$Encoding,$Media,$Scene,$RemasterYear,
				$GroupYear,$RemasterYear,$RemasterTitle,$Snatched,$Seeders,
				$Leechers,$NotificationTime,$UnRead) = $Result;
			// generate torrent's title
			$DisplayName='';
			
			$Artists = get_artist($GroupID);
			
			if(!empty($Artists)) {
				$DisplayName = display_artists($Artists, true, true);
			}
			
			$DisplayName.= "<a href='torrents.php?id=$GroupID&amp;torrentid=$TorrentID'  title='View Torrent'>".$GroupName."</a>";
	
			if($GroupCategoryID==1 && $GroupYear>0) {
				$DisplayName.= " [$GroupYear]";
			}
	
			// append extra info to torrent title
			$ExtraInfo='';
			$AddExtra='';
			if($Format) 		{ $ExtraInfo.=$Format; $AddExtra=' / '; }
			if($Encoding) 		{ $ExtraInfo.=$AddExtra.$Encoding; $AddExtra=' / '; }
			if($Media) 		{ $ExtraInfo.=$AddExtra.$Media; $AddExtra=' / '; }
			if($Scene) 		{ $ExtraInfo.=$AddExtra.'Scene'; $AddExtra=' / '; }
Example #11
0
	
	<div class="linkbox">
	<?=$OtherLink?>
	<br /><br />
	<?=$Pages?>
	</div>
<?php

while(list($UserID, $Username, $Class, $Enabled, $Avatar, $Donor, $Warned, $TorrentID, $GroupID, $Title, $PostID, $Body, $AddedTime, $EditedTime, $EditorID, $EditorUsername) = $DB->next_record()) {
	?>
	<table class='forum_post vertical_margin' id="post<?=$PostID?>">
		<tr class='colhead_dark'>
			<td  colspan="2">
				<span style="float:left;"><a href='torrents.php?id=<?=$GroupID?>#post<?=$PostID?>'>#<?=$PostID?></a>
					by <strong><?=format_username($UserID, $Username, $Donor, $Warned, $Enabled, $Class)?></strong> <?=time_diff($AddedTime) ?>
					on <?=display_artists($Artists[$GroupID])?><a href="torrents.php?id=<?=$GroupID?>"><?=$Title?></a>
				</span>
			</td>
		</tr>
		<tr>
			<td class='avatar' valign="top">
<?
if(empty($HeavyInfo['DisableAvatars'])) {
				if($Avatar){ 
?>
				<img src='<?=$Avatar?>' width='150' alt="<?=$Username ?>'s avatar" />
<?
				} else { ?>
				<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="150" alt="Default avatar" />
<? } 
}?>
Example #12
0
			$Nothing = false;
?>
		<div class="head colhead">
			You have snatched the following of <?php 
echo $Username2;
?>
's uploads:
		</div>
		<div class='pad'>
			<ul>
<? 
			while(list($TorrentID, $Media, $Format, $Encoding, $GroupID, $GroupName) = $DB->next_record()) {
				$Extra = $Format." / ".$Encoding." / ".$Media;
?>
				<li><?php 
echo display_artists(get_artist($GroupID), true, false);
?>
 - <a href="torrents.php?id=<?php 
echo $GroupID;
?>
"><?php 
echo $GroupName;
?>
</a> [<a href="torrents.php?id=<?php 
echo $GroupID;
?>
&amp;torrentid=<?php 
echo $TorrentID;
?>
"><?php 
echo $Extra;
Example #13
0
function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
	global $LoggedUser,$Categories;
?>
		<h3>Top <?php 
echo $Limit . ' ' . $Caption;
?>
<?	if(empty($_GET['advanced'])){ ?> 
		<small>
			- [<a href="top10.php?type=torrents&amp;limit=100&amp;details=<?php 
echo $Tag;
?>
">Top 100</a>]
			- [<a href="top10.php?type=torrents&amp;limit=250&amp;details=<?php 
echo $Tag;
?>
">Top 250</a>]
		</small>
<?	} ?> 
		</h3>
	<table class="border">
	<tr class="colhead">
		<td class="center" style="width:15px;"></td>
		<td></td>
		<td><strong>Name</strong></td>
		<td style="text-align:right"><strong>Data</strong></td>
		<td style="text-align:right"><img src="static/styles/<?php 
echo $LoggedUser['StyleName'];
?>
/images/snatched.png" alt="Snatches" title="Snatches" /></td>
		<td style="text-align:right"><img src="static/styles/<?php 
echo $LoggedUser['StyleName'];
?>
/images/seeders.png" alt="Seeders" title="Seeders" /></td>
		<td style="text-align:right"><img src="static/styles/<?php 
echo $LoggedUser['StyleName'];
?>
/images/leechers.png" alt="Leechers" title="Leechers" /></td>
		<td style="text-align:right"><strong>Peers</strong></td>
	</tr>
<?
	// in the unlikely event that query finds 0 rows...
	if(empty($Details)) {
?>
		<tr class="rowb">
			<td colspan="9" class="center">
				Found no torrents matching the criteria
			</td>
		</tr>
		</table><br />
<?
		return;
	}
	$Rank = 0;

	foreach ($Details as $Detail) {
		list($TorrentID,$GroupID,$GroupName,$GroupCategoryID,$TorrentTags,
			$Format,$Encoding,$Media,$Scene,$HasLog,$HasCue,$LogScore,$Year,$GroupYear,
			$RemasterTitle,$Snatched,$Seeders,$Leechers,$Data) = $Detail;

		// highlight every other row
		$Rank++;
		$Highlight = ($Rank % 2 ? 'a' : 'b');

		// generate torrent's title
		$DisplayName='';
		
		$Artists = get_artist($GroupID);
		
		if(!empty($Artists)) {
			$DisplayName = display_artists($Artists, true, true);
		}
		
		$DisplayName.= "<a href='torrents.php?id=$GroupID&amp;torrentid=$TorrentID'  title='View Torrent'>$GroupName</a>";

		if($GroupCategoryID==1 && $GroupYear>0) {
			$DisplayName.= " [$GroupYear]";
		}

		// append extra info to torrent title
		$ExtraInfo='';
		$AddExtra='';
		if($Format) { $ExtraInfo.=$Format; $AddExtra=' / '; }
		if($Encoding) { $ExtraInfo.=$AddExtra.$Encoding; $AddExtra=' / '; }
		"FLAC / Lossless / Log (100%) / Cue / CD";
		if($HasLog) { $ExtraInfo.=$AddExtra."Log (".$LogScore."%)"; $AddExtra=' / '; }
		if($HasCue) { $ExtraInfo.=$AddExtra."Cue"; $AddExtra=' / '; }
		if($Media) { $ExtraInfo.=$AddExtra.$Media; $AddExtra=' / '; }
		if($Scene) { $ExtraInfo.=$AddExtra.'Scene'; $AddExtra=' / '; }
		if($Year>0) { $ExtraInfo.=$AddExtra.$Year; $AddExtra=' '; }
		if($RemasterTitle) { $ExtraInfo.=$AddExtra.$RemasterTitle; }
		if($ExtraInfo!='') {
			$ExtraInfo = "- [$ExtraInfo]";
		}
		
		$TagList=array();
		
		$PrimaryTag = '';
		if($TorrentTags!='') {
			$TorrentTags=explode(' ',$TorrentTags);
			foreach ($TorrentTags as $TagKey => $TagName) {
				$TagName = str_replace('_','.',$TagName);
				$TagList[]='<a href="torrents.php?taglist='.$TagName.'">'.$TagName.'</a>';
			}
			$PrimaryTag = $TorrentTags[0];
			$TagList = implode(', ', $TagList);
			$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
		}

		// print row
?>
	<tr class="group_torrent row<?php 
echo $Highlight;
?>
">
		<td style="padding:8px;text-align:center;"><strong><?php 
echo $Rank;
?>
</strong></td>
		<td class="center cats_col"><div title="<?php 
echo ucfirst(str_replace('_', ' ', $PrimaryTag));
?>
" class="cats_<?php 
echo strtolower(str_replace(array('-', ' '), array('', ''), $Categories[$GroupCategoryID - 1]));
?>
 tags_<?php 
echo str_replace('.', '_', $PrimaryTag);
?>
"></div></td>
		<td>
		<span>[<a href="torrents.php?action=download&amp;id=<?php 
echo $TorrentID;
?>
&amp;authkey=<?php 
echo $LoggedUser['AuthKey'];
?>
&amp;torrent_pass=<?php 
echo $LoggedUser['torrent_pass'];
?>
" title="Download">DL</a>]</span>
			<strong><?php 
echo $DisplayName;
?>
</strong> <?php 
echo $ExtraInfo;
?>
			<?php 
echo $TorrentTags;
?>
		</td>
		<td style="text-align:right" class="nobr"><?php 
echo get_size($Data);
?>
</td>
		<td style="text-align:right"><?php 
echo number_format((double) $Snatched);
?>
</td>
		<td style="text-align:right"><?php 
echo number_format((double) $Seeders);
?>
</td>
		<td style="text-align:right"><?php 
echo number_format((double) $Leechers);
?>
</td>
		<td style="text-align:right"><?php 
echo number_format($Seeders + $Leechers);
?>
</td>
	</tr>
<?
	}
?>
	</table><br />
<?
}
Example #14
0
    ?>
		</tr>
	</table>
<?php 
}
if (!isset($Uploads)) {
    $Uploads = 0;
}
if ($Uploads > 4 && check_paranoia_here('uploads')) {
    $RecentUploads = $Cache->get_value('recent_uploads_' . $UserID);
    if (!is_array($RecentUploads)) {
        $DB->query("SELECT \n\t\tg.ID,\n\t\tg.Name,\n\t\tg.WikiImage\n\t\tFROM torrents_group AS g\n\t\tINNER JOIN torrents AS t ON t.GroupID=g.ID\n\t\tWHERE t.UserID='{$UserID}'\n\t\tAND g.WikiImage <> ''\n\t\tGROUP BY g.ID\n\t\tORDER BY t.Time DESC\n\t\tLIMIT 5");
        $RecentUploads = $DB->to_array();
        $Artists = get_artists($DB->collect('ID'));
        foreach ($RecentUploads as $Key => $UploadInfo) {
            $RecentUploads[$Key]['Artist'] = display_artists($Artists[$UploadInfo['ID']], false, true);
        }
        $Cache->cache_value('recent_uploads_' . $UserID, $RecentUploads, 0);
        //inf cache
    }
    ?>
	<table class="recent" cellpadding="0" cellspacing="0" border="0">
		<tr class="colhead">
			<td colspan="5">Recent Uploads</td>
		<tr>
<?php 
    foreach ($RecentUploads as $RU) {
        ?>
			<td>
				<a href="torrents.php?id=<?php 
        echo $RU['ID'];
Example #15
0
					t.Format,
					t.Encoding,
					IF(t.RemasterYear=0,tg.Year,t.RemasterYear),
					tg.ID AS GroupID,
					tg.Name,
					tg.WikiImage,
					tg.CategoryID
					FROM torrents AS t
					INNER JOIN torrents_group AS tg ON tg.ID=t.GroupID
					WHERE t.ID='".db_string($TorrentID)."'");
				if($DB->record_count() < 1) {
					header('Location: log.php?search='.$TorrentID);
					die();
				}
				$Info = array($DB->next_record(MYSQLI_NUM, array(4,5,6)));
				$Info['Artists'] = display_artists(get_artist($Info[0][4]), false, true);
				$Cache->cache_value('torrent_download_'.$TorrentID, $Info, 0);
			}
			if(!is_array($Info[0])) {
				error(404);
			}
			list($Media,$Format,$Encoding,$Year,$GroupID,$Name,$Image, $CategoryID) = array_shift($Info); // used for generating the filename
			$Artists = $Info['Artists'];
			
			//Stupid Recent Snatches On User Page
			if($CategoryID == '1' && $Image != "") {
				$RecentSnatches = $Cache->get_value('recent_snatches_'.$UserID);
				if(is_array($RecentSnatches)) {
					array_pop($RecentSnatches);
					array_unshift($RecentSnatches, array('ID'=>$GroupID,'Name'=>$Name,'Artist'=>$Artists,'WikiImage'=>$Image));
				} else {
Example #16
0
    $GroupVanityHouse = $Importances[$GroupID]['VanityHouse'];
    $TagList = explode(' ', str_replace('_', '.', $TagList));
    // $Tags array is for the sidebar on the right
    foreach ($TagList as $Tag) {
        if (!isset($Tags[$Tag])) {
            $Tags[$Tag] = array('name' => $Tag, 'count' => 1);
        } else {
            $Tags[$Tag]['count']++;
        }
    }
    $DisplayName = '<a href="torrents.php?id=' . $GroupID . '" title="View Torrent">' . $GroupName . '</a>';
    if (check_perms('users_mod')) {
        $DisplayName .= ' [<a href="torrents.php?action=fix_group&amp;groupid=' . $GroupID . '&amp;artistid=' . $ArtistID . '&amp;auth=' . $LoggedUser['AuthKey'] . '">Fix</a>]';
    }
    if ($ReleaseType == 1023 || $ReleaseType == 1024) {
        $DisplayName = display_artists(array(1 => $Artists), true, true) . $DisplayName;
    }
    if ($GroupYear > 0) {
        $DisplayName = $GroupYear . ' - ' . $DisplayName;
    }
    if ($GroupVanityHouse) {
        $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]';
    }
    ?>
			<tr class="releases_<?php 
    echo $ReleaseType;
    ?>
 group discog<?php 
    echo $HideDiscog;
    ?>
">
Example #17
0
				<td><i><?php 
        echo $Time;
        ?>
</i></	>
<?php 
    }
    ?>
				<td><b><?php 
    echo format_username($UserID, $Username);
    ?>
</b></td>
		<td>
<?php 
    $Artists = get_artist($GroupID);
    if ($Artists) {
        echo display_artists($Artists, true);
    }
    ?>
				<a href="torrents.php?id=<?php 
    echo $GroupID;
    ?>
"><?php 
    echo $GroupName;
    ?>
</a>
		</td>
<?php 
    if ($Active) {
        ?>
				<td>Yes, expires in: <?php 
        echo if_empty(time_diff(strtotime($Expires)), 'Expired');
Example #18
0
foreach($Results as $GroupID=>$Data) {
	list($Artists, $GroupCatalogueNumber, $GroupID2, $GroupName, $GroupRecordLabel, $ReleaseType, $TagList, $Torrents, $GroupYear, $CategoryID, $FreeTorrent, $HasCue, $HasLog, $TotalLeechers, $LogScore, $ReleaseType, $ReleaseType, $TotalSeeders, $MaxSize, $TotalSnatched, $GroupTime) = array_values($Data);
	
	$TagList = explode(' ',str_replace('_','.',$TagList));
	
	$TorrentTags = array();
	foreach($TagList as $Tag) {
		$TorrentTags[]='<a href="torrents.php?'.$Action.'&amp;taglist='.$Tag.'">'.$Tag.'</a>';
	}
	$TorrentTags = implode(', ', $TorrentTags);
	
	if(count($Torrents)>1 || $CategoryID==1) {
		// These torrents are in a group
		if(!empty($Artists)) {
			$DisplayName = display_artists(array(1=>$Artists));
		} else {
			$DisplayName='';
		}
		$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
		if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
?>
	<tr class="group">
		<td class="center">
			<div title="View" id="showimg_<?php 
echo $GroupID;
?>
" class="show_torrents">
				<a href="#" class="show_torrents_link" onclick="$('.groupid_<?php 
echo $GroupID;
?>
Example #19
0
		}
	</script>
	<div class="box" id="recommended">
		<div class="head colhead_dark">
			<strong>Latest vanity house additions</strong>
			<a href="#" onclick="$('#vanityhouse').toggle();log_hit();return false;">(View)</a>
		</div>

		<table class="hidden" id="vanityhouse">
<?
	foreach($Recommend as $Recommendations) {
		list($GroupID, $UserID, $Username, $GroupName) = $Recommendations;
?>
			<tr>
				<td><?php 
echo display_artists($Recommend_artists[$GroupID], true, false);
?>
</td>
				<td><a href="torrents.php?id=<?php 
echo $GroupID;
?>
"><?php 
echo $GroupName;
?>
</a> (by <?php 
echo format_username($UserID, $Username);
?>
)</td>
			</tr>
<?	  } ?>
		</table>
Example #20
0
?>
" />
			<h2>You are attempting to merge the group:</h2>
			<ul><li><?php 
echo display_artists($Artists[$GroupID], true, false);
?>
 - <a href="torrents.php?id=<?php 
echo $GroupID;
?>
"><?php 
echo $Name;
?>
</a></li></ul>
			<h2>Into the group:</h2>
			<ul><li><?php 
echo display_artists($Artists[$NewGroupID], true, false);
?>
 - <a href="torrents.php?id=<?php 
echo $NewGroupID;
?>
"><?php 
echo $NewName;
?>
</a></li></ul>
			<input type="submit" value="Confirm" />
		</form>
	</div>
	</div>
<?
	show_footer();
} else {
Example #21
0
$DB->query("SELECT 
	DATE_FORMAT(t.Time,'%b \'%y') AS Month,
	t.GroupID,
	t.Media,
	t.Format,
	t.Encoding,
	IF(t.RemasterYear=0,tg.Year,t.RemasterYear),
	tg.Name,
	t.Size,
	f.File
	FROM torrents as t 
	JOIN torrents_group AS tg ON t.GroupID=tg.ID 
	LEFT JOIN torrents_files AS f ON t.ID=f.TorrentID
	".$SQL);
$Downloads = $DB->to_array(false,MYSQLI_NUM,false);
$Artists = get_artists($DB->collect('GroupID'));

list($UserID, $Username) = array_values(user_info($UserID));
$Zip = new ZIP($Username.'\'s '.ucfirst($_GET['type']));
foreach($Downloads as $Download) {
	list($Month, $GroupID, $Media, $Format, $Encoding, $Year, $Album, $Size, $Contents) = $Download;
	$Artist = display_artists($Artists[$GroupID],false);
	$Contents = unserialize(base64_decode($Contents));
	$Tor = new TORRENT($Contents, true);
	$Tor->set_announce_url(ANNOUNCE_URL.'/'.$LoggedUser['torrent_pass'].'/announce');
	unset($Tor->Val['announce-list']);
	$Zip->add_file($Tor->enc(), file_string($Month).'/'.file_string($Artist.$Album).' - '.file_string($Year).' ('.file_string($Media).' - '.file_string($Format).' - '.file_string($Encoding).').torrent');
}
$Zip->close_stream();