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
5db8f33eaa
commit
ef45b77859
@ -1,5 +1,7 @@
|
|||||||
<?
|
<?
|
||||||
|
if (!empty($_GET['action']) && $_GET['action'] === 'autocomplete') {
|
||||||
|
require('sections/artist/autocomplete.php');
|
||||||
|
} else {
|
||||||
define('ERROR_EXCEPTION', true);
|
define('ERROR_EXCEPTION', true);
|
||||||
require('classes/script_start.php');
|
require('classes/script_start.php');
|
||||||
|
}
|
||||||
|
@ -115,7 +115,7 @@ public static function get_stored($Link) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns link into thumbnail (if posible) or default group image (if missing)
|
* Turns link into thumbnail (if possible) or default group image (if missing)
|
||||||
* Automatically applies proxy when appropriate
|
* Automatically applies proxy when appropriate
|
||||||
*
|
*
|
||||||
* @global array $CategoryIcons
|
* @global array $CategoryIcons
|
||||||
@ -192,8 +192,8 @@ public static function cover_thumb($Source, $Category = 0, $Size = 90, $Title =
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create image proxy URL
|
* Create image proxy URL
|
||||||
* @param string $Url Image url
|
* @param string $Url image URL
|
||||||
* @return image peoxy URL
|
* @return image proxy URL
|
||||||
*/
|
*/
|
||||||
public static function proxy_url($Url) {
|
public static function proxy_url($Url) {
|
||||||
global $SSL;
|
global $SSL;
|
||||||
@ -203,7 +203,7 @@ public static function proxy_url($Url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This non-class determines the thumbnail equivalent of an image's url after being passed the original
|
* This non-class determines the thumbnail equivalent of an image's URL after being passed the original
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -220,14 +220,14 @@ function contains($Substring, $String) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if url points to a whatimg thumbnail.
|
* Checks if URL points to a whatimg thumbnail.
|
||||||
*/
|
*/
|
||||||
function has_whatimg_thumb($Url){
|
function has_whatimg_thumb($Url){
|
||||||
return contains("_thumb", $Url);
|
return contains("_thumb", $Url);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cleans up imgur url if it already has a modifier attached to the end of it.
|
* Cleans up imgur URL if it already has a modifier attached to the end of it.
|
||||||
*/
|
*/
|
||||||
function clean_imgur_url($Url){
|
function clean_imgur_url($Url){
|
||||||
$Extension = pathinfo($Url, PATHINFO_EXTENSION);
|
$Extension = pathinfo($Url, PATHINFO_EXTENSION);
|
||||||
|
@ -411,5 +411,24 @@ public static function display_array($Array, $Escape = array()) {
|
|||||||
public static function is_new_torrent(&$Data) {
|
public static function is_new_torrent(&$Data) {
|
||||||
return strpos(substr($Data, 0, 10), ':') !== false;
|
return strpos(substr($Data, 0, 10), ':') !== false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function display_recommend($ID, $Type, $Hide = true) {
|
||||||
|
global $DB, $LoggedUser;
|
||||||
|
if($Hide) {
|
||||||
|
$Hide = 'style="display: none;"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="recommendation_div" data-id="<?=$ID?>" data-type="<?=$Type?>" <?=$Hide?> class="center">
|
||||||
|
<div style="display: inline-block;" >
|
||||||
|
<strong>Recommend to: </strong><select id="friend" name="friend">
|
||||||
|
<option value="0" selected="selected">Choose Friend</option>
|
||||||
|
</select>
|
||||||
|
<input type="text" id="recommendation_note" placeholder="Add note..."/>
|
||||||
|
<button id="send_recommendation" disabled>Send</button>
|
||||||
|
</div>
|
||||||
|
<div class="new" id="recommendation_status"><br/></div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -1214,6 +1214,13 @@ CREATE TABLE `users_dupes` (
|
|||||||
CONSTRAINT `users_dupes_ibfk_2` FOREIGN KEY (`GroupID`) REFERENCES `dupe_groups` (`ID`) ON DELETE CASCADE
|
CONSTRAINT `users_dupes_ibfk_2` FOREIGN KEY (`GroupID`) REFERENCES `dupe_groups` (`ID`) ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
|
|
||||||
|
CREATE TABLE `users_enable_recommendations` (
|
||||||
|
`ID` int(10) NOT NULL,
|
||||||
|
`Enable` tinyint(1) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`ID`),
|
||||||
|
KEY `Enable` (`Enable`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE `users_freeleeches` (
|
CREATE TABLE `users_freeleeches` (
|
||||||
`UserID` int(10) NOT NULL,
|
`UserID` int(10) NOT NULL,
|
||||||
`TorrentID` int(10) NOT NULL,
|
`TorrentID` int(10) NOT NULL,
|
||||||
|
13
sections/ajax/get_friends.php
Normal file
13
sections/ajax/get_friends.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$DB->query("SELECT
|
||||||
|
f.FriendID, u.Username
|
||||||
|
FROM friends AS f
|
||||||
|
RIGHT JOIN users_enable_recommendations AS r
|
||||||
|
ON r.ID = f.FriendID AND r.Enable = 1
|
||||||
|
RIGHT JOIN users_main AS u
|
||||||
|
ON u.ID = f.FriendID
|
||||||
|
WHERE f.UserID = '$LoggedUser[ID]'
|
||||||
|
ORDER BY u.Username ASC");
|
||||||
|
echo json_encode($DB->to_array(false, MYSQLI_ASSOC));
|
||||||
|
die();
|
@ -135,6 +135,12 @@
|
|||||||
case 'wiki':
|
case 'wiki':
|
||||||
require(SERVER_ROOT . '/sections/ajax/wiki.php');
|
require(SERVER_ROOT . '/sections/ajax/wiki.php');
|
||||||
break;
|
break;
|
||||||
|
case 'send_recommendation':
|
||||||
|
require(SERVER_ROOT . '/sections/ajax/send_recommendation.php');
|
||||||
|
break;
|
||||||
|
case 'get_friends':
|
||||||
|
require(SERVER_ROOT . '/sections/ajax/get_friends.php');
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// If they're screwing around with the query string
|
// If they're screwing around with the query string
|
||||||
print json_encode(array('status' => 'failure'));
|
print json_encode(array('status' => 'failure'));
|
||||||
|
56
sections/ajax/send_recommendation.php
Normal file
56
sections/ajax/send_recommendation.php
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
$FriendID = (int) $_POST['friend'];
|
||||||
|
$Type = $_POST['type'];
|
||||||
|
$ID = (int) $_POST['id'];
|
||||||
|
$Note = $_POST['note'];
|
||||||
|
|
||||||
|
if(empty($FriendID) || empty($Type) || empty($ID)) {
|
||||||
|
echo json_encode(array("status" => "error", "response" => "Error."));
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
// Make sure the recipient is on your friends list and not some random dude.
|
||||||
|
$DB->query("SELECT
|
||||||
|
f.FriendID, u.Username
|
||||||
|
FROM friends AS f
|
||||||
|
JOIN users_enable_recommendations AS r
|
||||||
|
ON r.ID = f.FriendID AND r.Enable = 1
|
||||||
|
LEFT JOIN users_main AS u
|
||||||
|
ON u.ID = f.FriendID
|
||||||
|
WHERE f.UserID = '$LoggedUser[ID]' AND f.FriendID = '$FriendID'");
|
||||||
|
|
||||||
|
if($DB->record_count() == 0) {
|
||||||
|
echo json_encode(array("status" => "error", "response" => "Not on friend list."));
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
$Type = strtolower($Type);
|
||||||
|
$Link = "";
|
||||||
|
// "a" vs "an", english language is so confusing.
|
||||||
|
// http://en.wikipedia.org/wiki/English_articles#Distinction_between_a_and_an
|
||||||
|
$Article = "a";
|
||||||
|
switch($Type) {
|
||||||
|
case 'torrent':
|
||||||
|
$Link = "torrents.php?id=".$ID;
|
||||||
|
$DB->query("SELECT Name FROM torrents_group WHERE ID = '$ID'");
|
||||||
|
break;
|
||||||
|
case 'artist':
|
||||||
|
$Article = "an";
|
||||||
|
$Link = "artist.php?id=".$ID;
|
||||||
|
$DB->query("SELECT Name FROM artists_group WHERE ArtistID = '$ID'");
|
||||||
|
break;
|
||||||
|
case 'collage':
|
||||||
|
$Link = "collages.php?id=".$ID;
|
||||||
|
$DB->query("SELECT Name FROM collages WHERE ID = '$ID'");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
list($Name) = $DB->next_record();
|
||||||
|
$Subject = $LoggedUser['Username'] . " recommended you $Article " . $Type . "!";
|
||||||
|
$Body = $LoggedUser['Username'] . " recommended you the ".$Type." [url=https://".NONSSL_SITE_URL."/".$Link."]".$Name."[/url].";
|
||||||
|
if(!empty($Note)) {
|
||||||
|
$Body = $Body . "\n\n". $Note;
|
||||||
|
}
|
||||||
|
|
||||||
|
Misc::send_pm($FriendID, $LoggedUser['ID'], $Subject, $Body);
|
||||||
|
echo json_encode(array("status" => "success", "response" => "Sent!"));
|
||||||
|
die();
|
||||||
|
|
@ -472,7 +472,7 @@ function compare($X, $Y){
|
|||||||
|
|
||||||
//----------------- End building list and getting stats
|
//----------------- End building list and getting stats
|
||||||
|
|
||||||
View::show_header($Name, 'browse,requests,bbcode,comments,voting,jquery');
|
View::show_header($Name, 'browse,requests,bbcode,comments,voting,jquery,recommend');
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
@ -509,7 +509,9 @@ function compare($X, $Y){
|
|||||||
<a href="#" id="bookmarklink_artist_<?=$ArtistID?>" onclick="Bookmark('artist', <?=$ArtistID?>,'Remove bookmark');return false;" class="brackets">Bookmark</a>
|
<a href="#" id="bookmarklink_artist_<?=$ArtistID?>" onclick="Bookmark('artist', <?=$ArtistID?>,'Remove bookmark');return false;" class="brackets">Bookmark</a>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
<a href="#" id="recommend" class="brackets">Recommend</a>
|
||||||
|
<?
|
||||||
if (check_perms('site_edit_wiki')) {
|
if (check_perms('site_edit_wiki')) {
|
||||||
?>
|
?>
|
||||||
<a href="artist.php?action=edit&artistid=<?=$ArtistID?>" class="brackets">Edit</a>
|
<a href="artist.php?action=edit&artistid=<?=$ArtistID?>" class="brackets">Edit</a>
|
||||||
@ -532,6 +534,7 @@ function compare($X, $Y){
|
|||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<? Misc::display_recommend($ArtistID, "artist"); ?>
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<? if($Image) { ?>
|
<? if($Image) { ?>
|
||||||
<div class="box box_image">
|
<div class="box box_image">
|
||||||
|
@ -345,7 +345,7 @@ function compare($X, $Y){
|
|||||||
$CollagePages[] = $CollagePage;
|
$CollagePages[] = $CollagePage;
|
||||||
}
|
}
|
||||||
|
|
||||||
View::show_header($Name,'browse,collage,bbcode,voting');
|
View::show_header($Name,'browse,collage,bbcode,voting,jquery,recommend');
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
@ -370,7 +370,9 @@ function compare($X, $Y){
|
|||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<a href="#" id="bookmarklink_collage_<?=$CollageID?>" class="brackets" onclick="Bookmark('collage', <?=$CollageID?>,'Remove bookmark');return false;">Bookmark</a>
|
<a href="#" id="bookmarklink_collage_<?=$CollageID?>" class="brackets" onclick="Bookmark('collage', <?=$CollageID?>,'Remove bookmark');return false;">Bookmark</a>
|
||||||
<? }
|
<? }
|
||||||
|
?>
|
||||||
|
<a href="#" id="recommend" class="brackets">Recommend</a>
|
||||||
|
<?
|
||||||
if (check_perms('site_collages_manage') && !$Locked) { ?>
|
if (check_perms('site_collages_manage') && !$Locked) { ?>
|
||||||
<a href="collages.php?action=manage&collageid=<?=$CollageID?>" class="brackets">Manage torrents</a>
|
<a href="collages.php?action=manage&collageid=<?=$CollageID?>" class="brackets">Manage torrents</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
@ -380,6 +382,7 @@ function compare($X, $Y){
|
|||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<? Misc::display_recommend($CollageID, "collage"); ?>
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="box box_category">
|
<div class="box box_category">
|
||||||
<div class="head"><strong>Category</strong></div>
|
<div class="head"><strong>Category</strong></div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?
|
<?
|
||||||
/*
|
/*
|
||||||
* This page simply assings a report to the person clicking on
|
* This page simply assings a report to the person clicking on
|
||||||
* the Grab / Grab All button.
|
* the Claim / Claim all button.
|
||||||
*/
|
*/
|
||||||
if(!check_perms('admin_reports')){
|
if(!check_perms('admin_reports')){
|
||||||
//error(403);
|
//error(403);
|
||||||
|
@ -349,7 +349,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">
|
<td class="label">
|
||||||
<a href="javascript:Load('<?=$ReportID?>')">Resolve</a>
|
<a href="javascript:Load('<?=$ReportID?>')" title="Click here to reset the resolution options to their default values.">Resolve</a>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<select name="resolve_type" id="resolve_type<?=$ReportID?>" onchange="ChangeResolve(<?=$ReportID?>)">
|
<select name="resolve_type" id="resolve_type<?=$ReportID?>" onchange="ChangeResolve(<?=$ReportID?>)">
|
||||||
@ -369,7 +369,7 @@
|
|||||||
<span id="options<?=$ReportID?>">
|
<span id="options<?=$ReportID?>">
|
||||||
<? if(check_perms('users_mod')) { ?>
|
<? if(check_perms('users_mod')) { ?>
|
||||||
<span title="Delete torrent?">
|
<span title="Delete torrent?">
|
||||||
<strong>Delete</strong>
|
<label for="delete<?=$ReportID?>"><strong>Delete</strong></label>
|
||||||
<input type="checkbox" name="delete" id="delete<?=$ReportID?>" />
|
<input type="checkbox" name="delete" id="delete<?=$ReportID?>" />
|
||||||
</span>
|
</span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
@ -386,7 +386,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<span title="Remove upload privileges?">
|
<span title="Remove upload privileges?">
|
||||||
<strong>Upload</strong>
|
<label for="upload<?=$ReportID?>"><strong>Remove upload privileges</strong></label>
|
||||||
<input type="checkbox" name="upload" id="upload<?=$ReportID?>" />
|
<input type="checkbox" name="upload" id="upload<?=$ReportID?>" />
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@ -431,9 +431,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="4" style="text-align: center;">
|
<td colspan="4" style="text-align: center;">
|
||||||
<input type="button" value="Invalidate report" onclick="Dismiss(<?=$ReportID?>);" />
|
<input type="button" value="Invalidate report" onclick="Dismiss(<?=$ReportID?>);" />
|
||||||
<input type="button" value="Report resolved manually" onclick="ManualResolve(<?=$ReportID?>);" />
|
<input type="button" value="Resolve report manually" onclick="ManualResolve(<?=$ReportID?>);" />
|
||||||
| <input type="button" value="Give back" onclick="GiveBack(<?=$ReportID?>);" />
|
| <input type="button" value="Give back" onclick="GiveBack(<?=$ReportID?>);" />
|
||||||
| <input id="grab<?=$ReportID?>" type="button" value="Grab!" onclick="Grab(<?=$ReportID?>);" />
|
| <input id="grab<?=$ReportID?>" type="button" value="Claim" onclick="Grab(<?=$ReportID?>);" />
|
||||||
| Multi-resolve <input type="checkbox" name="multi" id="multi<?=$ReportID?>" checked="checked" />
|
| Multi-resolve <input type="checkbox" name="multi" id="multi<?=$ReportID?>" checked="checked" />
|
||||||
| <input type="button" value="Submit" onclick="TakeResolve(<?=$ReportID?>);" />
|
| <input type="button" value="Submit" onclick="TakeResolve(<?=$ReportID?>);" />
|
||||||
</td>
|
</td>
|
||||||
|
@ -196,7 +196,7 @@
|
|||||||
<div class="buttonbox thin center">
|
<div class="buttonbox thin center">
|
||||||
<? if($View != "resolved") { ?>
|
<? if($View != "resolved") { ?>
|
||||||
<span title="Resolves *all* checked reports with their respective resolutions"><input type="button" onclick="MultiResolve();" value="Multi-resolve" /></span>
|
<span title="Resolves *all* checked reports with their respective resolutions"><input type="button" onclick="MultiResolve();" value="Multi-resolve" /></span>
|
||||||
<span title="Assigns all of the reports on the page to you!"><input type="button" onclick="Grab();" value="Grab all" /></span>
|
<span title="Assigns all of the reports on the page to you!"><input type="button" onclick="Grab();" value="Claim all" /></span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<? if($View == "staff" && $LoggedUser['ID'] == $ID) { ?>| <span title="Un-'in progress' all the reports currently displayed"><input type="button" onclick="GiveBack();" value="Give back all" /></span><? } ?>
|
<? if($View == "staff" && $LoggedUser['ID'] == $ID) { ?>| <span title="Un-'in progress' all the reports currently displayed"><input type="button" onclick="GiveBack();" value="Give back all" /></span><? } ?>
|
||||||
</div>
|
</div>
|
||||||
@ -508,7 +508,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">
|
<td class="label">
|
||||||
<a href="javascript:Load('<?=$ReportID?>')">Resolve</a>
|
<a href="javascript:Load('<?=$ReportID?>')" title="Click here to reset the resolution options to their default values.">Resolve</a>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<select name="resolve_type" id="resolve_type<?=$ReportID?>" onchange="ChangeResolve(<?=$ReportID?>)">
|
<select name="resolve_type" id="resolve_type<?=$ReportID?>" onchange="ChangeResolve(<?=$ReportID?>)">
|
||||||
@ -528,7 +528,7 @@
|
|||||||
<span id="options<?=$ReportID?>">
|
<span id="options<?=$ReportID?>">
|
||||||
<? if(check_perms('users_mod')) { ?>
|
<? if(check_perms('users_mod')) { ?>
|
||||||
<span title="Delete torrent?">
|
<span title="Delete torrent?">
|
||||||
<strong>Delete</strong>
|
<label for="delete<?=$ReportID?>"><strong>Delete</strong></label>
|
||||||
<input type="checkbox" name="delete" id="delete<?=$ReportID?>" />
|
<input type="checkbox" name="delete" id="delete<?=$ReportID?>" />
|
||||||
</span>
|
</span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
@ -545,7 +545,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<span title="Remove upload privileges?">
|
<span title="Remove upload privileges?">
|
||||||
<strong>Upload</strong>
|
<label for="upload<?=$ReportID?>"><strong>Remove upload privileges</strong></label>
|
||||||
<input type="checkbox" name="upload" id="upload<?=$ReportID?>" />
|
<input type="checkbox" name="upload" id="upload<?=$ReportID?>" />
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@ -590,11 +590,11 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="4" style="text-align: center;">
|
<td colspan="4" style="text-align: center;">
|
||||||
<input type="button" value="Invalidate report" onclick="Dismiss(<?=$ReportID?>);" />
|
<input type="button" value="Invalidate report" onclick="Dismiss(<?=$ReportID?>);" />
|
||||||
<input type="button" value="Report resolved manually" onclick="ManualResolve(<?=$ReportID?>);" />
|
<input type="button" value="Resolve report manually" onclick="ManualResolve(<?=$ReportID?>);" />
|
||||||
<? if($Status == "InProgress" && $LoggedUser['ID'] == $ResolverID) { ?>
|
<? if($Status == "InProgress" && $LoggedUser['ID'] == $ResolverID) { ?>
|
||||||
| <input type="button" value="Give back" onclick="GiveBack(<?=$ReportID?>);" />
|
| <input type="button" value="Give back" onclick="GiveBack(<?=$ReportID?>);" />
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
| <input id="grab<?=$ReportID?>" type="button" value="Grab!" onclick="Grab(<?=$ReportID?>);" />
|
| <input id="grab<?=$ReportID?>" type="button" value="Claim" onclick="Grab(<?=$ReportID?>);" />
|
||||||
<? } ?>
|
<? } ?>
|
||||||
| Multi-resolve <input type="checkbox" name="multi" id="multi<?=$ReportID?>" checked="checked" />
|
| Multi-resolve <input type="checkbox" name="multi" id="multi<?=$ReportID?>" checked="checked" />
|
||||||
| <input type="button" id="submit_<?=$ReportID?>" value="Submit" onclick="TakeResolve(<?=$ReportID?>);" />
|
| <input type="button" id="submit_<?=$ReportID?>" value="Submit" onclick="TakeResolve(<?=$ReportID?>);" />
|
||||||
@ -630,7 +630,7 @@
|
|||||||
<? if($GroupID) { ?>
|
<? if($GroupID) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4" style="text-align: center;">
|
<td colspan="4" style="text-align: center;">
|
||||||
<input id="grab<?=$ReportID?>" type="button" value="Grab!" onclick="Grab(<?=$ReportID?>);" />
|
<input id="grab<?=$ReportID?>" type="button" value="Claim" onclick="Grab(<?=$ReportID?>);" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? }
|
<? }
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
View::show_header('Reports V2!', 'reportsv2');
|
View::show_header('Reports V2!', 'reportsv2');
|
||||||
|
|
||||||
|
|
||||||
//Grab owners ID, just for examples
|
//Grab owner's ID, just for examples
|
||||||
$DB->query("SELECT ID, Username FROM users_main ORDER BY ID ASC LIMIT 1");
|
$DB->query("SELECT ID, Username FROM users_main ORDER BY ID ASC LIMIT 1");
|
||||||
list($OwnerID, $Owner) = $DB->next_record();
|
list($OwnerID, $Owner) = $DB->next_record();
|
||||||
$Owner = display_str($Owner);
|
$Owner = display_str($Owner);
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<!-- Uploading Rules -->
|
<!-- Uploading Rules -->
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h2>Uploading</h2>
|
<h2>Uploading Rules</h2>
|
||||||
</div>
|
</div>
|
||||||
<!-- Uploading Rules Index Links -->
|
<!-- Uploading Rules Index Links -->
|
||||||
<br />
|
<br />
|
||||||
@ -211,7 +211,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li id="r2.1.17"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.17">2.1.17.</a> <strong>No comedy, audiobook, or spoken word releases may be uploaded as music.</strong> These torrents must not be grouped with other formats from the same release (i.e., they need to have individual torrent pages). See <a href="#r3.2">3.2</a> and <a href="wiki.php?action=article&id=955">this wiki</a> for more information.</li>
|
<li id="r2.1.17"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.17">2.1.17.</a> <strong>No comedy, audiobook, or spoken word releases may be uploaded as music.</strong> These torrents must not be grouped with other formats from the same release (i.e., they need to have individual torrent pages). See <a href="#r3.2">3.2</a> and <a href="wiki.php?action=article&id=955">this wiki</a> for more information.</li>
|
||||||
<li id="r2.1.18"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.18">2.1.18.</a> <strong>Sound Sample Packs must be uploaded as applications.</strong> See <a href="#r4.1.9">4.1.9</a> for more information.</li>
|
<li id="r2.1.18"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.18">2.1.18.</a> <strong>Sound sample packs must be uploaded as applications.</strong> See <a href="#r4.1.9">4.1.9</a> for more information.</li>
|
||||||
<li id="r2.1.19"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.19">2.1.19.</a> <strong>All music torrents must represent a complete release, and may not be missing tracks (or discs in the case of a multi-disc release).</strong>
|
<li id="r2.1.19"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.19">2.1.19.</a> <strong>All music torrents must represent a complete release, and may not be missing tracks (or discs in the case of a multi-disc release).</strong>
|
||||||
<ul>
|
<ul>
|
||||||
<li id="r2.1.19.1"><a href="#r2.1.19"><strong>↑_</strong></a> <a href="#r2.1.19.1">2.1.19.1.</a> <strong>If an album is released as a multi-disc set (or box set) of CDs or vinyl discs, then it must be uploaded as a single torrent.</strong> Preferably, each individual CD rip in a multi-disc set should be organized in its own folder (see <a href="#r2.3.15">2.3.15</a>).</li>
|
<li id="r2.1.19.1"><a href="#r2.1.19"><strong>↑_</strong></a> <a href="#r2.1.19.1">2.1.19.1.</a> <strong>If an album is released as a multi-disc set (or box set) of CDs or vinyl discs, then it must be uploaded as a single torrent.</strong> Preferably, each individual CD rip in a multi-disc set should be organized in its own folder (see <a href="#r2.3.15">2.3.15</a>).</li>
|
||||||
@ -222,11 +222,11 @@
|
|||||||
<li id="r2.1.20"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.20">2.1.20.</a> <strong>User made discographies may not be uploaded.</strong> Multi-album torrents are not allowed on the site under any circumstances. That means no discographies, Pitchfork compilations, etc. If releases (e.g., CD singles) were never released as a bundled set, do not upload them together. Live Soundboard material should be uploaded as one torrent per night, per show, or per venue. Including more than one show in a torrent results in a multi-album torrent. Exceptions: Only official boxsets and official compilation collections can contain multiple albums.</li>
|
<li id="r2.1.20"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.20">2.1.20.</a> <strong>User made discographies may not be uploaded.</strong> Multi-album torrents are not allowed on the site under any circumstances. That means no discographies, Pitchfork compilations, etc. If releases (e.g., CD singles) were never released as a bundled set, do not upload them together. Live Soundboard material should be uploaded as one torrent per night, per show, or per venue. Including more than one show in a torrent results in a multi-album torrent. Exceptions: Only official boxsets and official compilation collections can contain multiple albums.</li>
|
||||||
<li id="r2.1.21"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.21">2.1.21.</a> <strong><a href="wiki.php?action=article&id=386">Pre-emphasis</a> is allowed in lossless torrents only.</strong> Lossless FLAC torrents with pre-emphasis are allowed on the site. They are allowed to coexist with lossless de-emphasized torrents (both in their separate album edition groups). In contrast, lossy formats may not have pre-emphasis and will be deleted if uploaded.</li>
|
<li id="r2.1.21"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.21">2.1.21.</a> <strong><a href="wiki.php?action=article&id=386">Pre-emphasis</a> is allowed in lossless torrents only.</strong> Lossless FLAC torrents with pre-emphasis are allowed on the site. They are allowed to coexist with lossless de-emphasized torrents (both in their separate album edition groups). In contrast, lossy formats may not have pre-emphasis and will be deleted if uploaded.</li>
|
||||||
<li id="r2.1.22"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.22">2.1.22.</a> <strong>Edition Information must be provided for digitally-sourced torrents.</strong> Digitally-sourced (including CD-sourced) rips of albums that were first released before the availability of their source medium must have accurate edition information. For example, if a CD rip is of an album whose original release date was 1957, predating the creation and distribution of CDs, then the uploader must make note of the correct year in which the CD was pressed, and preferably note the catalog identification as well. Rips for which Edition Information cannot be provided must be marked as an "Unknown Release." Under no circumstances may you guess or feign knowledge of the Edition Information. See <a href="wiki.php?action=article&id=367">this wiki</a> for more information on album editions.</li>
|
<li id="r2.1.22"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.22">2.1.22.</a> <strong>Edition Information must be provided for digitally-sourced torrents.</strong> Digitally-sourced (including CD-sourced) rips of albums that were first released before the availability of their source medium must have accurate edition information. For example, if a CD rip is of an album whose original release date was 1957, predating the creation and distribution of CDs, then the uploader must make note of the correct year in which the CD was pressed, and preferably note the catalog identification as well. Rips for which Edition Information cannot be provided must be marked as an "Unknown Release." Under no circumstances may you guess or feign knowledge of the Edition Information. See <a href="wiki.php?action=article&id=367">this wiki</a> for more information on album editions.</li>
|
||||||
<li id="r2.1.23"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.23">2.1.23.</a> <strong>This audio layer must comply with the Redbook standard for audio data. If there is no Redbook audio on the game disc, you may not upload a rip of the disc. Be prepared to provide extensive information on any audio that is ripped from a gaming disc (see <a href="wiki.php?action=article&id=953">this wiki</a> for information about providing proofs).</strong>
|
<li id="r2.1.23"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.23">2.1.23.</a> <strong>Audio can only be ripped from a video game CD under very specific circumstances. Audio ripped from a video game DVD is not allowed on site.</strong>
|
||||||
<ul>
|
<ul>
|
||||||
<li id="r2.1.23.1"><a href="#r2.1.23"><strong>↑_</strong></a> <a href="#r2.1.23.1">2.1.23.1.</a> <strong>This audio layer must comply with the Redbook standard for audio data. </strong>f there is no Redbook audio on the game disc, you may not upload a rip of the disc. Be prepared to provide extensive information on any audio that is ripped from a gaming disc (see <a href="wiki.php?action=article&id=953">this wiki</a> for information about providing proofs).</li>
|
<li id="r2.1.23.1"><a href="#r2.1.23"><strong>↑_</strong></a> <a href="#r2.1.23.1">2.1.23.1.</a> <strong>This audio layer must comply with the Red Book standard for audio data.</strong> If there is no Red Book audio on the game disc, you may not upload a rip of the disc. Be prepared to provide extensive information on any audio that is ripped from a gaming disc (see <a href="wiki.php?action=article&id=953">this wiki</a> for information about providing proof).</li>
|
||||||
<li id="r2.1.23.2"><a href="#r2.1.23"><strong>↑_</strong></a> <a href="#r2.1.23.2">2.1.23.2.</a> <strong>The audio must meet the minimum requirements for music on the site (see <a href="#r2.1.3">2.1.3</a> and <a href="#r2.1.6">2.1.6</a>).</strong> </li>
|
<li id="r2.1.23.2"><a href="#r2.1.23"><strong>↑_</strong></a> <a href="#r2.1.23.2">2.1.23.2.</a> <strong>The audio must meet the minimum requirements for music on the site (see <a href="#r2.1.3">2.1.3</a> and <a href="#r2.1.6">2.1.6</a>).</strong> </li>
|
||||||
<li id="r2.1.23.3"><a href="#r2.1.23"><strong>↑_</strong></a> <a href="#r2.1.23.3">2.1.23.3.</a> <strong>Officially-released game soundtracks, which adhere to Redbook standards, are always allowed.</strong> </li>
|
<li id="r2.1.23.3"><a href="#r2.1.23"><strong>↑_</strong></a> <a href="#r2.1.23.3">2.1.23.3.</a> <strong>Officially-released game soundtracks, which adhere to Red Book standards, are always allowed.</strong> </li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li id="r2.1.24"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.24">2.1.24.</a> <strong>Lossy AAC torrents may only be uploaded when they represent exclusive content not currently available in any other format (e.g., an iTunes WEB exclusive release).</strong> </li>
|
<li id="r2.1.24"><a href="#h2.1"><strong>↑_</strong></a> <a href="#r2.1.24">2.1.24.</a> <strong>Lossy AAC torrents may only be uploaded when they represent exclusive content not currently available in any other format (e.g., an iTunes WEB exclusive release).</strong> </li>
|
||||||
@ -301,7 +301,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li id="r2.2.10.10"><a href="#r2.2.10"><strong>↑_</strong></a> <a href="#r2.2.10.10">2.2.10.10.</a> <strong>FLAC files must be compressed.</strong> We strongly recommend that FLAC files be compressed to Level 8. Lack of compression can increase the torrent size by 5% or more. Any torrents that have uncompressed FLAC files may be reported and trumped.</li>
|
<li id="r2.2.10.10"><a href="#r2.2.10"><strong>↑_</strong></a> <a href="#r2.2.10.10">2.2.10.10.</a> <strong>FLAC files must be compressed.</strong> We strongly recommend that FLAC files be compressed to Level 8. Lack of compression can increase the torrent size by 5% or more. Any torrents that have uncompressed FLAC files may be reported and trumped.</li>
|
||||||
<li id="r2.2.10.11"><a href="#r2.2.10"><strong>↑_</strong></a> <a href="#r2.2.10.11">2.2.10.11.</a> <strong>Any lossless formats must be encoded at the same sampling rate as their lossless source material.</strong> Lossless files from a Redbook-compliant CD rip (sampled at 44.1 kHz) can only be encoded to 44.1 kHz FLAC files for uploading in lossless torrents. Any 48 kHz lossless torrents for the same release are considered dupes. FLAC files from a WEB FLAC (sampled at 48 kHz) can only be uploaded as 48 kHz FLAC torrents. Any 44.1 kHz torrents for the same release are considered dupes. When albums are available in a number of different lossless formats (44.1 kHz, 48, kHz, 96 kHz, etc.) the first lossless torrent that is uploaded to the site may remain while all subsequent versions are considered dupes. See <a href="#r2.2.2">2.2.2</a> and <a href="#r2.2.9.13">2.2.9.13</a> for more information.</li>
|
<li id="r2.2.10.11"><a href="#r2.2.10"><strong>↑_</strong></a> <a href="#r2.2.10.11">2.2.10.11.</a> <strong>Any lossless formats must be encoded at the same sampling rate as their lossless source material.</strong> Lossless files from a Red Book-compliant CD rip (sampled at 44.1 kHz) can only be encoded to 44.1 kHz FLAC files for uploading in lossless torrents. Any 48 kHz lossless torrents for the same release are considered dupes. FLAC files from a WEB FLAC (sampled at 48 kHz) can only be uploaded as 48 kHz FLAC torrents. Any 44.1 kHz torrents for the same release are considered dupes. When albums are available in a number of different lossless formats (44.1 kHz, 48, kHz, 96 kHz, etc.) the first lossless torrent that is uploaded to the site may remain while all subsequent versions are considered dupes. See <a href="#r2.2.2">2.2.2</a> and <a href="#r2.2.9.13">2.2.9.13</a> for more information.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li id="r2.2.11"><a href="#h2.2"><strong>↑_</strong></a> <a href="#r2.2.11">2.2.11.</a> <strong>Editions and Releases rules</strong>
|
<li id="r2.2.11"><a href="#h2.2"><strong>↑_</strong></a> <a href="#r2.2.11">2.2.11.</a> <strong>Editions and Releases rules</strong>
|
||||||
@ -500,7 +500,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li id="r2.8.5.1"><a href="#r2.8.5"><strong>↑_</strong></a> <a href="#r2.8.5.1">2.8.5.1.</a> <strong> A multichannel lossless rip must have the same number of and arrangement of channels as the source media.</strong> In addition, the rip must be encoded at the same bit depth and sampling rate as the original stream. Downsampled versions of the original source material may be trumped by a torrent containing audio files ripped directly from the disc at the bit depth and sampling rate originally found on disc. For example, there is a 192 kHz track and a 44.1 kHz track on the SACD. A user uploads only the 192 kHz track and that source is subsequently downsampled to 44.1 kHz. Another user who rips the actual 44.1 kHz track from the original disc may trump the downsampled torrent.</li>
|
<li id="r2.8.5.1"><a href="#r2.8.5"><strong>↑_</strong></a> <a href="#r2.8.5.1">2.8.5.1.</a> <strong> A multichannel lossless rip must have the same number of and arrangement of channels as the source media.</strong> In addition, the rip must be encoded at the same bit depth and sampling rate as the original stream. Downsampled versions of the original source material may be trumped by a torrent containing audio files ripped directly from the disc at the bit depth and sampling rate originally found on disc. For example, there is a 192 kHz track and a 44.1 kHz track on the SACD. A user uploads only the 192 kHz track and that source is subsequently downsampled to 44.1 kHz. Another user who rips the actual 44.1 kHz track from the original disc may trump the downsampled torrent.</li>
|
||||||
<li id="r2.8.5.2"><a href="#r2.8.5"><strong>↑_</strong></a> <a href="#r2.8.5.2">2.8.5.2.</a> <strong>Downmixing of SACD sources is prohibited.</strong> Do not downmix a 5.1 (or higher) channel mix to stereo and upload the resulting audio files. You may still downconvert lossless audio sources from 24-bit to 16-bit.</li>
|
<li id="r2.8.5.2"><a href="#r2.8.5"><strong>↑_</strong></a> <a href="#r2.8.5.2">2.8.5.2.</a> <strong>Downmixing of SACD sources is prohibited.</strong> Do not downmix a 5.1 (or higher) channel mix to stereo and upload the resulting audio files. You may still downconvert lossless audio sources from 24-bit to 16-bit.</li>
|
||||||
<li id="r2.8.5.3"><a href="#r2.8.5"><strong>↑_</strong></a> <a href="#r2.8.5.3">2.8.5.3.</a> <strong> All lossy SACD torrents must be uploaded in a Redbook-compliant form.</strong> Any stereo lossless sources must be downconverted to 16 bits and downsampled to 44.1 kHz before they are transcoded to lossy MP3 formats. No other bit depth or sampling rate is allowed for lossy SACD torrents.</li>
|
<li id="r2.8.5.3"><a href="#r2.8.5"><strong>↑_</strong></a> <a href="#r2.8.5.3">2.8.5.3.</a> <strong> All lossy SACD torrents must be uploaded in a Red Book-compliant form.</strong> Any stereo lossless sources must be downconverted to 16 bits and downsampled to 44.1 kHz before they are transcoded to lossy MP3 formats. No other bit depth or sampling rate is allowed for lossy SACD torrents.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -526,7 +526,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li id="r2.9.5.1"><a href="#r2.9.5"><strong>↑_</strong></a> <a href="#r2.9.5.1">2.9.5.1.</a> <strong> A multichannel lossless rip must have the same number of and arrangement of channels as the source media.</strong> In addition, the rip must be encoded at the same bit depth and sampling rate as the original stream. Downsampled versions of the original source material may be trumped by a torrent containing audio files ripped directly from the disc at the bit depth and sampling rate originally found on disc. For example, there is a 96 kHz track and a 44.1 kHz track on the Blu-ray disc. A user uploads only the 96 kHz track and that source is subsequently downsampled to 44.1 kHz. Another user who rips the actual 44.1 kHz track from the original disc may trump the downsampled torrent.</li>
|
<li id="r2.9.5.1"><a href="#r2.9.5"><strong>↑_</strong></a> <a href="#r2.9.5.1">2.9.5.1.</a> <strong> A multichannel lossless rip must have the same number of and arrangement of channels as the source media.</strong> In addition, the rip must be encoded at the same bit depth and sampling rate as the original stream. Downsampled versions of the original source material may be trumped by a torrent containing audio files ripped directly from the disc at the bit depth and sampling rate originally found on disc. For example, there is a 96 kHz track and a 44.1 kHz track on the Blu-ray disc. A user uploads only the 96 kHz track and that source is subsequently downsampled to 44.1 kHz. Another user who rips the actual 44.1 kHz track from the original disc may trump the downsampled torrent.</li>
|
||||||
<li id="r2.9.5.2"><a href="#r2.9.5"><strong>↑_</strong></a> <a href="#r2.9.5.2">2.9.5.2.</a> <strong> Downmixing of Blu-ray sources is prohibited.</strong> Do not downmix a 5.1 (or higher) channel mix to stereo and upload the resulting audio files. You may still downconvert lossless audio sources from 24-bit to 16-bit.</li>
|
<li id="r2.9.5.2"><a href="#r2.9.5"><strong>↑_</strong></a> <a href="#r2.9.5.2">2.9.5.2.</a> <strong> Downmixing of Blu-ray sources is prohibited.</strong> Do not downmix a 5.1 (or higher) channel mix to stereo and upload the resulting audio files. You may still downconvert lossless audio sources from 24-bit to 16-bit.</li>
|
||||||
<li id="r2.9.5.3"><a href="#r2.9.5"><strong>↑_</strong></a> <a href="#r2.9.5.3">2.9.5.3.</a> <strong> All lossy Blu-ray torrents must be uploaded in a Redbook-compliant form.</strong> Any stereo lossless sources must be downconverted to 16 bits and downsampled to 44.1 kHz before they are transcoded to lossy MP3 formats. No other bit depth or sampling rate is allowed for lossy Blu-ray torrents.</li>
|
<li id="r2.9.5.3"><a href="#r2.9.5"><strong>↑_</strong></a> <a href="#r2.9.5.3">2.9.5.3.</a> <strong> All lossy Blu-ray torrents must be uploaded in a Red Book-compliant form.</strong> Any stereo lossless sources must be downconverted to 16 bits and downsampled to 44.1 kHz before they are transcoded to lossy MP3 formats. No other bit depth or sampling rate is allowed for lossy Blu-ray torrents.</li>
|
||||||
<li id="r2.9.5.4"><a href="#r2.9.5"><strong>↑_</strong></a> <a href="#r2.9.5.4">2.9.5.4.</a> <strong> Do not downsample, downmix, transcode or otherwise manipulate any lossy Blu-ray format (e.g., Dolby Digital (AC3), DTS, Dolby Digital Plus (AC3), and DTS-HD).</strong> </li>
|
<li id="r2.9.5.4"><a href="#r2.9.5"><strong>↑_</strong></a> <a href="#r2.9.5.4">2.9.5.4.</a> <strong> Do not downsample, downmix, transcode or otherwise manipulate any lossy Blu-ray format (e.g., Dolby Digital (AC3), DTS, Dolby Digital Plus (AC3), and DTS-HD).</strong> </li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
@ -1,149 +0,0 @@
|
|||||||
<?
|
|
||||||
// skipfile
|
|
||||||
if (!check_perms('users_mod') && !check_perms("site_mark_suggestions")) {
|
|
||||||
error(403);
|
|
||||||
}
|
|
||||||
|
|
||||||
View::show_header('Suggestions');
|
|
||||||
|
|
||||||
$Categories = array(
|
|
||||||
"Dupe Suggestion",
|
|
||||||
"Already Implemented",
|
|
||||||
"Already Rejected Suggestion/Against The Rules",
|
|
||||||
"Awful Suggestion",
|
|
||||||
"Suggestion",
|
|
||||||
"Approved Suggestion"
|
|
||||||
)?>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Suggestions</h2>
|
|
||||||
|
|
||||||
<div class="linkbox">
|
|
||||||
<a href="tools.php?action=suggestions&view=scoreboard" class="brackets">Scoreboard</a>
|
|
||||||
<a href="tools.php?action=suggestions&view=marked" class="brackets">Open suggestions</a>
|
|
||||||
<a href="tools.php?action=suggestions&view=marked&closed=1" class="brackets">Closed suggestions</a>
|
|
||||||
<a href="tools.php?action=suggestions&view=marked&all=1" class="brackets">All suggestions</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?if($_GET['view'] == "scoreboard" || empty($_GET['view'])) { ?>
|
|
||||||
<div id="marked_suggestion">
|
|
||||||
<h3>Marked</h3>
|
|
||||||
<table>
|
|
||||||
<tr class="colhead">
|
|
||||||
<td>Username</td>
|
|
||||||
<td>Count</td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
$DB->query("SELECT
|
|
||||||
s.UserID, count(s.ThreadID) AS C
|
|
||||||
FROM marked_suggestions AS s
|
|
||||||
GROUP BY s.UserID ORDER BY c DESC LIMIT 15");
|
|
||||||
$Row = 'b';
|
|
||||||
while ( list ($UserID, $Count) = $DB->next_record() ) {
|
|
||||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
|
||||||
?>
|
|
||||||
<tr class="row<?=$Row?>">
|
|
||||||
<td><?=Users::format_username($UserID)?></td>
|
|
||||||
<td><?=number_format($Count)?></td>
|
|
||||||
</tr>
|
|
||||||
<? }?>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div id="implemented_suggestion">
|
|
||||||
<h3>Implemented</h3>
|
|
||||||
<table>
|
|
||||||
<tr class="colhead">
|
|
||||||
<td>Username</td>
|
|
||||||
<td>Count</td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
$DB->query("SELECT
|
|
||||||
LastPostAuthorID, count(LastPostAuthorID) AS C
|
|
||||||
FROM forums_topics AS f
|
|
||||||
WHERE ForumID = 63 AND f.Title LIKE '[implemented]%'
|
|
||||||
GROUP BY LastPostAuthorID ORDER BY c DESC LIMIT 15");
|
|
||||||
$Row = 'b';
|
|
||||||
while ( list ($UserID, $Count) = $DB->next_record() ) {
|
|
||||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
|
||||||
?>
|
|
||||||
<tr class="row<?=$Row?>">
|
|
||||||
<td><?=Users::format_username($UserID)?></td>
|
|
||||||
<td><?=number_format($Count)?></td>
|
|
||||||
</tr>
|
|
||||||
<? }?>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div id="rejected_suggestion">
|
|
||||||
<h3>Rejected</h3>
|
|
||||||
<table>
|
|
||||||
<tr class="colhead">
|
|
||||||
<td>Username</td>
|
|
||||||
<td>Count</td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
$DB->query("SELECT
|
|
||||||
LastPostAuthorID, count(LastPostAuthorID) AS C
|
|
||||||
FROM forums_topics AS f
|
|
||||||
WHERE ForumID = 63 AND f.Title LIKE '[rejected]%'
|
|
||||||
GROUP BY LastPostAuthorID ORDER BY c DESC LIMIT 15");
|
|
||||||
$Row = 'b';
|
|
||||||
while ( list ($UserID, $Count) = $DB->next_record() ) {
|
|
||||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
|
||||||
?>
|
|
||||||
<tr class="row<?=$Row?>">
|
|
||||||
<td><?=Users::format_username($UserID)?></td>
|
|
||||||
<td><?=number_format($Count)?></td>
|
|
||||||
</tr>
|
|
||||||
<? }?>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
elseif ($_GET['view'] == "marked") {
|
|
||||||
if(((int) $_GET['all']) == 1) {
|
|
||||||
$Forums = "9, 63, 13";
|
|
||||||
} elseif(((int) $_GET['closed']) == 1) {
|
|
||||||
$Forums = "63, 13";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$Forums = 9;
|
|
||||||
}
|
|
||||||
foreach ($Categories as $Key => $Value) {
|
|
||||||
$DB->query("SELECT
|
|
||||||
f.Title, s.ThreadID, s.URL, s.UserID, s.Notes
|
|
||||||
FROM marked_suggestions AS s
|
|
||||||
LEFT JOIN forums_topics AS f ON s.ThreadID = f.ID
|
|
||||||
WHERE f.ForumID IN ($Forums) AND s.Category = $Key
|
|
||||||
ORDER BY f.Title ASC");
|
|
||||||
?>
|
|
||||||
<h3><a href="#" onclick="$('#category_<?=$Key?>').toggle();"><?=$Value?></a> (<?=$DB->record_count()?>)</h3>
|
|
||||||
<div class="hidden" id="category_<?=$Key?>">
|
|
||||||
<table>
|
|
||||||
<tr class="colhead">
|
|
||||||
<td>Thread title</td>
|
|
||||||
<td>Username</td>
|
|
||||||
<td>Links</td>
|
|
||||||
<td>Notes</td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
$Row = 'b';
|
|
||||||
while ( list ($Title, $ThreadID, $URL, $UserID, $Notes) = $DB->next_record() ) {
|
|
||||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
|
||||||
?>
|
|
||||||
<tr class="row<?=$Row?>">
|
|
||||||
<td><a href="forums.php?action=viewthread&threadid=<?=$ThreadID?>"><?=$Title?></a></td>
|
|
||||||
<td><?=Users::format_username($UserID)?></td>
|
|
||||||
<td><a href="<?=$URL?>"><?=$URL?></a></td>
|
|
||||||
<td><?=$Notes?></td>
|
|
||||||
</tr>
|
|
||||||
<? }?>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?
|
|
||||||
|
|
||||||
View::show_footer();
|
|
||||||
?>
|
|
@ -80,7 +80,7 @@ function compare($X, $Y){
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
// Start output
|
// Start output
|
||||||
View::show_header($Title,'jquery,browse,comments,torrent,bbcode');
|
View::show_header($Title,'jquery,browse,comments,torrent,bbcode,recommend');
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
@ -99,6 +99,9 @@ function compare($X, $Y){
|
|||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark brackets" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a>
|
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark brackets" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a>
|
||||||
<? }
|
<? }
|
||||||
|
?>
|
||||||
|
<a href="#" id="recommend" class="brackets">Recommend</a>
|
||||||
|
<?
|
||||||
if($Categories[$GroupCategoryID-1] == 'Music') { ?>
|
if($Categories[$GroupCategoryID-1] == 'Music') { ?>
|
||||||
<a href="upload.php?groupid=<?=$GroupID?>" class="brackets">Add format</a>
|
<a href="upload.php?groupid=<?=$GroupID?>" class="brackets">Add format</a>
|
||||||
<? }
|
<? }
|
||||||
@ -108,6 +111,7 @@ function compare($X, $Y){
|
|||||||
<a href="torrents.php?action=grouplog&groupid=<?=$GroupID?>" class="brackets">View log</a>
|
<a href="torrents.php?action=grouplog&groupid=<?=$GroupID?>" class="brackets">View log</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<? Misc::display_recommend($GroupID, "torrent"); ?>
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="box box_image box_image_albumart box_albumart"><!-- .box_albumart deprecated -->
|
<div class="box box_image box_image_albumart box_albumart"><!-- .box_albumart deprecated -->
|
||||||
<div class="head"><strong>Cover</strong></div>
|
<div class="head"><strong>Cover</strong></div>
|
||||||
|
@ -66,6 +66,12 @@ function checked($Checked) {
|
|||||||
$LastFMUsername = "";
|
$LastFMUsername = "";
|
||||||
list($LastFMUsername) = $DB->next_record();
|
list($LastFMUsername) = $DB->next_record();
|
||||||
|
|
||||||
|
$DB->query("SELECT Enable FROM users_enable_recommendations WHERE ID = '$UserID' AND Enable = 1");
|
||||||
|
if($DB->record_count() > 0) {
|
||||||
|
$RecommendationsEnabled = "value='1' checked='checked'";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
echo $Val->GenerateJS('userform');
|
echo $Val->GenerateJS('userform');
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
@ -258,6 +264,13 @@ function checked($Checked) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
<tr>
|
||||||
|
<td class="label"><strong>Torrent Recommendations</strong></td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="torrent_recommendations" id="torrent_recommendations" <?=$RecommendationsEnabled?> />
|
||||||
|
<label for="torrent_recommendations">Allow people to send you torrent recommendations.</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label"><strong>Auto-save text</strong></td>
|
<td class="label"><strong>Auto-save text</strong></td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -248,6 +248,24 @@
|
|||||||
$DB->query("INSERT INTO lastfm_users (ID, Username) VALUES ('$UserID', '$LastFMUsername')");
|
$DB->query("INSERT INTO lastfm_users (ID, Username) VALUES ('$UserID', '$LastFMUsername')");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$RecommendationsEnabled = $_POST['torrent_recommendations'];
|
||||||
|
|
||||||
|
// Make sure user has recommentations enabled before removing them.
|
||||||
|
if($RecommendationsEnabled == 'on') {
|
||||||
|
$DB->query("INSERT INTO
|
||||||
|
users_enable_recommendations
|
||||||
|
(ID, Enable) VALUES ('$UserID', '1')
|
||||||
|
ON DUPLICATE KEY UPDATE Enable = '1'");
|
||||||
|
} else {
|
||||||
|
$DB->query("SELECT Enable FROM users_enable_recommendations WHERE ID = '$UserID' AND Enable = 1");
|
||||||
|
if($DB->record_count() > 0) {
|
||||||
|
$DB->query("INSERT INTO
|
||||||
|
users_enable_recommendations
|
||||||
|
(ID, Enable) VALUES ('$UserID', '0')
|
||||||
|
ON DUPLICATE KEY UPDATE Enable = '0'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Information on how the user likes to download torrents is stored in cache
|
// Information on how the user likes to download torrents is stored in cache
|
||||||
if($DownloadAlt != $LoggedUser['DownloadAlt']) {
|
if($DownloadAlt != $LoggedUser['DownloadAlt']) {
|
||||||
$Cache->delete_value('user_'.$LoggedUser['torrent_pass']);
|
$Cache->delete_value('user_'.$LoggedUser['torrent_pass']);
|
||||||
|
@ -1,60 +0,0 @@
|
|||||||
//skipfile
|
|
||||||
function SetDate() {
|
|
||||||
var amount = $('#amount').raw().value;
|
|
||||||
var denom = $('#denomination').raw().value;
|
|
||||||
switch(denom) {
|
|
||||||
case 'months' :
|
|
||||||
amount *= 4.33333;
|
|
||||||
case 'weeks' :
|
|
||||||
amount *= 7;
|
|
||||||
case 'days' :
|
|
||||||
amount *= 24;
|
|
||||||
case 'hours' :
|
|
||||||
amount *= 60;
|
|
||||||
case 'minutes' :
|
|
||||||
amount *= 60;
|
|
||||||
amount *= 1000; //millis
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
var d = new Date;
|
|
||||||
d.setTime(d.getTime() + amount + (d.getTimezoneOffset() * 60 * 1000));
|
|
||||||
|
|
||||||
//YYYY-MM-DD HH:MM:SS
|
|
||||||
var out = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + " " + d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();
|
|
||||||
|
|
||||||
$('#date').raw().value = out;
|
|
||||||
}
|
|
||||||
|
|
||||||
function AddOption() {
|
|
||||||
var list = document.createElement("li");
|
|
||||||
var effects = document.createElement("select");
|
|
||||||
effects.name = "delay_effect[]";
|
|
||||||
|
|
||||||
var enable = document.createElement("option");
|
|
||||||
enable.value = "1";
|
|
||||||
enable.innerHTML = "Enable";
|
|
||||||
effects.appendChild(enable);
|
|
||||||
|
|
||||||
var disable = document.createElement("option");
|
|
||||||
disable.value = "0";
|
|
||||||
disable.innerHTML = "Disable";
|
|
||||||
effects.appendChild(disable);
|
|
||||||
list.appendChild(effects);
|
|
||||||
|
|
||||||
list.innerHTML += " ";
|
|
||||||
|
|
||||||
var options = json.decode($('#delays_json').raw().value);
|
|
||||||
var delays = document.createElement("select");
|
|
||||||
delays.name = "delay[]";
|
|
||||||
for(var option in options) {
|
|
||||||
var delay = document.createElement("option");
|
|
||||||
delay.value = option;
|
|
||||||
delay.innerHTML = options[option][0].long;
|
|
||||||
delays.appendChild(delay);
|
|
||||||
}
|
|
||||||
list.appendChild(delays);
|
|
||||||
|
|
||||||
|
|
||||||
$('#delays_list').raw().appendChild(list);
|
|
||||||
}
|
|
73
static/functions/recommend.js
Normal file
73
static/functions/recommend.js
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
(function($) {
|
||||||
|
var sent = new Array();
|
||||||
|
var loaded = false;
|
||||||
|
var type;
|
||||||
|
var id;
|
||||||
|
$(document).ready(function() {
|
||||||
|
type = $("#recommendation_div").data('type');
|
||||||
|
id = $("#recommendation_div").data('id');
|
||||||
|
$("#recommend").click(function() {
|
||||||
|
$("#recommendation_div").slideToggle(150);
|
||||||
|
if(!loaded) {
|
||||||
|
$("#recommendation_status").html("Loading...");
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "ajax.php?action=get_friends",
|
||||||
|
dataType : "json",
|
||||||
|
success : function(response) {
|
||||||
|
$.each(response, function(key, value) {
|
||||||
|
var id = value['FriendID'];
|
||||||
|
var friend = value['Username'];
|
||||||
|
$("#friend").append($("<option></option>").attr("value", id).text(friend));
|
||||||
|
});
|
||||||
|
loaded = true;
|
||||||
|
$("#recommendation_status").html("<br />");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#friend").change(function() {
|
||||||
|
var friend = $("select#friend").val();
|
||||||
|
if (friend == 0) {
|
||||||
|
$("#send_recommendation").attr("disabled", "disabled");
|
||||||
|
} else if ($.inArray(friend, sent) == -1) {
|
||||||
|
$("#send_recommendation").removeAttr("disabled");
|
||||||
|
}
|
||||||
|
$("#recommendation_status").html("<br />");
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#send_recommendation").click(function() {
|
||||||
|
send_recommendation();
|
||||||
|
});
|
||||||
|
$("#recommendation_note").keypress(function(e) {
|
||||||
|
state = $("#send_recommendation").attr("disabled");
|
||||||
|
if (typeof state === 'undefined' && e.keyCode == 13)
|
||||||
|
{
|
||||||
|
e.preventDefault();
|
||||||
|
send_recommendation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
function send_recommendation() {
|
||||||
|
var friend = $("select#friend").val();
|
||||||
|
var note = $("#recommendation_note").val();
|
||||||
|
if (friend != 0) {
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
dataType : "json",
|
||||||
|
url : "ajax.php?action=send_recommendation",
|
||||||
|
data : {
|
||||||
|
"friend" : friend,
|
||||||
|
"note" : note,
|
||||||
|
"type" : type,
|
||||||
|
"id" : id
|
||||||
|
}
|
||||||
|
}).done(function(response) {
|
||||||
|
$("#recommendation_status").html("<strong>" + response['response'] + "</strong>");
|
||||||
|
$("#send_recommendation").attr("disabled", "disabled");
|
||||||
|
$("#recommendation_note").val("");
|
||||||
|
sent.push(friend);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}(jQuery));
|
Loading…
Reference in New Issue
Block a user