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
0d1974337f
commit
df1de3ebad
@ -142,6 +142,7 @@ $ForumsRevealVoters = array();
|
||||
$ForumsDoublePost = array();
|
||||
|
||||
$Categories = array('Music', 'Applications', 'E-Books', 'Audiobooks', 'E-Learning Videos', 'Comedy', 'Comics');
|
||||
$GroupedCategories = array_intersect(array('Music'), $Categories);
|
||||
$CategoryIcons = array('music.png', 'apps.png', 'ebook.png', 'audiobook.png', 'elearning.png', 'comedy.png', 'comics.png');
|
||||
|
||||
$Formats = array('MP3', 'FLAC', 'Ogg Vorbis', 'AAC', 'AC3', 'DTS');
|
||||
|
@ -295,7 +295,7 @@
|
||||
Name AS ProperName
|
||||
FROM stylesheets');
|
||||
$Stylesheets = $DB->to_array('ID', MYSQLI_BOTH);
|
||||
$Cache->cache_value('stylesheets', $Stylesheets, 600);
|
||||
$Cache->cache_value('stylesheets', $Stylesheets, 0);
|
||||
}
|
||||
|
||||
//A9 TODO: Clean up this messy solution
|
||||
|
@ -1,5 +1,11 @@
|
||||
CHANGELOG
|
||||
|
||||
2013-09-05 by porkpie
|
||||
Fix multi-format uploader when switching from "Music" to something else, then back to "Music"
|
||||
|
||||
2013-09-05 by alderaan
|
||||
Fix missing category change JavaScript code on torrent edit page in public Gazelle
|
||||
|
||||
2013-09-01 by Ajax
|
||||
Tool for staff to send mass PMs to primary and secondary classes
|
||||
|
||||
|
@ -148,23 +148,18 @@
|
||||
}
|
||||
|
||||
|
||||
$DB->query("
|
||||
UPDATE users_notify_quoted
|
||||
SET UnRead = false
|
||||
WHERE UserID = '$LoggedUser[ID]'
|
||||
AND Page = 'forums'
|
||||
AND PageID = '$ThreadID'
|
||||
AND PostID >= '$FirstPost'
|
||||
AND PostID <= '$LastPost'");
|
||||
$Cache->delete_value('notify_quoted_' . $LoggedUser['ID']);
|
||||
/*
|
||||
$QuoteNotificationsCount = $Cache->get_value('notify_quoted_' . $LoggedUser['ID']);
|
||||
if ($QuoteNotificationsCount > 0) {
|
||||
$Cache->cache_value('notify_quoted_' . $LoggedUser['ID'], $QuoteNotificationsCount - 1, 0);
|
||||
} else {
|
||||
if ($QuoteNotificationsCount === false || $QuoteNotificationsCount > 0) {
|
||||
$DB->query("
|
||||
UPDATE users_notify_quoted
|
||||
SET UnRead = false
|
||||
WHERE UserID = '$LoggedUser[ID]'
|
||||
AND Page = 'forums'
|
||||
AND PageID = '$ThreadID'
|
||||
AND PostID >= '$FirstPost'
|
||||
AND PostID <= '$LastPost'");
|
||||
$Cache->delete_value('notify_quoted_' . $LoggedUser['ID']);
|
||||
}
|
||||
*/
|
||||
|
||||
// Start printing
|
||||
View::show_header($ThreadInfo['Title'] . ' < '.$Forums[$ForumID]['Name'].' < Forums','comments,subscriptions,bbcode', $IsDonorForum ? 'donor' : '');
|
||||
|
@ -106,7 +106,7 @@
|
||||
b.Time,
|
||||
b.ThreadID
|
||||
FROM blog AS b
|
||||
LEFT JOIN users_main AS um ON b.UserID=um.ID
|
||||
LEFT JOIN users_main AS um ON b.UserID = um.ID
|
||||
ORDER BY Time DESC
|
||||
LIMIT 20");
|
||||
$Blog = $DB->to_array();
|
||||
@ -478,7 +478,7 @@
|
||||
<? if (check_perms('admin_manage_news')) { ?>
|
||||
- <a href="tools.php?action=editnews&id=<?=$NewsID?>" class="brackets">Edit</a>
|
||||
<? } ?>
|
||||
<span style="float: right;"><a href="#" onclick="$('#newsbody<?=$NewsID?>').gtoggle(); this.innerHTML=(this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Hide</a></span>
|
||||
<span style="float: right;"><a href="#" onclick="$('#newsbody<?=$NewsID?>').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Hide</a></span>
|
||||
</div>
|
||||
|
||||
<div id="newsbody<?=$NewsID?>" class="pad"><?=$Text->full_format($Body)?></div>
|
||||
@ -542,5 +542,6 @@ function contest() {
|
||||
</div>
|
||||
</div>
|
||||
<!-- END contest Section -->
|
||||
<? } // contest()
|
||||
<?
|
||||
} // contest()
|
||||
?>
|
||||
|
@ -56,12 +56,12 @@
|
||||
$Title .= " [$GroupYear]";
|
||||
}
|
||||
if ($GroupVanityHouse) {
|
||||
$DisplayName .=' [Vanity House]';
|
||||
$AltName .=' [Vanity House]';
|
||||
$DisplayName .= ' [Vanity House]';
|
||||
$AltName .= ' [Vanity House]';
|
||||
}
|
||||
if ($GroupCategoryID == 1) {
|
||||
$DisplayName .=' [' . $ReleaseTypes[$ReleaseType] . ']';
|
||||
$AltName .=' [' . $ReleaseTypes[$ReleaseType] . ']';
|
||||
$DisplayName .= ' [' . $ReleaseTypes[$ReleaseType] . ']';
|
||||
$AltName .= ' [' . $ReleaseTypes[$ReleaseType] . ']';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,17 +20,9 @@
|
||||
<div class="box2">
|
||||
<div class="pad">Do not process these donations manually! The bitcoin parser <em>will</em> get them sooner or later (poke a developer if something seems broken).</div>
|
||||
</div>
|
||||
<table class="border" width="100%">
|
||||
<tr class="colhead">
|
||||
<td>Bitcoin address</td>
|
||||
<td>User</td>
|
||||
<td>Unprocessed amount</td>
|
||||
<td>Total amount</td>
|
||||
<td>Donor rank</td>
|
||||
<td>Special rank</td>
|
||||
</tr>
|
||||
<?
|
||||
$NewDonations = array();
|
||||
$TotalUnproc = 0;
|
||||
foreach ($AllDonations as $Address => $Amount) {
|
||||
if (isset($OldDonations[$Address])) {
|
||||
if ($Amount == $OldDonations[$Address]) { // Direct comparison should be fine as everything comes from bitcoind
|
||||
@ -41,8 +33,20 @@
|
||||
// so let's just round this off to satoshis and pray that we're on a 64 bit system
|
||||
$Amount = round($Amount - $OldDonations[$Address], 8);
|
||||
}
|
||||
$TotalUnproc += $Amount;
|
||||
$NewDonations[$Address] = $Amount;
|
||||
}
|
||||
?>
|
||||
<table class="border" width="100%">
|
||||
<tr class="colhead">
|
||||
<td>Bitcoin address</td>
|
||||
<td>User</td>
|
||||
<td>Unprocessed amount (<?=$TotalUnproc ?: '0'?>)</td>
|
||||
<td>Total amount</td>
|
||||
<td>Donor rank</td>
|
||||
<td>Special rank</td>
|
||||
</tr>
|
||||
<?
|
||||
if (!empty($NewDonations)) {
|
||||
foreach(DonationsBitcoin::get_userids(array_keys($NewDonations)) as $Address => $UserID) {
|
||||
?>
|
||||
|
@ -48,17 +48,17 @@
|
||||
lma.TorrentID AS LossymasterApproved,
|
||||
lwa.TorrentID AS LossywebApproved
|
||||
FROM torrents AS t
|
||||
LEFT JOIN torrents_group AS tg ON tg.ID=t.GroupID
|
||||
LEFT JOIN artists_group AS ag ON ag.ArtistID=tg.ArtistID
|
||||
LEFT JOIN torrents_bad_tags AS bt ON bt.TorrentID=t.ID
|
||||
LEFT JOIN torrents_bad_folders AS bf ON bf.TorrentID=t.ID
|
||||
LEFT JOIN torrents_bad_files AS bfi ON bfi.TorrentID=t.ID
|
||||
LEFT JOIN torrents_cassette_approved AS ca ON ca.TorrentID=t.ID
|
||||
LEFT JOIN torrents_lossymaster_approved AS lma ON lma.TorrentID=t.ID
|
||||
LEFT JOIN torrents_lossyweb_approved AS lwa ON lwa.TorrentID=t.id
|
||||
WHERE t.ID='$TorrentID'");
|
||||
LEFT JOIN torrents_group AS tg ON tg.ID = t.GroupID
|
||||
LEFT JOIN artists_group AS ag ON ag.ArtistID = tg.ArtistID
|
||||
LEFT JOIN torrents_bad_tags AS bt ON bt.TorrentID = t.ID
|
||||
LEFT JOIN torrents_bad_folders AS bf ON bf.TorrentID = t.ID
|
||||
LEFT JOIN torrents_bad_files AS bfi ON bfi.TorrentID = t.ID
|
||||
LEFT JOIN torrents_cassette_approved AS ca ON ca.TorrentID = t.ID
|
||||
LEFT JOIN torrents_lossymaster_approved AS lma ON lma.TorrentID = t.ID
|
||||
LEFT JOIN torrents_lossyweb_approved AS lwa ON lwa.TorrentID = t.id
|
||||
WHERE t.ID = '$TorrentID'");
|
||||
|
||||
list($Properties) = $DB->to_array(false,MYSQLI_BOTH);
|
||||
list($Properties) = $DB->to_array(false, MYSQLI_BOTH);
|
||||
if (!$Properties) {
|
||||
error(404);
|
||||
}
|
||||
@ -69,8 +69,7 @@
|
||||
error(403);
|
||||
}
|
||||
|
||||
View::show_header('Edit torrent', 'upload');
|
||||
|
||||
View::show_header('Edit torrent', 'upload,torrent');
|
||||
|
||||
if (!($Properties['Remastered'] && !$Properties['RemasterYear']) || check_perms('edit_unknowns')) {
|
||||
$TorrentForm = new TORRENT_FORM($Properties, $Err, false);
|
||||
|
@ -165,7 +165,6 @@
|
||||
<script type="text/javascript">
|
||||
Format();
|
||||
Bitrate();
|
||||
Media();
|
||||
</script>
|
||||
<?
|
||||
View::show_footer();
|
||||
|
@ -1,117 +1,119 @@
|
||||
(function() {
|
||||
var count = 1;
|
||||
var MAX_EXTRAS = 5;
|
||||
var FORMATS = [ 'MP3', 'FLAC', 'AAC', 'AC3', 'DTS' ];
|
||||
var BITRATES = [ '192', 'APS (VBR)', 'V2 (VBR)', 'V1 (VBR)', '256', 'APX (VBR)', 'V0 (VBR)', '320', 'Lossless', '24bit Lossless'];
|
||||
var filenames = new Array();
|
||||
$(document).ready(function () {
|
||||
$("#add_format").click(function () {
|
||||
createRow();
|
||||
});
|
||||
var buttonCount;
|
||||
var MAX_EXTRAS = 5;
|
||||
var FORMATS = [ 'MP3', 'FLAC', 'AAC', 'AC3', 'DTS' ];
|
||||
var BITRATES = [ '192', 'APS (VBR)', 'V2 (VBR)', 'V1 (VBR)', '256', 'APX (VBR)', 'V0 (VBR)', '320', 'Lossless', '24bit Lossless'];
|
||||
|
||||
$("#remove_format").click(function () {
|
||||
removeRow();
|
||||
});
|
||||
function initMultiButtons() {
|
||||
if (!$('#add_format')) {
|
||||
return;
|
||||
}
|
||||
buttonCount = 1;
|
||||
$('#add_format').click(function () {
|
||||
createRow();
|
||||
});
|
||||
|
||||
function createRow() {
|
||||
if (count >= 1) {
|
||||
$("#remove_format").show();
|
||||
}
|
||||
if (count == MAX_EXTRAS) {
|
||||
$("#add_format").hide();
|
||||
}
|
||||
var after = count > 1 ? "#extra_format_row_" + (count - 1) : '#placeholder_row_top';
|
||||
var master = $(document.createElement("tr")).attr({
|
||||
id:'extra_format_row_' + count
|
||||
}).insertAfter(after);
|
||||
$('#remove_format').click(function () {
|
||||
removeRow();
|
||||
});
|
||||
}
|
||||
|
||||
$(document.createElement("td")).addClass('label').html("Extra format " + count + ":").appendTo(master);
|
||||
var row = $(document.createElement("td")).appendTo(master);
|
||||
addFile(row);
|
||||
addFormats(row);
|
||||
addBitrates(row);
|
||||
addReleaseDescription(row);
|
||||
function createRow() {
|
||||
if (buttonCount >= 1) {
|
||||
$("#remove_format").show();
|
||||
}
|
||||
if (buttonCount == MAX_EXTRAS) {
|
||||
$("#add_format").hide();
|
||||
}
|
||||
var after = buttonCount > 1 ? "#extra_format_row_" + (buttonCount - 1) : '#placeholder_row_top';
|
||||
var master = $(document.createElement("tr")).attr({
|
||||
id:'extra_format_row_' + buttonCount
|
||||
}).insertAfter(after);
|
||||
|
||||
$(document.createElement("td")).addClass('label').html("Extra format " + buttonCount + ":").appendTo(master);
|
||||
var row = $(document.createElement("td")).appendTo(master);
|
||||
addFile(row);
|
||||
addFormats(row);
|
||||
addBitrates(row);
|
||||
addReleaseDescription(row);
|
||||
$("#post").val("Upload torrents");
|
||||
buttonCount++;
|
||||
}
|
||||
|
||||
function addFile(row) {
|
||||
var id = buttonCount;
|
||||
$(document.createElement("input")).attr({
|
||||
id:"extra_file_" + buttonCount,
|
||||
type:'file',
|
||||
name:"extra_file_" + buttonCount,
|
||||
size:'30'
|
||||
}).appendTo(row);
|
||||
|
||||
}
|
||||
|
||||
function addFormats(row) {
|
||||
$(document.createElement("span")).html(" Format: ").appendTo(row);
|
||||
$(document.createElement("select")).attr({
|
||||
id:"format_" + buttonCount,
|
||||
name:'extra_format[]'
|
||||
}).html(createDropDownOptions(FORMATS)).appendTo(row);
|
||||
}
|
||||
|
||||
function addBitrates(row) {
|
||||
$(document.createElement("span")).html(" Bitrate: ").appendTo(row);
|
||||
$(document.createElement("select")).attr({
|
||||
id:"bitrate_" + buttonCount,
|
||||
name:'extra_bitrate[]'
|
||||
}).html(createDropDownOptions(BITRATES)).appendTo(row);
|
||||
/*change(
|
||||
function () {
|
||||
var id = $(this).attr('id');
|
||||
if ($(this).val() == 'Other') {
|
||||
$(this).after(
|
||||
'<span id="other_bitrate_span_' + id
|
||||
+ '" class=""> <input type="text" name="extra_other_bitrate[]" size="5" id="other_bitrate_' + id
|
||||
+ '"><input type="checkbox" id="vbr_' + id + '" name="extra_vbr[]"><label for="vbr_' + id
|
||||
+ '"> (VBR)</label> </span>');
|
||||
} else {
|
||||
$("#other_bitrate_span_" + id).remove();
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
function addReleaseDescription(row) {
|
||||
var id = buttonCount;
|
||||
var desc_row = $(document.createElement("tr")).attr({ id:"desc_row"}).css('cursor', 'pointer').appendTo(row);
|
||||
$(document.createElement("a")).html(" [Add Release Description]").css('marginLeft', '-5px').appendTo(desc_row).click(function () {
|
||||
$("#extra_release_desc_" + id).toggle(300);
|
||||
});
|
||||
$(document.createElement("textarea")).attr({
|
||||
id:"extra_release_desc_" + id,
|
||||
name:"extra_release_desc[]",
|
||||
cols:60,
|
||||
rows:4,
|
||||
style:'display:none; margin-left: 5px; margin-top: 10px; margin-bottom: 10px;'
|
||||
}).appendTo(desc_row);
|
||||
}
|
||||
|
||||
function createDropDownOptions(array) {
|
||||
s = "<option value='0'>---</option>";
|
||||
for (var i in array) {
|
||||
s += ("<option value=\"" + array[i] + "\">" + array[i] + "</option>");
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
function removeRow() {
|
||||
if (buttonCount > 1) {
|
||||
$("#placeholder_row_bottom").prev().remove();
|
||||
$("#add_format").show();
|
||||
buttonCount--;
|
||||
$("#post").val("Upload torrents");
|
||||
count++;
|
||||
}
|
||||
if (buttonCount == 1) {
|
||||
$("#remove_format").hide();
|
||||
$("#post").val("Upload torrent");
|
||||
}
|
||||
|
||||
function addFile(row) {
|
||||
var id = count;
|
||||
$(document.createElement("input")).attr({
|
||||
id:"extra_file_" + count,
|
||||
type:'file',
|
||||
name:"extra_file_" + count,
|
||||
size:'30'
|
||||
}).appendTo(row);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function addFormats(row) {
|
||||
$(document.createElement("span")).html(" Format: ").appendTo(row);
|
||||
$(document.createElement("select")).attr({
|
||||
id:"format_" + count,
|
||||
name:'extra_format[]'
|
||||
}).html(createDropDownOptions(FORMATS)).appendTo(row);
|
||||
}
|
||||
|
||||
function addBitrates(row) {
|
||||
$(document.createElement("span")).html(" Bitrate: ").appendTo(row);
|
||||
$(document.createElement("select")).attr({
|
||||
id:"bitrate_" + count,
|
||||
name:'extra_bitrate[]'
|
||||
}).html(createDropDownOptions(BITRATES)).appendTo(row);
|
||||
/*change(
|
||||
function () {
|
||||
var id = $(this).attr('id');
|
||||
if ($(this).val() == 'Other') {
|
||||
$(this).after(
|
||||
'<span id="other_bitrate_span_' + id
|
||||
+ '" class=""> <input type="text" name="extra_other_bitrate[]" size="5" id="other_bitrate_' + id
|
||||
+ '"><input type="checkbox" id="vbr_' + id + '" name="extra_vbr[]"><label for="vbr_' + id
|
||||
+ '"> (VBR)</label> </span>');
|
||||
} else {
|
||||
$("#other_bitrate_span_" + id).remove();
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
function addReleaseDescription(row) {
|
||||
var id = count;
|
||||
var desc_row = $(document.createElement("tr")).attr({ id:"desc_row"}).css('cursor', 'pointer').appendTo(row);
|
||||
$(document.createElement("a")).html(" [Add Release Description]").css('marginLeft', '-5px').appendTo(desc_row).click(function () {
|
||||
$("#extra_release_desc_" + id).toggle(300);
|
||||
});
|
||||
$(document.createElement("textarea")).attr({
|
||||
id:"extra_release_desc_" + id,
|
||||
name:"extra_release_desc[]",
|
||||
cols:60,
|
||||
rows:4,
|
||||
style:'display:none; margin-left: 5px; margin-top: 10px; margin-bottom: 10px;'
|
||||
}).appendTo(desc_row);
|
||||
}
|
||||
|
||||
function createDropDownOptions(array) {
|
||||
s = "<option value='0'>---</option>";
|
||||
for (var i in array) {
|
||||
s += ("<option value=\"" + array[i] + "\">" + array[i] + "</option>");
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
function removeRow() {
|
||||
if (count > 1) {
|
||||
$("#placeholder_row_bottom").prev().remove();
|
||||
$("#add_format").show();
|
||||
filenames.pop();
|
||||
count--;
|
||||
$("#post").val("Upload torrents");
|
||||
}
|
||||
if (count == 1) {
|
||||
$("#remove_format").hide();
|
||||
$("#post").val("Upload torrent");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
$(document).ready(initMultiButtons);
|
||||
|
@ -1,6 +1,7 @@
|
||||
function Categories() {
|
||||
ajax.get('ajax.php?action=upload_section&categoryid=' + $('#categories').raw().value, function (response) {
|
||||
$('#dynamic_form').raw().innerHTML = response;
|
||||
initMultiButtons();
|
||||
// Evaluate the code that generates previews.
|
||||
eval($('#dynamic_form script.preview_code').html());
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user