mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 19:06:27 +00:00
Empty commit
This commit is contained in:
parent
a6e79bbfe2
commit
135b61a80f
@ -202,7 +202,7 @@ function compare($X, $Y){
|
||||
'media' => $GroupTorrents['Media'],
|
||||
'format' => $GroupTorrents['Format'],
|
||||
'encoding' => $GroupTorrents['Encoding'],
|
||||
'remasterYear' => $GroupTorrents['RemasterYear'],
|
||||
'remasterYear' => (int) $GroupTorrents['RemasterYear'],
|
||||
'remastered' => $GroupTorrents['Remastered'] == 1,
|
||||
'remasterTitle' => $GroupTorrents['RemasterTitle'],
|
||||
'remasterRecordLabel' => $GroupTorrents['RemasterRecordLabel'],
|
||||
@ -224,7 +224,7 @@ function compare($X, $Y){
|
||||
$JsonBookmarks[] = array(
|
||||
'id' => (int) $Torrent['ID'],
|
||||
'name' => $Torrent['Name'],
|
||||
'year' => $Torrent['Year'],
|
||||
'year' => (int) $Torrent['Year'],
|
||||
'recordLabel' => $Torrent['RecordLabel'],
|
||||
'catalogueNumber' => $Torrent['CatalogueNumber'],
|
||||
'tagList' => $Torrent['TagList'],
|
||||
|
@ -202,7 +202,7 @@ function compare($X, $Y){
|
||||
'media' => $GroupTorrents['Media'],
|
||||
'format' => $GroupTorrents['Format'],
|
||||
'encoding' => $GroupTorrents['Encoding'],
|
||||
'remasterYear' => $GroupTorrents['RemasterYear'],
|
||||
'remasterYear' => (int) $GroupTorrents['RemasterYear'],
|
||||
'remastered' => $GroupTorrents['Remastered'] == 1,
|
||||
'remasterTitle' => $GroupTorrents['RemasterTitle'],
|
||||
'remasterRecordLabel' => $GroupTorrents['RemasterRecordLabel'],
|
||||
@ -224,7 +224,7 @@ function compare($X, $Y){
|
||||
$JsonBookmarks[] = array(
|
||||
'id' => (int) $Torrent['ID'],
|
||||
'name' => $Torrent['Name'],
|
||||
'year' => $Torrent['Year'],
|
||||
'year' => (int) $Torrent['Year'],
|
||||
'recordLabel' => $Torrent['RecordLabel'],
|
||||
'catalogueNumber' => $Torrent['CatalogueNumber'],
|
||||
'tagList' => $Torrent['TagList'],
|
||||
|
@ -515,7 +515,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
$JsonTorrents[] = array(
|
||||
'torrentId' => (int) $TorrentID,
|
||||
'editionId' => (int) $EditionID,
|
||||
'remastered' => $Data['Remastered'],
|
||||
'remastered' => $Data['Remastered'] == '1',
|
||||
'remasterYear' => (int) $Data['RemasterYear'],
|
||||
'remasterCatalogueNumber' => $Data['RemasterCatalogueNumber'],
|
||||
'remasterTitle' => $Data['RemasterTitle'],
|
||||
@ -548,7 +548,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
'groupName' => $GroupName,
|
||||
'tags' => $TagList,
|
||||
'bookmarked' => in_array($GroupID, $Bookmarks),
|
||||
'vanityHouse' => $GroupVanityHouse,
|
||||
'vanityHouse' => $GroupVanityHouse == '1',
|
||||
'groupYear' => (int) $GroupYear,
|
||||
'releaseType' => $ReleaseTypes[$ReleaseType],
|
||||
'groupTime' => $GroupTime,
|
||||
@ -597,4 +597,4 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
'results' => $JsonGroups
|
||||
)
|
||||
)
|
||||
);
|
||||
);
|
||||
|
@ -102,15 +102,17 @@
|
||||
$LastPost = $LastPost['ID'];
|
||||
reset($Thread);
|
||||
|
||||
//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) {
|
||||
$DB->query("INSERT INTO forums_last_read_topics
|
||||
(UserID, TopicID, PostID) VALUES
|
||||
('$LoggedUser[ID]', '".$ThreadID ."', '".db_string($LastPost)."')
|
||||
ON DUPLICATE KEY UPDATE PostID='$LastPost'");
|
||||
if ($_GET['updatelastread'] != '0') {
|
||||
//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) {
|
||||
$DB->query("INSERT INTO forums_last_read_topics
|
||||
(UserID, TopicID, PostID) VALUES
|
||||
('$LoggedUser[ID]', '".$ThreadID ."', '".db_string($LastPost)."')
|
||||
ON DUPLICATE KEY UPDATE PostID='$LastPost'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,9 +53,6 @@
|
||||
case 'usersearch':
|
||||
require(SERVER_ROOT.'/sections/ajax/usersearch.php');
|
||||
break;
|
||||
case 'artist':
|
||||
require(SERVER_ROOT.'/sections/ajax/artist.php');
|
||||
break;
|
||||
case 'requests':
|
||||
require(SERVER_ROOT.'/sections/ajax/requests.php');
|
||||
break;
|
||||
|
@ -5,10 +5,11 @@
|
||||
|
||||
//calculate ratio --Gwindow
|
||||
//returns 0 for DNE and -1 for infiinity, because we dont want strings being returned for a numeric value in our java
|
||||
$Ratio = 0;
|
||||
if($LoggedUser['BytesUploaded'] == 0 && $LoggedUser['BytesDownloaded'] == 0) {
|
||||
$Ratio = '0';
|
||||
$Ratio = 0;
|
||||
} elseif($LoggedUser['BytesDownloaded'] == 0) {
|
||||
$Ratio = '-1';
|
||||
$Ratio = -1;
|
||||
} else {
|
||||
$Ratio = number_format(max($LoggedUser['BytesUploaded']/$LoggedUser['BytesDownloaded']-0.005,0), 2); //Subtract .005 to floor to 2 decimals
|
||||
}
|
||||
@ -24,7 +25,7 @@
|
||||
'userstats' => array(
|
||||
'uploaded' => (int) $LoggedUser['BytesUploaded'],
|
||||
'downloaded' => (int) $LoggedUser['BytesDownloaded'],
|
||||
'ratio' => (float) $LoggedUser['Ratio'],
|
||||
'ratio' => (float) $Ratio,
|
||||
'requiredratio' => (float) $LoggedUser['RequiredRatio'],
|
||||
//'class' => $Class
|
||||
'class' => $ClassLevels[$LoggedUser['Class']]['Name']
|
||||
|
@ -154,6 +154,9 @@
|
||||
case 'ocelot':
|
||||
include('managers/ocelot.php');
|
||||
break;
|
||||
case 'official_tags':
|
||||
include('managers/official_tags.php');
|
||||
break;
|
||||
|
||||
case 'permissions':
|
||||
if (!check_perms('admin_manage_permissions')) { error(403); }
|
||||
|
1
sections/tools/managers/official_tags.php
Normal file
1
sections/tools/managers/official_tags.php
Normal file
@ -0,0 +1 @@
|
||||
<?
if (!check_perms('users_mod')) { error(403); }
if (isset($_POST['doit'])) {
authorize();
if (isset($_POST['oldtags'])) {
$OldTagIDs = $_POST['oldtags'];
foreach ($OldTagIDs AS $OldTagID) {
if (!is_number($OldTagID)) { error(403); }
}
$OldTagIDs = implode(', ', $OldTagIDs);
$DB->query("UPDATE tags SET TagType = 'other' WHERE ID IN ($OldTagIDs)");
}
if ($_POST['newtag']) {
$TagName = sanitize_tag($_POST['newtag']);
$DB->query("SELECT t.ID FROM tags AS t WHERE t.Name LIKE '".$TagName."'");
list($TagID) = $DB->next_record();
if($TagID) {
$DB->query("UPDATE tags SET TagType = 'genre' WHERE ID = $TagID");
} else { // Tag doesn't exist yet - create tag
$DB->query("INSERT INTO tags (Name, UserID, TagType, Uses) VALUES ('".$TagName."', ".$LoggedUser['ID'].", 'genre', 0)");
$TagID = $DB->inserted_id();
}
}
$Cache->delete_value('genre_tags');
}
show_header('Official Tags');
?>
<h2>Official Tags</h2>
<div style="text-align: center">
<div style="display: inline-block;">
<form method="post">
<input type="hidden" name="action" value="official_tags" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="doit" value="1" />
<table>
<tr class="colhead_dark">
<td style="font-weight: bold" style="text-align: center">Rem.</td>
<td style="font-weight: bold">Tag</td>
<td style="font-weight: bold">Uses</td>
<td> </td>
<td style="font-weight: bold" style="text-align: center">Rem.</td>
<td style="font-weight: bold">Tag</td>
<td style="font-weight: bold">Uses</td>
<td> </td>
<td style="font-weight: bold" style="text-align: center">Rem.</td>
<td style="font-weight: bold">Tag</td>
<td style="font-weight: bold">Uses</td>
</tr>
<?
$i = 0;
$DB->query("SELECT ID, Name, Uses FROM tags WHERE TagType='genre' ORDER BY Name ASC");
$TagCount = $DB->record_count();
$Tags = $DB->to_array();
for ($i = 0; $i < $TagCount / 3; $i++) {
list($TagID1, $TagName1, $TagUses1) = $Tags[$i];
list($TagID2, $TagName2, $TagUses2) = $Tags[ceil($TagCount/3) + $i];
list($TagID3, $TagName3, $TagUses3) = $Tags[2*ceil($TagCount/3) + $i];
?>
<tr class="<?=(($i % 2)?'rowa':'rowb')?>">
<td style="text-align: center"><input type="checkbox" name="oldtags[]" value="<?=$TagID1?>" /></td>
<td><?=$TagName1?></td>
<td style="text-align: center"><?=$TagUses1?></td>
<td> </td>
<td style="text-align: center">
<? if ($TagID2) { ?>
<input type="checkbox" name="oldtags[]" value="<?=$TagID2?>" />
<? } ?>
</td>
<td><?=$TagName2?></td>
<td style="text-align: center"><?=$TagUses2?></td>
<td> </td>
<td style="text-align: center">
<? if ($TagID3) { ?>
<input type="checkbox" name="oldtags[]" value="<?=$TagID3?>" />
<? } ?>
</td>
<td><?=$TagName3?></td>
<td style="text-align: center"><?=$TagUses3?></td>
</tr>
<?
}
?>
<tr class="<?=(($i % 2)?'rowa':'rowb')?>">
<td colspan="11"><label for="newtag">New official tag: </label><input type="text" name="newtag" /></td>
</tr>
<tr style="border-top: thin solid">
<td colspan="11" style="text-align: center"><input type="submit" value="Submit Changes" /></td>
</tr>
</table>
</form>
</div>
</div>
<?
show_footer();
?>
|
@ -28,6 +28,7 @@
|
||||
<? } if (check_perms('users_mod')) { ?>
|
||||
<tr><td><a href="tools.php?action=email_blacklist">Email Blacklist</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=tokens">Manage freeleech tokens</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=official_tags">Official Tags Manager</a></td></tr>
|
||||
|
||||
<? } ?>
|
||||
</table>
|
||||
|
@ -38,7 +38,8 @@
|
||||
tln.TorrentID AS LogInDB,
|
||||
unt.UnRead,
|
||||
unt.FilterID,
|
||||
unf.Label
|
||||
unf.Label,
|
||||
g.ReleaseType
|
||||
FROM users_notify_torrents AS unt
|
||||
JOIN torrents AS t ON t.ID=unt.TorrentID
|
||||
JOIN torrents_group AS g ON g.ID = t.GroupID
|
||||
@ -76,7 +77,6 @@
|
||||
</table>
|
||||
<? } else {
|
||||
$FilterGroups = array();
|
||||
$i = 0;
|
||||
while($Result = $DB->next_record()) {
|
||||
if(!$Result['FilterID']) {
|
||||
$Result['FilterID'] = 0;
|
||||
@ -89,10 +89,9 @@
|
||||
}
|
||||
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>) <a href="javascript:GroupClear($('#notificationform_<?=$i?>').raw())">(clear selected)</a></h3>
|
||||
<form id="notificationform_<?=$i?>">
|
||||
<h3>Matches for <?=$FilterResults['FilterLabel']?> (<a href="torrents.php?action=notify_cleargroup&filterid=<?=$ID?>&auth=<?=$LoggedUser['AuthKey']?>">Clear</a>) <a href="javascript:GroupClear($('#notificationform_<?=$ID?>').raw())">(clear selected)</a></h3>
|
||||
<form id="notificationform_<?=$ID?>">
|
||||
<table class="border">
|
||||
<tr class="colhead">
|
||||
<td style="text-align: center"><input type="checkbox" name="toggle" onClick="ToggleBoxes(this.form, this.checked)" /></td>
|
||||
@ -110,7 +109,7 @@
|
||||
foreach($FilterResults as $Result) {
|
||||
list($TorrentID, $GroupID, $GroupName, $GroupCategoryID, $TorrentTags, $Size, $FileCount, $Format, $Encoding,
|
||||
$Media, $Scene, $RemasterYear, $GroupYear, $RemasterYear, $RemasterTitle, $Snatched, $Seeders,
|
||||
$Leechers, $NotificationTime, $HasLog, $HasCue, $LogScore, $FreeTorrent, $LogInDB, $UnRead) = $Result;
|
||||
$Leechers, $NotificationTime, $HasLog, $HasCue, $LogScore, $FreeTorrent, $LogInDB, $UnRead, $FilterLabel, $FilterLabel, $ReleaseType) = $Result;
|
||||
// generate torrent's title
|
||||
$DisplayName='';
|
||||
|
||||
@ -129,6 +128,9 @@
|
||||
if($GroupCategoryID==1 && $GroupYear>0) {
|
||||
$DisplayName.= " [$GroupYear]";
|
||||
}
|
||||
if($GroupCategoryID==1 && $ReleaseType>0) {
|
||||
$DisplayName.= " [".$ReleaseTypes[$ReleaseType]."]";
|
||||
}
|
||||
|
||||
// append extra info to torrent title
|
||||
$ExtraInfo='';
|
||||
|
Loading…
Reference in New Issue
Block a user