mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-02-21 20:59:02 +00:00
Empty commit
This commit is contained in:
parent
ad16695c9b
commit
3201b28b2f
@ -180,6 +180,7 @@ function music_form($GenreTags) {
|
||||
}
|
||||
}
|
||||
|
||||
global $DB;
|
||||
$HasLog = $Torrent['HasLog'];
|
||||
$HasCue = $Torrent['HasCue'];
|
||||
$BadTags = $Torrent['BadTags'];
|
||||
@ -187,6 +188,13 @@ function music_form($GenreTags) {
|
||||
$BadFiles = $Torrent['BadFiles'];
|
||||
$CassetteApproved = $Torrent['CassetteApproved'];
|
||||
$LossymasterApproved = $Torrent['LossymasterApproved'];
|
||||
if (!$this->NewTorrent) {
|
||||
$DB->query("SELECT UserID, Points FROM library_contest WHERE TorrentID = ".$this->TorrentID);
|
||||
list($LibraryUser, $LibraryPoints) = $DB->next_record();
|
||||
}
|
||||
if ($LibraryUser != "") {
|
||||
$LibraryUpload = '1';
|
||||
}
|
||||
global $ReleaseTypes;
|
||||
?>
|
||||
<table cellpadding="3" cellspacing="1" border="0" class="border<? if($this->NewTorrent) { echo ' slice'; }?>" width="100%">
|
||||
@ -511,6 +519,18 @@ function music_form($GenreTags) {
|
||||
<input type="checkbox" id="lossymaster_approved" name="lossymaster_approved"<? if ($LossymasterApproved) {echo " checked='checked'";}?>/> Check this box if the torrent is an approved lossy master.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Library Contest Upload</td>
|
||||
<td>
|
||||
<input type="checkbox" id="library_upload" name="library_upload"<? if ($LibraryUpload) { echo " checked='checked'";}?>/> Check this box if the torrent is library contest upload.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Library Contest Points</td>
|
||||
<td>
|
||||
<input type="text" name="library_points" value="<?=$LibraryPoints?>" size="10" />
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? if($this->NewTorrent) { ?>
|
||||
<tr>
|
||||
@ -554,6 +574,12 @@ function music_form($GenreTags) {
|
||||
<p class="min_padding">Contains background information such as album history and maybe a review.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" style="font-weight: bold;">Library Contest Image Location</td>
|
||||
<td>
|
||||
<input type="text" id="library_image" name="library_image" size="60" /> <input type="checkbox" id="multi_disc" name="multi_disc" />Multi-disc Upload
|
||||
</td>
|
||||
</tr>
|
||||
<? } // if new torrent ?>
|
||||
<tr>
|
||||
<td class="label">Release Description (optional)</td>
|
||||
|
12
gazelle.sql
12
gazelle.sql
@ -389,6 +389,7 @@ CREATE TABLE `ip_bans` (
|
||||
CREATE TABLE `library_contest` (
|
||||
`UserID` int(10) NOT NULL,
|
||||
`TorrentID` int(10) NOT NULL,
|
||||
`Points` int(10) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`UserID`,`TorrentID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
@ -1150,6 +1151,17 @@ CREATE TABLE `users_history_passwords` (
|
||||
`ChangerIP` varchar(15) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `users_history_sessions` (
|
||||
`UserID` int(11) NOT NULL DEFAULT '0',
|
||||
`SessionID` char(32) NOT NULL DEFAULT '',
|
||||
`Browser` varchar(40) DEFAULT NULL,
|
||||
`OperatingSystem` varchar(8) DEFAULT NULL,
|
||||
`IP` varchar(15) DEFAULT NULL,
|
||||
`LastUpdate` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`UserID`,`SessionID`),
|
||||
KEY `LastUpdate` (`LastUpdate`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `users_info` (
|
||||
`UserID` int(10) unsigned NOT NULL,
|
||||
`StyleID` int(10) unsigned NOT NULL,
|
||||
|
@ -550,6 +550,23 @@
|
||||
'pm' => ""
|
||||
)
|
||||
),
|
||||
'library' => array(
|
||||
'priority' => '90',
|
||||
'title' => 'Library Contest Request',
|
||||
'report_messages' => array(
|
||||
"Make sure to include a link to the image so we can verify it is a library upload.",
|
||||
"Please indicate if this is a multi-disc upload in the Comments field. A simple 'yes' or 'no' will do."
|
||||
),
|
||||
'report_fields' => array(
|
||||
'image' => '1'
|
||||
),
|
||||
'resolve_options' => array(
|
||||
'upload' => '0',
|
||||
'warn' => '0',
|
||||
'delete' => '0',
|
||||
'pm' => ""
|
||||
)
|
||||
),
|
||||
'ogg' => array(
|
||||
'priority' => '11',
|
||||
'title' => 'Disallowed Ogg Preset',
|
||||
|
@ -303,6 +303,7 @@
|
||||
<a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">[DL]</a>
|
||||
uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
|
||||
<br />
|
||||
<? if ($ReporterName == "") { $ReporterName = "System"; } ?>
|
||||
<div style="text-align: right;">was reported by <a href="user.php?id=<?=$ReporterID?>"><?=$ReporterName?></a> <?=time_diff($ReportedTime)?> for the reason: <strong><?=$ReportType['title']?></strong></div>
|
||||
<? if($Status != 'Resolved') {
|
||||
|
||||
|
@ -168,6 +168,10 @@
|
||||
$Cache->delete_value('torrents_details_'.$GroupID);
|
||||
$SendPM = true;
|
||||
}
|
||||
if ($_POST['resolve_type'] == "library") {
|
||||
$DB->query("INSERT INTO library_contest (UserID, TorrentID, Points) VALUES (".$UploaderID.", ".$TorrentID.", 1)");
|
||||
$SendPM = false;
|
||||
}
|
||||
|
||||
//Log and delete
|
||||
if(isset($Escaped['delete']) && check_perms('users_mod')) {
|
||||
|
@ -46,6 +46,8 @@
|
||||
$Properties['BadFiles'] = (isset($_POST['bad_files'])) ? 1 : 0;
|
||||
$Properties['CassetteApproved'] = (isset($_POST['cassette_approved']))? 1 : 0;
|
||||
$Properties['LossymasterApproved'] = (isset($_POST['lossymaster_approved']))? 1 : 0;
|
||||
$Properties['LibraryUpload'] = (isset($_POST['library_upload']))? 1 : 0;
|
||||
$Properties['LibraryPoints'] = (isset($_POST['library_points']))? $_POST['library_points'] : 0;
|
||||
$Properties['Format'] = $_POST['format'];
|
||||
$Properties['Media'] = $_POST['media'];
|
||||
$Properties['Bitrate'] = $_POST['bitrate'];
|
||||
@ -88,10 +90,12 @@
|
||||
error(403);
|
||||
}
|
||||
|
||||
if($Properties['UnknownRelease'] && !($Remastered == '1' && !$RemasterYear) && !check_perms('edit_unknowns')) {
|
||||
//It's Unknown now, and it wasn't before
|
||||
$DB->query("SELECT UserID FROM torrents WHERE ID = ".$TorrentID);
|
||||
list($UploaderID) = $DB->next_record();
|
||||
|
||||
|
||||
if($Properties['UnknownRelease'] && !($Remastered == '1' && !$RemasterYear) && !check_perms('edit_unknowns')) {
|
||||
//It's Unknown now, and it wasn't before
|
||||
if($LoggedUser['ID'] != $UploaderID) {
|
||||
//Hax
|
||||
die();
|
||||
@ -328,6 +332,17 @@
|
||||
$DB->query("DELETE FROM torrents_bad_files WHERE TorrentID='$TorrentID'");
|
||||
}
|
||||
|
||||
$DB->query("SELECT TorrentID FROM library_contest WHERE TorrentID='$TorrentID'");
|
||||
list($lbID) = $DB->next_record();
|
||||
if (!$lbID && $Properties['LibraryUpload'] && $Properties['LibraryPoints'] > 0) {
|
||||
$DB->query("SELECT UserID FROM torrents WHERE ID = ".$TorrentID);
|
||||
list($UploaderID) = $DB->next_record();
|
||||
$DB->query("INSERT INTO library_contest VALUES ($UploaderID, $TorrentID, $Properties[LibraryPoints])");
|
||||
}
|
||||
if ($lbID && !$Properties['LibraryUpload']) {
|
||||
$DB->query("DELETE FROM library_contest WHERE TorrentID='$TorrentID'");
|
||||
}
|
||||
|
||||
$DB->query("SELECT TorrentID FROM torrents_cassette_approved WHERE TorrentID='$TorrentID'");
|
||||
list($caID) = $DB->next_record();
|
||||
|
||||
|
@ -58,6 +58,8 @@
|
||||
$Properties['Media'] = $_POST['media'];
|
||||
$Properties['Bitrate'] = $_POST['bitrate'];
|
||||
$Properties['Encoding'] = $_POST['bitrate'];
|
||||
$Properties['LibraryImage'] = $_POST['library_image'];
|
||||
$Properties['MultiDisc'] = $_POST['multi_disc'];
|
||||
$Properties['TagList'] = $_POST['tags'];
|
||||
$Properties['Image'] = $_POST['image'];
|
||||
$Properties['GroupDescription'] = trim($_POST['album_desc']);
|
||||
@ -698,6 +700,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
//******************************************************************************//
|
||||
//--------------- Contest ------------------------------------------------------//
|
||||
if ($Properties['LibraryImage'] != "") {
|
||||
$DB->query("INSERT INTO reportsv2 (ReporterID, TorrentID, Type, UserComment, Status, ReportedTime, Track, Image, ExtraID, Link)
|
||||
VALUES (0, ".$TorrentID.", 'library', '".db_string(($Properties['MultiDisc'] ? "Multi-disc" : ""))."', 'New', '".sqltime()."', '', '".db_string($Properties['LibraryImage'])."', '', '')");
|
||||
}
|
||||
|
||||
//******************************************************************************//
|
||||
//--------------- IRC announce and feeds ---------------------------------------//
|
||||
$Announce = "";
|
||||
|
@ -224,6 +224,12 @@ function check_paranoia_here($Setting) {
|
||||
<? } ?>
|
||||
<? if ($OwnProfile || check_paranoia_here(false)) { //if ($OwnProfile || check_perms('users_mod')) { ?>
|
||||
<li><a href="userhistory.php?action=token_history&userid=<?=$UserID?>">Tokens</a>: <?=number_format($FLTokens)?></li>
|
||||
<? } ?>
|
||||
<? if ($OwnProfile || check_paranoia_here(false)) {
|
||||
$DB->query("SELECT SUM(Points) FROM library_contest WHERE UserID = ".$UserID);
|
||||
list($LibraryUploads) = $DB->next_record();
|
||||
?>
|
||||
<li>Library Points: <?=number_format($LibraryUploads)?></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user