mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
096ad190af
commit
a6e79bbfe2
@ -5,23 +5,22 @@
|
||||
include(SERVER_ROOT.'/sections/bookmarks/functions.php');
|
||||
include(SERVER_ROOT.'/sections/torrents/functions.php');
|
||||
|
||||
// Search by infohash
|
||||
if(!empty($_GET['searchstr']) || !empty($_GET['groupname'])) {
|
||||
if(!empty($_GET['searchstr'])) {
|
||||
$InfoHash = $_GET['searchstr'];
|
||||
} else {
|
||||
$InfoHash = $_GET['groupname'];
|
||||
}
|
||||
// The "order by x" links on columns headers
|
||||
function header_link($SortKey,$DefaultWay="desc") {
|
||||
global $OrderBy,$OrderWay;
|
||||
if($SortKey==$OrderBy) {
|
||||
if($OrderWay=="desc") { $NewWay="asc"; }
|
||||
else { $NewWay="desc"; }
|
||||
} else { $NewWay=$DefaultWay; }
|
||||
|
||||
if($InfoHash = is_valid_torrenthash($InfoHash)) {
|
||||
$InfoHash = db_string(pack("H*", $InfoHash));
|
||||
$DB->query("SELECT ID,GroupID FROM torrents WHERE info_hash='$InfoHash'");
|
||||
if($DB->record_count() > 0) {
|
||||
list($ID, $GroupID) = $DB->next_record();
|
||||
header('Location: torrents.php?id='.$GroupID.'&torrentid='.$ID);
|
||||
die();
|
||||
}
|
||||
}
|
||||
return "torrents.php?order_way=".$NewWay."&order_by=".$SortKey."&".get_url(array('order_way','order_by'));
|
||||
}
|
||||
|
||||
$TokenTorrents = $Cache->get_value('users_tokens_'.$UserID);
|
||||
if (empty($TokenTorrents)) {
|
||||
$DB->query("SELECT TorrentID FROM users_freeleeches WHERE UserID=$UserID AND Expired=FALSE");
|
||||
$TokenTorrents = $DB->collect('TorrentID');
|
||||
$Cache->cache_value('users_tokens_'.$UserID, $TokenTorrents);
|
||||
}
|
||||
|
||||
// Setting default search options
|
||||
@ -156,7 +155,7 @@
|
||||
if(!empty($_GET[$Search])) {
|
||||
$_GET[$Search] = str_replace(array('%'), '', $_GET[$Search]);
|
||||
if($Search == 'filelist') {
|
||||
$Queries[]='@filelist "'.$SS->EscapeString(strtr($_GET['filelist'], '.', " ")).'"~20';
|
||||
$Queries[]='@filelist "'.$SS->EscapeString($_GET['filelist']).'"~20';
|
||||
} else {
|
||||
$Words = explode(' ', $_GET[$Search]);
|
||||
foreach($Words as $Key => &$Word) {
|
||||
@ -255,14 +254,18 @@
|
||||
$OrderWay = 'desc';
|
||||
}
|
||||
|
||||
if(empty($_GET['order_by']) || !in_array($_GET['order_by'], array('year', 'time','size','seeders','leechers','snatched'))) {
|
||||
if(empty($_GET['order_by']) || !in_array($_GET['order_by'], array('year','time','size','seeders','leechers','snatched','random'))) {
|
||||
$_GET['order_by'] = 'time';
|
||||
$OrderBy = 'time'; // For header links
|
||||
} elseif($_GET['order_by'] == 'random') {
|
||||
$OrderBy = '@random';
|
||||
$Way = SPH_SORT_EXTENDED;
|
||||
$SS->limit(0, TORRENTS_PER_PAGE, TORRENTS_PER_PAGE);
|
||||
} else {
|
||||
$OrderBy = $_GET['order_by'];
|
||||
}
|
||||
|
||||
$SS->SetSortMode($Way, $_GET['order_by']);
|
||||
$SS->SetSortMode($Way, $OrderBy);
|
||||
|
||||
|
||||
if(count($Queries)>0) {
|
||||
@ -278,20 +281,6 @@
|
||||
$Results = $SS->search($Query, '', 0, array(), '', '');
|
||||
$TorrentCount = $SS->TotalResults;
|
||||
|
||||
/*
|
||||
// If some were fetched from memcached, get their artists
|
||||
if(!empty($Results['matches'])) { // Fetch the artists for groups
|
||||
$GroupIDs = array_keys($Results['matches']);
|
||||
$Artists = get_artists($GroupIDs);
|
||||
|
||||
foreach($Artists as $GroupID=>$Data) {
|
||||
if(!empty($Data[1])) {
|
||||
$Results['matches'][$GroupID]['Artists']=$Data[1]; // Only use main artists
|
||||
}
|
||||
ksort($Results['matches'][$GroupID]);
|
||||
}
|
||||
}
|
||||
*/
|
||||
// These ones were not found in the cache, run SQL
|
||||
if(!empty($Results['notfound'])) {
|
||||
$SQLResults = get_groups($Results['notfound']);
|
||||
@ -320,11 +309,9 @@
|
||||
$Action = 'action=advanced';
|
||||
}
|
||||
|
||||
// List of pages
|
||||
$Pages=get_pages($Page,$TorrentCount,TORRENTS_PER_PAGE);
|
||||
|
||||
if(count($Results)==0) {
|
||||
$DB->query("SELECT
|
||||
$DB->query("SELECT
|
||||
tags.Name,
|
||||
((COUNT(tags.Name)-2)*(SUM(tt.PositiveVotes)-SUM(tt.NegativeVotes)))/(tags.Uses*0.8) AS Score
|
||||
FROM xbt_snatched AS s
|
||||
@ -364,14 +351,25 @@
|
||||
|
||||
$JsonGroups = array();
|
||||
foreach($Results as $GroupID=>$Data) {
|
||||
$JsonGroup = array();
|
||||
list($Artists, $GroupCatalogueNumber, $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, $TagList, $Torrents, $GroupVanityHouse, $GroupYear, $CategoryID, $FreeTorrent, $HasCue, $HasLog, $TotalLeechers, $LogScore, $ReleaseType, $ReleaseType, $TotalSeeders, $MaxSize, $TotalSnatched, $GroupTime) = array_values($Data);
|
||||
|
||||
$TagList = explode(' ',str_replace('_','.',$TagList));
|
||||
|
||||
if(count($Torrents)>1 || $CategoryID==1) {
|
||||
// These torrents are in a group
|
||||
$ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1);
|
||||
$IsBookmarked = in_array($GroupID, $Bookmarks);
|
||||
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
|
||||
unset($ExtendedArtists[2]);
|
||||
unset($ExtendedArtists[3]);
|
||||
$DisplayName = display_artists($ExtendedArtists, false, false);
|
||||
} elseif(!empty($Artists)) {
|
||||
$DisplayName = display_artists(array(1=>$Artists), false, false);
|
||||
} else {
|
||||
$DisplayName='';
|
||||
}
|
||||
$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent" dir="ltr">'.$GroupName.'</a>';
|
||||
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
|
||||
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
|
||||
$DisplayName .= ' ['.$ReleaseTypes[$ReleaseType].']';
|
||||
|
||||
$LastRemasterYear = '-';
|
||||
$LastRemasterTitle = '';
|
||||
@ -384,7 +382,9 @@
|
||||
|
||||
$JsonTorrents = array();
|
||||
foreach($Torrents as $TorrentID => $Data) {
|
||||
$JsonTorrent = array();
|
||||
// All of the individual torrents in the group
|
||||
|
||||
// If they're using the advanced search and have chosen enabled grouping, we just skip the torrents that don't check out
|
||||
|
||||
$Filter = false;
|
||||
$Pass = false;
|
||||
@ -478,11 +478,12 @@
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
|
||||
if($CategoryID == 1 && ($Data['RemasterTitle'] != $LastRemasterTitle ||
|
||||
$Data['RemasterYear'] != $LastRemasterYear ||
|
||||
$Data['RemasterRecordLabel'] != $LastRemasterRecordLabel ||
|
||||
$Data['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber) ||
|
||||
$FirstUnknown || $Data['Media'] != $LastMedia) {
|
||||
if (in_array($TorrentID, $TokenTorrents) && empty($Torrent['FreeTorrent'])) {
|
||||
$Data['PersonalFL'] = 1;
|
||||
}
|
||||
|
||||
if($CategoryID == 1 && ($Data['RemasterTitle'] != $LastRemasterTitle || $Data['RemasterYear'] != $LastRemasterYear ||
|
||||
$Data['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Data['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber) || $FirstUnknown || $Data['Media'] != $LastMedia) {
|
||||
$EditionID++;
|
||||
|
||||
if($Data['Remastered'] && $Data['RemasterYear'] != 0) {
|
||||
@ -505,29 +506,85 @@
|
||||
$MasterName .= $AddExtra.display_str($Data['Media']);
|
||||
}
|
||||
}
|
||||
$JsonTorrents[] = $Data;
|
||||
}
|
||||
$LastRemasterTitle = $Data['RemasterTitle'];
|
||||
$LastRemasterYear = $Data['RemasterYear'];
|
||||
$LastRemasterRecordLabel = $Data['RemasterRecordLabel'];
|
||||
$LastRemasterCatalogueNumber = $Data['RemasterCatalogueNumber'];
|
||||
$LastMedia = $Data['Media'];
|
||||
$JsonGroup[] = $JsonTorrents;
|
||||
} else {
|
||||
list($TorrentID, $Data) = each($Torrents);
|
||||
$JsonGroup = $Data;
|
||||
|
||||
$JsonTorrents[] = array(
|
||||
'torrentId' => (int) $TorrentID,
|
||||
'editionId' => (int) $EditionID,
|
||||
'remastered' => $Data['Remastered'],
|
||||
'remasterYear' => (int) $Data['RemasterYear'],
|
||||
'remasterCatalogueNumber' => $Data['RemasterCatalogueNumber'],
|
||||
'remasterTitle' => $Data['RemasterTitle'],
|
||||
'media' => $Data['Media'],
|
||||
'encoding' => $Data['Encoding'],
|
||||
'format' => $Data['Format'],
|
||||
'hasLog' => $Data['HasLog'] == '1',
|
||||
'logScore' => (int) $Data['LogScore'],
|
||||
'hasCue' => $Data['HasCue'] == '1',
|
||||
'scene' => $Data['Scene'] == '1',
|
||||
'vanityHouse' => $Data['VanityHouse'] == '1',
|
||||
'fileCount' => (int) $Data['FileCount'],
|
||||
'time' => $Data['Time'],
|
||||
'size' => (int) $Data['Size'],
|
||||
'snatches' => (int) $Data['Snatched'],
|
||||
'seeders' => (int) $Data['Seeders'],
|
||||
'leechers' => (int) $Data['Leechers'],
|
||||
'isFreeleech' => $Data['FreeTorrent'] == '1',
|
||||
'isNeutralLeech' => $Data['FreeTorrent'] == '2',
|
||||
'isPersonalFreeleech' => in_array($TorrentID, $TokenTorrents),
|
||||
'canUseToken' => ($LoggedUser['FLTokens'] > 0)
|
||||
&& $Data['HasFile'] && ($Data['Size'] < 1073741824)
|
||||
&& !in_array($TorrentID, $TokenTorrents)
|
||||
&& empty($Data['FreeTorrent']) && ($LoggedUser['CanLeech'] == '1')
|
||||
);
|
||||
}
|
||||
|
||||
$JsonGroups[] = array(
|
||||
'groupId' => (int) $GroupID,
|
||||
'groupName' => $GroupName,
|
||||
'tags' => $TagList,
|
||||
'torrentId' => (int) $TorrentID,
|
||||
'categoryId' => (int) $Categories[$CategoryID-1],
|
||||
'bookmarked' => in_array($GroupID, $Bookmarks),
|
||||
'vanityHouse' => $GroupVanityHouse,
|
||||
'groupYear' => (int) $GroupYear,
|
||||
'releaseType' => $ReleaseTypes[$ReleaseType],
|
||||
'groupTime' => $GroupTime,
|
||||
'maxSize' => (int) $MaxSize,
|
||||
'totalSnatched' => (int) $TotalSnatched,
|
||||
'totalSeeders' => (int) $TotalSeeders,
|
||||
'totalLeechers' => (int) $TotalLeechers,
|
||||
'group' => $JsonGroup
|
||||
'torrents' => $JsonTorrents
|
||||
);
|
||||
}
|
||||
else {
|
||||
// Viewing a type that does not require grouping
|
||||
|
||||
list($TorrentID, $Data) = each($Torrents);
|
||||
|
||||
$JsonGroups[] = array(
|
||||
'groupId' => (int) $GroupID,
|
||||
'groupName' => $GroupName,
|
||||
'torrentId' => (int) $TorrentID,
|
||||
'tags' => $TagList,
|
||||
'category' => $Categories[$CategoryID-1],
|
||||
'fileCount' => (int) $Data['FileCount'],
|
||||
'groupTime' => $GroupTime,
|
||||
'size' => (int) $Data['Size'],
|
||||
'snatches' => (int) $TotalSnatched,
|
||||
'seeders' => (int) $TotalSeeders,
|
||||
'leechers' => (int) $TotalLeechers,
|
||||
'isFreeleech' => $Data['FreeTorrent'] == '1',
|
||||
'isNeutralLeech' => $Data['FreeTorrent'] == '2',
|
||||
'isPersonalFreeleech' => in_array($TorrentID, $TokenTorrents),
|
||||
'canUseToken' => ($LoggedUser['FLTokens'] > 0)
|
||||
&& $Data['HasFile'] && ($Data['Size'] < 1073741824)
|
||||
&& !in_array($TorrentID, $TokenTorrents)
|
||||
&& empty($Data['FreeTorrent']) && ($LoggedUser['CanLeech'] == '1')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
print
|
||||
@ -536,10 +593,8 @@
|
||||
'status' => 'success',
|
||||
'response' => array(
|
||||
'currentPage' => intval($Page),
|
||||
'pages' => ceil($Pages/TORRENTS_PER_PAGE),
|
||||
'pages' => ceil($TorrentCount/TORRENTS_PER_PAGE),
|
||||
'results' => $JsonGroups
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
if (!empty($LoggedUser['DisableForums'])) {
|
||||
print json_encode(array('status' => 'failure'));
|
||||
die();
|
||||
}
|
||||
else {
|
||||
include(SERVER_ROOT.'/sections/forums/functions.php');
|
||||
|
@ -30,9 +30,11 @@
|
||||
die();
|
||||
} else {
|
||||
print json_encode(array('status' => 'failure'));
|
||||
die();
|
||||
}
|
||||
} else {
|
||||
print json_encode(array('status' => 'failure'));
|
||||
die();
|
||||
}
|
||||
} else {
|
||||
$ThreadID = $_GET['threadid'];
|
||||
@ -56,6 +58,7 @@
|
||||
// Make sure they're allowed to look at the page
|
||||
if(!check_forumperm($ForumID)) {
|
||||
print json_encode(array('status' => 'failure'));
|
||||
die();
|
||||
}
|
||||
|
||||
//Post links utilize the catalogue & key params to prevent issues with custom posts per page
|
||||
@ -227,7 +230,7 @@
|
||||
'paranoia' => $Paranoia,
|
||||
'artist' => $Artist == 1,
|
||||
'donor' => $Donor == 1,
|
||||
'warned' => $Warned == 1,
|
||||
'warned' => ($Warned!='0000-00-00 00:00:00'),
|
||||
'avatar' => $Avatar,
|
||||
'enabled' => $Enabled == 2 ? false : true,
|
||||
'userTitle' => $UserTitle
|
||||
|
@ -71,9 +71,6 @@
|
||||
case 'index':
|
||||
require(SERVER_ROOT.'/sections/ajax/info.php');
|
||||
break;
|
||||
case 'usersearch':
|
||||
require(SERVER_ROOT.'/sections/ajax/usersearch.php');
|
||||
break;
|
||||
case 'bookmarks':
|
||||
require(SERVER_ROOT.'/sections/ajax/bookmarks.php');
|
||||
break;
|
||||
|
@ -51,9 +51,9 @@
|
||||
$DisplayName = display_artists(array('1'=>$Artists));
|
||||
}
|
||||
$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
|
||||
if($GroupYear>0) {
|
||||
$DisplayName.=" [".$GroupYear."]";
|
||||
}
|
||||
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
|
||||
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
|
||||
|
||||
$ExtraInfo = torrent_info($Torrents[$TorrentID]);
|
||||
if($ExtraInfo) {
|
||||
$DisplayName.=' - '.$ExtraInfo;
|
||||
|
@ -54,6 +54,7 @@
|
||||
if($GroupYear>0) {
|
||||
$DisplayName.=" [".$GroupYear."]";
|
||||
}
|
||||
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
|
||||
$ExtraInfo = torrent_info($Torrents[$TorrentID]);
|
||||
if($ExtraInfo) {
|
||||
$DisplayName.=' - '.$ExtraInfo;
|
||||
|
@ -34,6 +34,7 @@
|
||||
}
|
||||
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&torrentid='.$FlacID.'" title="View Torrent">'.$GroupName.'</a>';
|
||||
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
|
||||
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
|
||||
|
||||
$TagList=array();
|
||||
if($TorrentTags!='') {
|
||||
|
@ -80,6 +80,7 @@
|
||||
}
|
||||
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&torrentid='.$FlacID.'" title="View Torrent">'.$GroupName.'</a>';
|
||||
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
|
||||
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
|
||||
|
||||
$MissingEncodings = array('V0 (VBR)'=>1, 'V2 (VBR)'=>1, '320'=>1);
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
if($GroupYear>0) {
|
||||
$DisplayName.=" [".$GroupYear."]";
|
||||
}
|
||||
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
|
||||
$ExtraInfo = torrent_info($Torrents[$TorrentID]);
|
||||
if($ExtraInfo) {
|
||||
$DisplayName.=' - '.$ExtraInfo;
|
||||
|
@ -102,7 +102,7 @@
|
||||
}
|
||||
$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
|
||||
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
|
||||
|
||||
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
|
||||
$MissingEncodings = array('V0 (VBR)'=>1, 'V2 (VBR)'=>1, '320'=>1);
|
||||
$FlacID = 0;
|
||||
|
||||
|
@ -67,6 +67,7 @@
|
||||
}
|
||||
$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
|
||||
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
|
||||
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
|
||||
|
||||
$MissingEncodings = array('V0 (VBR)'=>1, 'V2 (VBR)'=>1, '320'=>1);
|
||||
|
||||
|
@ -92,12 +92,13 @@
|
||||
}
|
||||
$Thread = catalogue_select($Catalogue,$Page,$PerPage,THREAD_CATALOGUE);
|
||||
|
||||
$LastPost = end($Thread);
|
||||
$LastPost = $LastPost['ID'];
|
||||
reset($Thread);
|
||||
if ($_GET['updatelastread'] != '0') {
|
||||
$LastPost = end($Thread);
|
||||
$LastPost = $LastPost['ID'];
|
||||
reset($Thread);
|
||||
|
||||
//Handle last read
|
||||
if (!$ThreadInfo['IsLocked'] || $ThreadInfo['IsSticky']) {
|
||||
//Handle last read
|
||||
if (!$ThreadInfo['IsLocked'] || $ThreadInfo['IsSticky']) {
|
||||
$DB->query("SELECT PostID From forums_last_read_topics WHERE UserID='$LoggedUser[ID]' AND TopicID='$ThreadID'");
|
||||
list($LastRead) = $DB->next_record();
|
||||
if($LastRead < $LastPost) {
|
||||
@ -106,6 +107,7 @@
|
||||
('$LoggedUser[ID]', '".$ThreadID ."', '".db_string($LastPost)."')
|
||||
ON DUPLICATE KEY UPDATE PostID='$LastPost'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Handle subscriptions
|
||||
|
@ -62,20 +62,21 @@
|
||||
|
||||
|
||||
?>
|
||||
<h2>Latest notifications <a href="torrents.php?action=notify_clear&auth=<?=$LoggedUser['AuthKey']?>">(clear all)</a> <a href="user.php?action=notify">(edit filters)</a></h2>
|
||||
<h2>Latest notifications <a href="torrents.php?action=notify_clear&auth=<?=$LoggedUser['AuthKey']?>">(clear all)</a> <a href="javascript:SuperGroupClear()">(clear selected)</a> <a href="user.php?action=notify">(edit filters)</a></h2>
|
||||
<div class="linkbox">
|
||||
<?=$Pages?>
|
||||
</div>
|
||||
<? if($DB->record_count()==0) { ?>
|
||||
<table class="border">
|
||||
<tr class="rowb">
|
||||
<td colspan="7" class="center">
|
||||
<td colspan="8" class="center">
|
||||
No new notifications found! <a href="user.php?action=notify">Edit notification filters</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<? } else {
|
||||
$FilterGroups = array();
|
||||
$i = 0;
|
||||
while($Result = $DB->next_record()) {
|
||||
if(!$Result['FilterID']) {
|
||||
$Result['FilterID'] = 0;
|
||||
@ -88,10 +89,13 @@
|
||||
}
|
||||
unset($Result);
|
||||
foreach($FilterGroups as $ID => $FilterResults) {
|
||||
$i++;
|
||||
?>
|
||||
<h3>Matches for <?=$FilterResults['FilterLabel']?> (<a href="torrents.php?action=notify_cleargroup&filterid=<?=$ID?>&auth=<?=$LoggedUser['AuthKey']?>">Clear</a>)</h3>
|
||||
<h3>Matches for <?=$FilterResults['FilterLabel']?> (<a href="torrents.php?action=notify_cleargroup&filterid=<?=$ID?>&auth=<?=$LoggedUser['AuthKey']?>">Clear</a>) <a href="javascript:GroupClear($('#notificationform_<?=$i?>').raw())">(clear selected)</a></h3>
|
||||
<form id="notificationform_<?=$i?>">
|
||||
<table class="border">
|
||||
<tr class="colhead">
|
||||
<td style="text-align: center"><input type="checkbox" name="toggle" onClick="ToggleBoxes(this.form, this.checked)" /></td>
|
||||
<td class="small cats_col"></td>
|
||||
<td style="width:100%;"><strong>Name</strong></td>
|
||||
<td><strong>Files</strong></td>
|
||||
@ -159,6 +163,7 @@
|
||||
// print row
|
||||
?>
|
||||
<tr class="group_torrent" id="torrent<?=$TorrentID?>">
|
||||
<td style="text-align: center"><input type="checkbox" value="<?=$TorrentID?>" id="clear_<?=$TorrentID?>" /></td>
|
||||
<td class="center cats_cols"><div title="<?=ucfirst(str_replace('_',' ',$MainTag))?>" class="cats_<?=strtolower(str_replace(array('-',' '),array('',''),$Categories[$GroupCategoryID-1])).' tags_'.str_replace('.','_',$MainTag)?>"></div></td>
|
||||
<td>
|
||||
<span>
|
||||
@ -184,6 +189,7 @@
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</form>
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,3 +3,27 @@ function Clear(torrentid) {
|
||||
$("#torrent" + torrentid).remove();
|
||||
});
|
||||
}
|
||||
|
||||
function GroupClear(form) {
|
||||
for (var i = 0; i < form.elements.length; i++ ) {
|
||||
if (form.elements[i].type == 'checkbox' && form.elements[i].name != 'toggle') {
|
||||
if (form.elements[i].checked == true) {
|
||||
Clear(form.elements[i].value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ToggleBoxes(form, newval) {
|
||||
for (var i = 0; i < form.elements.length; i++ ) {
|
||||
if (form.elements[i].type == 'checkbox' && form.elements[i].name != 'toggle') {
|
||||
form.elements[i].checked = newval;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function SuperGroupClear() {
|
||||
for (var i = 0; i < document.forms.length; i++ ) {
|
||||
GroupClear(document.forms[i]);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user