mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Empty commit
This commit is contained in:
parent
cbc1680acf
commit
fec9c0ca19
@ -1,6 +1,5 @@
|
||||
<?
|
||||
class Format
|
||||
{
|
||||
class Format {
|
||||
/**
|
||||
* Torrent Labels
|
||||
* Map a common display string to a CSS class
|
||||
@ -53,10 +52,14 @@ public static function cut_string($Str, $Length, $Hard = false, $ShowDots = true
|
||||
array_pop($DescArr);
|
||||
$CutDesc = implode(' ', $DescArr);
|
||||
}
|
||||
if ($ShowDots) { $CutDesc .= '...'; }
|
||||
if ($ShowDots) {
|
||||
$CutDesc .= '...';
|
||||
}
|
||||
} else {
|
||||
$CutDesc = mb_substr($Str, 0, $Length, 'UTF-8');
|
||||
if ($ShowDots) { $CutDesc .= '...'; }
|
||||
if ($ShowDots) {
|
||||
$CutDesc .= '...';
|
||||
}
|
||||
}
|
||||
return $CutDesc;
|
||||
} else {
|
||||
@ -96,19 +99,22 @@ public static function get_ratio_color($Ratio) {
|
||||
* @param boolean $Color if true, ratio will be coloured.
|
||||
* @return string formatted ratio HTML
|
||||
*/
|
||||
public static function get_ratio_html($Dividend, $Divisor, $Color = true)
|
||||
{
|
||||
public static function get_ratio_html($Dividend, $Divisor, $Color = true) {
|
||||
$Ratio = self::get_ratio($Dividend, $Divisor);
|
||||
|
||||
if ($Ratio === false) return '--';
|
||||
if ($Ratio === '∞') return '<span class="r99" title="Infinite">∞</span>';
|
||||
|
||||
if ($Color)
|
||||
if ($Ratio === false) {
|
||||
return '--';
|
||||
}
|
||||
if ($Ratio === '∞') {
|
||||
return '<span class="r99" title="Infinite">∞</span>';
|
||||
}
|
||||
if ($Color) {
|
||||
$Ratio = sprintf('<span class="%s" title="%s">%s</span>',
|
||||
self::get_ratio_color($Ratio),
|
||||
self::get_ratio($Dividend, $Divisor, 5),
|
||||
$Ratio
|
||||
);
|
||||
}
|
||||
|
||||
return $Ratio;
|
||||
}
|
||||
@ -120,11 +126,14 @@ public static function get_ratio_html($Dividend, $Divisor, $Color = true)
|
||||
* @param int $Decimal floor to n decimals (eg Subtract .005 to floor to 2 decimals)
|
||||
* @return boolean|string
|
||||
*/
|
||||
public function get_ratio ($Dividend, $Divisor, $Decimal = 2)
|
||||
{
|
||||
if ($Divisor == 0 && $Dividend == 0) return false;
|
||||
if ($Divisor == 0) return '∞';
|
||||
return number_format(max($Dividend/$Divisor - (0.5/pow(10, $Decimal)), 0), $Decimal);
|
||||
public function get_ratio ($Dividend, $Divisor, $Decimal = 2) {
|
||||
if ($Divisor == 0 && $Dividend == 0) {
|
||||
return false;
|
||||
}
|
||||
if ($Divisor == 0) {
|
||||
return '∞';
|
||||
}
|
||||
return number_format(max($Dividend / $Divisor - (0.5 / pow(10, $Decimal)), 0), $Decimal);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -188,8 +197,8 @@ public static function catalogue_limit($Page, $PerPage, $CatalogueSize=500) {
|
||||
return array($CatalogueID, $CatalogueLimit);
|
||||
}
|
||||
|
||||
public static function catalogue_select($Catalogue, $Page, $PerPage, $CatalogueSize=500) {
|
||||
return array_slice($Catalogue,(($PerPage*$Page-$PerPage)%$CatalogueSize),$PerPage,true);
|
||||
public static function catalogue_select($Catalogue, $Page, $PerPage, $CatalogueSize = 500) {
|
||||
return array_slice($Catalogue,(($PerPage * $Page - $PerPage) % $CatalogueSize),$PerPage,true);
|
||||
}
|
||||
|
||||
|
||||
@ -197,41 +206,41 @@ public static function catalogue_select($Catalogue, $Page, $PerPage, $CatalogueS
|
||||
* Returns a page list, given certain information about the pages.
|
||||
*
|
||||
* @param int $StartPage: The current record the page you're on starts with.
|
||||
* eg. if you're on page 2 of a forum thread with 25 posts per page, $StartPage is 25.
|
||||
* e.g. if you're on page 2 of a forum thread with 25 posts per page, $StartPage is 25.
|
||||
* If you're on page 1, $StartPage is 0.
|
||||
* @param int $TotalRecords: The total number of records in the result set.
|
||||
* eg. if you're on a forum thread with 152 posts, $TotalRecords is 152.
|
||||
* e.g. if you're on a forum thread with 152 posts, $TotalRecords is 152.
|
||||
* @param int $ItemsPerPage: Self-explanatory. The number of records shown on each page
|
||||
* eg. if there are 25 posts per forum page, $ItemsPerPage is 25.
|
||||
* e.g. if there are 25 posts per forum page, $ItemsPerPage is 25.
|
||||
* @param int $ShowPages: The number of page links that are shown.
|
||||
* eg. If there are 20 pages that exist, but $ShowPages is only 11, only 11 links will be shown.
|
||||
* e.g. If there are 20 pages that exist, but $ShowPages is only 11, only 11 links will be shown.
|
||||
* @param string $Anchor A URL fragment to attach to the links.
|
||||
* eg. '#comment12'
|
||||
* e.g. '#comment12'
|
||||
* @return A sanitized HTML page listing.
|
||||
*/
|
||||
public static function get_pages($StartPage,$TotalRecords,$ItemsPerPage,$ShowPages=11,$Anchor='') {
|
||||
public static function get_pages($StartPage, $TotalRecords, $ItemsPerPage, $ShowPages = 11, $Anchor = '') {
|
||||
global $Document, $Method, $Mobile;
|
||||
$Location = $Document.'.php';
|
||||
$StartPage = ceil($StartPage);
|
||||
$TotalPages = 0;
|
||||
if ($TotalRecords > 0) {
|
||||
$StartPage = min($StartPage, ceil($TotalRecords/$ItemsPerPage));
|
||||
$StartPage = min($StartPage, ceil($TotalRecords / $ItemsPerPage));
|
||||
|
||||
$ShowPages--;
|
||||
$TotalPages = ceil($TotalRecords/$ItemsPerPage);
|
||||
$TotalPages = ceil($TotalRecords / $ItemsPerPage);
|
||||
|
||||
if ($TotalPages > $ShowPages) {
|
||||
$StartPosition = $StartPage-round($ShowPages/2);
|
||||
$StartPosition = $StartPage - round($ShowPages / 2);
|
||||
|
||||
if ($StartPosition <= 0) {
|
||||
$StartPosition = 1;
|
||||
} else {
|
||||
if ($StartPosition >= ($TotalPages-$ShowPages)) {
|
||||
$StartPosition = $TotalPages-$ShowPages;
|
||||
if ($StartPosition >= ($TotalPages - $ShowPages)) {
|
||||
$StartPosition = $TotalPages - $ShowPages;
|
||||
}
|
||||
}
|
||||
|
||||
$StopPage = $ShowPages+$StartPosition;
|
||||
$StopPage = $ShowPages + $StartPosition;
|
||||
|
||||
} else {
|
||||
$StopPage = $TotalPages;
|
||||
@ -259,18 +268,18 @@ public static function get_pages($StartPage,$TotalRecords,$ItemsPerPage,$ShowPag
|
||||
$Pages .= '<a href="'.$Location.'?page='.$i.$QueryString.$Anchor.'">';
|
||||
}
|
||||
$Pages .= "<strong>";
|
||||
if ($i*$ItemsPerPage > $TotalRecords) {
|
||||
$Pages .= ((($i-1)*$ItemsPerPage)+1).'-'.($TotalRecords);
|
||||
if ($i * $ItemsPerPage > $TotalRecords) {
|
||||
$Pages .= ((($i - 1) * $ItemsPerPage) + 1).'-'.($TotalRecords);
|
||||
} else {
|
||||
$Pages .= ((($i-1)*$ItemsPerPage)+1).'-'.($i*$ItemsPerPage);
|
||||
$Pages .= ((($i - 1) * $ItemsPerPage) + 1).'-'.($i * $ItemsPerPage);
|
||||
}
|
||||
|
||||
$Pages .= "</strong>";
|
||||
$Pages .= '</strong>';
|
||||
if ($i != $StartPage) {
|
||||
$Pages.='</a>';
|
||||
}
|
||||
if ($i < $StopPage) {
|
||||
$Pages.=" | ";
|
||||
$Pages.=' | ';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -278,7 +287,7 @@ public static function get_pages($StartPage,$TotalRecords,$ItemsPerPage,$ShowPag
|
||||
}
|
||||
|
||||
if ($StartPage && $StartPage < $TotalPages) {
|
||||
$Pages .= ' | <a href="'.$Location.'?page='.($StartPage+1).$QueryString.$Anchor.'" class="pager_next"><strong>Next ></strong></a> ';
|
||||
$Pages .= ' | <a href="'.$Location.'?page='.($StartPage + 1).$QueryString.$Anchor.'" class="pager_next"><strong>Next ></strong></a> ';
|
||||
$Pages .= '<a href="'.$Location.'?page='.$TotalPages.$QueryString.$Anchor.'"><strong> Last >></strong></a>';
|
||||
}
|
||||
}
|
||||
@ -314,9 +323,9 @@ public static function get_size($Size, $Levels = 2) {
|
||||
*/
|
||||
public static function human_format($Number) {
|
||||
$Steps = 0;
|
||||
while($Number>=1000) {
|
||||
while ($Number >= 1000) {
|
||||
$Steps++;
|
||||
$Number=$Number/1000;
|
||||
$Number = $Number / 1000;
|
||||
}
|
||||
switch ($Steps) {
|
||||
case 0: return round($Number); break;
|
||||
@ -393,11 +402,11 @@ public static function form($Index, $Return = false) {
|
||||
* @param $Array The array the option is in, defaults to GET.
|
||||
* @return
|
||||
*/
|
||||
public static function selected($Name, $Value, $Attribute='selected', $Array = array()) {
|
||||
public static function selected($Name, $Value, $Attribute = 'selected', $Array = array()) {
|
||||
if (empty($Array)) {
|
||||
$Array = $_GET;
|
||||
}
|
||||
if (isset($Array[$Name]) && $Array[$Name]!=='') {
|
||||
if (isset($Array[$Name]) && $Array[$Name] !== '') {
|
||||
if ($Array[$Name] == $Value) {
|
||||
echo ' '.$Attribute.'="'.$Attribute.'"';
|
||||
}
|
||||
@ -468,12 +477,21 @@ public static function add_class($Target, $Tests, $ClassName, $AddAttribute, $Us
|
||||
* @return UTF-8 encoded version of $Str
|
||||
*/
|
||||
public static function make_utf8($Str) {
|
||||
if ($Str!="") {
|
||||
if (self::is_utf8($Str)) { $Encoding="UTF-8"; }
|
||||
if (empty($Encoding)) { $Encoding=mb_detect_encoding($Str,'UTF-8, ISO-8859-1'); }
|
||||
if (empty($Encoding)) { $Encoding="ISO-8859-1"; }
|
||||
if ($Encoding=="UTF-8") { return $Str; }
|
||||
else { return @mb_convert_encoding($Str,"UTF-8",$Encoding); }
|
||||
if ($Str != '') {
|
||||
if (self::is_utf8($Str)) {
|
||||
$Encoding = 'UTF-8';
|
||||
}
|
||||
if (empty($Encoding)) {
|
||||
$Encoding = mb_detect_encoding($Str,'UTF-8, ISO-8859-1');
|
||||
}
|
||||
if (empty($Encoding)) {
|
||||
$Encoding = 'ISO-8859-1';
|
||||
}
|
||||
if ($Encoding == 'UTF-8') {
|
||||
return $Str;
|
||||
} else {
|
||||
return @mb_convert_encoding($Str,'UTF-8',$Encoding);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -508,8 +526,11 @@ public static function is_utf8($Str) {
|
||||
public static function find_torrent_label_class ($text)
|
||||
{
|
||||
$index = mb_eregi_replace('(?:[^\w\d\s]+)', '', strtolower($text));
|
||||
if (isset(self::$TorrentLabels[$index])) return self::$TorrentLabels[$index];
|
||||
return self::$TorrentLabels['default'];
|
||||
if (isset(self::$TorrentLabels[$index])) {
|
||||
return self::$TorrentLabels[$index];
|
||||
} else {
|
||||
return self::$TorrentLabels['default'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -522,9 +543,11 @@ public static function find_torrent_label_class ($text)
|
||||
* @param string $class Custom CSS class
|
||||
* @return string Strong element
|
||||
*/
|
||||
public static function torrent_label ($text, $class='')
|
||||
public static function torrent_label ($text, $class = '')
|
||||
{
|
||||
if (empty($class)) $class = self::find_torrent_label_class($text);
|
||||
if (empty($class)) {
|
||||
$class = self::find_torrent_label_class($text);
|
||||
}
|
||||
return sprintf('<strong class="torrent_label %1$s" title="%2$s">%2$s</strong>',
|
||||
display_str($class), display_str($text));
|
||||
}
|
||||
@ -541,4 +564,4 @@ public static function css_category ($CategoryID = 1)
|
||||
return 'cats_' . strtolower(str_replace(array('-', ' '), '',
|
||||
$Categories[$CategoryID - 1]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -180,6 +180,7 @@ protected function listen() {
|
||||
}
|
||||
if (isset($this->DisabledUsers[$Nick[1]])) {
|
||||
$DB->query("DELETE FROM disable_list WHERE Nick = '" . $Nick[1] . "'");
|
||||
$Cache->increment_value('num_disablees', -1);
|
||||
unset($this->DisabledUsers[$Nick[1]]);
|
||||
}
|
||||
}
|
||||
@ -187,6 +188,7 @@ protected function listen() {
|
||||
if (preg_match("/:([^!]+)![^\s]* PART #what.cd-disabled/", $this->Data, $Nick)) {
|
||||
if (isset($this->DisabledUsers[$Nick[1]])) {
|
||||
$DB->query("DELETE FROM disable_list WHERE Nick = '" . $Nick[1] . "'");
|
||||
$Cache->increment_value('num_disablees', -1);
|
||||
unset($this->DisabledUsers[$Nick[1]]);
|
||||
}
|
||||
}
|
||||
@ -195,6 +197,7 @@ protected function listen() {
|
||||
$Nick = explode(" ", $Nick[0]);
|
||||
if (isset($this->DisabledUsers[$Nick[3]])) {
|
||||
$DB->query("DELETE FROM disable_list WHERE Nick = '" . $Nick[3] . "'");
|
||||
$Cache->increment_value('num_disablees', -1);
|
||||
unset($this->DisabledUsers[$Nick[3]]);
|
||||
}
|
||||
}
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
$BookmarkView = false;
|
||||
|
||||
if(empty($_GET['type'])) {
|
||||
if (empty($_GET['type'])) {
|
||||
$Title = 'Requests';
|
||||
if(!check_perms('site_see_old_requests') || empty($_GET['showall'])) {
|
||||
if (!check_perms('site_see_old_requests') || empty($_GET['showall'])) {
|
||||
$SS->set_filter('visible', array(1));
|
||||
}
|
||||
} else {
|
||||
@ -27,8 +27,8 @@
|
||||
$SS->set_filter('userid', array($LoggedUser['ID']));
|
||||
break;
|
||||
case 'voted':
|
||||
if(!empty($_GET['userid'])) {
|
||||
if(is_number($_GET['userid'])) {
|
||||
if (!empty($_GET['userid'])) {
|
||||
if (is_number($_GET['userid'])) {
|
||||
if (!check_paranoia('requestsvoted_list', $UserInfo['Paranoia'], $Perms['Class'], $_GET['userid'])) {
|
||||
print json_encode(array('status' => 'failure'));
|
||||
die();
|
||||
@ -45,7 +45,7 @@
|
||||
}
|
||||
break;
|
||||
case 'filled':
|
||||
if(empty($_GET['userid']) || !is_number($_GET['userid'])) {
|
||||
if (empty($_GET['userid']) || !is_number($_GET['userid'])) {
|
||||
print json_encode(array('status' => 'failure'));
|
||||
die();
|
||||
} else {
|
||||
@ -68,132 +68,132 @@
|
||||
}
|
||||
}
|
||||
|
||||
if($Submitted && empty($_GET['show_filled'])) {
|
||||
if ($Submitted && empty($_GET['show_filled'])) {
|
||||
$SS->set_filter('torrentid', array(0));
|
||||
}
|
||||
|
||||
if(!empty($_GET['search'])) {
|
||||
if (!empty($_GET['search'])) {
|
||||
$Words = explode(' ', $_GET['search']);
|
||||
foreach($Words as $Key => &$Word) {
|
||||
if($Word[0] == '!' && strlen($Word) > 2) {
|
||||
if(strpos($Word,'!',1) === false) {
|
||||
foreach ($Words as $Key => &$Word) {
|
||||
if ($Word[0] == '!' && strlen($Word) > 2) {
|
||||
if (strpos($Word,'!',1) === false) {
|
||||
$Word = '!'.$SS->EscapeString(substr($Word,1));
|
||||
} else {
|
||||
$Word = $SS->EscapeString($Word);
|
||||
}
|
||||
} elseif(strlen($Word) >= 2) {
|
||||
} elseif (strlen($Word) >= 2) {
|
||||
$Word = $SS->EscapeString($Word);
|
||||
} else {
|
||||
unset($Words[$Key]);
|
||||
}
|
||||
}
|
||||
if(!empty($Words)) {
|
||||
if (!empty($Words)) {
|
||||
$Queries[] = "@* ".implode(' ', $Words);
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['tags'])){
|
||||
if (!empty($_GET['tags'])){
|
||||
$Tags = explode(',', $_GET['tags']);
|
||||
$TagNames = array();
|
||||
foreach ($Tags as $Tag) {
|
||||
$Tag = Misc::sanitize_tag($Tag);
|
||||
if(!empty($Tag)) {
|
||||
if (!empty($Tag)) {
|
||||
$TagNames[] = $Tag;
|
||||
}
|
||||
}
|
||||
$Tags = Misc::get_tags($TagNames);
|
||||
}
|
||||
|
||||
if(empty($_GET['tags_type']) && !empty($Tags)) {
|
||||
if (empty($_GET['tags_type']) && !empty($Tags)) {
|
||||
$_GET['tags_type'] = '0';
|
||||
$SS->set_filter('tagid', array_keys($Tags));
|
||||
} elseif(!empty($Tags)) {
|
||||
foreach(array_keys($Tags) as $Tag) {
|
||||
} elseif (!empty($Tags)) {
|
||||
foreach (array_keys($Tags) as $Tag) {
|
||||
$SS->set_filter('tagid', array($Tag));
|
||||
}
|
||||
} else {
|
||||
$_GET['tags_type'] = '1';
|
||||
}
|
||||
|
||||
if(!empty($_GET['filter_cat'])) {
|
||||
if (!empty($_GET['filter_cat'])) {
|
||||
$CategoryArray = array_keys($_GET['filter_cat']);
|
||||
if(count($CategoryArray) != count($Categories)) {
|
||||
foreach($CategoryArray as $Key => $Index) {
|
||||
if(!isset($Categories[$Index-1])) {
|
||||
if (count($CategoryArray) != count($Categories)) {
|
||||
foreach ($CategoryArray as $Key => $Index) {
|
||||
if (!isset($Categories[$Index-1])) {
|
||||
unset($CategoryArray[$Key]);
|
||||
}
|
||||
}
|
||||
if(count($CategoryArray) >= 1) {
|
||||
if (count($CategoryArray) >= 1) {
|
||||
$SS->set_filter('categoryid', $CategoryArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['releases'])) {
|
||||
if (!empty($_GET['releases'])) {
|
||||
$ReleaseArray = $_GET['releases'];
|
||||
if(count($ReleaseArray) != count($ReleaseTypes)) {
|
||||
foreach($ReleaseArray as $Index => $Value) {
|
||||
if(!isset($ReleaseTypes[$Value])) {
|
||||
if (count($ReleaseArray) != count($ReleaseTypes)) {
|
||||
foreach ($ReleaseArray as $Index => $Value) {
|
||||
if (!isset($ReleaseTypes[$Value])) {
|
||||
unset($ReleaseArray[$Index]);
|
||||
}
|
||||
}
|
||||
|
||||
if(count($ReleaseArray) >= 1) {
|
||||
if (count($ReleaseArray) >= 1) {
|
||||
$SS->set_filter('releasetype', $ReleaseArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['formats'])) {
|
||||
if (!empty($_GET['formats'])) {
|
||||
$FormatArray = $_GET['formats'];
|
||||
if(count($FormatArray) != count($Formats)) {
|
||||
if (count($FormatArray) != count($Formats)) {
|
||||
$FormatNameArray = array();
|
||||
foreach($FormatArray as $Index => $MasterIndex) {
|
||||
if(isset($Formats[$MasterIndex])) {
|
||||
foreach ($FormatArray as $Index => $MasterIndex) {
|
||||
if (isset($Formats[$MasterIndex])) {
|
||||
$FormatNameArray[$Index] = '"'.strtr($Formats[$MasterIndex], '-.', ' ').'"';
|
||||
}
|
||||
}
|
||||
|
||||
if(count($FormatNameArray) >= 1) {
|
||||
if (count($FormatNameArray) >= 1) {
|
||||
$Queries[]='@formatlist (any | '.implode(' | ', $FormatNameArray).')';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['media'])) {
|
||||
if (!empty($_GET['media'])) {
|
||||
$MediaArray = $_GET['media'];
|
||||
if(count($MediaArray) != count($Media)) {
|
||||
if (count($MediaArray) != count($Media)) {
|
||||
$MediaNameArray = array();
|
||||
foreach($MediaArray as $Index => $MasterIndex) {
|
||||
if(isset($Media[$MasterIndex])) {
|
||||
foreach ($MediaArray as $Index => $MasterIndex) {
|
||||
if (isset($Media[$MasterIndex])) {
|
||||
$MediaNameArray[$Index] = '"'.strtr($Media[$MasterIndex], '-.', ' ').'"';
|
||||
}
|
||||
}
|
||||
|
||||
if(count($MediaNameArray) >= 1) {
|
||||
if (count($MediaNameArray) >= 1) {
|
||||
$Queries[]='@medialist (any | '.implode(' | ', $MediaNameArray).')';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['bitrates'])) {
|
||||
if (!empty($_GET['bitrates'])) {
|
||||
$BitrateArray = $_GET['bitrates'];
|
||||
if(count($BitrateArray) != count($Bitrates)) {
|
||||
if (count($BitrateArray) != count($Bitrates)) {
|
||||
$BitrateNameArray = array();
|
||||
foreach($BitrateArray as $Index => $MasterIndex) {
|
||||
if(isset($Bitrates[$MasterIndex])) {
|
||||
foreach ($BitrateArray as $Index => $MasterIndex) {
|
||||
if (isset($Bitrates[$MasterIndex])) {
|
||||
$BitrateNameArray[$Index] = '"'.strtr($SS->EscapeString($Bitrates[$MasterIndex]), '-.', ' ').'"';
|
||||
}
|
||||
}
|
||||
|
||||
if(count($BitrateNameArray) >= 1) {
|
||||
if (count($BitrateNameArray) >= 1) {
|
||||
$Queries[]='@bitratelist (any | '.implode(' | ', $BitrateNameArray).')';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['requestor']) && check_perms('site_see_old_requests')) {
|
||||
if(is_number($_GET['requestor'])) {
|
||||
if (!empty($_GET['requestor']) && check_perms('site_see_old_requests')) {
|
||||
if (is_number($_GET['requestor'])) {
|
||||
$SS->set_filter('userid', array($_GET['requestor']));
|
||||
} else {
|
||||
print json_encode(array('status' => 'failure'));
|
||||
@ -201,8 +201,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_GET['year'])) {
|
||||
if(is_number($_GET['year']) || $_GET['year'] == 0) {
|
||||
if (isset($_GET['year'])) {
|
||||
if (is_number($_GET['year']) || $_GET['year'] == 0) {
|
||||
$SS->set_filter('year', array($_GET['year']));
|
||||
} else {
|
||||
print json_encode(array('status' => 'failure'));
|
||||
@ -210,7 +210,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['page']) && is_number($_GET['page']) && $_GET['page'] > 0) {
|
||||
if (!empty($_GET['page']) && is_number($_GET['page']) && $_GET['page'] > 0) {
|
||||
$Page = $_GET['page'];
|
||||
$SS->limit(($Page - 1) * REQUESTS_PER_PAGE, REQUESTS_PER_PAGE);
|
||||
} else {
|
||||
@ -218,15 +218,15 @@
|
||||
$SS->limit(0, REQUESTS_PER_PAGE);
|
||||
}
|
||||
|
||||
if(empty($_GET['order'])) {
|
||||
if (empty($_GET['order'])) {
|
||||
$CurrentOrder = 'created';
|
||||
$CurrentSort = 'desc';
|
||||
$Way = SPH_SORT_ATTR_DESC;
|
||||
$NewSort = 'asc';
|
||||
} else {
|
||||
if(in_array($_GET['order'], $OrderWays)) {
|
||||
if (in_array($_GET['order'], $OrderWays)) {
|
||||
$CurrentOrder = $_GET['order'];
|
||||
if($_GET['sort'] == 'asc' || $_GET['sort'] == 'desc') {
|
||||
if ($_GET['sort'] == 'asc' || $_GET['sort'] == 'desc') {
|
||||
$CurrentSort = $_GET['sort'];
|
||||
$Way = ($CurrentSort == 'asc' ? SPH_SORT_ATTR_ASC : SPH_SORT_ATTR_DESC);
|
||||
$NewSort = ($_GET['sort'] == 'asc' ? 'desc' : 'asc');
|
||||
@ -266,10 +266,10 @@
|
||||
//print($Way); print($OrderBy); die();
|
||||
$SS->SetSortMode($Way, $OrderBy);
|
||||
|
||||
if(count($Queries) > 0) {
|
||||
if (count($Queries) > 0) {
|
||||
$Query = implode(' ',$Queries);
|
||||
} else {
|
||||
$Query='';
|
||||
$Query = '';
|
||||
}
|
||||
|
||||
$SS->set_index('requests requests_delta');
|
||||
@ -277,19 +277,19 @@
|
||||
$NumResults = $SS->TotalResults;
|
||||
//We don't use sphinxapi's default cache searcher, we use our own functions
|
||||
|
||||
if(!empty($SphinxResults['notfound'])) {
|
||||
if (!empty($SphinxResults['notfound'])) {
|
||||
$SQLResults = Requests::get_requests($SphinxResults['notfound']);
|
||||
if(is_array($SQLResults['notfound'])) {
|
||||
if (is_array($SQLResults['notfound'])) {
|
||||
//Something wasn't found in the db, remove it from results
|
||||
reset($SQLResults['notfound']);
|
||||
foreach($SQLResults['notfound'] as $ID) {
|
||||
foreach ($SQLResults['notfound'] as $ID) {
|
||||
unset($SQLResults['matches'][$ID]);
|
||||
unset($SphinxResults['matches'][$ID]);
|
||||
}
|
||||
}
|
||||
|
||||
// Merge SQL results with memcached results
|
||||
foreach($SQLResults['matches'] as $ID => $SQLResult) {
|
||||
foreach ($SQLResults['matches'] as $ID => $SQLResult) {
|
||||
$SphinxResults['matches'][$ID] = $SQLResult;
|
||||
|
||||
//$Requests['matches'][$ID] = array_merge($Requests['matches'][$ID], $SQLResult);
|
||||
@ -328,14 +328,14 @@
|
||||
|
||||
$VoteCount = count($RequestVotes['Voters']);
|
||||
|
||||
if($CategoryID == 0) {
|
||||
if ($CategoryID == 0) {
|
||||
$CategoryName = "Unknown";
|
||||
} else {
|
||||
$CategoryName = $Categories[$CategoryID - 1];
|
||||
}
|
||||
|
||||
$JsonArtists = array();
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == "Music") {
|
||||
$ArtistForm = get_request_artists($RequestID);
|
||||
$JsonArtists = array_values($ArtistForm);
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
<?
|
||||
|
||||
|
||||
if(isset($_GET['details'])) {
|
||||
if(in_array($_GET['details'],array('ul','dl','numul','uls','dls'))) {
|
||||
if (isset($_GET['details'])) {
|
||||
if (in_array($_GET['details'],array('ul','dl','numul','uls','dls'))) {
|
||||
$Details = $_GET['details'];
|
||||
} else {
|
||||
print json_encode(array('status' => 'failure'));
|
||||
@ -16,82 +14,83 @@
|
||||
$Limit = isset($_GET['limit']) ? intval($_GET['limit']) : 10;
|
||||
$Limit = in_array($Limit, array(10,100,250)) ? $Limit : 10;
|
||||
|
||||
$BaseQuery = "SELECT
|
||||
u.ID,
|
||||
u.Username,
|
||||
ui.JoinDate,
|
||||
u.Uploaded,
|
||||
u.Downloaded,
|
||||
ABS(u.Uploaded-524288000) / (".time()." - UNIX_TIMESTAMP(ui.JoinDate)) AS UpSpeed,
|
||||
u.Downloaded / (".time()." - UNIX_TIMESTAMP(ui.JoinDate)) AS DownSpeed,
|
||||
COUNT(t.ID) AS NumUploads
|
||||
$BaseQuery = "
|
||||
SELECT
|
||||
u.ID,
|
||||
u.Username,
|
||||
ui.JoinDate,
|
||||
u.Uploaded,
|
||||
u.Downloaded,
|
||||
ABS(u.Uploaded-524288000) / (".time()." - UNIX_TIMESTAMP(ui.JoinDate)) AS UpSpeed,
|
||||
u.Downloaded / (".time()." - UNIX_TIMESTAMP(ui.JoinDate)) AS DownSpeed,
|
||||
COUNT(t.ID) AS NumUploads
|
||||
FROM users_main AS u
|
||||
JOIN users_info AS ui ON ui.UserID = u.ID
|
||||
LEFT JOIN torrents AS t ON t.UserID=u.ID
|
||||
JOIN users_info AS ui ON ui.UserID = u.ID
|
||||
LEFT JOIN torrents AS t ON t.UserID=u.ID
|
||||
WHERE u.Enabled='1'
|
||||
AND Uploaded>'". 5*1024*1024*1024 ."'
|
||||
AND Downloaded>'". 5*1024*1024*1024 ."'
|
||||
AND (Paranoia IS NULL OR (Paranoia NOT LIKE '%\"uploaded\"%' AND Paranoia NOT LIKE '%\"downloaded\"%'))
|
||||
AND Uploaded>'". 5 * 1024 * 1024 * 1024 ."'
|
||||
AND Downloaded>'". 5 * 1024 * 1024 * 1024 ."'
|
||||
AND (Paranoia IS NULL OR (Paranoia NOT LIKE '%\"uploaded\"%' AND Paranoia NOT LIKE '%\"downloaded\"%'))
|
||||
GROUP BY u.ID";
|
||||
|
||||
$OuterResults = array();
|
||||
|
||||
if($Details == 'all' || $Details == 'ul') {
|
||||
if ($Details == 'all' || $Details == 'ul') {
|
||||
if (!$TopUserUploads = $Cache->get_value('topuser_ul_'.$Limit)) {
|
||||
$DB->query("$BaseQuery ORDER BY u.Uploaded DESC LIMIT $Limit;");
|
||||
$TopUserUploads = $DB->to_array();
|
||||
$Cache->cache_value('topuser_ul_'.$Limit,$TopUserUploads,3600*12);
|
||||
$Cache->cache_value('topuser_ul_'.$Limit,$TopUserUploads,3600 * 12);
|
||||
}
|
||||
$OuterResults[] = generate_user_json('Uploaders', 'ul', $TopUserUploads, $Limit);
|
||||
}
|
||||
|
||||
if($Details == 'all' || $Details == 'dl') {
|
||||
if ($Details == 'all' || $Details == 'dl') {
|
||||
if (!$TopUserDownloads = $Cache->get_value('topuser_dl_'.$Limit)) {
|
||||
$DB->query("$BaseQuery ORDER BY u.Downloaded DESC LIMIT $Limit;");
|
||||
$TopUserDownloads = $DB->to_array();
|
||||
$Cache->cache_value('topuser_dl_'.$Limit,$TopUserDownloads,3600*12);
|
||||
$Cache->cache_value('topuser_dl_'.$Limit,$TopUserDownloads,3600 * 12);
|
||||
}
|
||||
$OuterResults[] = generate_user_json('Downloaders', 'dl', $TopUserDownloads, $Limit);
|
||||
}
|
||||
|
||||
if($Details == 'all' || $Details == 'numul') {
|
||||
if ($Details == 'all' || $Details == 'numul') {
|
||||
if (!$TopUserNumUploads = $Cache->get_value('topuser_numul_'.$Limit)) {
|
||||
$DB->query("$BaseQuery ORDER BY NumUploads DESC LIMIT $Limit;");
|
||||
$TopUserNumUploads = $DB->to_array();
|
||||
$Cache->cache_value('topuser_numul_'.$Limit,$TopUserNumUploads,3600*12);
|
||||
$Cache->cache_value('topuser_numul_'.$Limit,$TopUserNumUploads,3600 * 12);
|
||||
}
|
||||
$OuterResults[] = generate_user_json('Torrents Uploaded', 'numul', $TopUserNumUploads, $Limit);
|
||||
}
|
||||
|
||||
if($Details == 'all' || $Details == 'uls') {
|
||||
if ($Details == 'all' || $Details == 'uls') {
|
||||
if (!$TopUserUploadSpeed = $Cache->get_value('topuser_ulspeed_'.$Limit)) {
|
||||
$DB->query("$BaseQuery ORDER BY UpSpeed DESC LIMIT $Limit;");
|
||||
$TopUserUploadSpeed = $DB->to_array();
|
||||
$Cache->cache_value('topuser_ulspeed_'.$Limit,$TopUserUploadSpeed,3600*12);
|
||||
$Cache->cache_value('topuser_ulspeed_'.$Limit,$TopUserUploadSpeed,3600 * 12);
|
||||
}
|
||||
$OuterResults[] = generate_user_json('Fastest Uploaders', 'uls', $TopUserUploadSpeed, $Limit);
|
||||
}
|
||||
|
||||
if($Details == 'all' || $Details == 'dls') {
|
||||
if ($Details == 'all' || $Details == 'dls') {
|
||||
if (!$TopUserDownloadSpeed = $Cache->get_value('topuser_dlspeed_'.$Limit)) {
|
||||
$DB->query("$BaseQuery ORDER BY DownSpeed DESC LIMIT $Limit;");
|
||||
$TopUserDownloadSpeed = $DB->to_array();
|
||||
$Cache->cache_value('topuser_dlspeed_'.$Limit,$TopUserDownloadSpeed,3600*12);
|
||||
$Cache->cache_value('topuser_dlspeed_'.$Limit,$TopUserDownloadSpeed,3600 * 12);
|
||||
}
|
||||
$OuterResults[] = generate_user_json('Fastest Downloaders', 'dls', $TopUserDownloadSpeed, $Limit);
|
||||
}
|
||||
|
||||
print
|
||||
json_encode(
|
||||
array(
|
||||
'status' => 'success',
|
||||
'response' => $OuterResults
|
||||
)
|
||||
);
|
||||
json_encode(
|
||||
array(
|
||||
'status' => 'success',
|
||||
'response' => $OuterResults
|
||||
)
|
||||
);
|
||||
|
||||
function generate_user_json($Caption, $Tag, $Details, $Limit) {
|
||||
$results = array();
|
||||
foreach($Details as $Details) {
|
||||
foreach ($Details as $Details) {
|
||||
$results[] = array(
|
||||
'id' => (int) $Detail['ID'],
|
||||
'username' => $Detail['Username'],
|
||||
|
@ -1,21 +1,20 @@
|
||||
<?
|
||||
|
||||
if ($_GET['type']) {
|
||||
switch ($_GET['type']) {
|
||||
case 'posts':
|
||||
// Load post history page
|
||||
include('post_history.php');
|
||||
break;
|
||||
default:
|
||||
print json_encode(
|
||||
array('status' => 'failure')
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
print json_encode(
|
||||
array('status' => 'failure')
|
||||
);
|
||||
switch ($_GET['type']) {
|
||||
case 'posts':
|
||||
// Load post history page
|
||||
include('post_history.php');
|
||||
break;
|
||||
default:
|
||||
print json_encode(
|
||||
array('status' => 'failure')
|
||||
);
|
||||
}
|
||||
} else {
|
||||
print json_encode(
|
||||
array('status' => 'failure')
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -5,15 +5,15 @@
|
||||
*/
|
||||
|
||||
function error_out($reason = '') {
|
||||
$error = array('status' => 'failure');
|
||||
if ($reason != '')
|
||||
$error['reason'] = $reason;
|
||||
print $error;
|
||||
die();
|
||||
$error = array('status' => 'failure');
|
||||
if ($reason != '')
|
||||
$error['reason'] = $reason;
|
||||
print $error;
|
||||
die();
|
||||
}
|
||||
|
||||
if (!empty($LoggedUser['DisableForums'])) {
|
||||
error_out("You do not have access to the forums!");
|
||||
error_out('You do not have access to the forums!');
|
||||
}
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ function error_out($reason = '') {
|
||||
|
||||
$UserID = empty($_GET['userid']) ? $LoggedUser['ID'] : $_GET['userid'];
|
||||
if (!is_number($UserID)) {
|
||||
error_out("User does not exist!");
|
||||
error_out('User does not exist!');
|
||||
}
|
||||
|
||||
if (isset($LoggedUser['PostsPerPage'])) {
|
||||
@ -43,11 +43,11 @@ function error_out($reason = '') {
|
||||
i.Donor,
|
||||
i.Warned
|
||||
FROM users_main AS m
|
||||
JOIN users_info AS i ON i.UserID = m.ID
|
||||
JOIN users_info AS i ON i.UserID = m.ID
|
||||
WHERE m.ID = $UserID");
|
||||
|
||||
if ($DB->record_count() == 0){ // If user doesn't exist
|
||||
error_out("User does not exist!");
|
||||
error_out('User does not exist!');
|
||||
}
|
||||
list($Username, $Enabled, $Title, $Avatar, $Donor, $Warned) = $DB->next_record();
|
||||
} else {
|
||||
@ -67,32 +67,32 @@ function error_out($reason = '') {
|
||||
$ShowGrouped = ($ViewingOwn && (!isset($_GET['group']) || !!$_GET['group']));
|
||||
if ($ShowGrouped) {
|
||||
$sql = 'SELECT
|
||||
SQL_CALC_FOUND_ROWS
|
||||
MAX(p.ID) AS ID
|
||||
SQL_CALC_FOUND_ROWS
|
||||
MAX(p.ID) AS ID
|
||||
FROM forums_posts AS p
|
||||
LEFT JOIN forums_topics AS t ON t.ID = p.TopicID';
|
||||
LEFT JOIN forums_topics AS t ON t.ID = p.TopicID';
|
||||
if ($ShowUnread) {
|
||||
$sql.='
|
||||
LEFT JOIN forums_last_read_topics AS l ON l.TopicID = t.ID AND l.UserID = '.$LoggedUser['ID'];
|
||||
LEFT JOIN forums_last_read_topics AS l ON l.TopicID = t.ID AND l.UserID = '.$LoggedUser['ID'];
|
||||
}
|
||||
$sql .= '
|
||||
LEFT JOIN forums AS f ON f.ID = t.ForumID
|
||||
LEFT JOIN forums AS f ON f.ID = t.ForumID
|
||||
WHERE p.AuthorID = '.$UserID.'
|
||||
AND ((f.MinClassRead <= '.$LoggedUser['EffectiveClass'];
|
||||
AND ((f.MinClassRead <= '.$LoggedUser['EffectiveClass'];
|
||||
if (!empty($RestrictedForums)) {
|
||||
$sql.='
|
||||
AND f.ID NOT IN (\''.$RestrictedForums.'\')';
|
||||
AND f.ID NOT IN (\''.$RestrictedForums.'\')';
|
||||
}
|
||||
$sql .= ')';
|
||||
if (!empty($PermittedForums)) {
|
||||
$sql.='
|
||||
OR f.ID IN (\''.$PermittedForums.'\')';
|
||||
OR f.ID IN (\''.$PermittedForums.'\')';
|
||||
}
|
||||
$sql .= ')';
|
||||
if ($ShowUnread) {
|
||||
$sql .= '
|
||||
AND ((t.IsLocked=\'0\' OR t.IsSticky=\'1\')
|
||||
AND (l.PostID<t.LastPostID OR l.PostID IS NULL))';
|
||||
AND ((t.IsLocked=\'0\' OR t.IsSticky=\'1\')
|
||||
AND (l.PostID<t.LastPostID OR l.PostID IS NULL))';
|
||||
}
|
||||
$sql .= '
|
||||
GROUP BY t.ID
|
||||
@ -118,12 +118,12 @@ function error_out($reason = '') {
|
||||
t.IsLocked,
|
||||
t.IsSticky
|
||||
FROM forums_posts as p
|
||||
LEFT JOIN users_main AS um ON um.ID = p.AuthorID
|
||||
LEFT JOIN users_info AS ui ON ui.UserID = p.AuthorID
|
||||
LEFT JOIN users_main AS ed ON ed.ID = p.EditedUserID
|
||||
JOIN forums_topics AS t ON t.ID = p.TopicID
|
||||
JOIN forums AS f ON f.ID = t.ForumID
|
||||
LEFT JOIN forums_last_read_topics AS l ON l.UserID = '.$UserID.' AND l.TopicID = t.ID
|
||||
LEFT JOIN users_main AS um ON um.ID = p.AuthorID
|
||||
LEFT JOIN users_info AS ui ON ui.UserID = p.AuthorID
|
||||
LEFT JOIN users_main AS ed ON ed.ID = p.EditedUserID
|
||||
JOIN forums_topics AS t ON t.ID = p.TopicID
|
||||
JOIN forums AS f ON f.ID = t.ForumID
|
||||
LEFT JOIN forums_last_read_topics AS l ON l.UserID = '.$UserID.' AND l.TopicID = t.ID
|
||||
WHERE p.ID IN ('.implode(',',$PostIDs).')
|
||||
ORDER BY p.ID DESC';
|
||||
$Posts = $DB->query($sql);
|
||||
@ -152,23 +152,23 @@ function error_out($reason = '') {
|
||||
t.IsLocked,
|
||||
t.IsSticky
|
||||
FROM forums_posts as p
|
||||
LEFT JOIN users_main AS um ON um.ID = p.AuthorID
|
||||
LEFT JOIN users_info AS ui ON ui.UserID = p.AuthorID
|
||||
LEFT JOIN users_main AS ed ON ed.ID = p.EditedUserID
|
||||
JOIN forums_topics AS t ON t.ID = p.TopicID
|
||||
JOIN forums AS f ON f.ID = t.ForumID
|
||||
LEFT JOIN forums_last_read_topics AS l ON l.UserID = '.$UserID.' AND l.TopicID = t.ID
|
||||
LEFT JOIN users_main AS um ON um.ID = p.AuthorID
|
||||
LEFT JOIN users_info AS ui ON ui.UserID = p.AuthorID
|
||||
LEFT JOIN users_main AS ed ON ed.ID = p.EditedUserID
|
||||
JOIN forums_topics AS t ON t.ID = p.TopicID
|
||||
JOIN forums AS f ON f.ID = t.ForumID
|
||||
LEFT JOIN forums_last_read_topics AS l ON l.UserID = '.$UserID.' AND l.TopicID = t.ID
|
||||
WHERE p.AuthorID = '.$UserID.'
|
||||
AND f.MinClassRead <= '.$LoggedUser['EffectiveClass'];
|
||||
AND f.MinClassRead <= '.$LoggedUser['EffectiveClass'];
|
||||
|
||||
if (!empty($RestrictedForums)) {
|
||||
$sql.='
|
||||
AND f.ID NOT IN (\''.$RestrictedForums.'\')';
|
||||
AND f.ID NOT IN (\''.$RestrictedForums.'\')';
|
||||
}
|
||||
|
||||
if ($ShowUnread) {
|
||||
$sql.='
|
||||
AND ((t.IsLocked=\'0\' OR t.IsSticky=\'1\') AND (l.PostID<t.LastPostID OR l.PostID IS NULL)) ';
|
||||
AND ((t.IsLocked=\'0\' OR t.IsSticky=\'1\') AND (l.PostID<t.LastPostID OR l.PostID IS NULL)) ';
|
||||
}
|
||||
|
||||
$sql .= '
|
||||
@ -191,30 +191,30 @@ function error_out($reason = '') {
|
||||
|
||||
$JsonResults = array();
|
||||
while (list($PostID, $AddedTime, $Body, $EditedUserID, $EditedTime, $EditedUsername, $TopicID, $ThreadTitle, $LastPostID, $LastRead, $Locked, $Sticky) = $DB->next_record()) {
|
||||
$JsonResults[] = array(
|
||||
'postId' => (int) $PostID,
|
||||
'topicId' => (int) $TopicID,
|
||||
'threadTitle' => $ThreadTitle,
|
||||
'lastPostId' => (int) $LastPostID,
|
||||
'lastRead' => (int) $LastRead,
|
||||
'locked' => $Locked == 1,
|
||||
'sticky' => $Sticky == 1,
|
||||
'addedTime' => $AddedTime,
|
||||
'body' => $Text->full_format($Body),
|
||||
'bbbody' => $Body,
|
||||
'editedUserId' => (int) $EditedUserID,
|
||||
'editedTime' => $EditedTime,
|
||||
'editedUsername' => $EditedUsername
|
||||
);
|
||||
$JsonResults[] = array(
|
||||
'postId' => (int) $PostID,
|
||||
'topicId' => (int) $TopicID,
|
||||
'threadTitle' => $ThreadTitle,
|
||||
'lastPostId' => (int) $LastPostID,
|
||||
'lastRead' => (int) $LastRead,
|
||||
'locked' => $Locked == 1,
|
||||
'sticky' => $Sticky == 1,
|
||||
'addedTime' => $AddedTime,
|
||||
'body' => $Text->full_format($Body),
|
||||
'bbbody' => $Body,
|
||||
'editedUserId' => (int) $EditedUserID,
|
||||
'editedTime' => $EditedTime,
|
||||
'editedUsername' => $EditedUsername
|
||||
);
|
||||
}
|
||||
|
||||
print json_encode(
|
||||
array(
|
||||
'status' => 'success',
|
||||
'response' => array(
|
||||
'currentPage' => (int) $Page,
|
||||
'pages' => ceil($Results/$PerPage),
|
||||
'threads' => $JsonResults
|
||||
)
|
||||
)
|
||||
);
|
||||
array(
|
||||
'status' => 'success',
|
||||
'response' => array(
|
||||
'currentPage' => (int) $Page,
|
||||
'pages' => ceil($Results/$PerPage),
|
||||
'threads' => $JsonResults
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -2,7 +2,7 @@
|
||||
//~~~~~~~~~~~ Main artist page ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
//For sorting tags
|
||||
function compare($X, $Y){
|
||||
function compare($X, $Y) {
|
||||
return($Y['count'] - $X['count']);
|
||||
}
|
||||
|
||||
@ -18,12 +18,14 @@ function compare($X, $Y){
|
||||
$UserVotes = Votes::get_user_votes($LoggedUser['ID']);
|
||||
|
||||
$ArtistID = $_GET['id'];
|
||||
if(!is_number($ArtistID)) { error(0); }
|
||||
if (!is_number($ArtistID)) {
|
||||
error(0);
|
||||
}
|
||||
|
||||
|
||||
if(!empty($_GET['revisionid'])) { // if they're viewing an old revision
|
||||
if (!empty($_GET['revisionid'])) { // if they're viewing an old revision
|
||||
$RevisionID=$_GET['revisionid'];
|
||||
if(!is_number($RevisionID)) {
|
||||
if (!is_number($RevisionID)) {
|
||||
error(0);
|
||||
}
|
||||
$Data = $Cache->get_value("artist_$ArtistID"."_revision_$RevisionID", true);
|
||||
@ -32,7 +34,7 @@ function compare($X, $Y){
|
||||
$RevisionID = false;
|
||||
}
|
||||
|
||||
if($Data) {
|
||||
if ($Data) {
|
||||
if (!is_array($Data)) {
|
||||
$Data = unserialize($Data);
|
||||
}
|
||||
@ -40,27 +42,29 @@ function compare($X, $Y){
|
||||
} else {
|
||||
if ($RevisionID) {
|
||||
$sql = "SELECT
|
||||
a.Name,
|
||||
wiki.Image,
|
||||
wiki.body,
|
||||
a.VanityHouse
|
||||
FROM wiki_artists AS wiki
|
||||
LEFT JOIN artists_group AS a ON wiki.RevisionID=a.RevisionID
|
||||
WHERE wiki.RevisionID='$RevisionID' ";
|
||||
a.Name,
|
||||
wiki.Image,
|
||||
wiki.body,
|
||||
a.VanityHouse
|
||||
FROM wiki_artists AS wiki
|
||||
LEFT JOIN artists_group AS a ON wiki.RevisionID=a.RevisionID
|
||||
WHERE wiki.RevisionID='$RevisionID' ";
|
||||
} else {
|
||||
$sql = "SELECT
|
||||
a.Name,
|
||||
wiki.Image,
|
||||
wiki.body,
|
||||
a.VanityHouse
|
||||
FROM artists_group AS a
|
||||
LEFT JOIN wiki_artists AS wiki ON wiki.RevisionID=a.RevisionID
|
||||
WHERE a.ArtistID='$ArtistID' ";
|
||||
a.Name,
|
||||
wiki.Image,
|
||||
wiki.body,
|
||||
a.VanityHouse
|
||||
FROM artists_group AS a
|
||||
LEFT JOIN wiki_artists AS wiki ON wiki.RevisionID=a.RevisionID
|
||||
WHERE a.ArtistID='$ArtistID' ";
|
||||
}
|
||||
$sql .= " GROUP BY a.ArtistID";
|
||||
$DB->query($sql);
|
||||
|
||||
if($DB->record_count()==0) { error(404); }
|
||||
if ($DB->record_count() == 0) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
list($Name, $Image, $Body, $VanityHouseArtist) = $DB->next_record(MYSQLI_NUM, array(0));
|
||||
}
|
||||
@ -72,24 +76,24 @@ function compare($X, $Y){
|
||||
|
||||
// Requests
|
||||
$Requests = $Cache->get_value('artists_requests_'.$ArtistID);
|
||||
if(!is_array($Requests)) {
|
||||
if (!is_array($Requests)) {
|
||||
$DB->query("SELECT
|
||||
r.ID,
|
||||
r.CategoryID,
|
||||
r.Title,
|
||||
r.Year,
|
||||
r.TimeAdded,
|
||||
COUNT(rv.UserID) AS Votes,
|
||||
SUM(rv.Bounty) AS Bounty
|
||||
FROM requests AS r
|
||||
LEFT JOIN requests_votes AS rv ON rv.RequestID=r.ID
|
||||
LEFT JOIN requests_artists AS ra ON r.ID=ra.RequestID
|
||||
WHERE ra.ArtistID = ".$ArtistID."
|
||||
AND r.TorrentID = 0
|
||||
GROUP BY r.ID
|
||||
ORDER BY Votes DESC");
|
||||
r.ID,
|
||||
r.CategoryID,
|
||||
r.Title,
|
||||
r.Year,
|
||||
r.TimeAdded,
|
||||
COUNT(rv.UserID) AS Votes,
|
||||
SUM(rv.Bounty) AS Bounty
|
||||
FROM requests AS r
|
||||
LEFT JOIN requests_votes AS rv ON rv.RequestID=r.ID
|
||||
LEFT JOIN requests_artists AS ra ON r.ID=ra.RequestID
|
||||
WHERE ra.ArtistID = ".$ArtistID."
|
||||
AND r.TorrentID = 0
|
||||
GROUP BY r.ID
|
||||
ORDER BY Votes DESC");
|
||||
|
||||
if($DB->record_count() > 0) {
|
||||
if ($DB->record_count() > 0) {
|
||||
$Requests = $DB->to_array();
|
||||
} else {
|
||||
$Requests = array();
|
||||
@ -101,11 +105,11 @@ function compare($X, $Y){
|
||||
|
||||
if (($Importances = $Cache->get_value('artist_groups_'.$ArtistID)) === false) {
|
||||
$DB->query("SELECT
|
||||
DISTINCTROW ta.GroupID, ta.Importance, tg.VanityHouse, tg.Year
|
||||
FROM torrents_artists AS ta
|
||||
JOIN torrents_group AS tg ON tg.ID=ta.GroupID
|
||||
WHERE ta.ArtistID='$ArtistID'
|
||||
ORDER BY tg.Year DESC, tg.Name DESC");
|
||||
DISTINCTROW ta.GroupID, ta.Importance, tg.VanityHouse, tg.Year
|
||||
FROM torrents_artists AS ta
|
||||
JOIN torrents_group AS tg ON tg.ID=ta.GroupID
|
||||
WHERE ta.ArtistID='$ArtistID'
|
||||
ORDER BY tg.Year DESC, tg.Name DESC");
|
||||
$GroupIDs = $DB->collect('GroupID');
|
||||
$Importances = $DB->to_array(false, MYSQLI_BOTH, false);
|
||||
$Cache->cache_value('artist_groups_'.$ArtistID, $Importances, 0);
|
||||
@ -206,7 +210,7 @@ function compare($X, $Y){
|
||||
if (!empty($UsedReleases)) { ?>
|
||||
<div class="box center">
|
||||
<?
|
||||
foreach($UsedReleases as $ReleaseID) {
|
||||
foreach ($UsedReleases as $ReleaseID) {
|
||||
switch($ReleaseTypes[$ReleaseID]) {
|
||||
case "Remix" :
|
||||
$DisplayName = "Remixes";
|
||||
@ -295,7 +299,7 @@ function compare($X, $Y){
|
||||
|
||||
$TorrentTags = new Tags($TagList, false);
|
||||
|
||||
if($ReleaseType!=$LastReleaseType) {
|
||||
if ($ReleaseType != $LastReleaseType) {
|
||||
switch($ReleaseTypes[$ReleaseType]) {
|
||||
case "Remix" :
|
||||
$DisplayName = "Remixes";
|
||||
@ -312,7 +316,7 @@ function compare($X, $Y){
|
||||
}
|
||||
|
||||
$ReleaseTypeLabel = strtolower(str_replace(' ','_',$ReleaseTypes[$ReleaseType]));
|
||||
if($OpenTable) { ?>
|
||||
if ($OpenTable) { ?>
|
||||
</table>
|
||||
<? } ?>
|
||||
<table class="torrent_table grouped release_table" id="torrents_<?=$ReleaseTypeLabel?>">
|
||||
@ -330,7 +334,7 @@ function compare($X, $Y){
|
||||
|
||||
|
||||
$DisplayName ='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
|
||||
if(check_perms('users_mod') || check_perms('torrents_fix_ghosts')) {
|
||||
if (check_perms('users_mod') || check_perms('torrents_fix_ghosts')) {
|
||||
$DisplayName .= ' <a href="torrents.php?action=fix_group&groupid='.$GroupID.'&artistid='.$ArtistID.'&auth='.$LoggedUser['AuthKey'].'" class="brackets" title="Fix ghost DB entry">Fix</a>';
|
||||
}
|
||||
|
||||
@ -344,17 +348,17 @@ function compare($X, $Y){
|
||||
unset($ExtendedArtists[2]);
|
||||
unset($ExtendedArtists[3]);
|
||||
$DisplayName = Artists::display_artists($ExtendedArtists).$DisplayName;
|
||||
} elseif(count($GroupArtists)>0) {
|
||||
} elseif (count($GroupArtists) > 0) {
|
||||
$DisplayName = Artists::display_artists(array(1 => $Artists), true, true).$DisplayName;
|
||||
}
|
||||
break;
|
||||
case 1022: // Show performers on composer pages
|
||||
case 1022: // Show performers on composer pages
|
||||
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])) {
|
||||
unset($ExtendedArtists[4]);
|
||||
unset($ExtendedArtists[3]);
|
||||
unset($ExtendedArtists[6]);
|
||||
$DisplayName = Artists::display_artists($ExtendedArtists).$DisplayName;
|
||||
} elseif(count($GroupArtists)>0) {
|
||||
} elseif (count($GroupArtists) > 0) {
|
||||
$DisplayName = Artists::display_artists(array(1 => $Artists), true, true).$DisplayName;
|
||||
}
|
||||
break;
|
||||
@ -364,9 +368,13 @@ function compare($X, $Y){
|
||||
}
|
||||
}
|
||||
|
||||
if($GroupYear>0) { $DisplayName = $GroupYear. ' - '.$DisplayName; }
|
||||
if ($GroupYear > 0) {
|
||||
$DisplayName = $GroupYear. ' - '.$DisplayName;
|
||||
}
|
||||
|
||||
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
|
||||
if ($GroupVanityHouse) {
|
||||
$DisplayName .= ' [<abbr title="This is a Vanity House release">VH</abbr>]';
|
||||
}
|
||||
|
||||
$SnatchedGroupClass = $GroupFlags['IsSnatched'] ? ' snatched_group' : '';
|
||||
?>
|
||||
@ -410,8 +418,9 @@ function compare($X, $Y){
|
||||
}
|
||||
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
|
||||
|
||||
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
|
||||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
|
||||
if ($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
|
||||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] !=
|
||||
$LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
|
||||
|
||||
$EditionID++;
|
||||
|
||||
@ -445,7 +454,7 @@ function compare($X, $Y){
|
||||
<?
|
||||
}
|
||||
}
|
||||
if(!empty($TorrentList)) { ?>
|
||||
if (!empty($TorrentList)) { ?>
|
||||
</table>
|
||||
</div>
|
||||
<?}
|
||||
@ -481,7 +490,7 @@ function compare($X, $Y){
|
||||
}
|
||||
}
|
||||
|
||||
if (Bookmarks::has_bookmarked('artist', $ArtistID)) {
|
||||
if (Bookmarks::has_bookmarked('artist', $ArtistID)) {
|
||||
?>
|
||||
<a href="#" id="bookmarklink_artist_<?=$ArtistID?>" onclick="Unbookmark('artist', <?=$ArtistID?>,'Bookmark');return false;" class="brackets">Remove bookmark</a>
|
||||
|
||||
@ -490,39 +499,39 @@ 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="recommend" class="brackets">Recommend</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=history&artistid=<?=$ArtistID?>" class="brackets">View history</a>
|
||||
<a href="artist.php?id=<?=$ArtistID?>#info" class="brackets">Info</a>
|
||||
<!-- <strip>-->
|
||||
<a href="artist.php?id=<?=$ArtistID?>#concerts" class="brackets">Concerts</a>
|
||||
<!-- </strip>-->
|
||||
<a href="artist.php?id=<?=$ArtistID?>#artistcomments" class="brackets">Comments</a>
|
||||
<? if (check_perms('site_delete_artist') && check_perms('torrents_delete')) { ?>
|
||||
<? if (check_perms('site_delete_artist') && check_perms('torrents_delete')) { ?>
|
||||
<a href="artist.php?action=delete&artistid=<?=$ArtistID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Delete</a>
|
||||
<? }
|
||||
<? }
|
||||
|
||||
if ($RevisionID && check_perms('site_edit_wiki')) {
|
||||
if ($RevisionID && check_perms('site_edit_wiki')) {
|
||||
?>
|
||||
<a href="artist.php?action=revert&artistid=<?=$ArtistID?>&revisionid=<?=$RevisionID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">
|
||||
Revert to this revision
|
||||
</a>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? /* Misc::display_recommend($ArtistID, "artist"); */ ?>
|
||||
<div class="sidebar">
|
||||
<? if($Image) { ?>
|
||||
<div class="sidebar">
|
||||
<? if ($Image) { ?>
|
||||
<div class="box box_image">
|
||||
<div class="head"><strong><?=$Name?></strong></div>
|
||||
<div style="text-align:center;padding:10px 0px;">
|
||||
<div style="text-align: center; padding: 10px 0px;">
|
||||
<img style="max-width: 220px;" src="<?=ImageTools::thumbnail($Image)?>" alt="<?=$Name?>" onclick="lightbox.init('<?=$Image?>',220);" />
|
||||
</div>
|
||||
</div>
|
||||
@ -543,8 +552,8 @@ function compare($X, $Y){
|
||||
</div>
|
||||
<?
|
||||
|
||||
if(check_perms('zip_downloader')){
|
||||
if(isset($LoggedUser['Collector'])) {
|
||||
if (check_perms('zip_downloader')) {
|
||||
if (isset($LoggedUser['Collector'])) {
|
||||
list($ZIPList,$ZIPPrefs) = $LoggedUser['Collector'];
|
||||
$ZIPList = explode(':',$ZIPList);
|
||||
} else {
|
||||
@ -563,40 +572,40 @@ function compare($X, $Y){
|
||||
<? foreach ($ZIPList as $ListItem) { ?>
|
||||
<li id="list<?=$ListItem?>">
|
||||
<input type="hidden" name="list[]" value="<?=$ListItem?>" />
|
||||
<span style="float:left;"><?=$ZIPOptions[$ListItem]['2']?></span>
|
||||
<span class="remove remove_collector"><a href="#" onclick="remove_selection('<?=$ListItem?>');return false;" style="float:right;" class="brackets" title="Remove format from the Collector">X</a></span>
|
||||
<br style="clear:all;" />
|
||||
<span style="float: left;"><?=$ZIPOptions[$ListItem]['2']?></span>
|
||||
<span class="remove remove_collector"><a href="#" onclick="remove_selection('<?=$ListItem?>');return false;" style="float: right;" class="brackets" title="Remove format from the Collector">X</a></span>
|
||||
<br style="clear: all;" />
|
||||
</li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
<select id="formats" style="width:180px">
|
||||
<select id="formats" style="width: 180px;">
|
||||
<?
|
||||
$OpenGroup = false;
|
||||
$LastGroupID=-1;
|
||||
$LastGroupID = -1;
|
||||
|
||||
foreach ($ZIPOptions as $Option) {
|
||||
list($GroupID,$OptionID,$OptName) = $Option;
|
||||
|
||||
if($GroupID!=$LastGroupID) {
|
||||
$LastGroupID=$GroupID;
|
||||
if($OpenGroup) { ?>
|
||||
if ($GroupID != $LastGroupID) {
|
||||
$LastGroupID = $GroupID;
|
||||
if ($OpenGroup) { ?>
|
||||
</optgroup>
|
||||
<? } ?>
|
||||
<optgroup label="<?=$ZIPGroups[$GroupID]?>">
|
||||
<? $OpenGroup = true;
|
||||
}
|
||||
?>
|
||||
<option id="opt<?=$GroupID.$OptionID?>" value="<?=$GroupID.$OptionID?>"<? if(in_array($GroupID.$OptionID,$ZIPList)){ echo ' disabled="disabled"'; }?>><?=$OptName?></option>
|
||||
<option id="opt<?=$GroupID.$OptionID?>" value="<?=$GroupID.$OptionID?>"<? if (in_array($GroupID.$OptionID,$ZIPList)){ echo ' disabled="disabled"'; }?>><?=$OptName?></option>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</optgroup>
|
||||
</select>
|
||||
<button type="button" onclick="add_selection()">+</button>
|
||||
<select name="preference" style="width:210px">
|
||||
<option value="0"<? if($ZIPPrefs==0){ echo ' selected="selected"'; } ?>>Prefer Original</option>
|
||||
<option value="1"<? if($ZIPPrefs==1){ echo ' selected="selected"'; } ?>>Prefer Best Seeded</option>
|
||||
<option value="2"<? if($ZIPPrefs==2){ echo ' selected="selected"'; } ?>>Prefer Bonus Tracks</option>
|
||||
<select name="preference" style="width: 210px">
|
||||
<option value="0"<? if ($ZIPPrefs == 0){ echo ' selected="selected"'; } ?>>Prefer Original</option>
|
||||
<option value="1"<? if ($ZIPPrefs == 1){ echo ' selected="selected"'; } ?>>Prefer Best Seeded</option>
|
||||
<option value="2"<? if ($ZIPPrefs == 2){ echo ' selected="selected"'; } ?>>Prefer Bonus Tracks</option>
|
||||
</select>
|
||||
<input type="submit" style="width:210px" value="Download" />
|
||||
</form>
|
||||
@ -628,17 +637,17 @@ function compare($X, $Y){
|
||||
<?
|
||||
|
||||
|
||||
if(empty($SimilarArray)) {
|
||||
if (empty($SimilarArray)) {
|
||||
$DB->query("
|
||||
SELECT
|
||||
s2.ArtistID,
|
||||
a.Name,
|
||||
ass.Score,
|
||||
ass.SimilarID
|
||||
s2.ArtistID,
|
||||
a.Name,
|
||||
ass.Score,
|
||||
ass.SimilarID
|
||||
FROM artists_similar AS s1
|
||||
JOIN artists_similar AS s2 ON s1.SimilarID=s2.SimilarID AND s1.ArtistID!=s2.ArtistID
|
||||
JOIN artists_similar_scores AS ass ON ass.SimilarID=s1.SimilarID
|
||||
JOIN artists_group AS a ON a.ArtistID=s2.ArtistID
|
||||
JOIN artists_similar AS s2 ON s1.SimilarID=s2.SimilarID AND s1.ArtistID!=s2.ArtistID
|
||||
JOIN artists_similar_scores AS ass ON ass.SimilarID=s1.SimilarID
|
||||
JOIN artists_group AS a ON a.ArtistID=s2.ArtistID
|
||||
WHERE s1.ArtistID='$ArtistID'
|
||||
ORDER BY ass.Score DESC
|
||||
LIMIT 30
|
||||
@ -651,14 +660,14 @@ function compare($X, $Y){
|
||||
<div class="head"><strong>Similar artists</strong></div>
|
||||
<ul class="stats nobullet">
|
||||
<?
|
||||
if($NumSimilar == 0) { ?>
|
||||
if ($NumSimilar == 0) { ?>
|
||||
<li><span style="font-style: italic;">None found</span></li>
|
||||
<? }
|
||||
$First = true;
|
||||
foreach ($SimilarArray as $SimilarArtist) {
|
||||
list($Artist2ID, $Artist2Name, $Score, $SimilarID) = $SimilarArtist;
|
||||
$Score = $Score/100;
|
||||
if($First) {
|
||||
$Score = $Score / 100;
|
||||
if ($First) {
|
||||
$Max = $Score + 1;
|
||||
$First = false;
|
||||
}
|
||||
@ -667,11 +676,11 @@ function compare($X, $Y){
|
||||
|
||||
?>
|
||||
<li>
|
||||
<span title="<?=$Score?>"><a href="artist.php?id=<?=$Artist2ID?>" style="float:left; display:block;"><?=$Artist2Name?></a></span>
|
||||
<div style="float:right; display:block; letter-spacing: -1px;">
|
||||
<span title="<?=$Score?>"><a href="artist.php?id=<?=$Artist2ID?>" style="float: left; display: block;"><?=$Artist2Name?></a></span>
|
||||
<div style="float: right; display: block; letter-spacing: -1px;">
|
||||
<a href="artist.php?action=vote_similar&artistid=<?=$ArtistID?>&similarid=<?=$SimilarID?>&way=down" style="font-family: monospace;" title="Vote down this similar artist. Use this when you feel that the two artists are not all that similar." class="brackets">−</a>
|
||||
<a href="artist.php?action=vote_similar&artistid=<?=$ArtistID?>&similarid=<?=$SimilarID?>&way=up" style="font-family: monospace;" title="Vote up this similar artist. Use this when you feel that the two artists are quite similar." class="brackets">+</a>
|
||||
<? if(check_perms('site_delete_tag')) { ?>
|
||||
<? if (check_perms('site_delete_tag')) { ?>
|
||||
<span class="remove remove_artist"><a href="artist.php?action=delete_similar&similarid=<?=$SimilarID?>&auth=<?=$LoggedUser['AuthKey']?>" title="Remove this similar artist" class="brackets">X</a></span>
|
||||
<? } ?>
|
||||
</div>
|
||||
@ -700,7 +709,7 @@ function compare($X, $Y){
|
||||
|
||||
echo $TorrentDisplayList;
|
||||
|
||||
if($NumRequests > 0) {
|
||||
if ($NumRequests > 0) {
|
||||
|
||||
?>
|
||||
<table cellpadding="6" cellspacing="1" border="0" class="request_table border" width="100%" id="requests">
|
||||
@ -720,16 +729,16 @@ function compare($X, $Y){
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
foreach($Requests as $Request) {
|
||||
foreach ($Requests as $Request) {
|
||||
list($RequestID, $CategoryID, $Title, $Year, $TimeAdded, $Votes, $Bounty) = $Request;
|
||||
|
||||
$CategoryName = $Categories[$CategoryID - 1];
|
||||
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == "Music") {
|
||||
$ArtistForm = get_request_artists($RequestID);
|
||||
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
||||
$FullName = $ArtistLink."<a href='requests.php?action=view&id=".$RequestID."'>".$Title." [".$Year."]</a>";
|
||||
} else if($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
} elseif ($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
$FullName = "<a href='requests.php?action=view&id=".$RequestID."'>".$Title." [".$Year."]</a>";
|
||||
} else {
|
||||
$FullName ="<a href='requests.php?action=view&id=".$RequestID."'>".$Title."</a>";
|
||||
@ -739,7 +748,7 @@ function compare($X, $Y){
|
||||
|
||||
$Tags = get_request_tags($RequestID);
|
||||
$ReqTagList = array();
|
||||
foreach($Tags as $TagID => $TagName) {
|
||||
foreach ($Tags as $TagID => $TagName) {
|
||||
$ReqTagList[] = "<a href='requests.php?tags=".$TagName."'>".display_str($TagName)."</a>";
|
||||
}
|
||||
$ReqTagList = implode(', ', $ReqTagList);
|
||||
@ -751,7 +760,7 @@ function compare($X, $Y){
|
||||
</td>
|
||||
<td>
|
||||
<span id="vote_count_<?=$RequestID?>"><?=$Votes?></span>
|
||||
<? if(check_perms('site_vote')){ ?>
|
||||
<? if (check_perms('site_vote')){ ?>
|
||||
<input type="hidden" id="auth" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<a href="javascript:Vote(0, <?=$RequestID?>)" class="brackets"><strong>+</strong></a>
|
||||
<? } ?>
|
||||
@ -770,15 +779,15 @@ function compare($X, $Y){
|
||||
|
||||
// Similar artist map
|
||||
|
||||
if($NumSimilar>0) {
|
||||
if($SimilarData = $Cache->get_value('similar_positions_'.$ArtistID)) {
|
||||
if ($NumSimilar > 0) {
|
||||
if ($SimilarData = $Cache->get_value('similar_positions_'.$ArtistID)) {
|
||||
$Similar = new ARTISTS_SIMILAR($ArtistID, $Name);
|
||||
$Similar->load_data($SimilarData);
|
||||
if(!(current($Similar->Artists)->NameLength)) {
|
||||
if (!(current($Similar->Artists)->NameLength)) {
|
||||
unset($Similar);
|
||||
}
|
||||
}
|
||||
if(empty($Similar) || empty($Similar->Artists)) {
|
||||
if (empty($Similar) || empty($Similar->Artists)) {
|
||||
include(SERVER_ROOT.'/classes/class_image.php');
|
||||
$Img = new IMAGE;
|
||||
$Img->create(WIDTH, HEIGHT);
|
||||
@ -820,13 +829,13 @@ function compare($X, $Y){
|
||||
function flipView() {
|
||||
var state = document.getElementById('flip_view_1').style.display == 'block';
|
||||
|
||||
if(state) {
|
||||
if (state) {
|
||||
document.getElementById('flip_view_1').style.display='none';
|
||||
document.getElementById('flip_view_2').style.display='block';
|
||||
document.getElementById('flipper_title').innerHTML = 'Similar artist cloud';
|
||||
document.getElementById('flip_to').innerHTML = 'Switch to map';
|
||||
|
||||
if(!cloudLoaded) {
|
||||
if (!cloudLoaded) {
|
||||
require("static/functions/jquery.js", function () {
|
||||
require("static/functions/tagcanvas.js", function () {
|
||||
require("static/functions/artist_cloud.js", function () {
|
||||
@ -882,7 +891,7 @@ function require(file, callback) {
|
||||
|
||||
// gets the amount of comments for this group
|
||||
$Results = $Cache->get_value('artist_comments_'.$ArtistID);
|
||||
if($Results === false) {
|
||||
if ($Results === false) {
|
||||
$DB->query("SELECT
|
||||
COUNT(c.ID)
|
||||
FROM artist_comments as c
|
||||
@ -891,7 +900,7 @@ function require(file, callback) {
|
||||
$Cache->cache_value('artist_comments_'.$ArtistID, $Results, 0);
|
||||
}
|
||||
|
||||
if(isset($_GET['postid']) && is_number($_GET['postid']) && $Results > TORRENT_COMMENTS_PER_PAGE) {
|
||||
if (isset($_GET['postid']) && is_number($_GET['postid']) && $Results > TORRENT_COMMENTS_PER_PAGE) {
|
||||
$DB->query("SELECT COUNT(ID) FROM artist_comments WHERE ArtistID = $ArtistID AND ID <= $_GET[postid]");
|
||||
list($PostNum) = $DB->next_record();
|
||||
list($Page,$Limit) = Format::page_limit(TORRENT_COMMENTS_PER_PAGE,$PostNum);
|
||||
@ -907,7 +916,7 @@ function require(file, callback) {
|
||||
|
||||
// Cache catalogue from which the page is selected, allows block caches and future ability to specify posts per page
|
||||
$Catalogue = $Cache->get_value('artist_comments_'.$ArtistID.'_catalogue_'.$CatalogueID);
|
||||
if($Catalogue === false) {
|
||||
if ($Catalogue === false) {
|
||||
$DB->query("SELECT
|
||||
c.ID,
|
||||
c.AuthorID,
|
||||
@ -938,7 +947,7 @@ function require(file, callback) {
|
||||
<?
|
||||
|
||||
//---------- Begin printing
|
||||
foreach($Thread as $Key => $Post) {
|
||||
foreach ($Thread as $Key => $Post) {
|
||||
list($PostID, $AuthorID, $AddedTime, $CommentBody, $EditedUserID, $EditedTime, $EditedUsername) = array_values($Post);
|
||||
list($AuthorID, $Username, $PermissionID, $Paranoia, $Artist, $Donor, $Warned, $Avatar, $Enabled, $UserTitle) = array_values(Users::user_info($AuthorID));
|
||||
?>
|
||||
|
@ -28,16 +28,15 @@
|
||||
<a href="#">↑</a> <strong>Upcoming concerts</strong>
|
||||
<a href="#" class="brackets" onclick="$('#concertsbody').toggle(); return false;">Toggle</a>
|
||||
</div>
|
||||
<div id="concertsbody"<?=$Hidden ? ' class="hidden"' : ''?>>
|
||||
<div id="concertsbody"<?=$Hidden ? ' class="hidden"' : '' ?>>
|
||||
<?=$Concerts?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?
|
||||
function make_concert_link($Event)
|
||||
{
|
||||
function make_concert_link($Event) {
|
||||
// The event doesn't have a start date (this should never happen)
|
||||
if ($Event['startDate'] == "") {
|
||||
if ($Event['startDate'] == '') {
|
||||
return;
|
||||
}
|
||||
$Date = get_date_title($Event['startDate']);
|
||||
@ -46,24 +45,23 @@ function make_concert_link($Event)
|
||||
$Concert = "<a href='" . $Event['url'] . "'>" . $ConcertTitle . "</a>";
|
||||
?>
|
||||
<form class="hidden" action="" id="concert<?=$Event['id']?>" method="post">
|
||||
<input type="hidden" name="action" value="concert_thread"/>
|
||||
<input type="hidden" name="concert_title" value="<?="[Concert] " . display_str($Name) . " - " . $ConcertTitle?>"/>
|
||||
<input type="hidden" name="concert_id" value="<?=$Event['id']?>"/>
|
||||
<input type="hidden" name="concert_template" value="<?=get_concert_post_template($Name, $Event)?>"/>
|
||||
<input type="hidden" name="action" value="concert_thread" />
|
||||
<input type="hidden" name="concert_title" value="<?="[Concert] " . display_str($Name) . " - " . $ConcertTitle?>" />
|
||||
<input type="hidden" name="concert_id" value="<?=$Event['id']?>" />
|
||||
<input type="hidden" name="concert_template" value="<?=get_concert_post_template($Name, $Event)?>" />
|
||||
</form>
|
||||
<li><?=$Concert?> - <a href="#" class="brackets" onclick="$('#concert<?=$Event['id']?>').raw().submit(); return false;">Go to thread</a></li>
|
||||
<?
|
||||
}
|
||||
|
||||
function get_concert_post_template($Artist, $Event)
|
||||
{
|
||||
$With = "";
|
||||
$EventTitle = "";
|
||||
$Location = "";
|
||||
$Directions = "";
|
||||
$Website = "";
|
||||
function get_concert_post_template($Artist, $Event) {
|
||||
$With = '';
|
||||
$EventTitle = '';
|
||||
$Location = '';
|
||||
$Directions = '';
|
||||
$Website = '';
|
||||
if (!empty($Event['venue']['website'])) {
|
||||
$Url = $Event['venue']['website'];
|
||||
$Url = $Event['venue']['website'];
|
||||
if (strpos ($Url, '://') === false) {
|
||||
$Url = 'http://' . $Url;
|
||||
}
|
||||
@ -78,11 +76,11 @@ function get_concert_post_template($Artist, $Event)
|
||||
$Directions = "[b]Directions:[/b] [url=https://maps.google.com/maps?f=q&q=" . urlencode($Event['venue']['name'] . "," . $Event['venue']['location']['city']) . "&ie=UTF8&om=1&iwloc=addr]Show on Map[/url]";
|
||||
}
|
||||
if (!empty($Event['venue']['website'])) {
|
||||
$Url = $Event['venue']['website'];
|
||||
$Url = $Event['venue']['website'];
|
||||
if (strpos ($Url, '://') === false) {
|
||||
$Url = 'http://' . $Url;
|
||||
}
|
||||
$Website = "[b]Web site:[/b] " . $Url;
|
||||
$Website = '[b]Web site:[/b] ' . $Url;
|
||||
}
|
||||
if (isset($Event['artists']['artist']) && (count($Event['artists']['artist']) == 1 && strtolower($Event['artists']['artist'][1]) == strtolower($Artist))) {
|
||||
$i = 0;
|
||||
@ -111,17 +109,15 @@ function get_concert_post_template($Artist, $Event)
|
||||
[align=center]. . . . . . . . . .[/align]";
|
||||
}
|
||||
|
||||
function get_date_title($Str)
|
||||
{
|
||||
function get_date_title($Str) {
|
||||
$Exploded = explode(' ', $Str);
|
||||
$Date = $Exploded[2] . " " . $Exploded[1] . ", " . $Exploded[3];
|
||||
$Date = $Exploded[2] . ' ' . $Exploded[1] . ', ' . $Exploded[3];
|
||||
return $Date;
|
||||
}
|
||||
|
||||
function get_date_post($Str)
|
||||
{
|
||||
function get_date_post($Str) {
|
||||
$Exploded = explode(' ', $Str);
|
||||
$Date = $Exploded[2] . " " . $Exploded[1] . ", " . $Exploded[3] . " (" . rtrim($Exploded[0], ',') . ")";
|
||||
$Date = $Exploded[2] . ' ' . $Exploded[1] . ', ' . $Exploded[3] . ' (' . rtrim($Exploded[0], ',') . ')';
|
||||
return $Date;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
if (!check_perms('users_warn')) { error(404);}
|
||||
if (!check_perms('users_warn')) {
|
||||
error(404);
|
||||
}
|
||||
Misc::assert_isset_request($_POST, array('artistid', 'postid', 'userid', 'key'));
|
||||
|
||||
$ArtistID = (int) $_POST['artistid'];
|
||||
@ -8,10 +10,10 @@
|
||||
$Key = (int) $_POST['key'];
|
||||
$UserInfo = Users::user_info($UserID);
|
||||
$DB -> query("SELECT
|
||||
ac.Body,
|
||||
ac.AddedTime
|
||||
FROM artist_comments AS ac
|
||||
WHERE ac.ID='" . db_string($PostID) . "'");
|
||||
ac.Body,
|
||||
ac.AddedTime
|
||||
FROM artist_comments AS ac
|
||||
WHERE ac.ID='" . db_string($PostID) . "'");
|
||||
list($PostBody) = $DB -> next_record();
|
||||
|
||||
View::show_header('Warn User');
|
||||
@ -23,11 +25,11 @@
|
||||
</div>
|
||||
<div class="thin box pad">
|
||||
<form class="create_form" name="warning" action="" onsubmit="quickpostform.submit_button.disabled=true;" method="post">
|
||||
<input type="hidden" name="artistid" value="<?=$ArtistID?>"/>
|
||||
<input type="hidden" name="postid" value="<?=$PostID?>"/>
|
||||
<input type="hidden" name="userid" value="<?=$UserID?>"/>
|
||||
<input type="hidden" name="key" value="<?=$Key?>"/>
|
||||
<input type="hidden" name="action" value="take_warn"/>
|
||||
<input type="hidden" name="artistid" value="<?=$ArtistID?>" />
|
||||
<input type="hidden" name="postid" value="<?=$PostID?>" />
|
||||
<input type="hidden" name="userid" value="<?=$UserID?>" />
|
||||
<input type="hidden" name="key" value="<?=$Key?>" />
|
||||
<input type="hidden" name="action" value="take_warn" />
|
||||
<table class="layout" align="center">
|
||||
<tr>
|
||||
<td class="label">Reason:</td>
|
||||
@ -41,25 +43,25 @@
|
||||
<select name="length">
|
||||
<option value="verbal">Verbal</option>
|
||||
<option value="1">1 week</option>
|
||||
<option value="2">2 week</option>
|
||||
<option value="4">4 week</option>
|
||||
<? if(check_perms("users_mod")) { ?>
|
||||
<option value="8">8 week</option>
|
||||
<? } ?>
|
||||
<option value="2">2 weeks</option>
|
||||
<option value="4">4 weeks</option>
|
||||
<? if(check_perms('users_mod')) { ?>
|
||||
<option value="8">8 weeks</option>
|
||||
<? } ?>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Private Message:</td>
|
||||
<td class="label">Private message:</td>
|
||||
<td>
|
||||
<textarea id="message" style="width: 95%;" tabindex="1" onkeyup="resize('message');" name="privatemessage" cols="90" rows="4"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Edit Post:</td>
|
||||
<td class="label">Edit post:</td>
|
||||
<td>
|
||||
<textarea id="body" style="width: 95%;" tabindex="1" onkeyup="resize('body');" name="body" cols="90" rows="8"><?=$PostBody?></textarea>
|
||||
<br />
|
||||
<input type="submit" id="submit_button" value="Warn User" tabindex="1" />
|
||||
<input type="submit" id="submit_button" value="Warn user" tabindex="1" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?
|
||||
function get_thread_info($ThreadID, $Return = true, $SelectiveCache = false) {
|
||||
global $DB, $Cache;
|
||||
if((!$ThreadInfo = $Cache->get_value('thread_'.$ThreadID.'_info')) || !isset($ThreadInfo['OP'])) {
|
||||
if ((!$ThreadInfo = $Cache->get_value('thread_'.$ThreadID.'_info')) || !isset($ThreadInfo['OP'])) {
|
||||
$DB->query("SELECT
|
||||
t.Title,
|
||||
t.ForumID,
|
||||
@ -11,15 +11,17 @@ function get_thread_info($ThreadID, $Return = true, $SelectiveCache = false) {
|
||||
t.LastPostAuthorID,
|
||||
ISNULL(p.TopicID) AS NoPoll,
|
||||
t.StickyPostID,
|
||||
t.AuthorID as OP
|
||||
FROM forums_topics AS t
|
||||
JOIN forums_posts AS fp ON fp.TopicID = t.ID
|
||||
LEFT JOIN forums_polls AS p ON p.TopicID=t.ID
|
||||
t.AuthorID as OP
|
||||
FROM forums_topics AS t
|
||||
JOIN forums_posts AS fp ON fp.TopicID = t.ID
|
||||
LEFT JOIN forums_polls AS p ON p.TopicID=t.ID
|
||||
WHERE t.ID = '$ThreadID'
|
||||
GROUP BY fp.TopicID");
|
||||
if($DB->record_count()==0) { error(404); }
|
||||
if ($DB->record_count() == 0) {
|
||||
error(404);
|
||||
}
|
||||
$ThreadInfo = $DB->next_record(MYSQLI_ASSOC, false);
|
||||
if($ThreadInfo['StickyPostID']) {
|
||||
if ($ThreadInfo['StickyPostID']) {
|
||||
$ThreadInfo['Posts']--;
|
||||
$DB->query("SELECT
|
||||
p.ID,
|
||||
@ -30,15 +32,15 @@ function get_thread_info($ThreadID, $Return = true, $SelectiveCache = false) {
|
||||
p.EditedTime,
|
||||
ed.Username
|
||||
FROM forums_posts as p
|
||||
LEFT JOIN users_main AS ed ON ed.ID = p.EditedUserID
|
||||
LEFT JOIN users_main AS ed ON ed.ID = p.EditedUserID
|
||||
WHERE p.TopicID = '$ThreadID' AND p.ID = '".$ThreadInfo['StickyPostID']."'");
|
||||
list($ThreadInfo['StickyPost']) = $DB->to_array(false, MYSQLI_ASSOC);
|
||||
}
|
||||
if(!$SelectiveCache || !$ThreadInfo['IsLocked'] || $ThreadInfo['IsSticky']) {
|
||||
if (!$SelectiveCache || !$ThreadInfo['IsLocked'] || $ThreadInfo['IsSticky']) {
|
||||
$Cache->cache_value('thread_'.$ThreadID.'_info', $ThreadInfo, 0);
|
||||
}
|
||||
}
|
||||
if($Return) {
|
||||
if ($Return) {
|
||||
return $ThreadInfo;
|
||||
}
|
||||
}
|
||||
@ -48,10 +50,10 @@ function check_forumperm($ForumID, $Perm = 'Read') {
|
||||
if ($LoggedUser['CustomForums'][$ForumID] == 1) {
|
||||
return true;
|
||||
}
|
||||
if($Forums[$ForumID]['MinClass'.$Perm] > $LoggedUser['Class'] && (!isset($LoggedUser['CustomForums'][$ForumID]) || $LoggedUser['CustomForums'][$ForumID] == 0)) {
|
||||
if ($Forums[$ForumID]['MinClass'.$Perm] > $LoggedUser['Class'] && (!isset($LoggedUser['CustomForums'][$ForumID]) || $LoggedUser['CustomForums'][$ForumID] == 0)) {
|
||||
return false;
|
||||
}
|
||||
if(isset($LoggedUser['CustomForums'][$ForumID]) && $LoggedUser['CustomForums'][$ForumID] == 0) {
|
||||
if (isset($LoggedUser['CustomForums'][$ForumID]) && $LoggedUser['CustomForums'][$ForumID] == 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -62,7 +64,7 @@ function check_forumperm($ForumID, $Perm = 'Read') {
|
||||
function get_forum_info($ForumID) {
|
||||
global $DB, $Cache;
|
||||
$Forum = $Cache->get_value('ForumInfo_'.$ForumID);
|
||||
if(!$Forum) {
|
||||
if (!$Forum) {
|
||||
$DB->query("SELECT
|
||||
Name,
|
||||
MinClassRead,
|
||||
@ -70,10 +72,10 @@ function get_forum_info($ForumID) {
|
||||
MinClassCreate,
|
||||
COUNT(forums_topics.ID) AS Topics
|
||||
FROM forums
|
||||
LEFT JOIN forums_topics ON forums_topics.ForumID=forums.ID
|
||||
LEFT JOIN forums_topics ON forums_topics.ForumID=forums.ID
|
||||
WHERE forums.ID='$ForumID'
|
||||
GROUP BY ForumID");
|
||||
if($DB->record_count() == 0) {
|
||||
if ($DB->record_count() == 0) {
|
||||
return false;
|
||||
}
|
||||
// Makes an array, with $Forum['Name'], etc.
|
||||
@ -82,4 +84,4 @@ function get_forum_info($ForumID) {
|
||||
$Cache->cache_value('ForumInfo_'.$ForumID, $Forum, 86400); // Cache for a day
|
||||
}
|
||||
return $Forum;
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
ini_set('display_errors', '1');authorize();
|
||||
ini_set('display_errors', '1');
|
||||
authorize();
|
||||
|
||||
$ForumID = db_string($_GET['forumid']);
|
||||
if($_GET['perform'] == 'add') {
|
||||
$DB->query("INSERT IGNORE INTO subscribed_forums (ForumID, SubscriberID) VALUES ('$ForumID', '$LoggedUser[ID]')");
|
||||
}
|
||||
elseif($_GET['perform'] == 'remove') {
|
||||
$DB->query("DELETE FROM subscribed_forums WHERE ForumID = '$ForumID' AND SubscriberID = '$LoggedUser[ID]'");
|
||||
if ($_GET['perform'] == 'add') {
|
||||
$DB->query("INSERT IGNORE INTO subscribed_forums (ForumID, SubscriberID) VALUES ('$ForumID', '$LoggedUser[ID]')");
|
||||
} elseif ($_GET['perform'] == 'remove') {
|
||||
$DB->query("DELETE FROM subscribed_forums WHERE ForumID = '$ForumID' AND SubscriberID = '$LoggedUser[ID]'");
|
||||
}
|
||||
header('Location: forums.php?action=viewforum&forumid=' . $ForumID);
|
||||
?>
|
||||
|
@ -18,21 +18,21 @@
|
||||
error(403);
|
||||
}
|
||||
|
||||
$URL = "https://" . SSL_SITE_URL . "/forums.php?action=viewthread&postid=$PostID#post$PostID";
|
||||
$URL = 'https://' . SSL_SITE_URL . "/forums.php?action=viewthread&postid=$PostID#post$PostID";
|
||||
if ($Length != 'verbal') {
|
||||
$Time = ((int) $Length) * (7 * 24 * 60 * 60);
|
||||
Tools::warn_user($UserID, $Time, "$URL - " . $Reason);
|
||||
$Subject = "You have received a warning";
|
||||
$Subject = 'You have received a warning';
|
||||
$PrivateMessage = "You have received a $Length week warning for [url=$URL]this post[/url].\n\n" . $PrivateMessage;
|
||||
|
||||
$WarnTime = time_plus($Time);
|
||||
$AdminComment = date("Y-m-d") . ' - Warned until ' . $WarnTime . ' by ' . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n";
|
||||
$AdminComment = date('Y-m-d') . ' - Warned until ' . $WarnTime . ' by ' . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n";
|
||||
|
||||
} else {
|
||||
$Subject = "You have received a verbal warning";
|
||||
$Subject = 'You have received a verbal warning';
|
||||
$PrivateMessage = "You have received a verbal warning for [url=$URL]this post[/url].\n\n" . $PrivateMessage;
|
||||
$AdminComment = date("Y-m-d") . ' - Verbally warned by ' . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n";
|
||||
Tools::update_user_notes($UserID, $AdminComment);
|
||||
$AdminComment = date('Y-m-d') . ' - Verbally warned by ' . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n";
|
||||
Tools::update_user_notes($UserID, $AdminComment);
|
||||
}
|
||||
|
||||
$DB->query("INSERT INTO users_warnings_forums (UserID, Comment) VALUES('$UserID', '" . db_string($AdminComment) . "')
|
||||
@ -41,28 +41,27 @@
|
||||
|
||||
//edit the post
|
||||
$DB->query("SELECT
|
||||
p.Body,
|
||||
p.AuthorID,
|
||||
p.TopicID,
|
||||
t.ForumID,
|
||||
CEIL((SELECT COUNT(ID)
|
||||
FROM forums_posts
|
||||
WHERE forums_posts.TopicID = p.TopicID
|
||||
AND forums_posts.ID <= '$PostID')/" . POSTS_PER_PAGE
|
||||
. ")
|
||||
AS Page
|
||||
FROM forums_posts as p
|
||||
JOIN forums_topics as t on p.TopicID = t.ID
|
||||
JOIN forums as f ON t.ForumID=f.ID
|
||||
WHERE p.ID='$PostID'");
|
||||
p.Body,
|
||||
p.AuthorID,
|
||||
p.TopicID,
|
||||
t.ForumID,
|
||||
CEIL( (SELECT COUNT(ID)
|
||||
FROM forums_posts
|
||||
WHERE forums_posts.TopicID = p.TopicID
|
||||
AND forums_posts.ID <= '$PostID')/" . POSTS_PER_PAGE
|
||||
. ") AS Page
|
||||
FROM forums_posts as p
|
||||
JOIN forums_topics as t on p.TopicID = t.ID
|
||||
JOIN forums as f ON t.ForumID=f.ID
|
||||
WHERE p.ID='$PostID'");
|
||||
list($OldBody, $AuthorID, $TopicID, $ForumID, $Page) = $DB->next_record();
|
||||
|
||||
// Perform the update
|
||||
$DB->query("UPDATE forums_posts SET
|
||||
Body = '" . db_string($Body) . "',
|
||||
EditedUserID = '$UserID',
|
||||
EditedTime = '" . $SQLTime . "'
|
||||
WHERE ID='$PostID'");
|
||||
$DB->query("UPDATE forums_posts
|
||||
SET Body = '" . db_string($Body) . "',
|
||||
EditedUserID = '$UserID',
|
||||
EditedTime = '" . $SQLTime . "'
|
||||
WHERE ID='$PostID'");
|
||||
|
||||
$CatalogueID = floor((POSTS_PER_PAGE * $Page - POSTS_PER_PAGE) / THREAD_CATALOGUE);
|
||||
$Cache->begin_transaction('thread_' . $TopicID . '_catalogue_' . $CatalogueID);
|
||||
@ -85,7 +84,7 @@
|
||||
}
|
||||
|
||||
$DB->query("INSERT INTO comments_edits (Page, PostID, EditUser, EditTime, Body)
|
||||
VALUES ('forums', " . $PostID . ", " . $UserID . ", '" . $SQLTime . "', '" . db_string($OldBody) . "')");
|
||||
VALUES ('forums', " . $PostID . ", " . $UserID . ", '" . $SQLTime . "', '" . db_string($OldBody) . "')");
|
||||
$Cache->delete_value("forums_edits_$PostID");
|
||||
|
||||
header("Location: forums.php?action=viewthread&postid=$PostID#post$PostID");
|
||||
|
@ -5,10 +5,12 @@
|
||||
$UserID = (int)$_POST['userid'];
|
||||
$Key = (int)$_POST['key'];
|
||||
$UserInfo = Users::user_info($UserID);
|
||||
$DB -> query("SELECT
|
||||
p.Body, t.ForumID
|
||||
FROM forums_posts as p JOIN forums_topics as t on p.TopicID = t.ID
|
||||
WHERE p.ID='$PostID'");
|
||||
$DB -> query(" SELECT
|
||||
p.Body,
|
||||
t.ForumID
|
||||
FROM forums_posts as p
|
||||
JOIN forums_topics as t on p.TopicID = t.ID
|
||||
WHERE p.ID='$PostID'");
|
||||
list($PostBody, $ForumID) = $DB -> next_record();
|
||||
View::show_header('Warn User');
|
||||
?>
|
||||
@ -31,18 +33,18 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Length:</td>
|
||||
<td>
|
||||
<select name="length">
|
||||
<option value="verbal">Verbal</option>
|
||||
<option value="1">1 week</option>
|
||||
<option value="2">2 weeks</option>
|
||||
<option value="4">4 weeks</option>
|
||||
<? if(check_perms("users_mod")) { ?>
|
||||
<option value="8">8 weeks</option>
|
||||
<? } ?>
|
||||
</select></td>
|
||||
</tr>
|
||||
<td class="label">Length:</td>
|
||||
<td>
|
||||
<select name="length">
|
||||
<option value="verbal">Verbal</option>
|
||||
<option value="1">1 week</option>
|
||||
<option value="2">2 weeks</option>
|
||||
<option value="4">4 weeks</option>
|
||||
<? if(check_perms("users_mod")) { ?>
|
||||
<option value="8">8 weeks</option>
|
||||
<? } ?>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Private Message:</td>
|
||||
<td>
|
||||
|
@ -23,21 +23,22 @@
|
||||
|
||||
// Main query
|
||||
$DB->query("SELECT
|
||||
SQL_CALC_FOUND_ROWS
|
||||
f.FriendID,
|
||||
f.Comment,
|
||||
m.Username,
|
||||
m.Uploaded,
|
||||
m.Downloaded,
|
||||
m.PermissionID,
|
||||
m.Paranoia,
|
||||
m.LastAccess,
|
||||
i.Avatar
|
||||
FROM friends AS f
|
||||
JOIN users_main AS m ON f.FriendID=m.ID
|
||||
JOIN users_info AS i ON f.FriendID=i.UserID
|
||||
WHERE f.UserID='$UserID'
|
||||
ORDER BY Username LIMIT $Limit");
|
||||
SQL_CALC_FOUND_ROWS
|
||||
f.FriendID,
|
||||
f.Comment,
|
||||
m.Username,
|
||||
m.Uploaded,
|
||||
m.Downloaded,
|
||||
m.PermissionID,
|
||||
m.Paranoia,
|
||||
m.LastAccess,
|
||||
i.Avatar
|
||||
FROM friends AS f
|
||||
JOIN users_main AS m ON f.FriendID=m.ID
|
||||
JOIN users_info AS i ON f.FriendID=i.UserID
|
||||
WHERE f.UserID='$UserID'
|
||||
ORDER BY Username
|
||||
LIMIT $Limit");
|
||||
$Friends = $DB->to_array(false, MYSQLI_BOTH, array(6, 'Paranoia'));
|
||||
|
||||
// Number of results (for pagination)
|
||||
@ -53,17 +54,17 @@
|
||||
<div class="linkbox">
|
||||
<?
|
||||
// Pagination
|
||||
$Pages=Format::get_pages($Page,$Results,FRIENDS_PER_PAGE,9);
|
||||
$Pages = Format::get_pages($Page, $Results, FRIENDS_PER_PAGE, 9);
|
||||
echo $Pages;
|
||||
?>
|
||||
</div>
|
||||
<div class="box pad">
|
||||
<?
|
||||
if($Results == 0) {
|
||||
if ($Results == 0) {
|
||||
echo '<p>You have no friends! :(</p>';
|
||||
}
|
||||
// Start printing out friends
|
||||
foreach($Friends as $Friend) {
|
||||
foreach ($Friends as $Friend) {
|
||||
list($FriendID, $Comment, $Username, $Uploaded, $Downloaded, $Class, $Paranoia, $LastAccess, $Avatar) = $Friend;
|
||||
?>
|
||||
<form class="manage_form" name="friends" action="friends.php" method="post">
|
||||
@ -72,17 +73,17 @@
|
||||
<tr class="colhead">
|
||||
<td colspan="3">
|
||||
<span style="float:left;"><?=Users::format_username($FriendID, true, true, true, true)?>
|
||||
<? if(check_paranoia('ratio', $Paranoia, $Class, $FriendID)) { ?>
|
||||
<? if (check_paranoia('ratio', $Paranoia, $Class, $FriendID)) { ?>
|
||||
Ratio: <strong><?=Format::get_ratio_html($Uploaded, $Downloaded)?></strong>
|
||||
<? } ?>
|
||||
<? if(check_paranoia('uploaded', $Paranoia, $Class, $FriendID)) { ?>
|
||||
<? }
|
||||
if (check_paranoia('uploaded', $Paranoia, $Class, $FriendID)) { ?>
|
||||
Up: <strong><?=Format::get_size($Uploaded)?></strong>
|
||||
<? } ?>
|
||||
<? if(check_paranoia('downloaded', $Paranoia, $Class, $FriendID)) { ?>
|
||||
<? }
|
||||
if (check_paranoia('downloaded', $Paranoia, $Class, $FriendID)) { ?>
|
||||
Down: <strong><?=Format::get_size($Downloaded)?></strong>
|
||||
<? } ?>
|
||||
</span>
|
||||
<? if(check_paranoia('lastseen', $Paranoia, $Class, $FriendID)) { ?>
|
||||
<? if (check_paranoia('lastseen', $Paranoia, $Class, $FriendID)) { ?>
|
||||
<span style="float:right;"><?=time_diff($LastAccess)?></span>
|
||||
<? } ?>
|
||||
</td>
|
||||
@ -90,17 +91,16 @@
|
||||
<tr>
|
||||
<td width="50px" valign="top">
|
||||
<?
|
||||
if(empty($HeavyInfo['DisableAvatars'])) {
|
||||
if(!empty($Avatar)) {
|
||||
if(check_perms('site_proxy_images')) {
|
||||
if (empty($HeavyInfo['DisableAvatars'])) {
|
||||
if (!empty($Avatar)) {
|
||||
if (check_perms('site_proxy_images')) {
|
||||
$Avatar = 'http'.($SSL?'s':'').'://'.SITE_URL.'/image.php?c=1&i='.urlencode($Avatar);
|
||||
}
|
||||
?>
|
||||
} ?>
|
||||
<img src="<?=$Avatar?>" alt="<?=$Username?>'s avatar" width="50px" />
|
||||
<? } else { ?>
|
||||
<? } else { ?>
|
||||
<img src="<?=STATIC_SERVER?>common/avatars/default.png" width="50px" alt="Default avatar" />
|
||||
<? }
|
||||
}?>
|
||||
<? }
|
||||
} ?>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<input type="hidden" name="friendid" value="<?=$FriendID?>" />
|
||||
@ -109,9 +109,8 @@
|
||||
</td>
|
||||
<td class="left" valign="top">
|
||||
<input type="submit" name="action" value="Update" /><br />
|
||||
<input type="submit" name="action" value="Defriend" /><br />
|
||||
<input type="submit" name="action" value="Remove friend" /><br />
|
||||
<input type="submit" name="action" value="Contact" /><br />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -125,7 +124,7 @@
|
||||
<div class="linkbox">
|
||||
<?=$Pages?>
|
||||
</div>
|
||||
<? // close <div class="thin"> ?>
|
||||
<? // close <div class="thin"> ?>
|
||||
</div>
|
||||
<?
|
||||
View::show_footer();
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?
|
||||
View::show_header('Disabled');
|
||||
if(empty($_POST['submit']) || empty($_POST['username'])) {
|
||||
if (empty($_POST['submit']) || empty($_POST['username'])) {
|
||||
?>
|
||||
<p class="warning">
|
||||
Your account has been disabled.<br />
|
||||
@ -10,16 +10,16 @@
|
||||
<strong>Be honest.</strong> At this point, lying will get you nowhere.<br /><br /><br />
|
||||
</p>
|
||||
|
||||
<strong>Before joining the disabled channel, please read our <br /> <span style="color:gold;">Golden Rules</span> which can be found <a style="color:#1464F4;" href="#" onclick="toggle_visibility('golden_rules')">here.</a></strong> <br /><br />
|
||||
<strong>Before joining the disabled channel, please read our <br /> <span style="color: gold;">Golden Rules</span> which can be found <a style="color: #1464F4;" href="#" onclick="toggle_visibility('golden_rules')">here</a>.</strong> <br /><br />
|
||||
|
||||
<script type="text/javascript">
|
||||
function toggle_visibility(id) {
|
||||
var e = document.getElementById(id);
|
||||
if(e.style.display == 'block')
|
||||
e.style.display = 'none';
|
||||
else
|
||||
e.style.display = 'block';
|
||||
}
|
||||
function toggle_visibility(id) {
|
||||
var e = document.getElementById(id);
|
||||
if (e.style.display == 'block')
|
||||
e.style.display = 'none';
|
||||
else
|
||||
e.style.display = 'block';
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="golden_rules" style="width:35%;font-weight:bold;display:none;" >
|
||||
@ -56,11 +56,11 @@ function toggle_visibility(id) {
|
||||
} else {
|
||||
$nick = $_POST['username'];
|
||||
$nick = preg_replace('/[^a-zA-Z0-9\[\]\\`\^\{\}\|_]/', '', $nick);
|
||||
if(strlen($nick) == 0) {
|
||||
$nick = "WhatGuest????";
|
||||
if (strlen($nick) == 0) {
|
||||
$nick = 'WhatGuest????';
|
||||
} else {
|
||||
if(is_numeric(substr($nick, 0, 1))) {
|
||||
$nick = "_" . $nick;
|
||||
if (is_numeric(substr($nick, 0, 1))) {
|
||||
$nick = '_' . $nick;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -68,8 +68,8 @@ function toggle_visibility(id) {
|
||||
<div class="header">
|
||||
<h3 id="general">Disabled IRC</h3>
|
||||
</div>
|
||||
<div class="box pad" style="padding:10px 0px 10px 0px;">
|
||||
<div style="padding:0px 10px 10px 20px;">
|
||||
<div class="box pad" style="padding: 10px 0px 10px 0px;">
|
||||
<div style="padding: 0px 10px 10px 20px;">
|
||||
<p>Please read the topic carefully.</p>
|
||||
</div>
|
||||
<applet codebase="static/irc/" code="IRCApplet.class" archive="irc.jar,sbox.jar" width="800" height="600" align="center">
|
||||
|
@ -95,9 +95,9 @@
|
||||
"We encourage all users to use this feature when they see a rules violation of any form.",
|
||||
"This will get quicker action than PMing a staff member will.",
|
||||
"Please restrict the use of this feature to reporting rules violations, and remember, this is for reporting comments, not replying to them."
|
||||
)
|
||||
),
|
||||
"artist_comment" => array(
|
||||
)
|
||||
),
|
||||
"artist_comment" => array(
|
||||
"title" => "Artist Comment",
|
||||
"guidelines" => array(
|
||||
"The report comment option is specifically for reporting when the <a href=\"rules.php?p=chat\">chat rules</a> have been broken, such as posts containing racism, offensive language, flaming, pornography, and other rules violations.",
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
include(SERVER_ROOT.'/sections/reports/array.php');
|
||||
|
||||
if(empty($_GET['type']) || empty($_GET['id']) || !is_number($_GET['id'])) {
|
||||
if (empty($_GET['type']) || empty($_GET['id']) || !is_number($_GET['id'])) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
if(!array_key_exists($_GET['type'], $Types)) {
|
||||
if (!array_key_exists($_GET['type'], $Types)) {
|
||||
error(403);
|
||||
}
|
||||
$Short = $_GET['type'];
|
||||
@ -14,10 +14,10 @@
|
||||
|
||||
$ID = $_GET['id'];
|
||||
|
||||
switch($Short) {
|
||||
switch ($Short) {
|
||||
case "user" :
|
||||
$DB->query("SELECT Username FROM users_main WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Username) = $DB->next_record();
|
||||
@ -26,18 +26,18 @@
|
||||
case "request_update" :
|
||||
$NoReason = true;
|
||||
$DB->query("SELECT Title, Description, TorrentID, CategoryID, Year FROM requests WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Name, $Desc, $Filled, $CategoryID, $Year) = $DB->next_record();
|
||||
if($Filled || ($CategoryID != 0 && ($Categories[$CategoryID-1] != "Music" || $Year != 0))) {
|
||||
if ($Filled || ($CategoryID != 0 && ($Categories[$CategoryID-1] != "Music" || $Year != 0))) {
|
||||
error(403);
|
||||
}
|
||||
break;
|
||||
|
||||
case "request" :
|
||||
$DB->query("SELECT Title, Description, TorrentID FROM requests WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Name, $Desc, $Filled) = $DB->next_record();
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
case "collage" :
|
||||
$DB->query("SELECT Name, Description FROM collages WHERE ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Name, $Desc) = $DB->next_record();
|
||||
@ -53,13 +53,13 @@
|
||||
|
||||
case "thread" :
|
||||
$DB->query("SELECT ft.Title, ft.ForumID, um.Username FROM forums_topics AS ft JOIN users_main AS um ON um.ID=ft.AuthorID WHERE ft.ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Title, $ForumID, $Username) = $DB->next_record();
|
||||
$DB->query("SELECT MinClassRead FROM forums WHERE ID = ".$ForumID);
|
||||
list($MinClassRead) = $DB->next_record();
|
||||
if(!empty($LoggedUser['DisableForums']) ||
|
||||
if (!empty($LoggedUser['DisableForums']) ||
|
||||
($MinClassRead > $LoggedUser['EffectiveClass'] && (!isset($LoggedUser['CustomForums'][$ForumID]) || $LoggedUser['CustomForums'][$ForumID] == 0)) ||
|
||||
(isset($LoggedUser['CustomForums'][$ForumID]) && $LoggedUser['CustomForums'][$ForumID] == 0)) {
|
||||
error(403);
|
||||
@ -68,7 +68,7 @@
|
||||
|
||||
case "post" :
|
||||
$DB->query("SELECT fp.Body, fp.TopicID, um.Username FROM forums_posts AS fp JOIN users_main AS um ON um.ID=fp.AuthorID WHERE fp.ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Body, $TopicID, $Username) = $DB->next_record();
|
||||
@ -76,7 +76,7 @@
|
||||
list($ForumID) = $DB->next_record();
|
||||
$DB->query("SELECT MinClassRead FROM forums WHERE ID = ".$ForumID);
|
||||
list($MinClassRead) = $DB->next_record();
|
||||
if(!empty($LoggedUser['DisableForums']) ||
|
||||
if (!empty($LoggedUser['DisableForums']) ||
|
||||
($MinClassRead > $LoggedUser['EffectiveClass'] && (!isset($LoggedUser['CustomForums'][$ForumID]) || $LoggedUser['CustomForums'][$ForumID] == 0)) ||
|
||||
(isset($LoggedUser['CustomForums'][$ForumID]) && $LoggedUser['CustomForums'][$ForumID] == 0)) {
|
||||
error(403);
|
||||
@ -88,13 +88,13 @@
|
||||
case "artist_comment":
|
||||
case "collages_comment" :
|
||||
$Table = $Short.'s';
|
||||
if($Short == "collages_comment") {
|
||||
if ($Short == "collages_comment") {
|
||||
$Column = "UserID";
|
||||
} else {
|
||||
$Column = "AuthorID";
|
||||
}
|
||||
$DB->query("SELECT ".$Short.".Body, um.Username FROM ".$Table." AS ".$Short." JOIN users_main AS um ON um.ID=".$Short.".".$Column." WHERE ".$Short.".ID=".$ID);
|
||||
if($DB->record_count() < 1) {
|
||||
if ($DB->record_count() < 1) {
|
||||
error(404);
|
||||
}
|
||||
list($Body, $Username) = $DB->next_record();
|
||||
@ -112,7 +112,7 @@
|
||||
<p>Following these guidelines will help the moderators deal with your report in a timely fashion. </p>
|
||||
<ul>
|
||||
<?
|
||||
foreach($Type['guidelines'] as $Guideline) {
|
||||
foreach ($Type['guidelines'] as $Guideline) {
|
||||
?>
|
||||
<li><?=$Guideline?></li>
|
||||
<? } ?>
|
||||
@ -125,7 +125,7 @@
|
||||
$Text = new TEXT;
|
||||
|
||||
|
||||
switch($Short) {
|
||||
switch ($Short) {
|
||||
case "user" :
|
||||
?>
|
||||
<p>You are reporting the user <strong><?=display_str($Username)?></strong></p>
|
||||
@ -271,7 +271,7 @@
|
||||
<?
|
||||
break;
|
||||
}
|
||||
if(empty($NoReason)) {
|
||||
if (empty($NoReason)) {
|
||||
?>
|
||||
<h3>Reason</h3>
|
||||
<div class="box pad center">
|
||||
|
@ -40,7 +40,7 @@
|
||||
$Where .= " AND Type = 'request_update'";
|
||||
}
|
||||
if (check_perms('site_moderate_forums')) {
|
||||
$Where .= " AND Type IN('collages_comment', 'Post', 'requests_comment', 'thread', 'torrents_comment', 'torrent_comments')";
|
||||
$Where .= " AND Type IN('collages_comment', 'post', 'requests_comment', 'thread', 'torrents_comment', 'torrent_comments', 'artist_comment')";
|
||||
}
|
||||
|
||||
}
|
||||
@ -83,13 +83,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="linkbox">
|
||||
<?
|
||||
<?
|
||||
// pagination
|
||||
$Pages = Format::get_pages($Page, $Results, REPORTS_PER_PAGE, 11);
|
||||
echo $Pages;
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
<?
|
||||
while (list($ReportID, $SnitchID, $SnitchName, $ThingID, $Short, $ReportedTime, $Reason, $Status, $ClaimerID, $Notes, $ResolverID) = $DB->next_record()) {
|
||||
$Type = $Types[$Short];
|
||||
$Reference = "reports.php?id=" . $ReportID . "#report" . $ReportID;
|
||||
@ -106,8 +106,7 @@
|
||||
<tr>
|
||||
<td class="center" colspan="2">
|
||||
<strong>
|
||||
<?
|
||||
switch ($Short) {
|
||||
<? switch ($Short) {
|
||||
case "user" :
|
||||
$DB->query("SELECT Username FROM users_main WHERE ID=" . $ThingID);
|
||||
if ($DB->record_count() < 1) {
|
||||
@ -211,13 +210,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<? if ($ClaimerID == $LoggedUser['ID']) { ?>
|
||||
<? if ($ClaimerID == $LoggedUser['ID']) { ?>
|
||||
<span id="claimed_<?=$ReportID?>">Claimed by <?=Users::format_username($ClaimerID, false, false, false, false)?> <a href="#" onclick="unClaim(<?=$ReportID?>); return false;" class="brackets">Unclaim</a></span>
|
||||
<? } else if ($ClaimerID) { ?>
|
||||
<? } else if ($ClaimerID) { ?>
|
||||
<span id="claimed_<?=$ReportID?>">Claimed by <?=Users::format_username($ClaimerID, false, false, false, false)?></span>
|
||||
<? } else { ?>
|
||||
<? } else { ?>
|
||||
<a href="#" id="claim_<?=$ReportID?>" onclick="claim(<?=$ReportID?>); return false;" class="brackets">Claim</a>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
|
||||
<a href="#" onclick="toggleNotes(<?=$ReportID?>); return false;" class="brackets">Toggle notes</a>
|
||||
|
||||
@ -228,34 +227,34 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<? if ($Status != "Resolved") { ?>
|
||||
<? if ($Status != "Resolved") { ?>
|
||||
<tr>
|
||||
<td class="center" colspan="2">
|
||||
<form id="report_form_<?=$ReportID?>" action="">
|
||||
<input type="hidden" name="reportid" value="<?=$ReportID?>" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="submit" onclick="return resolve(<?=$ReportID?>, <?=($ClaimerID == $LoggedUser['ID'] || !$ClaimerID) ? "true" : "false"?>)" name="submit" value="Resolve" />
|
||||
<input type="submit" onclick="return resolve(<?=$ReportID?>, <?=($ClaimerID == $LoggedUser['ID'] || !$ClaimerID) ? 'true' : 'false' ?>)" name="submit" value="Resolve" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<? } else {
|
||||
$ResolverInfo = Users::user_info($ResolverID);
|
||||
?>
|
||||
<? } else {
|
||||
$ResolverInfo = Users::user_info($ResolverID);
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Resolved by <a href="users.php?id=<?=$ResolverID?>"><?=$ResolverInfo['Username']?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<?
|
||||
<?
|
||||
$DB->set_query_id($Reports);
|
||||
}
|
||||
?>
|
||||
<div class="linkbox">
|
||||
<?
|
||||
<?
|
||||
echo $Pages;
|
||||
?>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?
|
||||
|
||||
if(!check_perms('admin_reports') && !check_perms('site_moderate_forums')){
|
||||
if (!check_perms('admin_reports') && !check_perms('site_moderate_forums')) {
|
||||
error(403);
|
||||
}
|
||||
View::show_header('Other reports stats');
|
||||
@ -14,11 +14,18 @@
|
||||
<a href="reports.php?action=stats">Stats</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box pad thin" style="padding: 0px 0px 0px 20px; margin-left: auto; margin-right: auto">
|
||||
<table class="layout">
|
||||
<div class="box pad thin" style="padding: 0px 0px 0px 20px; margin-left: auto; margin-right: auto;">
|
||||
<table class="layout">
|
||||
<?
|
||||
if(check_perms('admin_reports')) {
|
||||
$DB->query("SELECT um.Username, COUNT(r.ID) AS Reports FROM reports AS r JOIN users_main AS um ON um.ID=r.ResolverID WHERE r.ReportedTime > '2009-08-21 22:39:41' AND r.ReportedTime > NOW() - INTERVAL 24 HOUR GROUP BY r.ResolverID ORDER BY Reports DESC");
|
||||
if (check_perms('admin_reports')) :
|
||||
$DB->query("SELECT um.Username,
|
||||
COUNT(r.ID) AS Reports
|
||||
FROM reports AS r
|
||||
JOIN users_main AS um ON um.ID=r.ResolverID
|
||||
WHERE r.ReportedTime > '2009-08-21 22:39:41'
|
||||
AND r.ReportedTime > NOW() - INTERVAL 24 HOUR
|
||||
GROUP BY r.ResolverID
|
||||
ORDER BY Reports DESC");
|
||||
$Results = $DB->to_array();
|
||||
?>
|
||||
<tr>
|
||||
@ -29,20 +36,27 @@
|
||||
<td class="head colhead_dark">Username</td>
|
||||
<td class="head colhead_dark">Reports</td>
|
||||
</tr>
|
||||
<? foreach($Results as $Result) {
|
||||
list($Username, $Reports) = $Result;
|
||||
<? foreach ($Results as $Result) {
|
||||
list($Username, $Reports) = $Result;
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$Username?></td>
|
||||
<td><?=number_format($Reports)?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?
|
||||
$DB->query("SELECT um.Username, COUNT(r.ID) AS Reports FROM reports AS r JOIN users_main AS um ON um.ID=r.ResolverID WHERE r.ReportedTime > '2009-08-21 22:39:41' AND r.ReportedTime > NOW() - INTERVAL 1 WEEK GROUP BY r.ResolverID ORDER BY Reports DESC");
|
||||
$DB->query("SELECT um.Username,
|
||||
COUNT(r.ID) AS Reports
|
||||
FROM reports AS r
|
||||
JOIN users_main AS um ON um.ID=r.ResolverID
|
||||
WHERE r.ReportedTime > '2009-08-21 22:39:41'
|
||||
AND r.ReportedTime > NOW() - INTERVAL 1 WEEK
|
||||
GROUP BY r.ResolverID
|
||||
ORDER BY Reports DESC");
|
||||
$Results = $DB->to_array();
|
||||
?>
|
||||
<td class="label"><strong>Reports resolved in the last week</strong></td>
|
||||
@ -52,20 +66,27 @@
|
||||
<td class="head colhead_dark">Username</td>
|
||||
<td class="head colhead_dark">Reports</td>
|
||||
</tr>
|
||||
<? foreach($Results as $Result) {
|
||||
list($Username, $Reports) = $Result;
|
||||
<? foreach ($Results as $Result) {
|
||||
list($Username, $Reports) = $Result;
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$Username?></td>
|
||||
<td><?=number_format($Reports)?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?
|
||||
$DB->query("SELECT um.Username, COUNT(r.ID) AS Reports FROM reports AS r JOIN users_main AS um ON um.ID=r.ResolverID WHERE r.ReportedTime > '2009-08-21 22:39:41' AND r.ReportedTime > NOW() - INTERVAL 1 MONTH GROUP BY r.ResolverID ORDER BY Reports DESC");
|
||||
$DB->query("SELECT um.Username,
|
||||
COUNT(r.ID) AS Reports
|
||||
FROM reports AS r
|
||||
JOIN users_main AS um ON um.ID=r.ResolverID
|
||||
WHERE r.ReportedTime > '2009-08-21 22:39:41'
|
||||
AND r.ReportedTime > NOW() - INTERVAL 1 MONTH
|
||||
GROUP BY r.ResolverID
|
||||
ORDER BY Reports DESC");
|
||||
$Results = $DB->to_array();
|
||||
?>
|
||||
<td class="label"><strong>Reports resolved in the last month</strong></td>
|
||||
@ -75,68 +96,81 @@
|
||||
<td class="head colhead_dark">Username</td>
|
||||
<td class="head colhead_dark">Reports</td>
|
||||
</tr>
|
||||
<? foreach($Results as $Result) {
|
||||
list($Username, $Reports) = $Result;
|
||||
<? foreach ($Results as $Result) {
|
||||
list($Username, $Reports) = $Result;
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$Username?></td>
|
||||
<td><?=number_format($Reports)?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?
|
||||
$DB->query("SELECT um.Username, COUNT(r.ID) AS Reports FROM reports AS r JOIN users_main AS um ON um.ID=r.ResolverID GROUP BY r.ResolverID ORDER BY Reports DESC");
|
||||
$DB->query("SELECT um.Username,
|
||||
COUNT(r.ID) AS Reports
|
||||
FROM reports AS r
|
||||
JOIN users_main AS um ON um.ID=r.ResolverID
|
||||
GROUP BY r.ResolverID
|
||||
ORDER BY Reports DESC");
|
||||
$Results = $DB->to_array();
|
||||
?>
|
||||
<td class="label"><strong>Reports resolved since 'other' reports (2009-08-21)</strong></td>
|
||||
<td class="label"><strong>Reports resolved since "other" reports (2009-08-21)</strong></td>
|
||||
<td>
|
||||
<table style="width: 50%; margin-left: auto; margin-right: auto;" class="border">
|
||||
<tr>
|
||||
<td class="head colhead_dark">Username</td>
|
||||
<td class="head colhead_dark">Reports</td>
|
||||
</tr>
|
||||
<? foreach($Results as $Result) {
|
||||
list($Username, $Reports) = $Result;
|
||||
<? foreach ($Results as $Result) {
|
||||
list($Username, $Reports) = $Result;
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$Username?></td>
|
||||
<td><?=number_format($Reports)?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<tr>
|
||||
<?
|
||||
$DB->query("select u.Username, count(LastPostAuthorID) as Trashed from forums_topics as f left join users_main as u on u.id = LastPostAuthorID where ForumID = 12 group by LastPostAuthorID order by Trashed desc limit 30;");
|
||||
<? endif; ?>
|
||||
<tr>
|
||||
<?
|
||||
$DB->query("SELECT u.Username,
|
||||
count(LastPostAuthorID) as Trashed
|
||||
FROM forums_topics as f
|
||||
LEFT JOIN users_main as u on u.id = LastPostAuthorID
|
||||
WHERE ForumID = 12
|
||||
GROUP BY LastPostAuthorID
|
||||
ORDER BY Trashed DESC
|
||||
LIMIT 30;");
|
||||
$Results = $DB->to_array();
|
||||
?>
|
||||
<td class="label"><strong>Threads trashed since the beginning of time</strong></td>
|
||||
<td>
|
||||
<table style="width: 50%; margin-left: auto; margin-right: auto;" class="border">
|
||||
<tr>
|
||||
<td class="head colhead_dark">Place</td>
|
||||
<td class="head colhead_dark">Username</td>
|
||||
<td class="head colhead_dark">Trashed</td>
|
||||
</tr>
|
||||
<?
|
||||
$i = 1;
|
||||
foreach($Results as $Result) {
|
||||
list($Username, $Trashed) = $Result;
|
||||
<td class="label"><strong>Threads trashed since the beginning of time</strong></td>
|
||||
<td>
|
||||
<table style="width: 50%; margin-left: auto; margin-right: auto;" class="border">
|
||||
<tr>
|
||||
<td class="head colhead_dark">Place</td>
|
||||
<td class="head colhead_dark">Username</td>
|
||||
<td class="head colhead_dark">Trashed</td>
|
||||
</tr>
|
||||
<?
|
||||
$i = 1;
|
||||
foreach ($Results as $Result) {
|
||||
list($Username, $Trashed) = $Result;
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$i?></td>
|
||||
<td><?=$Username?></td>
|
||||
<td><?=number_format($Trashed)?></td>
|
||||
</tr>
|
||||
<? $i++; } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?=$i?></td>
|
||||
<td><?=$Username?></td>
|
||||
<td><?=number_format($Trashed)?></td>
|
||||
</tr>
|
||||
<? $i++;
|
||||
} ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?
|
||||
|
@ -5,7 +5,7 @@
|
||||
* replicated on static.php.
|
||||
*/
|
||||
|
||||
if(!check_perms('admin_reports')){
|
||||
if (!check_perms('admin_reports')) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
@ -15,66 +15,66 @@
|
||||
|
||||
|
||||
$DB->query("SELECT
|
||||
r.ID,
|
||||
r.ReporterID,
|
||||
reporter.Username,
|
||||
r.TorrentID,
|
||||
r.Type,
|
||||
r.UserComment,
|
||||
r.ResolverID,
|
||||
resolver.Username,
|
||||
r.Status,
|
||||
r.ReportedTime,
|
||||
r.LastChangeTime,
|
||||
r.ModComment,
|
||||
r.Track,
|
||||
r.Image,
|
||||
r.ExtraID,
|
||||
r.Link,
|
||||
r.LogMessage,
|
||||
tg.Name,
|
||||
tg.ID,
|
||||
CASE COUNT(ta.GroupID)
|
||||
WHEN 1 THEN aa.ArtistID
|
||||
WHEN 0 THEN '0'
|
||||
ELSE '0'
|
||||
END AS ArtistID,
|
||||
CASE COUNT(ta.GroupID)
|
||||
WHEN 1 THEN aa.Name
|
||||
WHEN 0 THEN ''
|
||||
ELSE 'Various Artists'
|
||||
END AS ArtistName,
|
||||
tg.Year,
|
||||
tg.CategoryID,
|
||||
t.Time,
|
||||
t.Remastered,
|
||||
t.RemasterTitle,
|
||||
t.RemasterYear,
|
||||
t.Media,
|
||||
t.Format,
|
||||
t.Encoding,
|
||||
t.Size,
|
||||
t.HasCue,
|
||||
t.HasLog,
|
||||
t.LogScore,
|
||||
t.UserID AS UploaderID,
|
||||
t.Tasted,
|
||||
uploader.Username
|
||||
r.ID,
|
||||
r.ReporterID,
|
||||
reporter.Username,
|
||||
r.TorrentID,
|
||||
r.Type,
|
||||
r.UserComment,
|
||||
r.ResolverID,
|
||||
resolver.Username,
|
||||
r.Status,
|
||||
r.ReportedTime,
|
||||
r.LastChangeTime,
|
||||
r.ModComment,
|
||||
r.Track,
|
||||
r.Image,
|
||||
r.ExtraID,
|
||||
r.Link,
|
||||
r.LogMessage,
|
||||
tg.Name,
|
||||
tg.ID,
|
||||
CASE COUNT(ta.GroupID)
|
||||
WHEN 1 THEN aa.ArtistID
|
||||
WHEN 0 THEN '0'
|
||||
ELSE '0'
|
||||
END AS ArtistID,
|
||||
CASE COUNT(ta.GroupID)
|
||||
WHEN 1 THEN aa.Name
|
||||
WHEN 0 THEN ''
|
||||
ELSE 'Various Artists'
|
||||
END AS ArtistName,
|
||||
tg.Year,
|
||||
tg.CategoryID,
|
||||
t.Time,
|
||||
t.Remastered,
|
||||
t.RemasterTitle,
|
||||
t.RemasterYear,
|
||||
t.Media,
|
||||
t.Format,
|
||||
t.Encoding,
|
||||
t.Size,
|
||||
t.HasCue,
|
||||
t.HasLog,
|
||||
t.LogScore,
|
||||
t.UserID AS UploaderID,
|
||||
t.Tasted,
|
||||
uploader.Username
|
||||
FROM reportsv2 AS r
|
||||
LEFT JOIN torrents AS t ON t.ID=r.TorrentID
|
||||
LEFT JOIN torrents_group AS tg ON tg.ID=t.GroupID
|
||||
LEFT JOIN torrents_artists AS ta ON ta.GroupID=tg.ID AND ta.Importance='1'
|
||||
LEFT JOIN artists_alias AS aa ON aa.AliasID=ta.AliasID
|
||||
LEFT JOIN users_main AS resolver ON resolver.ID=r.ResolverID
|
||||
LEFT JOIN users_main AS reporter ON reporter.ID=r.ReporterID
|
||||
LEFT JOIN users_main AS uploader ON uploader.ID=t.UserID
|
||||
LEFT JOIN torrents AS t ON t.ID=r.TorrentID
|
||||
LEFT JOIN torrents_group AS tg ON tg.ID=t.GroupID
|
||||
LEFT JOIN torrents_artists AS ta ON ta.GroupID=tg.ID AND ta.Importance='1'
|
||||
LEFT JOIN artists_alias AS aa ON aa.AliasID=ta.AliasID
|
||||
LEFT JOIN users_main AS resolver ON resolver.ID=r.ResolverID
|
||||
LEFT JOIN users_main AS reporter ON reporter.ID=r.ReporterID
|
||||
LEFT JOIN users_main AS uploader ON uploader.ID=t.UserID
|
||||
WHERE r.Status = 'New'
|
||||
GROUP BY r.ID
|
||||
ORDER BY ReportedTime ASC
|
||||
LIMIT 1");
|
||||
|
||||
|
||||
if($DB->record_count() < 1) {
|
||||
if ($DB->record_count() < 1) {
|
||||
die();
|
||||
}
|
||||
|
||||
@ -83,13 +83,13 @@
|
||||
$ModComment, $Tracks, $Images, $ExtraIDs, $Links, $LogMessage, $GroupName, $GroupID, $ArtistID, $ArtistName, $Year, $CategoryID, $Time, $Remastered, $RemasterTitle,
|
||||
$RemasterYear, $Media, $Format, $Encoding, $Size, $HasCue, $HasLog, $LogScore, $UploaderID, $UploaderName) = $DB->next_record(MYSQLI_BOTH, array("ModComment"));
|
||||
|
||||
if(!$GroupID) {
|
||||
if (!$GroupID) {
|
||||
//Torrent already deleted
|
||||
$DB->query("UPDATE reportsv2 SET
|
||||
Status='Resolved',
|
||||
LastChangeTime='".sqltime()."',
|
||||
ModComment='Report already dealt with (torrent deleted)'
|
||||
WHERE ID=".$ReportID);
|
||||
$DB->query("UPDATE reportsv2
|
||||
SET Status='Resolved',
|
||||
LastChangeTime='".sqltime()."',
|
||||
ModComment='Report already dealt with (torrent deleted)'
|
||||
WHERE ID=".$ReportID);
|
||||
?>
|
||||
<div>
|
||||
<table class="layout">
|
||||
@ -103,14 +103,14 @@
|
||||
<?
|
||||
die();
|
||||
}
|
||||
$DB->query("UPDATE reportsv2 SET Status='InProgress',
|
||||
ResolverID=".$LoggedUser['ID']."
|
||||
WHERE ID=".$ReportID);
|
||||
|
||||
$DB->query("UPDATE reportsv2
|
||||
SET Status='InProgress',
|
||||
ResolverID=".$LoggedUser['ID']."
|
||||
WHERE ID=".$ReportID);
|
||||
|
||||
if (array_key_exists($Type, $Types[$CategoryID])) {
|
||||
$ReportType = $Types[$CategoryID][$Type];
|
||||
} else if(array_key_exists($Type,$Types['master'])) {
|
||||
} elseif (array_key_exists($Type,$Types['master'])) {
|
||||
$ReportType = $Types['master'][$Type];
|
||||
} else {
|
||||
//There was a type but it wasn't an option!
|
||||
@ -154,7 +154,7 @@
|
||||
<tr>
|
||||
<td class="label"><a href="reportsv2.php?view=report&id=<?=$ReportID?>">Reported</a> torrent:</td>
|
||||
<td colspan="3">
|
||||
<? if(!$GroupID) { ?>
|
||||
<? if (!$GroupID) { ?>
|
||||
<a href="log.php?search=Torrent+<?=$TorrentID?>"><?=$TorrentID?></a> (Deleted)
|
||||
<? } else { ?>
|
||||
<?=$LinkName?>
|
||||
@ -162,129 +162,124 @@
|
||||
uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
|
||||
<br />
|
||||
<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>
|
||||
<? $DB->query("SELECT r.ID
|
||||
<? $DB->query("SELECT r.ID
|
||||
FROM reportsv2 AS r
|
||||
LEFT JOIN torrents AS t ON t.ID=r.TorrentID
|
||||
LEFT JOIN torrents AS t ON t.ID=r.TorrentID
|
||||
WHERE r.Status != 'Resolved'
|
||||
AND t.GroupID=$GroupID");
|
||||
AND t.GroupID=$GroupID");
|
||||
$GroupOthers = ($DB->record_count() - 1);
|
||||
|
||||
if($GroupOthers > 0) { ?>
|
||||
if ($GroupOthers > 0) { ?>
|
||||
<div style="text-align: right;">
|
||||
<a href="reportsv2.php?view=group&id=<?=$GroupID?>">There <?=(($GroupOthers > 1) ? "are $GroupOthers other reports" : "is 1 other report")?> for torrents in this group</a>
|
||||
</div>
|
||||
<? $DB->query("SELECT t.UserID
|
||||
<? $DB->query("SELECT t.UserID
|
||||
FROM reportsv2 AS r
|
||||
JOIN torrents AS t ON t.ID=r.TorrentID
|
||||
JOIN torrents AS t ON t.ID=r.TorrentID
|
||||
WHERE r.Status != 'Resolved'
|
||||
AND t.UserID=$UploaderID");
|
||||
AND t.UserID=$UploaderID");
|
||||
$UploaderOthers = ($DB->record_count() - 1);
|
||||
|
||||
if($UploaderOthers > 0) { ?>
|
||||
if ($UploaderOthers > 0) { ?>
|
||||
<div style="text-align: right;">
|
||||
<a href="reportsv2.php?view=uploader&id=<?=$UploaderID?>">There <?=(($UploaderOthers > 1) ? "are $UploaderOthers other reports" : "is 1 other report")?> for torrents uploaded by this user</a>
|
||||
</div>
|
||||
<? }
|
||||
<? }
|
||||
|
||||
$DB->query("SELECT DISTINCT req.ID,
|
||||
req.FillerID,
|
||||
um.Username,
|
||||
req.TimeFilled
|
||||
req.FillerID,
|
||||
um.Username,
|
||||
req.TimeFilled
|
||||
FROM requests AS req
|
||||
LEFT JOIN torrents AS t ON t.ID=req.TorrentID
|
||||
LEFT JOIN reportsv2 AS rep ON rep.TorrentID=t.ID
|
||||
JOIN users_main AS um ON um.ID=req.FillerID
|
||||
LEFT JOIN torrents AS t ON t.ID=req.TorrentID
|
||||
LEFT JOIN reportsv2 AS rep ON rep.TorrentID=t.ID
|
||||
JOIN users_main AS um ON um.ID=req.FillerID
|
||||
WHERE rep.Status != 'Resolved'
|
||||
AND req.TimeFilled > '2010-03-04 02:31:49'
|
||||
AND req.TorrentID=$TorrentID");
|
||||
AND req.TimeFilled > '2010-03-04 02:31:49'
|
||||
AND req.TorrentID=$TorrentID");
|
||||
$Requests = ($DB->record_count());
|
||||
if($Requests > 0) {
|
||||
if ($Requests > 0) {
|
||||
while(list($RequestID, $FillerID, $FillerName, $FilledTime) = $DB->next_record()) {
|
||||
?>
|
||||
<div style="text-align: right;">
|
||||
<strong class="important_text"><a href="user.php?id=<?=$FillerID?>"><?=$FillerName?></a> used this torrent to fill <a href="requests.php?action=view&id=<?=$RequestID?>">this request</a> <?=time_diff($FilledTime)?></strong>
|
||||
</div>
|
||||
<? }
|
||||
<? }
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<? if($Tracks) { ?>
|
||||
<? if ($Tracks) { ?>
|
||||
<tr>
|
||||
<td class="label">Relevant tracks:</td>
|
||||
<td colspan="3">
|
||||
<?=str_replace(" ", ", ", $Tracks)?>
|
||||
</td>
|
||||
</tr>
|
||||
<? }
|
||||
<? }
|
||||
|
||||
if($Links) {
|
||||
?>
|
||||
if ($Links) { ?>
|
||||
<tr>
|
||||
<td class="label">Relevant links:</td>
|
||||
<td colspan="3">
|
||||
<?
|
||||
<?
|
||||
$Links = explode(" ", $Links);
|
||||
foreach($Links as $Link) {
|
||||
foreach ($Links as $Link) {
|
||||
|
||||
if ($local_url = $Text->local_url($Link)) {
|
||||
$Link = $local_url;
|
||||
}
|
||||
?>
|
||||
} ?>
|
||||
<a href="<?=$Link?>"><?=$Link?></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<?
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
<?
|
||||
}
|
||||
|
||||
if($ExtraIDs) {
|
||||
?>
|
||||
if ($ExtraIDs) { ?>
|
||||
<tr>
|
||||
<td class="label">Relevant other torrents:</td>
|
||||
<td colspan="3">
|
||||
<?
|
||||
<?
|
||||
$First = true;
|
||||
$Extras = explode(" ", $ExtraIDs);
|
||||
foreach($Extras as $ExtraID) {
|
||||
foreach ($Extras as $ExtraID) {
|
||||
|
||||
|
||||
$DB->query("SELECT
|
||||
tg.Name,
|
||||
tg.ID,
|
||||
CASE COUNT(ta.GroupID)
|
||||
WHEN 1 THEN aa.ArtistID
|
||||
WHEN 0 THEN '0'
|
||||
ELSE '0'
|
||||
END AS ArtistID,
|
||||
CASE COUNT(ta.GroupID)
|
||||
WHEN 1 THEN aa.Name
|
||||
WHEN 0 THEN ''
|
||||
ELSE 'Various Artists'
|
||||
END AS ArtistName,
|
||||
tg.Year,
|
||||
t.Time,
|
||||
t.Remastered,
|
||||
t.RemasterTitle,
|
||||
t.RemasterYear,
|
||||
t.Media,
|
||||
t.Format,
|
||||
t.Encoding,
|
||||
t.Size,
|
||||
t.HasCue,
|
||||
t.HasLog,
|
||||
t.LogScore,
|
||||
t.UserID AS UploaderID,
|
||||
uploader.Username
|
||||
tg.Name,
|
||||
tg.ID,
|
||||
CASE COUNT(ta.GroupID)
|
||||
WHEN 1 THEN aa.ArtistID
|
||||
WHEN 0 THEN '0'
|
||||
ELSE '0'
|
||||
END AS ArtistID,
|
||||
CASE COUNT(ta.GroupID)
|
||||
WHEN 1 THEN aa.Name
|
||||
WHEN 0 THEN ''
|
||||
ELSE 'Various Artists'
|
||||
END AS ArtistName,
|
||||
tg.Year,
|
||||
t.Time,
|
||||
t.Remastered,
|
||||
t.RemasterTitle,
|
||||
t.RemasterYear,
|
||||
t.Media,
|
||||
t.Format,
|
||||
t.Encoding,
|
||||
t.Size,
|
||||
t.HasCue,
|
||||
t.HasLog,
|
||||
t.LogScore,
|
||||
t.UserID AS UploaderID,
|
||||
uploader.Username
|
||||
FROM torrents AS t
|
||||
LEFT JOIN torrents_group AS tg ON tg.ID=t.GroupID
|
||||
LEFT JOIN torrents_artists AS ta ON ta.GroupID=tg.ID AND ta.Importance='1'
|
||||
LEFT JOIN artists_alias AS aa ON aa.AliasID=ta.AliasID
|
||||
LEFT JOIN users_main AS uploader ON uploader.ID=t.UserID
|
||||
LEFT JOIN torrents_group AS tg ON tg.ID=t.GroupID
|
||||
LEFT JOIN torrents_artists AS ta ON ta.GroupID=tg.ID AND ta.Importance='1'
|
||||
LEFT JOIN artists_alias AS aa ON aa.AliasID=ta.AliasID
|
||||
LEFT JOIN users_main AS uploader ON uploader.ID=t.UserID
|
||||
WHERE t.ID='$ExtraID'
|
||||
GROUP BY tg.ID");
|
||||
|
||||
@ -292,7 +287,7 @@
|
||||
$ExtraRemasterYear, $ExtraMedia, $ExtraFormat, $ExtraEncoding, $ExtraSize, $ExtraHasCue, $ExtraHasLog, $ExtraLogScore, $ExtraUploaderID, $ExtraUploaderName) = Misc::display_array($DB->next_record());
|
||||
|
||||
|
||||
if($ExtraGroupName) {
|
||||
if ($ExtraGroupName) {
|
||||
if ($ArtistID == 0 && empty($ArtistName)) {
|
||||
$ExtraLinkName = "<a href='torrents.php?id=$ExtraGroupID'>$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : "")."</a> <a href='torrents.php?torrentid=$ExtraID'> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : "")."</a> ".($ExtraHasLog == '1' ? " <a href='torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID'>(Log: $ExtraLogScore %)</a>" : "")." (".number_format($ExtraSize/(1024*1024), 2)." MB)";
|
||||
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
||||
@ -302,44 +297,39 @@
|
||||
}
|
||||
|
||||
?>
|
||||
<?=($First ? "" : "<br />")?>
|
||||
<?=($First ? '' : '<br />')?>
|
||||
<?=$ExtraLinkName?>
|
||||
<a href="torrents.php?action=download&id=<?=$ExtraID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download" class="brackets">DL</a>
|
||||
uploaded by <a href="user.php?id=<?=$ExtraUploaderID?>"><?=$ExtraUploaderName?></a> <?=time_diff($ExtraTime)?> <a href="#" onclick="Switch(<?=$ReportID?>, <?=$TorrentID?>, <?=$ExtraID?>); return false;" class="brackets">Switch</a>
|
||||
<?
|
||||
<?
|
||||
$First = false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
<?
|
||||
}
|
||||
|
||||
if($Images) {
|
||||
?>
|
||||
if ($Images) { ?>
|
||||
<tr>
|
||||
<td class="label">Relevant images:</td>
|
||||
<td colspan="3">
|
||||
<?
|
||||
<?
|
||||
$Images = explode(" ", $Images);
|
||||
foreach($Images as $Image) {
|
||||
foreach ($Images as $Image) {
|
||||
$Image = 'http'.($SSL?'s':'').'://'.SITE_URL.'/image.php?c=1&i='.urlencode($Image);
|
||||
?>
|
||||
<img style="max-width: 200px;" onclick="lightbox.init(this,200);" src="<?=$Image?>" alt="Relevant image" />
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<?
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<?
|
||||
} ?>
|
||||
<tr>
|
||||
<td class="label">User comment:</td>
|
||||
<td colspan="3"><?=$Text->full_format($UserComment)?></td>
|
||||
</tr>
|
||||
<? // END REPORTED STUFF :|: BEGIN MOD STUFF ?>
|
||||
<? // END REPORTED STUFF :|: BEGIN MOD STUFF ?>
|
||||
<tr>
|
||||
<td class="label">Report comment:</td>
|
||||
<td colspan="3">
|
||||
@ -361,25 +351,25 @@
|
||||
}
|
||||
array_multisort($Priorities, SORT_ASC, $TypeList);
|
||||
|
||||
foreach($TypeList as $Type => $Data) {
|
||||
foreach ($TypeList as $Type => $Data) {
|
||||
?>
|
||||
<option value="<?=$Type?>"><?=$Data['title']?></option>
|
||||
<? } ?>
|
||||
<option value="<?=$Type?>"><?=$Data['title']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<span id="options<?=$ReportID?>">
|
||||
<? if(check_perms('users_mod')) { ?>
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<span title="Delete torrent?">
|
||||
<label for="delete<?=$ReportID?>"><strong>Delete</strong></label>
|
||||
<input type="checkbox" name="delete" id="delete<?=$ReportID?>" />
|
||||
</span>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
<span title="Warning length in weeks">
|
||||
<strong>Warning</strong>
|
||||
<select name="warning" id="warning<?=$ReportID?>">
|
||||
<?
|
||||
for($i = 0; $i < 9; $i++) {
|
||||
?>
|
||||
<option value="<?=$i?>"><?=$i?></option>
|
||||
<option value="<?=$i?>"><?=$i?></option>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
@ -394,7 +384,7 @@
|
||||
<input type="button" name="update_resolve" id="update_resolve<?=$ReportID?>" value="Update now" onclick="UpdateResolve(<?=$ReportID?>)" />
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">
|
||||
@ -414,14 +404,14 @@
|
||||
<tr>
|
||||
<td class="label"><strong>Extra</strong> log message:</td>
|
||||
<td>
|
||||
<input type="text" name="log_message" id="log_message<?=$ReportID?>" size="40" <? if($ExtraIDs) {
|
||||
$Extras = explode(" ", $ExtraIDs);
|
||||
$Value = "";
|
||||
foreach($Extras as $ExtraID) {
|
||||
<input type="text" name="log_message" id="log_message<?=$ReportID?>" size="40"<? if ($ExtraIDs) {
|
||||
$Extras = explode(' ', $ExtraIDs);
|
||||
$Value = '';
|
||||
foreach ($Extras as $ExtraID) {
|
||||
$Value .= 'https://'.SSL_SITE_URL.'/torrents.php?torrentid='.$ExtraID.' ';
|
||||
}
|
||||
echo 'value="'.trim($Value).'"';
|
||||
} ?>/>
|
||||
echo ' value="'.trim($Value).'"';
|
||||
} ?> />
|
||||
</td>
|
||||
<td class="label"><strong>Extra</strong> staff notes:</td>
|
||||
<td>
|
||||
|
@ -4,24 +4,88 @@
|
||||
* they visit reportsv2.php?id=xxx
|
||||
*/
|
||||
|
||||
include(SERVER_ROOT.'/sections/torrents/functions.php');
|
||||
include(SERVER_ROOT.'/classes/class_text.php');
|
||||
|
||||
$Text = NEW TEXT;
|
||||
|
||||
//If we're not coming from torrents.php, check we're being returned because of an error.
|
||||
if(!isset($_GET['id']) || !is_number($_GET['id'])) {
|
||||
if(!isset($Err)) {
|
||||
error(404);
|
||||
}
|
||||
} else {
|
||||
$TorrentID = $_GET['id'];
|
||||
$DB->query("SELECT tg.CategoryID FROM torrents_group AS tg LEFT JOIN torrents AS t ON t.GroupID=tg.ID WHERE t.ID=".$_GET['id']);
|
||||
list($CategoryID) = $DB->next_record();
|
||||
$TorrentID = $_GET['id'];
|
||||
$DB->query("SELECT tg.CategoryID, t.GroupID FROM torrents_group AS tg LEFT JOIN torrents AS t ON t.GroupID=tg.ID WHERE t.ID=" . $_GET['id']);
|
||||
list($CategoryID, $GroupID) = $DB->next_record();
|
||||
$Artists = Artists::get_artist($GroupID);
|
||||
$TorrentCache = get_group_info($GroupID, true, $RevisionID);
|
||||
$GroupDetails = $TorrentCache[0];
|
||||
$TorrentList = $TorrentCache[1];
|
||||
//Resolve the torrentlist to the one specific torrent being reported
|
||||
foreach ($TorrentList as &$Torrent) {
|
||||
//Remove unneeded entries
|
||||
if ($Torrent["ID"] != $TorrentID)
|
||||
unset($TorrentList[$Torrent["ID"]]);
|
||||
}
|
||||
// Group details
|
||||
list($WikiBody, $WikiImage, $GroupID, $GroupName, $GroupYear,
|
||||
$GroupRecordLabel, $GroupCatalogueNumber, $ReleaseType, $GroupCategoryID,
|
||||
$GroupTime, $GroupVanityHouse, $TorrentTags, $TorrentTagIDs, $TorrentTagUserIDs,
|
||||
$TagPositiveVotes, $TagNegativeVotes, $GroupFlags) = array_values($GroupDetails);
|
||||
|
||||
$DisplayName = $GroupName;
|
||||
$AltName = $GroupName; // Goes in the alt text of the image
|
||||
$Title = $GroupName; // goes in <title>
|
||||
$WikiBody = $Text->full_format($WikiBody);
|
||||
|
||||
//Get the artist name, group name etc.
|
||||
$Artists = Artists::get_artist($GroupID);
|
||||
if ($Artists) {
|
||||
$DisplayName = '<span dir="ltr">' . Artists::display_artists($Artists, true) . '<a href="torrents.php?torrentid=' . $TorrentID . '">' .$DisplayName . '</a></span>';
|
||||
$AltName = display_str(Artists::display_artists($Artists, false)) . $AltName;
|
||||
$Title = $AltName;
|
||||
}
|
||||
if ($GroupYear > 0) {
|
||||
$DisplayName.=' [' . $GroupYear . ']';
|
||||
$AltName.=' [' . $GroupYear . ']';
|
||||
$Title.= ' [' . $GroupYear . ']';
|
||||
}
|
||||
if ($GroupVanityHouse) {
|
||||
$DisplayName.=' [Vanity House]';
|
||||
$AltName.=' [Vanity House]';
|
||||
}
|
||||
if ($GroupCategoryID == 1) {
|
||||
$DisplayName.=' [' . $ReleaseTypes[$ReleaseType] . ']';
|
||||
$AltName.=' [' . $ReleaseTypes[$ReleaseType] . ']';
|
||||
}
|
||||
}
|
||||
|
||||
View::show_header('Report', 'reportsv2');
|
||||
View::show_header('Report', 'reportsv2,jquery,browse,torrent,bbcode,recommend');
|
||||
?>
|
||||
|
||||
<div class="thin">
|
||||
<div class="header">
|
||||
<h2>Report a torrent</h2>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<h3><?=$DisplayName?></h3>
|
||||
</div>
|
||||
<div class="thin">
|
||||
<table class="torrent_table details<?=$GroupFlags['IsSnatched'] ? ' snatched' : ''?>" id="torrent_details">
|
||||
<tr class="colhead_dark">
|
||||
<td width="80%"><strong>Reported torrent</strong></td>
|
||||
<td><strong>Size</strong></td>
|
||||
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" alt="Snatches" title="Snatches" /></td>
|
||||
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" alt="Seeders" title="Seeders" /></td>
|
||||
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" alt="Leechers" title="Leechers" /></td>
|
||||
</tr>
|
||||
<?
|
||||
build_torrents_table($Cache, $DB, $LoggedUser, $GroupID, $GroupName, $GroupCategoryID, $ReleaseType, $TorrentList, $Types, $Text, $Username, $ReportedTimes);
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<form class="create_form" name="report" action="reportsv2.php?action=takereport" enctype="multipart/form-data" method="post" id="reportform">
|
||||
<div>
|
||||
@ -30,33 +94,33 @@
|
||||
<input type="hidden" name="torrentid" value="<?=$TorrentID?>" />
|
||||
<input type="hidden" name="categoryid" value="<?=$CategoryID?>" />
|
||||
</div>
|
||||
<table class="layout">
|
||||
<tr>
|
||||
<td class="label">Reason :</td>
|
||||
<td>
|
||||
<select id="type" name="type" onchange="ChangeReportType()">
|
||||
<?
|
||||
if (!empty($Types[$CategoryID])) {
|
||||
$TypeList = $Types['master'] + $Types[$CategoryID];
|
||||
$Priorities = array();
|
||||
foreach ($TypeList as $Key => $Value) {
|
||||
$Priorities[$Key] = $Value['priority'];
|
||||
}
|
||||
array_multisort($Priorities, SORT_ASC, $TypeList);
|
||||
} else {
|
||||
$TypeList = $Types['master'];
|
||||
}
|
||||
foreach($TypeList as $Type => $Data) {
|
||||
?>
|
||||
<option value="<?=$Type?>"><?=$Data['title']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Reporting guidelines</h3>
|
||||
<h3>Report information</h3>
|
||||
<div class="box pad">
|
||||
<table class="layout">
|
||||
<tr>
|
||||
<td class="label">Reason:</td>
|
||||
<td>
|
||||
<select id="type" name="type" onchange="ChangeReportType()">
|
||||
<?
|
||||
if (!empty($Types[$CategoryID])) {
|
||||
$TypeList = $Types['master'] + $Types[$CategoryID];
|
||||
$Priorities = array();
|
||||
foreach ($TypeList as $Key => $Value) {
|
||||
$Priorities[$Key] = $Value['priority'];
|
||||
}
|
||||
array_multisort($Priorities, SORT_ASC, $TypeList);
|
||||
} else {
|
||||
$TypeList = $Types['master'];
|
||||
}
|
||||
foreach ($TypeList as $Type => $Data) {
|
||||
?>
|
||||
<option value="<?= $Type ?>"><?= $Data['title'] ?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>Fields that contain lists of values (for example, listing more than one track number) should be separated by a space.</p>
|
||||
<br />
|
||||
<p><strong>Following the below report type specific guidelines will help the moderators deal with your report in a timely fashion. </strong></p>
|
||||
|
@ -278,7 +278,7 @@
|
||||
<tr>
|
||||
<td class="label">Created</td>
|
||||
<td>
|
||||
<?=time_diff($TimeAdded)?> by <strong><?=Users::format_username($RequestorID, false, false, false)?></strong>
|
||||
<?=time_diff($TimeAdded)?> by <strong><?=Users::format_username($RequestorID, false, false, false)?></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<? if ($CategoryName == "Music") {
|
||||
@ -550,14 +550,14 @@
|
||||
$AuthorInfo = Users::user_info($AuthorID);
|
||||
if ($LoggedUser['Class'] >= $AuthorInfo['Class']) {
|
||||
?>
|
||||
<form class="manage_form hidden" name="user" id="warn<?=$PostID?>" action="" method="post">
|
||||
<input type="hidden" name="action" value="warn" />
|
||||
<input type="hidden" name="groupid" value="<?=$RequestID?>" />
|
||||
<input type="hidden" name="postid" value="<?=$PostID?>" />
|
||||
<input type="hidden" name="userid" value="<?=$AuthorID?>" />
|
||||
<input type="hidden" name="key" value="<?=$Key?>" />
|
||||
</form>
|
||||
- <a href="#" onclick="$('#warn<?=$PostID?>').raw().submit(); return false;" class="brackets">Warn</a>
|
||||
<form class="manage_form hidden" name="user" id="warn<?=$PostID?>" action="" method="post">
|
||||
<input type="hidden" name="action" value="warn" />
|
||||
<input type="hidden" name="groupid" value="<?=$RequestID?>" />
|
||||
<input type="hidden" name="postid" value="<?=$PostID?>" />
|
||||
<input type="hidden" name="userid" value="<?=$AuthorID?>" />
|
||||
<input type="hidden" name="key" value="<?=$Key?>" />
|
||||
</form>
|
||||
- <a href="#" onclick="$('#warn<?=$PostID?>').raw().submit(); return false;" class="brackets">Warn</a>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
|
@ -7,27 +7,27 @@ $ExtraJoins = array();
|
||||
|
||||
$Submitted = !empty($_GET['submit']);
|
||||
|
||||
if(!empty($_GET['search'])) {
|
||||
if (!empty($_GET['search'])) {
|
||||
$Words = explode(' ', $_GET['search']);
|
||||
$SearchWords = array();
|
||||
foreach($Words AS $Word) {
|
||||
foreach ($Words AS $Word) {
|
||||
$Wheres[] = "LOCATE('".db_string($Word)."', r.Title)";
|
||||
}
|
||||
}
|
||||
|
||||
$TagMatcher = (!empty($_GET['tagmatcher']) && $_GET['tagmatcher'] == "any") ? "any" : "all";
|
||||
|
||||
if(!empty($_GET['tags'])){
|
||||
if (!empty($_GET['tags'])) {
|
||||
$Tags = explode(',', $_GET['tags']);
|
||||
$TagNames = array();
|
||||
foreach ($Tags as $Tag){
|
||||
foreach ($Tags as $Tag) {
|
||||
$Tag = Misc::sanitize_tag($Tag);
|
||||
if(!empty($Tag)) {
|
||||
if (!empty($Tag)) {
|
||||
$TagNames[] = $Tag;
|
||||
}
|
||||
}
|
||||
|
||||
if($TagMatcher == "any") {
|
||||
if ($TagMatcher == "any") {
|
||||
$ExtraJoins[] = "LEFT JOIN requests_tags AS rt ON r.ID=rt.RequestID";
|
||||
$ExtraJoins[] = "LEFT JOIN tags AS t ON t.ID=rt.TagID";
|
||||
$Wheres[] = "t.Name IN ('".implode("', '", $TagNames)."')";
|
||||
@ -36,20 +36,20 @@ if(!empty($_GET['tags'])){
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['requestor']) && check_perms('site_see_old_requests')) {
|
||||
if (!empty($_GET['requestor']) && check_perms('site_see_old_requests')) {
|
||||
$Wheres[] = "u.Username LIKE ".db_string($_GET['requestor']);
|
||||
}
|
||||
|
||||
if(!empty($_GET['filter_cat'])) {
|
||||
if (!empty($_GET['filter_cat'])) {
|
||||
$Keys = array_keys($_GET['filter_cat']);
|
||||
$Wheres[] = "r.CategoryID IN (".implode(", ", $Keys).")";
|
||||
}
|
||||
|
||||
if(!empty($_GET['releases'])) {
|
||||
if (!empty($_GET['releases'])) {
|
||||
$ReleaseArray = $_GET['releases'];
|
||||
if(count($ReleaseArray) != count($ReleaseTypes)) {
|
||||
foreach($ReleaseArray as $Index => $Value) {
|
||||
if(is_number($Value)) {
|
||||
if (count($ReleaseArray) != count($ReleaseTypes)) {
|
||||
foreach ($ReleaseArray as $Index => $Value) {
|
||||
if (is_number($Value)) {
|
||||
$Wheres[] = "r.ReleaseType = ".$Value;
|
||||
} else {
|
||||
error(0);
|
||||
@ -58,63 +58,63 @@ if(!empty($_GET['releases'])) {
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['formats'])) {
|
||||
if (!empty($_GET['formats'])) {
|
||||
$FormatArray = $_GET['formats'];
|
||||
if(count($FormatArray) != count($Formats)) {
|
||||
if (count($FormatArray) != count($Formats)) {
|
||||
$FormatNameArray = array();
|
||||
foreach($FormatArray as $Index => $MasterIndex) {
|
||||
if(array_key_exists($Index, $Formats)) {
|
||||
foreach ($FormatArray as $Index => $MasterIndex) {
|
||||
if (array_key_exists($Index, $Formats)) {
|
||||
$FormatNameArray[$Index] = $Formats[$MasterIndex];
|
||||
} else {
|
||||
//Hax
|
||||
error(0);
|
||||
}
|
||||
}
|
||||
foreach($FormatNameArray as $Index => $Name) {
|
||||
foreach ($FormatNameArray as $Index => $Name) {
|
||||
$Wheres[] = "LOCATE('".db_string($Name)."', r.FormatList)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['media'])) {
|
||||
if (!empty($_GET['media'])) {
|
||||
$MediaArray = $_GET['media'];
|
||||
if(count($MediaArray) != count($Media)) {
|
||||
if (count($MediaArray) != count($Media)) {
|
||||
$MediaNameArray = array();
|
||||
foreach($MediaArray as $Index => $MasterIndex) {
|
||||
if(array_key_exists($Index, $Media)) {
|
||||
foreach ($MediaArray as $Index => $MasterIndex) {
|
||||
if (array_key_exists($Index, $Media)) {
|
||||
$MediaNameArray[$Index] = $Media[$MasterIndex];
|
||||
} else {
|
||||
//Hax
|
||||
error(0);
|
||||
}
|
||||
}
|
||||
foreach($MediaNameArray as $Index => $Name) {
|
||||
foreach ($MediaNameArray as $Index => $Name) {
|
||||
$Wheres[] = "LOCATE('".db_string($Name)."', r.MediaList)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_GET['bitrates'])) {
|
||||
if (!empty($_GET['bitrates'])) {
|
||||
$BitrateArray = $_GET['bitrates'];
|
||||
if(count($BitrateArray) != count($Bitrates)) {
|
||||
if (count($BitrateArray) != count($Bitrates)) {
|
||||
$BitrateNameArray = array();
|
||||
foreach($BitrateArray as $Index => $MasterIndex) {
|
||||
if(array_key_exists($Index, $Bitrates)) {
|
||||
foreach ($BitrateArray as $Index => $MasterIndex) {
|
||||
if (array_key_exists($Index, $Bitrates)) {
|
||||
$BitrateNameArray[$Index] = $Bitrates[$MasterIndex];
|
||||
} else {
|
||||
//Hax
|
||||
error(0);
|
||||
}
|
||||
}
|
||||
foreach($BitrateNameArray as $Index => $Name) {
|
||||
foreach ($BitrateNameArray as $Index => $Name) {
|
||||
$Wheres[] = "LOCATE('".db_string($Name)."', r.BitrateList)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($_GET['type'])) {
|
||||
if (empty($_GET['type'])) {
|
||||
$Title = 'Requests';
|
||||
if(!check_perms('site_see_old_requests') || empty($_GET['showall'])) {
|
||||
if (!check_perms('site_see_old_requests') || empty($_GET['showall'])) {
|
||||
$Wheres[] = "(TorrentID = 0 OR (TimeFilled > (NOW() - INTERVAL 3 DAY)))";
|
||||
}
|
||||
} else {
|
||||
@ -129,7 +129,7 @@ if(empty($_GET['type'])) {
|
||||
$ExtraJoins[] = "LEFT JOIN requests_votes AS _rv ON _rv.RequestID=r.ID";
|
||||
break;
|
||||
case 'filled':
|
||||
if(empty($_GET['userid']) || !is_number($_GET['userid'])) {
|
||||
if (empty($_GET['userid']) || !is_number($_GET['userid'])) {
|
||||
error(404);
|
||||
} else {
|
||||
$Title = "Requests filled";
|
||||
@ -141,14 +141,14 @@ if(empty($_GET['type'])) {
|
||||
}
|
||||
|
||||
|
||||
if(empty($_GET['order'])) {
|
||||
if (empty($_GET['order'])) {
|
||||
$CurrentOrder = 'created';
|
||||
$CurrentSort = 'desc';
|
||||
$NewSort = 'asc';
|
||||
} else {
|
||||
if(in_array($_GET['order'], $OrderWays)) {
|
||||
if (in_array($_GET['order'], $OrderWays)) {
|
||||
$CurrentOrder = $_GET['order'];
|
||||
if($_GET['sort'] == 'asc' || $_GET['sort'] == 'desc') {
|
||||
if ($_GET['sort'] == 'asc' || $_GET['sort'] == 'desc') {
|
||||
$CurrentSort = $_GET['sort'];
|
||||
$NewSort = ($_GET['sort'] == 'asc' ? 'desc' : 'asc');
|
||||
} else {
|
||||
@ -192,42 +192,42 @@ switch($CurrentOrder) {
|
||||
}
|
||||
$OrderBy = $OrderBy." ".$CurrentSort;
|
||||
|
||||
$Matcher = "AND";
|
||||
if(count($Wheres)) {
|
||||
$Where = "WHERE (".implode(") ".$Matcher." (", $Wheres).")";
|
||||
$Matcher = 'AND';
|
||||
if (count($Wheres)) {
|
||||
$Where = 'WHERE ('.implode(") ".$Matcher." (", $Wheres).")";
|
||||
} else {
|
||||
$Where = "";
|
||||
$Where = '';
|
||||
}
|
||||
|
||||
if(count($ExtraJoins)) {
|
||||
$ExtraJoin = implode(" ", $ExtraJoins);
|
||||
if (count($ExtraJoins)) {
|
||||
$ExtraJoin = implode(' ', $ExtraJoins);
|
||||
} else {
|
||||
$ExtraJoin = "";
|
||||
$ExtraJoin = '';
|
||||
}
|
||||
|
||||
// Build SQL query
|
||||
$DB->query("SELECT
|
||||
SQL_CALC_FOUND_ROWS
|
||||
r.ID,
|
||||
r.CategoryID,
|
||||
r.Title,
|
||||
r.Year,
|
||||
SUM(rv.Bounty) AS Bounty,
|
||||
COUNT(rv.UserID) AS Votes,
|
||||
r.FillerID,
|
||||
filler.Username,
|
||||
r.TorrentID,
|
||||
r.TimeFilled,
|
||||
r.UserID,
|
||||
u.Username,
|
||||
r.TimeAdded,
|
||||
r.LastVote
|
||||
SQL_CALC_FOUND_ROWS
|
||||
r.ID,
|
||||
r.CategoryID,
|
||||
r.Title,
|
||||
r.Year,
|
||||
SUM(rv.Bounty) AS Bounty,
|
||||
COUNT(rv.UserID) AS Votes,
|
||||
r.FillerID,
|
||||
filler.Username,
|
||||
r.TorrentID,
|
||||
r.TimeFilled,
|
||||
r.UserID,
|
||||
u.Username,
|
||||
r.TimeAdded,
|
||||
r.LastVote
|
||||
FROM requests AS r
|
||||
LEFT JOIN users_main AS u ON u.ID=r.UserID
|
||||
LEFT JOIN users_main AS filler ON filler.ID = FillerID
|
||||
LEFT JOIN requests_votes AS rv ON rv.RequestID=r.ID "
|
||||
.$ExtraJoin." "
|
||||
.$Where."
|
||||
LEFT JOIN users_main AS u ON u.ID=r.UserID
|
||||
LEFT JOIN users_main AS filler ON filler.ID = FillerID
|
||||
LEFT JOIN requests_votes AS rv ON rv.RequestID=r.ID "
|
||||
.$ExtraJoin." "
|
||||
.$Where."
|
||||
GROUP BY r.ID
|
||||
ORDER BY ".$OrderBy."
|
||||
LIMIT ".$Limit);
|
||||
@ -248,11 +248,11 @@ show_header($Title, 'requests');
|
||||
<div class="header">
|
||||
<h2><?=$Title?></h2>
|
||||
<div class="linkbox">
|
||||
<? if(check_perms('site_submit_requests')){ ?>
|
||||
<? if (check_perms('site_submit_requests')) { ?>
|
||||
<a href="requests.php?action=new" class="brackets">New request</a>
|
||||
<a href="requests.php?type=created" class="brackets">My requests</a>
|
||||
<? }
|
||||
if(check_perms('site_vote')){?>
|
||||
if (check_perms('site_vote')) { ?>
|
||||
<a href="requests.php?type=voted" class="brackets">Requests I've voted on</a>
|
||||
<? } ?>
|
||||
</div>
|
||||
@ -264,23 +264,23 @@ show_header($Title, 'requests');
|
||||
<tr>
|
||||
<td class="label">Search terms:</td>
|
||||
<td>
|
||||
<input type="text" name="search" size="75" value="<?if(isset($_GET['search'])) { echo display_str($_GET['search']); } ?>" />
|
||||
<input type="text" name="search" size="75" value="<? if (isset($_GET['search'])) { echo display_str($_GET['search']); } ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Tags (comma-separated):</td>
|
||||
<td>
|
||||
<input type="text" name="tags" size="60" value="<?=display_str(implode(', ', $TagNames))?>" />
|
||||
<input type="radio" name="tagmatcher" value="any" <?=((empty($TagMatcher) || $TagMatcher == "any") ? ' checked="checked" ' : '')?>/>Any
|
||||
<input type="radio" name="tagmatcher" value="all" <?=((!empty($TagMatcher) && $TagMatcher == "all") ? ' checked="checked" ' : '')?>/>All
|
||||
<input type="radio" name="tagmatcher" value="any"<?=((empty($TagMatcher) || $TagMatcher == 'any') ? ' checked="checked"' : '') ?> />Any
|
||||
<input type="radio" name="tagmatcher" value="all"<?=((!empty($TagMatcher) && $TagMatcher == 'all') ? ' checked="checked"' : '') ?> />All
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? if(check_perms('site_see_old_requests')){ ?>
|
||||
<? if (check_perms('site_see_old_requests')) { ?>
|
||||
<tr>
|
||||
<td class="label">Include filled:</td>
|
||||
<td>
|
||||
<input type="checkbox" name="showall" <? if($_GET['showall']) {?>checked="checked"<? } ?> />
|
||||
<input type="checkbox" name="showall"<? if ($_GET['showall']) { ?> checked="checked"<? } ?> />
|
||||
</td>
|
||||
</tr>
|
||||
<? /* ?>
|
||||
@ -294,19 +294,19 @@ show_header($Title, 'requests');
|
||||
</table>
|
||||
<table class="layout cat_list">
|
||||
<?
|
||||
$x=1;
|
||||
$x = 1;
|
||||
reset($Categories);
|
||||
foreach($Categories as $CatKey => $CatName) {
|
||||
if($x%8==0 || $x==1) {
|
||||
foreach ($Categories as $CatKey => $CatName) {
|
||||
if ($x % 8 == 0 || $x == 1) {
|
||||
?>
|
||||
<tr class="cat_list">
|
||||
<? } ?>
|
||||
<td>
|
||||
<input type="checkbox" name="filter_cat[<?=($CatKey+1)?>]" id="cat_<?=($CatKey+1)?>" value="1" <? if(isset($_GET['filter_cat'][$CatKey+1])) { ?>checked="checked"<? } ?> />
|
||||
<label for="cat_<?=($CatKey+1)?>"><?=$CatName?></label>
|
||||
<input type="checkbox" name="filter_cat[<?=($CatKey+1)?>]" id="cat_<?=($CatKey+1)?>" value="1"<? if (isset($_GET['filter_cat'][$CatKey + 1])) { ?> checked="checked"<? } ?> />
|
||||
<label for="cat_<?=($CatKey + 1)?>"><?=$CatName?></label>
|
||||
</td>
|
||||
<?
|
||||
if($x%7==0) {
|
||||
if ($x % 7 == 0) {
|
||||
?>
|
||||
</tr>
|
||||
<?
|
||||
@ -322,7 +322,7 @@ foreach($Categories as $CatKey => $CatName) {
|
||||
<input type="checkbox" id="toggle_releases" onchange="Toggle('releases');" /> Toggle All
|
||||
<? $i = 0;
|
||||
foreach ($ReleaseTypes as $Key => $Val) {
|
||||
if($i % 8 == 0) echo "<br />";?>
|
||||
if ($i % 8 == 0) echo "<br />";?>
|
||||
<input type="checkbox" name="releases[]" value="<?=$Key?>"
|
||||
<?=(((!$Submitted) || !empty($ReleaseArray) && in_array($Key, $ReleaseArray)) ? ' checked="checked" ' : '')?>
|
||||
/> <?=$Val?>
|
||||
@ -335,7 +335,7 @@ foreach($Categories as $CatKey => $CatName) {
|
||||
<td>
|
||||
<input type="checkbox" id="toggle_formats" onchange="Toggle('formats');" /> Toggle All
|
||||
<? foreach ($Formats as $Key => $Val) {
|
||||
if($Key % 8 == 0) echo "<br />";?>
|
||||
if ($Key % 8 == 0) echo "<br />";?>
|
||||
<input type="checkbox" name="formats[]" value="<?=$Key?>"
|
||||
<?=(((!$Submitted) || !empty($FormatArray) && in_array($Key, $FormatArray)) ? ' checked="checked" ' : '')?>
|
||||
/> <?=$Val?>
|
||||
@ -347,7 +347,7 @@ foreach($Categories as $CatKey => $CatName) {
|
||||
<td>
|
||||
<input type="checkbox" id="toggle_bitrates" onchange="Toggle('bitrates');" /> Toggle All
|
||||
<? foreach ($Bitrates as $Key => $Val) {
|
||||
if($Key % 8 == 0) echo "<br />";?>
|
||||
if ($Key % 8 == 0) echo "<br />";?>
|
||||
<input type="checkbox" name="bitrates[]" value="<?=$Key?>"
|
||||
<?=(((!$Submitted) || !empty($BitrateArray) && in_array($Key, $BitrateArray)) ? ' checked="checked" ' : '')?>
|
||||
/> <?=$Val?>
|
||||
@ -359,7 +359,7 @@ foreach($Categories as $CatKey => $CatName) {
|
||||
<td>
|
||||
<input type="checkbox" id="toggle_media" onchange="Toggle('media');" /> Toggle All
|
||||
<? foreach ($Media as $Key => $Val) {
|
||||
if($Key % 8 == 0) echo "<br />";?>
|
||||
if ($Key % 8 == 0) echo "<br />";?>
|
||||
<input type="checkbox" name="media[]" value="<?=$Key?>"
|
||||
<?=(((!$Submitted) || !empty($MediaArray) && in_array($Key, $MediaArray)) ? ' checked="checked" ' : '')?>
|
||||
/> <?=$Val?>
|
||||
@ -405,7 +405,7 @@ foreach($Categories as $CatKey => $CatName) {
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<? if($Results == 0){ ?>
|
||||
<? if ($Results == 0) { ?>
|
||||
<tr class="rowb">
|
||||
<td colspan="7">
|
||||
Nothing found!
|
||||
@ -419,11 +419,11 @@ foreach($Categories as $CatKey => $CatName) {
|
||||
$CategoryName = $Categories[$CategoryID - 1];
|
||||
$IsFilled = ($TorrentID != 0);
|
||||
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == "Music") {
|
||||
$ArtistForm = get_request_artists($RequestID);
|
||||
$ArtistLink = display_artists($ArtistForm, true, true);
|
||||
$FullName = $ArtistLink."<a href='requests.php?action=view&id=".$RequestID."'>".$Title." [".$Year."]</a>";
|
||||
} elseif($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
||||
$FullName = "<a href='requests.php?action=view&id=".$RequestID."'>".$Title." [".$Year."]</a>";
|
||||
} else {
|
||||
$FullName ="<a href='requests.php?action=view&id=".$RequestID."'>".$Title."</a>";
|
||||
@ -439,7 +439,7 @@ foreach($Categories as $CatKey => $CatName) {
|
||||
<div class="tags">
|
||||
<?
|
||||
$TagList = array();
|
||||
foreach($Tags as $TagID => $TagName) {
|
||||
foreach ($Tags as $TagID => $TagName) {
|
||||
$TagList[] = "<a href='requests.php?tag=".$TagID."'>".display_str($TagName)."</a>";
|
||||
}
|
||||
$TagList = implode(', ', $TagList);
|
||||
@ -449,23 +449,23 @@ foreach($Categories as $CatKey => $CatName) {
|
||||
</td>
|
||||
<td>
|
||||
<?=$Votes?>
|
||||
<? if(!$IsFilled && check_perms('site_vote')){ ?>
|
||||
<? if (!$IsFilled && check_perms('site_vote')) { ?>
|
||||
<input type="hidden" id="auth" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<a href="javascript:Vote()" class="brackets"><strong>+</strong></a>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</td>
|
||||
<td>
|
||||
<?=get_size($Bounty)?>
|
||||
</td>
|
||||
<td>
|
||||
<? if($IsFilled){ ?>
|
||||
<? if ($IsFilled) { ?>
|
||||
<a href="torrents.php?id=<?=$TorrentID?>"><strong>Yes - <?=$TimeFilled?></strong></a>
|
||||
<? } else { ?>
|
||||
<? } else { ?>
|
||||
<strong>No - <a href="upload.php?requestid=<?=$RequestID?>" class="brackets">Upload</a></strong>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</td>
|
||||
<td>
|
||||
<? if($IsFilled){ ?>
|
||||
<? if ($IsFilled) { ?>
|
||||
<a href="user.php?id=<?=$FillerID?>"><?=$FillerName?></a>
|
||||
<? } else { ?>
|
||||
--
|
||||
|
@ -3,199 +3,191 @@
|
||||
View::show_header('Ratio Requirements');
|
||||
?>
|
||||
<div class="thin">
|
||||
<div class="header">
|
||||
<h2 class="center">Ratio Rules</h2>
|
||||
</div>
|
||||
<div class="box pad rule_summary">
|
||||
<br />
|
||||
<strong>Ratio System Overview:</strong><br />
|
||||
<ul>
|
||||
<li>Your <strong>ratio</strong> is calculated by dividing the amount of data you've uploaded by the amount of data you've downloaded. You can view your ratio in the site header, or
|
||||
in the 'stats' section of your user profile.
|
||||
</li>
|
||||
<li>To maintain <strong>leeching privileges</strong>, your ratio must remain above a minimum value. This minimum value is your <strong>required ratio</strong>.</li>
|
||||
<li>If your ratio falls below your required ratio, you will be given two weeks to raise your ratio back above your required ratio. During this period, you are on <strong>ratio
|
||||
watch</strong>.
|
||||
</li>
|
||||
<li>If you fail to raise your ratio above your required required ratio in the allotted time, your leeching privileges will be revoked. You will be unable to download more data. Your
|
||||
account will remain enabled.
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Required Ratio Overview:</strong><br />
|
||||
<ul>
|
||||
<li>Your required ratio represents the minimum ratio you must maintain to avoid ratio watch. You can view your required ratio in the site header after the word 'required,' or in
|
||||
the 'stats' section of your user profile.
|
||||
</li>
|
||||
<li>Your required ratio is unique; each person's required ratio is calculated for their account specifically.</li>
|
||||
<li>Your required ratio is calculated using (1) the total amount of data you've downloaded and (2) the total number of torrents you're seeding. The seeding total is not limited to
|
||||
snatched torrents (completed downloads)—the total includes, but is not limited to, your uploaded torrents.
|
||||
</li>
|
||||
<li>The required ratio system lowers your required ratio when you seed a greater number of torrents. The more torrents you seed, the lower your required ratio will be. The lower your
|
||||
required ratio is, the less likely it is that you'll enter ratio watch.
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div style="text-align:center"><strong>Required Ratio Table</strong><br /><br />
|
||||
<table class="ratio_table">
|
||||
<tr class="colhead">
|
||||
<td><span title="These units are actually in base 2, not base 10. For example, there are 1,024 MB in 1 GB.">Amount Downloaded</span></td>
|
||||
<td>Required Ratio (0% seeded)</td>
|
||||
<td>Required Ratio (100% seeded)</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] < 5 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>0-5 GB</td>
|
||||
<td>0.00</td>
|
||||
<td>0.00</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 5 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 10 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>5-10 GB</td>
|
||||
<td>0.15</td>
|
||||
<td>0.00</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 10 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 20 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>10-20 GB</td>
|
||||
<td>0.20</td>
|
||||
<td>0.00</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 20 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 30 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>20-30 GB</td>
|
||||
<td>0.30</td>
|
||||
<td>0.05</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 30 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 40 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>30-40 GB</td>
|
||||
<td>0.40</td>
|
||||
<td>0.10</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 40 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 50 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>40-50 GB</td>
|
||||
<td>0.50</td>
|
||||
<td>0.20</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 50 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 60 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>50-60 GB</td>
|
||||
<td>0.60</td>
|
||||
<td>0.30</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 60 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 80 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>60-80 GB</td>
|
||||
<td>0.60</td>
|
||||
<td>0.40</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 80 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 100 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>80-100 GB</td>
|
||||
<td>0.60</td>
|
||||
<td>0.50</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 100 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>100+ GB</td>
|
||||
<td>0.60</td>
|
||||
<td>0.60</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Required Ratio Calculation:</strong><br />
|
||||
<ul>
|
||||
<li><strong>1: Determine the maximum and minimum possible values of your required ratio.</strong> Using the table above, determine your amount downloaded bracket from the first column.
|
||||
Next, locate the values in the adjacent columns. The second column lists the maximum required ratio for each bracket, and the third column lists the minimum required ratio for each
|
||||
bracket. The maximum and minimum required ratios are also referred to as the <strong>0% seeded</strong> and <strong>100% seeded</strong> required ratios, respectively.
|
||||
</li>
|
||||
<li><strong>2: Determine the actual required ratio.</strong> Your actual required ratio will be a number that falls between the maximum and minimum required ratio values determined in the
|
||||
previous step. To determine your actual required ratio, the system first uses the maximum required ratio (0% seeded) and multiplies it by the value [1-seeding/snatched]. Formatted
|
||||
differently, the calculation performed by the system looks like this:
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div style="text-align:center"><img style="vertical-align: middle" src="static/blank.gif"
|
||||
onload="if (this.src.substr(this.src.length-9,this.src.length) == 'blank.gif') { this.src = 'http://chart.apis.google.com/chart?cht=tx&chf=bg,s,FFFFFF00&chl=%5Ctextrm%7B%28maximum+required+ratio%29+%2A+%281-%5Cfrac%7Bseeding%7D%7Bsnatched%7D%29%7D&chco=' + hexify(getComputedStyle(this.parentNode,null).color); }"/>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<ul>
|
||||
<li>In this formula, <strong>snatched</strong> is the number of non-deleted unique snatches you have made. If you snatch a torrent twice, it only counts once. If a snatched torrent is
|
||||
deleted from the site, it is not counted at all.
|
||||
</li>
|
||||
<li>In this formula, <strong>seeding</strong> is the average number of torrents you've seeded over a 72 hour period within the last week. If you've seeded a torrent for less than
|
||||
72 hours within the last week, it will not raise your seeding total. Please note that while it is possible to seed more torrents than you have snatched, the system effectively caps the
|
||||
value at 100% of your snatched amount.
|
||||
</li>
|
||||
<li><strong>3: Round if necessary.</strong> The value determined in the previous step is rounded up to your minimum required ratio (100% seeded) if necessary. This step is required because
|
||||
most amount downloaded brackets have a minimum required ratio (100% seeded) greater than zero, and the value returned by the above calculation is zero when seeding equals snatched.
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Required Ratio Details:</strong><br />
|
||||
<ul>
|
||||
<li>If you stop seeding for one week, your required ratio will become the maximum required ratio (0% seeded) for your amount downloaded bracket. Once you have resumed seeding for a 72 hour
|
||||
period, your required ratio will decrease according to the above calculations.
|
||||
</li>
|
||||
<li>If your download total is less than 5 GB, you won't be eligible for ratio watch, and you will not need a required ratio. In this circumstance, your required ratio will be zero
|
||||
regardless of your seeding percentage.
|
||||
</li>
|
||||
<li>If your download total is less than 20 GB and you are seeding a number of torrents equal to 100% of your snatches, your required ratio will be zero.</li>
|
||||
<li>As your download total increases, your minimum (100% seeded) and maximum (0% seeded) required ratios taper together. After you have downloaded 100 GB, those values become equal to each
|
||||
other. This means that users with download totals greater than or equal to 100 GB have a minimum required ratio (100% seeded) of 0.60 from that point forward.
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Required Ratio Example:</strong><br />
|
||||
<ul>
|
||||
<li>In this example, Rippy has downloaded 25 GB. Rippy falls into the 20-30 GB amount downloaded bracket in the table above. Rippy's maximum required ratio (0% seeded) is 0.30, and his
|
||||
minimum required ratio (100% seeded) is 0.05.
|
||||
</li>
|
||||
<li>In this example, Rippy has snatched 90 torrents, and is currently seeding 45 torrents.</li>
|
||||
<li>To calculate Rippy's actual required ratio, we take his maximum required ratio (0% seeded), which is 0.30, and multiply it by [1 - seeding/snatched] (which is 0.50). Written out:
|
||||
0.3 * [1 - (45/90)] = 0.15.
|
||||
</li>
|
||||
<li>The resulting required ratio is 0.15, which falls between the maximum required ratio of 0.30 and the minimum required ratio of 0.05 for his amount downloaded bracket.</li>
|
||||
<li>If Rippy's on-site required ratio was listed as a value greater than the calculated value, this would be because he hadn't seeded those 45 torrents for a 72 hour period in the
|
||||
last week. In this case, the system would not be counting all 45 torrents as seeded.
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Ratio Watch Overview:</strong><br />
|
||||
<ul>
|
||||
<li>Everyone gets to download their first 5 GB before ratio watch eligibility begins.</li>
|
||||
<li>If you've downloaded more than 5 GB and your ratio does not meet or surpass your required ratio, you will be put on ratio watch and have <strong>two weeks</strong> to raise your
|
||||
ratio above your required ratio.
|
||||
</li>
|
||||
<li>If you download 10 GB while on ratio watch, your leeching privileges will automatically be disabled.</li>
|
||||
<li>If you fail to leave ratio watch within a two week period, you will lose leeching privileges. After losing leeching privileges, you will be unable to download more data. Your account
|
||||
will remain enabled.
|
||||
</li>
|
||||
<li>The ratio watch system is automated and cannot be interrupted by staff.</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Leaving Ratio Watch:</strong><br />
|
||||
<ul>
|
||||
<li>To leave ratio watch, you must either raise your ratio by uploading more, or lower your required ratio by seeding more. Your ratio must be equal to or above your required ratio in
|
||||
order for ratio watch to end.
|
||||
</li>
|
||||
<li>If you fail to improve your ratio by the time ratio watch expires and lose leeching privileges, your required ratio will be temporarily set to the maximum possible requirement (as if
|
||||
0% of snatched torrents were being seeded).
|
||||
</li>
|
||||
<li>After losing leeching privileges, in order to adjust the required ratio so that it reflects the actual number of torrents being seeded, you must seed for a combined 72 hours within a weeklong period. After 72
|
||||
hours of seeding occur, the required ratio will update to reflect your current seeding total, just as it would for a leech-enabled user.
|
||||
</li>
|
||||
<li>Leeching privileges will be restored once your ratio has become greater than or equal to your required ratio.</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<? include('jump.php'); ?>
|
||||
</div>
|
||||
<div class="header">
|
||||
<h2 class="center">Ratio Rules</h2>
|
||||
</div>
|
||||
<?
|
||||
<div class="box pad rule_summary">
|
||||
<br />
|
||||
<strong>Ratio System Overview:</strong><br />
|
||||
<ul>
|
||||
<li>Your <strong>ratio</strong> is calculated by dividing the amount of data you've uploaded by the amount of data you've downloaded. You can view your ratio in the site header, or in the 'stats' section of your user profile.
|
||||
</li>
|
||||
<li>To maintain <strong>leeching privileges</strong>, your ratio must remain above a minimum value. This minimum value is your <strong>required ratio</strong>.</li>
|
||||
<li>If your ratio falls below your required ratio, you will be given two weeks to raise your ratio back above your required ratio. During this period, you are on <strong>ratio watch</strong>.
|
||||
</li>
|
||||
<li>If you fail to raise your ratio above your required required ratio in the allotted time, your leeching privileges will be revoked. You will be unable to download more data. Your account will remain enabled.
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Required Ratio Overview:</strong><br />
|
||||
<ul>
|
||||
<li>Your required ratio represents the minimum ratio you must maintain to avoid ratio watch. You can view your required ratio in the site header after the word 'required,' or in the 'stats' section of your user profile.
|
||||
</li>
|
||||
<li>Your required ratio is unique; each person's required ratio is calculated for their account specifically.</li>
|
||||
<li>Your required ratio is calculated using (1) the total amount of data you've downloaded and (2) the total number of torrents you're seeding. The seeding total is not limited to snatched torrents (completed downloads)—the total includes, but is not limited to, your uploaded torrents.
|
||||
</li>
|
||||
<li>The required ratio system lowers your required ratio when you seed a greater number of torrents. The more torrents you seed, the lower your required ratio will be. The lower your required ratio is, the less likely it is that you'll enter ratio watch.
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div style="text-align:center"><strong>Required Ratio Table</strong><br /><br />
|
||||
<table class="ratio_table">
|
||||
<tr class="colhead">
|
||||
<td><span title="These units are actually in base 2, not base 10. For example, there are 1,024 MB in 1 GB.">Amount Downloaded</span></td>
|
||||
<td>Required Ratio (0% seeded)</td>
|
||||
<td>Required Ratio (100% seeded)</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] < 5 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>0-5 GB</td>
|
||||
<td>0.00</td>
|
||||
<td>0.00</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 5 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 10 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>5-10 GB</td>
|
||||
<td>0.15</td>
|
||||
<td>0.00</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 10 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 20 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>10-20 GB</td>
|
||||
<td>0.20</td>
|
||||
<td>0.00</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 20 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 30 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>20-30 GB</td>
|
||||
<td>0.30</td>
|
||||
<td>0.05</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 30 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 40 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>30-40 GB</td>
|
||||
<td>0.40</td>
|
||||
<td>0.10</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 40 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 50 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>40-50 GB</td>
|
||||
<td>0.50</td>
|
||||
<td>0.20</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 50 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 60 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>50-60 GB</td>
|
||||
<td>0.60</td>
|
||||
<td>0.30</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 60 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 80 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>60-80 GB</td>
|
||||
<td>0.60</td>
|
||||
<td>0.40</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 80 * 1024 * 1024 * 1024 && $LoggedUser['BytesDownloaded'] < 100 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>80-100 GB</td>
|
||||
<td>0.60</td>
|
||||
<td>0.50</td>
|
||||
</tr>
|
||||
<tr class="row<?=($LoggedUser['BytesDownloaded'] >= 100 * 1024 * 1024 * 1024) ? 'a' : 'b'?>">
|
||||
<td>100+ GB</td>
|
||||
<td>0.60</td>
|
||||
<td>0.60</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Required Ratio Calculation:</strong><br />
|
||||
<ul>
|
||||
<li><strong>1: Determine the maximum and minimum possible values of your required ratio.</strong> Using the table above, determine your amount downloaded bracket from the first column.
|
||||
Next, locate the values in the adjacent columns. The second column lists the maximum required ratio for each bracket, and the third column lists the minimum required ratio for each
|
||||
bracket. The maximum and minimum required ratios are also referred to as the <strong>0% seeded</strong> and <strong>100% seeded</strong> required ratios, respectively.
|
||||
</li>
|
||||
<li><strong>2: Determine the actual required ratio.</strong> Your actual required ratio will be a number that falls between the maximum and minimum required ratio values determined in the
|
||||
previous step. To determine your actual required ratio, the system first uses the maximum required ratio (0% seeded) and multiplies it by the value [1-seeding/snatched]. Formatted
|
||||
differently, the calculation performed by the system looks like this:
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div style="text-align:center"><img style="vertical-align: middle" src="static/blank.gif"
|
||||
onload="if (this.src.substr(this.src.length-9,this.src.length) == 'blank.gif') { this.src = 'http://chart.apis.google.com/chart?cht=tx&chf=bg,s,FFFFFF00&chl=%5Ctextrm%7B%28maximum+required+ratio%29+%2A+%281-%5Cfrac%7Bseeding%7D%7Bsnatched%7D%29%7D&chco=' + hexify(getComputedStyle(this.parentNode,null).color); }"/>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<ul>
|
||||
<li>In this formula, <strong>snatched</strong> is the number of non-deleted unique snatches you have made. If you snatch a torrent twice, it only counts once. If a snatched torrent is
|
||||
deleted from the site, it is not counted at all.
|
||||
</li>
|
||||
<li>In this formula, <strong>seeding</strong> is the average number of torrents you've seeded over a 72 hour period within the last week. If you've seeded a torrent for less than
|
||||
72 hours within the last week, it will not raise your seeding total. Please note that while it is possible to seed more torrents than you have snatched, the system effectively caps the
|
||||
value at 100% of your snatched amount.
|
||||
</li>
|
||||
<li><strong>3: Round if necessary.</strong> The value determined in the previous step is rounded up to your minimum required ratio (100% seeded) if necessary. This step is required because
|
||||
most amount downloaded brackets have a minimum required ratio (100% seeded) greater than zero, and the value returned by the above calculation is zero when seeding equals snatched.
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Required Ratio Details:</strong><br />
|
||||
<ul>
|
||||
<li>If you stop seeding for one week, your required ratio will become the maximum required ratio (0% seeded) for your amount downloaded bracket. Once you have resumed seeding for a 72 hour
|
||||
period, your required ratio will decrease according to the above calculations.
|
||||
</li>
|
||||
<li>If your download total is less than 5 GB, you won't be eligible for ratio watch, and you will not need a required ratio. In this circumstance, your required ratio will be zero
|
||||
regardless of your seeding percentage.
|
||||
</li>
|
||||
<li>If your download total is less than 20 GB and you are seeding a number of torrents equal to 100% of your snatches, your required ratio will be zero.</li>
|
||||
<li>As your download total increases, your minimum (100% seeded) and maximum (0% seeded) required ratios taper together. After you have downloaded 100 GB, those values become equal to each
|
||||
other. This means that users with download totals greater than or equal to 100 GB have a minimum required ratio (100% seeded) of 0.60 from that point forward.
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Required Ratio Example:</strong><br />
|
||||
<ul>
|
||||
<li>In this example, Rippy has downloaded 25 GB. Rippy falls into the 20-30 GB amount downloaded bracket in the table above. Rippy's maximum required ratio (0% seeded) is 0.30, and his minimum required ratio (100% seeded) is 0.05.
|
||||
</li>
|
||||
<li>In this example, Rippy has snatched 90 torrents, and is currently seeding 45 torrents.</li>
|
||||
<li>To calculate Rippy's actual required ratio, we take his maximum required ratio (0% seeded), which is 0.30, and multiply it by [1 - seeding/snatched] (which is 0.50). Written out:
|
||||
0.3 * [1 - (45/90)] = 0.15.
|
||||
</li>
|
||||
<li>The resulting required ratio is 0.15, which falls between the maximum required ratio of 0.30 and the minimum required ratio of 0.05 for his amount downloaded bracket.</li>
|
||||
<li>If Rippy's on-site required ratio was listed as a value greater than the calculated value, this would be because he hadn't seeded those 45 torrents for a 72 hour period in the
|
||||
last week. In this case, the system would not be counting all 45 torrents as seeded.
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Ratio Watch Overview:</strong><br />
|
||||
<ul>
|
||||
<li>Everyone gets to download their first 5 GB before ratio watch eligibility begins.</li>
|
||||
<li>If you've downloaded more than 5 GB and your ratio does not meet or surpass your required ratio, you will be put on ratio watch and have <strong>two weeks</strong> to raise your
|
||||
ratio above your required ratio.
|
||||
</li>
|
||||
<li>If you download 10 GB while on ratio watch, your leeching privileges will automatically be disabled.</li>
|
||||
<li>If you fail to leave ratio watch within a two week period, you will lose leeching privileges. After losing leeching privileges, you will be unable to download more data. Your account
|
||||
will remain enabled.
|
||||
</li>
|
||||
<li>The ratio watch system is automated and cannot be interrupted by staff.</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<strong>Leaving Ratio Watch:</strong><br />
|
||||
<ul>
|
||||
<li>To leave ratio watch, you must either raise your ratio by uploading more, or lower your required ratio by seeding more. Your ratio must be equal to or above your required ratio in
|
||||
order for ratio watch to end.
|
||||
</li>
|
||||
<li>If you fail to improve your ratio by the time ratio watch expires and lose leeching privileges, your required ratio will be temporarily set to the maximum possible requirement (as if 0% of snatched torrents were being seeded).
|
||||
</li>
|
||||
<li>After losing leeching privileges, in order to adjust the required ratio so that it reflects the actual number of torrents being seeded, you must seed for a combined 72 hours within a weeklong period. After 72
|
||||
hours of seeding occur, the required ratio will update to reflect your current seeding total, just as it would for a leech-enabled user.
|
||||
</li>
|
||||
<li>Leeching privileges will be restored once your ratio has become greater than or equal to your required ratio.</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
<? include('jump.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
View::show_footer();
|
||||
?>
|
||||
?>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,9 +11,9 @@
|
||||
|
||||
if ($Level == 0) {
|
||||
// FLS conversation, assign to staff (moderator)
|
||||
if(!empty($_GET['to'])) {
|
||||
if (!empty($_GET['to'])) {
|
||||
$Level = 0;
|
||||
switch($_GET['to']) {
|
||||
switch ($_GET['to']) {
|
||||
case 'forum' :
|
||||
$Level = 650;
|
||||
break;
|
||||
@ -25,7 +25,10 @@
|
||||
break;
|
||||
}
|
||||
|
||||
$DB->query("UPDATE staff_pm_conversations SET Status='Unanswered', Level=".$Level." WHERE ID=$ConvID");
|
||||
$DB->query("UPDATE staff_pm_conversations
|
||||
SET Status='Unanswered',
|
||||
Level=$Level
|
||||
WHERE ID=$ConvID");
|
||||
header('Location: staffpm.php');
|
||||
} else {
|
||||
error(404);
|
||||
@ -46,12 +49,16 @@
|
||||
|
||||
if ($LevelType == 'class') {
|
||||
// Assign to class
|
||||
$DB->query("UPDATE staff_pm_conversations SET Status='Unanswered', Level=$NewLevel, AssignedToUser=NULL WHERE ID=$ConvID");
|
||||
$DB->query("UPDATE staff_pm_conversations
|
||||
SET Status='Unanswered',
|
||||
Level=$NewLevel,
|
||||
AssignedToUser=NULL
|
||||
WHERE ID=$ConvID");
|
||||
} else {
|
||||
$UserInfo = Users::user_info($NewLevel);
|
||||
$Level = $Classes[$UserInfo['PermissionID']]['Level'];
|
||||
$Level = $Classes[$UserInfo['PermissionID']]['Level'];
|
||||
if (!$Level) {
|
||||
error("Assign to user not found.");
|
||||
error('Assign to user not found.');
|
||||
}
|
||||
|
||||
// Assign to user
|
||||
@ -66,7 +73,7 @@
|
||||
}
|
||||
|
||||
} else {
|
||||
// No id
|
||||
// No ID
|
||||
header('Location: staffpm.php');
|
||||
}
|
||||
?>
|
||||
|
@ -39,15 +39,15 @@
|
||||
<div class="head">
|
||||
<strong>Name:</strong>
|
||||
<input onfocus="if (this.value == 'New name') this.value='';"
|
||||
onblur="if (this.value == '') this.value='New name';"
|
||||
type="text" id="response_name_0" size="87" value="New name"
|
||||
onblur="if (this.value == '') this.value='New name';"
|
||||
type="text" id="response_name_0" size="87" value="New name"
|
||||
/>
|
||||
</div>
|
||||
<div class="pad">
|
||||
<textarea onfocus="if (this.value == 'New message') this.value='';"
|
||||
onblur="if (this.value == '') this.value='New message';"
|
||||
rows="10" cols="87"
|
||||
id="response_message_0">New message</textarea>
|
||||
onblur="if (this.value == '') this.value='New message';"
|
||||
rows="10" cols="87"
|
||||
id="response_message_0">New message</textarea>
|
||||
<br />
|
||||
<input type="button" value="Save" id="save_0" onclick="SaveMessage(0);" />
|
||||
</div>
|
||||
@ -62,7 +62,7 @@
|
||||
|
||||
// List common responses
|
||||
$DB->query("SELECT ID, Message, Name FROM staff_pm_responses ORDER BY ID DESC");
|
||||
while(list($ID, $Message, $Name) = $DB->next_record()) {
|
||||
while (list($ID, $Message, $Name) = $DB->next_record()) {
|
||||
|
||||
?>
|
||||
<br />
|
||||
|
@ -12,7 +12,7 @@
|
||||
\*********************************************************************/
|
||||
|
||||
// Quick SQL injection check
|
||||
if(!$_GET['post'] || !is_number($_GET['post'])){
|
||||
if (!$_GET['post'] || !is_number($_GET['post'])) {
|
||||
error(0);
|
||||
}
|
||||
|
||||
@ -23,15 +23,15 @@
|
||||
// the right level
|
||||
$DB->query("SELECT m.Message, c.Level, c.UserID
|
||||
FROM staff_pm_messages as m
|
||||
JOIN staff_pm_conversations AS c ON m.ConvID=c.ID
|
||||
JOIN staff_pm_conversations AS c ON m.ConvID=c.ID
|
||||
WHERE m.ID='$PostID'");
|
||||
list($Message, $Level, $UserID) = $DB->next_record(MYSQLI_NUM);
|
||||
|
||||
if (($LoggedUser['ID'] == $UserID) || ($IsFLS && $LoggedUser['Class'] >= $Level)) {
|
||||
if (($LoggedUser['ID'] == $UserID) || ($IsFLS && $LoggedUser['Class'] >= $Level)) {
|
||||
// This gets sent to the browser, which echoes it wherever
|
||||
echo trim($Message);
|
||||
} else {
|
||||
error(403);
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -10,34 +10,38 @@
|
||||
$ConvID = (int)$_GET['id'];
|
||||
$DB->query("SELECT c.Subject, c.UserID, c.Level, c.AssignedToUser, c.Unread, c.Status, u.Donor
|
||||
FROM staff_pm_conversations AS c
|
||||
JOIN users_info AS u ON u.UserID = c.UserID
|
||||
JOIN users_info AS u ON u.UserID = c.UserID
|
||||
WHERE ID=$ConvID");
|
||||
list($Subject, $UserID, $Level, $AssignedToUser, $Unread, $Status, $Donor) = $DB->next_record();
|
||||
if ($DB->record_count() == 0) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
$Message = "Thank for for helping to support the site. It's users like you who make all of this possible.";
|
||||
$Message = "Thank for for helping to support the site. It's users like you who make all of this possible.";
|
||||
|
||||
if ((int)$Donor === 0) {
|
||||
$Msg = db_string(sqltime() . ' - Donated: http://'.NONSSL_SITE_URL."/staffpm.php?action=viewconv&id=$ConvID\n\n");
|
||||
$Msg = db_string(sqltime() . ' - Donated: https://'.SSL_SITE_URL."/staffpm.php?action=viewconv&id=$ConvID\n\n");
|
||||
$DB->query("UPDATE users_info
|
||||
SET Donor='1',
|
||||
AdminComment = CONCAT('$Msg',AdminComment)
|
||||
WHERE UserID = $UserID");
|
||||
$DB->query("UPDATE users_main SET Invites=Invites+2 WHERE ID = $UserID");
|
||||
$DB->query("UPDATE users_main
|
||||
SET Invites=Invites+2
|
||||
WHERE ID = $UserID");
|
||||
|
||||
$Cache->delete_value('user_info_'.$UserID);
|
||||
$Cache->delete_value('user_info_heavy_'.$UserID);
|
||||
$Message .= " Enjoy your new love from us!";
|
||||
$Message .= ' Enjoy your new love from us!';
|
||||
} else {
|
||||
$Message .= " ";
|
||||
$Message .= ' ';
|
||||
}
|
||||
$DB->query("INSERT INTO staff_pm_messages (UserID, SentDate, Message, ConvID)
|
||||
VALUES (".$LoggedUser['ID'].", '".sqltime()."', '".db_string($Message)."', $ConvID)");
|
||||
$DB->query("UPDATE staff_pm_conversations
|
||||
SET Date='".sqltime()."', Unread=true,
|
||||
Status='Resolved', ResolverID=".$LoggedUser['ID']."
|
||||
WHERE ID=$ConvID");
|
||||
SET Date='".sqltime()."',
|
||||
Unread=true,
|
||||
Status='Resolved',
|
||||
ResolverID=".$LoggedUser['ID']."
|
||||
WHERE ID=$ConvID");
|
||||
header('Location: staffpm.php');
|
||||
?>
|
||||
|
@ -6,37 +6,37 @@
|
||||
$UserLevel = $LoggedUser['EffectiveClass'];
|
||||
|
||||
// Setup for current view mode
|
||||
$SortStr = "IF(AssignedToUser = ".$LoggedUser['ID'].",0,1) ASC, ";
|
||||
$SortStr = 'IF(AssignedToUser = '.$LoggedUser['ID'].',0,1) ASC, ';
|
||||
switch ($View) {
|
||||
case 'unanswered':
|
||||
$ViewString = "Unanswered";
|
||||
$ViewString = 'Unanswered';
|
||||
$WhereCondition = "WHERE (Level <= $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'";
|
||||
break;
|
||||
case 'open':
|
||||
$ViewString = "All open";
|
||||
$ViewString = 'All open';
|
||||
$WhereCondition = "WHERE (Level <= $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status IN ('Open', 'Unanswered')";
|
||||
$SortStr = '';
|
||||
break;
|
||||
case 'resolved':
|
||||
$ViewString = "Resolved";
|
||||
$ViewString = 'Resolved';
|
||||
$WhereCondition = "WHERE (Level <= $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Resolved'";
|
||||
$SortStr = '';
|
||||
break;
|
||||
case 'my':
|
||||
$ViewString = "My unanswered";
|
||||
$ViewString = 'My unanswered';
|
||||
$WhereCondition = "WHERE (Level = $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'";
|
||||
break;
|
||||
default:
|
||||
if ($UserLevel >= 700) {
|
||||
$ViewString = "My unanswered";
|
||||
$ViewString = 'My unanswered';
|
||||
$WhereCondition = "WHERE ((Level >= ".max($Classes[MOD]['Level'],700)." AND Level <= $UserLevel) OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'";
|
||||
} elseif ($UserLevel == 650) {
|
||||
// Forum Mods
|
||||
$ViewString = "My Unanswered";
|
||||
$ViewString = 'My unanswered';
|
||||
$WhereCondition = "WHERE (Level = $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'";
|
||||
} else {
|
||||
// FLS
|
||||
$ViewString = "Unanswered";
|
||||
$ViewString = 'Unanswered';
|
||||
$WhereCondition = "WHERE (Level <= $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'";
|
||||
}
|
||||
break;
|
||||
@ -67,10 +67,10 @@
|
||||
$DB->set_query_id($StaffPMs);
|
||||
|
||||
$CurURL = Format::get_url();
|
||||
if(empty($CurURL)) {
|
||||
$CurURL = "staffpm.php?";
|
||||
if (empty($CurURL)) {
|
||||
$CurURL = 'staffpm.php?';
|
||||
} else {
|
||||
$CurURL = "staffpm.php?".$CurURL."&";
|
||||
$CurURL = 'staffpm.php?'.$CurURL.'&';
|
||||
}
|
||||
$Pages=Format::get_pages($Page,$NumResults,MESSAGES_PER_PAGE,9);
|
||||
|
||||
@ -82,14 +82,14 @@
|
||||
<div class="header">
|
||||
<h2><?=$ViewString?> Staff PMs</h2>
|
||||
<div class="linkbox">
|
||||
<? if ($IsStaff) {
|
||||
?> <a href="staffpm.php" class="brackets">My unanswered</a>
|
||||
<? if ($IsStaff) { ?>
|
||||
<a href="staffpm.php" class="brackets">My unanswered</a>
|
||||
<? } ?>
|
||||
<a href="staffpm.php?view=unanswered" class="brackets">All unanswered</a>
|
||||
<a href="staffpm.php?view=open" class="brackets">Open</a>
|
||||
<a href="staffpm.php?view=resolved" class="brackets">Resolved</a>
|
||||
<? if ($IsStaff) { ?>
|
||||
<a href="staffpm.php?action=scoreboard" class="brackets">Scoreboard</a>
|
||||
<a href="staffpm.php?action=scoreboard" class="brackets">Scoreboard</a>
|
||||
<? } ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -101,13 +101,13 @@
|
||||
<div class="box pad" id="inbox">
|
||||
<?
|
||||
|
||||
if ($DB->record_count() == 0) {
|
||||
if ($DB->record_count() == 0) :
|
||||
// No messages
|
||||
?>
|
||||
<h2>No messages</h2>
|
||||
<?
|
||||
|
||||
} else {
|
||||
else:
|
||||
// Messages, draw table
|
||||
if ($ViewString != 'Resolved' && $IsStaff) {
|
||||
// Open multiresolve form
|
||||
@ -120,7 +120,7 @@
|
||||
|
||||
// Table head
|
||||
?>
|
||||
<table class="message_table<?=($ViewString != 'Resolved' && $IsStaff)?' checkboxes':''?>">
|
||||
<table class="message_table<?=($ViewString != 'Resolved' && $IsStaff) ? ' checkboxes' : '' ?>">
|
||||
<tr class="colhead">
|
||||
<? if ($ViewString != 'Resolved' && $IsStaff) { ?>
|
||||
<td width="10"><input type="checkbox" onclick="toggleChecks('messageform',this)" /></td>
|
||||
@ -136,7 +136,7 @@
|
||||
<?
|
||||
|
||||
// List messages
|
||||
while(list($ID, $Subject, $UserID, $Status, $Level, $AssignedToUser, $Date, $Unread, $ResolverID) = $DB->next_record()) {
|
||||
while (list($ID, $Subject, $UserID, $Status, $Level, $AssignedToUser, $Date, $Unread, $ResolverID) = $DB->next_record()) :
|
||||
$Row = ($Row === 'a') ? 'b' : 'a';
|
||||
$RowClass = 'row'.$Row;
|
||||
|
||||
@ -146,7 +146,7 @@
|
||||
// Get assigned
|
||||
if ($AssignedToUser == '') {
|
||||
// Assigned to class
|
||||
$Assigned = ($Level == 0) ? "First Line Support" : $ClassLevels[$Level]['Name'];
|
||||
$Assigned = ($Level == 0) ? 'First Line Support' : $ClassLevels[$Level]['Name'];
|
||||
// No + on Sysops
|
||||
if ($Assigned != 'Sysop') { $Assigned .= "+"; }
|
||||
|
||||
@ -180,7 +180,7 @@
|
||||
<?
|
||||
|
||||
$DB->set_query_id($StaffPMs);
|
||||
}
|
||||
endwhile;
|
||||
|
||||
// Close table and multiresolve form
|
||||
?>
|
||||
@ -190,7 +190,7 @@
|
||||
</form>
|
||||
<?
|
||||
}
|
||||
}
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<div class="linkbox">
|
||||
|
@ -5,8 +5,8 @@
|
||||
list($UserID, $Level, $AssignedToUser) = $DB->next_record();
|
||||
|
||||
if ($UserID == $LoggedUser['ID'] || ($IsFLS && $Level == 0) ||
|
||||
$AssignedToUser == $LoggedUser['ID'] || ($IsStaff && $Level <= $LoggedUser['EffectiveClass'])) {
|
||||
/*if($Level != 0 && $IsStaff == false) {
|
||||
$AssignedToUser == $LoggedUser['ID'] || ($IsStaff && $Level <= $LoggedUser['EffectiveClass'])) {
|
||||
/*if ($Level != 0 && $IsStaff == false) {
|
||||
error(403);
|
||||
}*/
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
error(403);
|
||||
}
|
||||
} else {
|
||||
// No id
|
||||
// No ID
|
||||
header('Location: staffpm.php');
|
||||
}
|
||||
?>
|
||||
|
@ -25,7 +25,7 @@
|
||||
$UserInfo = Users::user_info($UserID);
|
||||
$UserStr = Users::format_username($UserID, true, true, true, true);
|
||||
|
||||
$OwnerID = $UserID;
|
||||
$OwnerID = $UserID;
|
||||
$OwnerName = $UserInfo['Username'];
|
||||
|
||||
?>
|
||||
@ -64,12 +64,12 @@
|
||||
// Get messages
|
||||
$StaffPMs = $DB->query("SELECT UserID, SentDate, Message, ID FROM staff_pm_messages WHERE ConvID=$ConvID");
|
||||
|
||||
while(list($UserID, $SentDate, $Message, $MessageID) = $DB->next_record()) {
|
||||
while (list($UserID, $SentDate, $Message, $MessageID) = $DB->next_record()) {
|
||||
// Set user string
|
||||
if ($UserID == $OwnerID) {
|
||||
// User, use prepared string
|
||||
$UserString = $UserStr;
|
||||
$Username = $OwnerName;
|
||||
$Username = $OwnerName;
|
||||
} else {
|
||||
// Staff/FLS
|
||||
$UserInfo = Users::user_info($UserID);
|
||||
@ -112,7 +112,7 @@
|
||||
<?
|
||||
// List common responses
|
||||
$DB->query("SELECT ID, Name FROM staff_pm_responses");
|
||||
while(list($ID, $Name) = $DB->next_record()) {
|
||||
while (list($ID, $Name) = $DB->next_record()) {
|
||||
?>
|
||||
<option value="<?=$ID?>"><?=$Name?></option>
|
||||
<? } ?>
|
||||
@ -168,11 +168,11 @@
|
||||
m.ID,
|
||||
m.Username
|
||||
FROM permissions as p
|
||||
JOIN users_main as m ON m.PermissionID=p.ID
|
||||
JOIN users_main as m ON m.PermissionID=p.ID
|
||||
WHERE p.DisplayStaff='1'
|
||||
ORDER BY p.Level DESC, m.Username ASC"
|
||||
);
|
||||
while(list($ID, $Name) = $DB->next_record()) {
|
||||
while (list($ID, $Name) = $DB->next_record()) {
|
||||
// Create one <option> for each staff member
|
||||
$Selected = ($AssignedToUser == $ID) ? ' selected="selected"' : '';
|
||||
?>
|
||||
@ -187,12 +187,12 @@
|
||||
m.ID,
|
||||
m.Username
|
||||
FROM users_info as i
|
||||
JOIN users_main as m ON m.ID=i.UserID
|
||||
JOIN permissions as p ON p.ID=m.PermissionID
|
||||
JOIN users_main as m ON m.ID=i.UserID
|
||||
JOIN permissions as p ON p.ID=m.PermissionID
|
||||
WHERE p.DisplayStaff!='1' AND i.SupportFor!=''
|
||||
ORDER BY m.Username ASC
|
||||
");
|
||||
while(list($ID, $Name) = $DB->next_record()) {
|
||||
while (list($ID, $Name) = $DB->next_record()) {
|
||||
// Create one <option> for each FLS user
|
||||
$Selected = ($AssignedToUser == $ID) ? ' selected="selected"' : '';
|
||||
?>
|
||||
@ -208,7 +208,7 @@
|
||||
|
||||
if ($Status != 'Resolved') { ?>
|
||||
<input type="button" value="Resolve" onclick="location.href='staffpm.php?action=resolve&id=<?=$ConvID?>';" />
|
||||
<? if ($IsFLS) { //Moved by request ?>
|
||||
<? if ($IsFLS) { //Moved by request ?>
|
||||
<input type="button" value="Common answers" onclick="$('#common_answers').toggle();" />
|
||||
<? } ?>
|
||||
<input type="button" id="previewbtn" value="Preview" class="hidden button_preview_<?=$TextPrev->getID()?>" title="Preview text" />
|
||||
@ -229,6 +229,6 @@
|
||||
|
||||
View::show_footer();
|
||||
} else {
|
||||
// No id
|
||||
// No ID
|
||||
header('Location: staffpm.php');
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
$_REQUEST['action'] = $argv[1];
|
||||
} else {
|
||||
if (empty($_REQUEST['action']) || ($_REQUEST['action'] != "public_sandbox" && $_REQUEST['action'] != "ocelot")) {
|
||||
if (empty($_REQUEST['action']) || ($_REQUEST['action'] != 'public_sandbox' && $_REQUEST['action'] != 'ocelot')) {
|
||||
enforce_login();
|
||||
}
|
||||
}
|
||||
@ -40,14 +40,16 @@
|
||||
}
|
||||
|
||||
include(SERVER_ROOT."/classes/class_validate.php");
|
||||
$Val=NEW VALIDATE;
|
||||
$Val = new VALIDATE;
|
||||
|
||||
include(SERVER_ROOT.'/classes/class_feed.php');
|
||||
$Feed = new FEED;
|
||||
|
||||
switch ($_REQUEST['action']){
|
||||
case 'phpinfo':
|
||||
if (!check_perms('site_debug')) error(403);
|
||||
if (!check_perms('site_debug')) {
|
||||
error(403);
|
||||
}
|
||||
phpinfo();
|
||||
break;
|
||||
//Services
|
||||
@ -124,7 +126,10 @@
|
||||
error(403);
|
||||
}
|
||||
if (is_number($_POST['newsid'])){
|
||||
$DB->query("UPDATE news SET Title='".db_string($_POST['title'])."', Body='".db_string($_POST['body'])."' WHERE ID='".db_string($_POST['newsid'])."'");
|
||||
$DB->query("UPDATE news
|
||||
SET Title='".db_string($_POST['title'])."',
|
||||
Body='".db_string($_POST['body'])."'
|
||||
WHERE ID='".db_string($_POST['newsid'])."'");
|
||||
$Cache->delete_value('news');
|
||||
$Cache->delete_value('feed_news');
|
||||
}
|
||||
@ -155,7 +160,8 @@
|
||||
error(403);
|
||||
}
|
||||
|
||||
$DB->query("INSERT INTO news (UserID, Title, Body, Time) VALUES ('$LoggedUser[ID]', '".db_string($_POST['title'])."', '".db_string($_POST['body'])."', '".sqltime()."')");
|
||||
$DB->query("INSERT INTO news (UserID, Title, Body, Time)
|
||||
VALUES ('$LoggedUser[ID]', '".db_string($_POST['title'])."', '".db_string($_POST['body'])."', '".sqltime()."')");
|
||||
|
||||
|
||||
|
||||
@ -190,7 +196,11 @@
|
||||
//$Val->SetFields('test',true,'number','You did not enter a valid level for this permission set.');
|
||||
|
||||
if (is_numeric($_REQUEST['id'])) {
|
||||
$DB->query("SELECT p.ID,p.Name,p.Level,p.Secondary,p.PermittedForums,p.Values,p.DisplayStaff,COUNT(u.ID) FROM permissions AS p LEFT JOIN users_main AS u ON u.PermissionID=p.ID WHERE p.ID='".db_string($_REQUEST['id'])."' GROUP BY p.ID");
|
||||
$DB->query("SELECT p.ID, p.Name, p.Level, p.Secondary, p.PermittedForums, p.Values, p.DisplayStaff, COUNT(u.ID)
|
||||
FROM permissions AS p
|
||||
LEFT JOIN users_main AS u ON u.PermissionID=p.ID
|
||||
WHERE p.ID='".db_string($_REQUEST['id'])."'
|
||||
GROUP BY p.ID");
|
||||
list($ID,$Name,$Level,$Secondary,$Forums,$Values,$DisplayStaff,$UserCount)=$DB->next_record(MYSQLI_NUM, array(5));
|
||||
|
||||
if ($Level > $LoggedUser['EffectiveClass'] || $_REQUEST['level'] > $LoggedUser['EffectiveClass']) {
|
||||
@ -207,7 +217,7 @@
|
||||
list($DupeCheck)=$DB->next_record();
|
||||
|
||||
if ($DupeCheck) {
|
||||
$Err = "There is already a permission class with that level.";
|
||||
$Err = 'There is already a permission class with that level.';
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,12 +245,13 @@
|
||||
'".db_string(serialize($Values))."',
|
||||
'".db_string($DisplayStaff)."')");
|
||||
} else {
|
||||
$DB->query("UPDATE permissions SET Level='".db_string($Level)."',
|
||||
Name='".db_string($Name)."',
|
||||
Secondary=".$Secondary.",
|
||||
PermittedForums='".db_string($Forums)."',
|
||||
`Values`='".db_string(serialize($Values))."',
|
||||
DisplayStaff='".db_string($DisplayStaff)."'
|
||||
$DB->query("UPDATE permissions
|
||||
SET Level='".db_string($Level)."',
|
||||
Name='".db_string($Name)."',
|
||||
Secondary=".$Secondary.",
|
||||
PermittedForums='".db_string($Forums)."',
|
||||
`Values`='".db_string(serialize($Values))."',
|
||||
DisplayStaff='".db_string($DisplayStaff)."'
|
||||
WHERE ID='".db_string($_REQUEST['id'])."'");
|
||||
$Cache->delete_value('perm_'.$_REQUEST['id']);
|
||||
if ($Secondary) {
|
||||
|
@ -1,14 +1,16 @@
|
||||
<?
|
||||
function class_list($Selected=0){
|
||||
function class_list($Selected = 0) {
|
||||
global $Classes;
|
||||
$Return = '';
|
||||
foreach ($Classes as $ID => $Class) {
|
||||
if ($Class['Secondary']) { continue; }
|
||||
if ($Class['Secondary']) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$Name = $Class['Name'];
|
||||
$Level = $Class['Level'];
|
||||
$Return.='<option value="'.$Level.'"';
|
||||
if($Selected == $Level){
|
||||
if ($Selected == $Level) {
|
||||
$Return.=' selected="selected"';
|
||||
}
|
||||
$Return.='>'.Format::cut_string($Name, 20, 1).'</option>'."\n";
|
||||
@ -17,7 +19,9 @@ function class_list($Selected=0){
|
||||
return $Return;
|
||||
}
|
||||
|
||||
if(!check_perms('admin_manage_forums')) { error(403); }
|
||||
if (!check_perms('admin_manage_forums')) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
View::show_header('Forum Management');
|
||||
$DB->query('SELECT ID, Name FROM forums ORDER BY Sort');
|
||||
@ -27,25 +31,26 @@ function class_list($Selected=0){
|
||||
unset($ForumCats);
|
||||
$ForumCats = $Cache->get_value('forums_categories');
|
||||
if ($ForumCats === false) {
|
||||
$DB->query("SELECT ID, Name FROM forums_categories");
|
||||
$DB->query('SELECT ID, Name FROM forums_categories');
|
||||
$ForumCats = array();
|
||||
while (list($ID, $Name) = $DB->next_record()) {
|
||||
while (list($ID, $Name) = $DB->next_record()) {
|
||||
$ForumCats[$ID] = $Name;
|
||||
}
|
||||
$Cache->cache_value('forums_categories', $ForumCats, 0); //Inf cache.
|
||||
}
|
||||
|
||||
$DB->query('SELECT
|
||||
ID,
|
||||
CategoryID,
|
||||
Sort,
|
||||
Name,
|
||||
Description,
|
||||
MinClassRead,
|
||||
MinClassWrite,
|
||||
MinClassCreate,
|
||||
AutoLock,
|
||||
AutoLockWeeks
|
||||
$DB->query('
|
||||
SELECT
|
||||
ID,
|
||||
CategoryID,
|
||||
Sort,
|
||||
Name,
|
||||
Description,
|
||||
MinClassRead,
|
||||
MinClassWrite,
|
||||
MinClassCreate,
|
||||
AutoLock,
|
||||
AutoLockWeeks
|
||||
FROM forums
|
||||
ORDER BY CategoryID, Sort ASC');
|
||||
?>
|
||||
@ -68,7 +73,7 @@ function class_list($Selected=0){
|
||||
</tr>
|
||||
<?
|
||||
$Row = 'b';
|
||||
while(list($ID, $CategoryID, $Sort, $Name, $Description, $MinClassRead, $MinClassWrite, $MinClassCreate, $AutoLock, $AutoLockWeeks) = $DB->next_record()){
|
||||
while (list($ID, $CategoryID, $Sort, $Name, $Description, $MinClassRead, $MinClassWrite, $MinClassCreate, $AutoLock, $AutoLockWeeks) = $DB->next_record()) {
|
||||
$Row = ($Row === 'a' ? 'b' : 'a');
|
||||
?>
|
||||
<tr class="row<?=$Row?>">
|
||||
@ -81,7 +86,7 @@ function class_list($Selected=0){
|
||||
<? reset($ForumCats);
|
||||
foreach ($ForumCats as $CurCat => $CatName) {
|
||||
?>
|
||||
<option value="<?=$CurCat?>" <? if($CurCat == $CategoryID) { echo ' selected="selected"'; } ?>><?=$CatName?></option>
|
||||
<option value="<?=$CurCat?>" <? if ($CurCat == $CategoryID) { echo ' selected="selected"'; } ?>><?=$CatName?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
@ -110,7 +115,7 @@ function class_list($Selected=0){
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="autolock" <?=($AutoLock == '1')?'checked ':''?>/>
|
||||
<input type="checkbox" name="autolock"<?=($AutoLock == '1') ? ' checked="checked"' : ''?> />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="autolockweeks" value="<?=$AutoLockWeeks?>" />
|
||||
@ -135,8 +140,8 @@ function class_list($Selected=0){
|
||||
<td>
|
||||
<select name="categoryid">
|
||||
<? reset($ForumCats);
|
||||
while(list($CurCat, $CatName) = each($ForumCats)) { ?>
|
||||
<option value="<?=$CurCat?>" <? if($CurCat == $CategoryID) { echo ' selected="selected"'; } ?>><?=$CatName?></option>
|
||||
while (list($CurCat, $CatName) = each($ForumCats)) { ?>
|
||||
<option value="<?=$CurCat?>"<? if ($CurCat == $CategoryID) { echo ' selected="selected"'; } ?>><?=$CatName?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
@ -165,7 +170,7 @@ function class_list($Selected=0){
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="autolock" checked />
|
||||
<input type="checkbox" name="autolock" checked="checked" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="autolockweeks" value="4" />
|
||||
@ -177,4 +182,4 @@ function class_list($Selected=0){
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
<? View::show_footer(); ?>
|
||||
<? View::show_footer(); ?>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?
|
||||
//******************************************************************************//
|
||||
//--------------- Restore all VH-recommended torrents to NL -------------------//
|
||||
//--------------- Restore all VH-recommended torrents to NL --------------------//
|
||||
//---- For use after resetting the FL/NL database (after sitewide freeleech) ---//
|
||||
authorize();
|
||||
|
||||
if(!check_perms('site_manage_recommendations')){
|
||||
if (!check_perms('site_manage_recommendations')) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
$DB->query("SELECT GroupID FROM torrents_recommended");
|
||||
$DB->query('SELECT GroupID FROM torrents_recommended');
|
||||
$ToNL = $DB->next_record();
|
||||
Torrents::freeleech_groups($ToNL, 2, 3);
|
||||
?>
|
||||
Done
|
||||
Done
|
||||
|
@ -1,11 +1,15 @@
|
||||
<?
|
||||
if (!check_perms('users_mod')) { error(403); }
|
||||
if (!check_perms('users_mod')) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['addtokens'])) {
|
||||
authorize();
|
||||
$Tokens = $_REQUEST['numtokens'];
|
||||
|
||||
if (!is_number($Tokens) || ($Tokens < 0)) { error("Please enter a valid number of tokens."); }
|
||||
if (!is_number($Tokens) || ($Tokens < 0)) {
|
||||
error('Please enter a valid number of tokens.');
|
||||
}
|
||||
$sql = "UPDATE users_main SET FLTokens = FLTokens + $Tokens WHERE Enabled = '1'";
|
||||
if (!isset($_REQUEST['leechdisabled'])) {
|
||||
$sql .= " AND can_leech = 1";
|
||||
@ -19,12 +23,14 @@
|
||||
while (list($UserID) = $DB->next_record()) {
|
||||
$Cache->delete_value('user_info_heavy_'.$UserID);
|
||||
}
|
||||
$message = "<strong>$Tokens freeleech tokens added to all enabled users" . (!isset($_REQUEST['leechdisabled'])?' with enabled leeching privs':'') . '.</strong><br /><br />';
|
||||
$message = '<strong>' . number_format($Tokens) . 'freeleech tokens added to all enabled users' . (!isset($_REQUEST['leechdisabled']) ? ' with enabled leeching privs' : '') . '.</strong><br /><br />';
|
||||
} elseif (isset($_REQUEST['cleartokens'])) {
|
||||
authorize();
|
||||
$Tokens = $_REQUEST['numtokens'];
|
||||
|
||||
if (!is_number($Tokens) || ($Tokens < 0)) { error("Please enter a valid number of tokens."); }
|
||||
if (!is_number($Tokens) || ($Tokens < 0)) {
|
||||
error('Please enter a valid number of tokens.');
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['onlydrop'])) {
|
||||
$Where = "WHERE FLTokens > $Tokens";
|
||||
@ -42,7 +48,7 @@
|
||||
$Cache->delete_value('user_info_heavy_'.$UserID);
|
||||
}
|
||||
|
||||
$where = "";
|
||||
$where = '';
|
||||
}
|
||||
|
||||
|
||||
@ -55,26 +61,26 @@
|
||||
<a href="tools.php?action=tokens&showabusers=1" class="brackets">Show abusers</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box pad" style="margin-left: auto; margin-right: auto; text-align:center; max-width: 40%">
|
||||
<div class="box pad" style="margin-left: auto; margin-right: auto; text-align: center; max-width: 40%;">
|
||||
<?=$message?>
|
||||
<form class="add_form" name="fltokens" action="" method="post">
|
||||
<input type="hidden" name="action" value="tokens" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
Tokens to add: <input type="text" name="numtokens" size="5" style="text-align: right" value="0"><br /><br />
|
||||
<label for="leechdisabled">Grant tokens to leech disabled users: </label><input type="checkbox" id="leechdisabled" name="leechdisabled" value="1"><br /><br />
|
||||
<input type="submit" name="addtokens" value="Add tokens">
|
||||
Tokens to add: <input type="text" name="numtokens" size="5" style="text-align: right;" value="0" /><br /><br />
|
||||
<label for="leechdisabled">Grant tokens to leech disabled users: </label><input type="checkbox" id="leechdisabled" name="leechdisabled" value="1" /><br /><br />
|
||||
<input type="submit" name="addtokens" value="Add tokens" />
|
||||
</form>
|
||||
</div>
|
||||
<br />
|
||||
<div class="box pad" style="margin-left: auto; margin-right: auto; text-align:center; max-width: 40%">
|
||||
<div class="box pad" style="margin-left: auto; margin-right: auto; text-align: center; max-width: 40%;">
|
||||
<?=$message?>
|
||||
<form class="manage_form" name="fltokens" action="" method="post">
|
||||
<input type="hidden" name="action" value="tokens" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
Tokens to set: <input type="text" name="numtokens" size="5" style="text-align: right" value="0"><br /><br />
|
||||
<span id="droptokens" class=""><label for="onlydrop">Only affect users with at least this many tokens: </label><input type="checkbox" id="onlydrop" name="onlydrop" value="1" onchange="$('#disabled').toggle();return true;"></span><br />
|
||||
<span id="disabled" class=""><label for="leechdisabled">Also add tokens (as needed) to leech disabled users: </label><input type="checkbox" id="leechdisabled" name="leechdisabled" value="1" onchange="$('#droptokens').toggle();return true;"></span><br /><br />
|
||||
<input type="submit" name="cleartokens" value="Set token total">
|
||||
Tokens to set: <input type="text" name="numtokens" size="5" style="text-align: right;" value="0" /><br /><br />
|
||||
<span id="droptokens" class=""><label for="onlydrop">Only affect users with at least this many tokens: </label><input type="checkbox" id="onlydrop" name="onlydrop" value="1" onchange="$('#disabled').toggle();return true;" /></span><br />
|
||||
<span id="disabled" class=""><label for="leechdisabled">Also add tokens (as needed) to leech disabled users: </label><input type="checkbox" id="leechdisabled" name="leechdisabled" value="1" onchange="$('#droptokens').toggle();return true;" /></span><br /><br />
|
||||
<input type="submit" name="cleartokens" value="Set token total" />
|
||||
</form>
|
||||
</div>
|
||||
<?
|
||||
|
@ -10,33 +10,33 @@
|
||||
<div class="permission_container">
|
||||
<table class="layout">
|
||||
<tr class="colhead"><td>Managers</td></tr>
|
||||
<? if (check_perms('admin_manage_permissions')) { ?>
|
||||
<? if (check_perms('admin_manage_permissions')) { ?>
|
||||
<tr><td><a href="tools.php?action=permissions">Permissions</a></td></tr>
|
||||
<? } if (check_perms('admin_whitelist')) { ?>
|
||||
<? } if (check_perms('admin_whitelist')) { ?>
|
||||
<tr><td><a href="tools.php?action=whitelist">Whitelist</a></td></tr>
|
||||
<? } if (check_perms('admin_manage_ipbans')) { ?>
|
||||
<? } if (check_perms('admin_manage_ipbans')) { ?>
|
||||
<tr><td><a href="tools.php?action=ip_ban">IP address bans</a></td></tr>
|
||||
|
||||
<? } if (check_perms('admin_login_watch')) { ?>
|
||||
<? } if (check_perms('admin_login_watch')) { ?>
|
||||
<tr><td><a href="tools.php?action=login_watch">Login watch</a></td></tr>
|
||||
<? } if (check_perms('admin_manage_forums')) { ?>
|
||||
<? } if (check_perms('admin_manage_forums')) { ?>
|
||||
<tr><td><a href="tools.php?action=forum">Forums</a></td></tr>
|
||||
<? } if (check_perms('admin_manage_news')) { ?>
|
||||
<? } if (check_perms('admin_manage_news')) { ?>
|
||||
<tr><td><a href="tools.php?action=news">News</a></td></tr>
|
||||
<? } if (check_perms('admin_dnu')) { ?>
|
||||
<? } if (check_perms('admin_dnu')) { ?>
|
||||
<tr><td><a href="tools.php?action=dnu">Do not upload list</a></td></tr>
|
||||
<? } if (check_perms('site_recommend_own') || check_perms('site_manage_recommendations')) { ?>
|
||||
<? } if (check_perms('site_recommend_own') || check_perms('site_manage_recommendations')) { ?>
|
||||
<tr><td><a href="tools.php?action=recommend">Vanity House additions</a></td></tr>
|
||||
|
||||
<? } if (check_perms('users_view_email')) { ?>
|
||||
<? } if (check_perms('users_view_email')) { ?>
|
||||
<tr><td><a href="tools.php?action=email_blacklist">Email blacklist</a></td></tr>
|
||||
<? } if (check_perms('users_mod')) { ?>
|
||||
<? } if (check_perms('users_mod')) { ?>
|
||||
<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>
|
||||
<tr><td><a href="tools.php?action=tag_aliases">Tag aliases</a></td></tr>
|
||||
|
||||
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="permission_container">
|
||||
@ -44,45 +44,45 @@
|
||||
<tr class="colhead"><td>Data</td></tr>
|
||||
|
||||
<?
|
||||
if (check_perms('admin_donor_log')) { ?>
|
||||
if (check_perms('admin_donor_log')) { ?>
|
||||
<tr><td><a href="tools.php?action=donation_log">Donation log</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=bitcoin_balance">Bitcoin donation balance</a></td></tr>
|
||||
<? } if (check_perms('users_view_ips') && check_perms('users_view_email')) { ?>
|
||||
<? } if (check_perms('users_view_ips') && check_perms('users_view_email')) { ?>
|
||||
<tr><td><a href="tools.php?action=registration_log">Registration log</a></td></tr>
|
||||
<? } if (check_perms('users_view_invites')) { ?>
|
||||
<? } if (check_perms('users_view_invites')) { ?>
|
||||
<tr><td><a href="tools.php?action=invite_pool">Invite pool</a></td></tr>
|
||||
|
||||
<? } if (check_perms('site_view_flow')) { ?>
|
||||
<? } if (check_perms('site_view_flow')) { ?>
|
||||
<tr><td><a href="tools.php?action=upscale_pool">Upscale pool</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=user_flow">User flow</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=torrent_stats">Torrent stats</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=economic_stats">Economic stats</a></td></tr>
|
||||
<? } if (check_perms('site_debug')) { ?>
|
||||
<? } if (check_perms('site_debug')) { ?>
|
||||
<tr><td><a href="tools.php?action=opcode_stats">Opcode stats</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=service_stats">Service stats</a></td></tr>
|
||||
<? } if (check_perms('admin_manage_permissions')) { ?>
|
||||
<? } if (check_perms('admin_manage_permissions')) { ?>
|
||||
<tr><td><a href="tools.php?action=special_users">Special users</a></td></tr>
|
||||
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="permission_container">
|
||||
<table class="layout">
|
||||
<tr class="colhead"><td>Misc</td></tr>
|
||||
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<tr><td><a href="tools.php?action=manipulate_tree">Manipulate tree</a></td></tr>
|
||||
<? }
|
||||
if (check_perms('admin_update_geoip')) { ?>
|
||||
<? }
|
||||
if (check_perms('admin_update_geoip')) { ?>
|
||||
<tr><td><a href="tools.php?action=update_geoip">Update GeoIP </a></td></tr>
|
||||
<? } if (check_perms('admin_create_users')) { ?>
|
||||
<? } if (check_perms('admin_create_users')) { ?>
|
||||
<tr><td><a href="tools.php?action=create_user">Create user</a></td></tr>
|
||||
<? } if (check_perms('users_mod')) { ?>
|
||||
<? } if (check_perms('users_mod')) { ?>
|
||||
<tr><td><a href="tools.php?action=clear_cache">Clear/view a cache key</a></td></tr>
|
||||
<? } if (check_perms('users_view_ips')) { ?>
|
||||
<? } if (check_perms('users_view_ips')) { ?>
|
||||
<tr><td><a href="tools.php?action=dupe_ips">Duplicate IP addresses</a></td></tr>
|
||||
|
||||
<? } if (check_perms('site_debug')) { ?>
|
||||
<? } if (check_perms('site_debug')) { ?>
|
||||
<tr><td><a href="tools.php?action=sandbox1">Sandbox (1)</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=sandbox2">Sandbox (2)</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=sandbox3">Sandbox (3)</a></td></tr>
|
||||
@ -93,13 +93,13 @@
|
||||
<tr><td><a href="tools.php?action=sandbox8">Sandbox (8)</a></td></tr>
|
||||
|
||||
<tr><td><a href="schedule.php?auth=<?=$LoggedUser['AuthKey']?>">Schedule</a></td></tr>
|
||||
<? }?>
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<? } ?>
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<tr><td><strong><a href="tools.php?action=public_sandbox">Public sandbox</a></strong></td></tr>
|
||||
<? } ?>
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<? } ?>
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<tr><td><strong><a href="tools.php?action=mod_sandbox">Mod-level sandbox</a></strong></td></tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,6 +1,10 @@
|
||||
<?
|
||||
if(!check_perms('users_mod')) { error(404); }
|
||||
//if(!check_perms('site_top10_history')) { error(403); }
|
||||
if (!check_perms('users_mod')) {
|
||||
error(404);
|
||||
}
|
||||
// if (!check_perms('site_top10_history')) {
|
||||
// error(403);
|
||||
// }
|
||||
View::show_header('Top 10 Torrents history!');
|
||||
?>
|
||||
<div class="thin">
|
||||
@ -21,7 +25,7 @@
|
||||
<table class="layout">
|
||||
<tr>
|
||||
<td class="label">Date:</td>
|
||||
<td><input type="text" id="date" name="date" value="<?=!empty($_GET['date']) ? display_str($_GET['date']) : 'YYYY-MM-DD'?>" onfocus="if($('#date').raw().value == 'YYYY-MM-DD') $('#date').raw().value = ''" /></td>
|
||||
<td><input type="text" id="date" name="date" value="<?=!empty($_GET['date']) ? display_str($_GET['date']) : 'YYYY-MM-DD'?>" onfocus="if ($('#date').raw().value == 'YYYY-MM-DD') $('#date').raw().value = ''" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Type:</td>
|
||||
@ -39,14 +43,14 @@
|
||||
</form>
|
||||
</div>
|
||||
<?
|
||||
if(!empty($_GET['date'])) {
|
||||
if (!empty($_GET['date'])) {
|
||||
$Date = $_GET['date'];
|
||||
$SQLTime = $Date." 00:00:00";
|
||||
if(!validDate($SQLTime)) {
|
||||
$SQLTime = $Date.' 00:00:00';
|
||||
if (!validDate($SQLTime)) {
|
||||
error('Something is wrong with the date you provided');
|
||||
}
|
||||
|
||||
if(empty($_GET['datetype']) || $_GET['datetype'] == "day") {
|
||||
if (empty($_GET['datetype']) || $_GET['datetype'] == 'day') {
|
||||
$Type = 'day';
|
||||
$Where = "WHERE th.Date BETWEEN '".$SQLTime."' AND '".$SQLTime."' + INTERVAL 24 HOUR AND Type='Daily'";
|
||||
} else {
|
||||
@ -55,7 +59,7 @@
|
||||
}
|
||||
|
||||
$Details = $Cache->get_value('top10_history_'.$SQLTime);
|
||||
if($Details === false) {
|
||||
if ($Details === false) {
|
||||
$DB->query("SELECT
|
||||
tht.Rank,
|
||||
tht.TitleString,
|
||||
@ -93,12 +97,12 @@
|
||||
<h3>Top 10 for <?=($Type == 'day' ? $Date : 'the first week after '.$Date)?></h3>
|
||||
<table class="torrent_table cats numbering border">
|
||||
<tr class="colhead">
|
||||
<td class="center" style="width:15px;"></td>
|
||||
<td class="center" style="width: 15px;"></td>
|
||||
<td class="center"></td>
|
||||
<td><strong>Name</strong></td>
|
||||
</tr>
|
||||
<?
|
||||
foreach ($Details as $Detail) {
|
||||
foreach ($Details as $Detail) :
|
||||
list($Rank, $TitleString, $TagString, $TorrentID, $GroupID,$GroupName,$GroupCategoryID,$TorrentTags,
|
||||
$Format,$Encoding,$Media,$Scene,$HasLog,$HasCue,$LogScore,$Year,$GroupYear,
|
||||
$RemasterTitle,$Snatched,$Seeders,$Leechers,$Data) = $Detail;
|
||||
@ -106,48 +110,71 @@
|
||||
// highlight every other row
|
||||
$Highlight = ($Rank % 2 ? 'a' : 'b');
|
||||
|
||||
if($GroupID) {
|
||||
if ($GroupID) :
|
||||
//Group still exists
|
||||
$DisplayName='';
|
||||
|
||||
$Artists = Artists::get_artist($GroupID);
|
||||
|
||||
if(!empty($Artists)) {
|
||||
if (!empty($Artists)) {
|
||||
$DisplayName = Artists::display_artists($Artists, true, true);
|
||||
}
|
||||
|
||||
$DisplayName .= "<a href='torrents.php?id=$GroupID&torrentid=$TorrentID' title='View Torrent'>$GroupName</a>";
|
||||
$DisplayName .= "<a href='torrents.php?id=$GroupID&torrentid=$TorrentID' title='View Torrent'>$GroupName</a>";
|
||||
|
||||
if($GroupCategoryID==1 && $GroupYear>0) {
|
||||
if ($GroupCategoryID == 1 && $GroupYear > 0) {
|
||||
$DisplayName.= " [$GroupYear]";
|
||||
}
|
||||
|
||||
// append extra info to torrent title
|
||||
$ExtraInfo='';
|
||||
$AddExtra='';
|
||||
if($Format) { $ExtraInfo.=$Format; $AddExtra=' / '; }
|
||||
if($Encoding) { $ExtraInfo.=$AddExtra.$Encoding; $AddExtra=' / '; }
|
||||
"FLAC / Lossless / Log (100%) / Cue / CD";
|
||||
if($HasLog) { $ExtraInfo.=$AddExtra."Log (".$LogScore."%)"; $AddExtra=' / '; }
|
||||
if($HasCue) { $ExtraInfo.=$AddExtra."Cue"; $AddExtra=' / '; }
|
||||
if($Media) { $ExtraInfo.=$AddExtra.$Media; $AddExtra=' / '; }
|
||||
if($Scene) { $ExtraInfo.=$AddExtra.'Scene'; $AddExtra=' / '; }
|
||||
if($Year>0) { $ExtraInfo.=$AddExtra.$Year; $AddExtra=' '; }
|
||||
if($RemasterTitle) { $ExtraInfo.=$AddExtra.$RemasterTitle; }
|
||||
if($ExtraInfo!='') {
|
||||
$ExtraInfo = '';
|
||||
$AddExtra = '';
|
||||
if ($Format) {
|
||||
$ExtraInfo.=$Format;
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Encoding) {
|
||||
$ExtraInfo.=$AddExtra.$Encoding;
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
//"FLAC / Lossless / Log (100%) / Cue / CD";
|
||||
if ($HasLog) {
|
||||
$ExtraInfo.=$AddExtra."Log (".$LogScore."%)";
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($HasCue) {
|
||||
$ExtraInfo.=$AddExtra."Cue";
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Media) {
|
||||
$ExtraInfo.=$AddExtra.$Media;
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Scene) {
|
||||
$ExtraInfo.=$AddExtra.'Scene';
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Year > 0) {
|
||||
$ExtraInfo.=$AddExtra.$Year;
|
||||
$AddExtra = ' ';
|
||||
}
|
||||
if ($RemasterTitle) {
|
||||
$ExtraInfo.=$AddExtra.$RemasterTitle;
|
||||
}
|
||||
if ($ExtraInfo != '') {
|
||||
$ExtraInfo = "- [$ExtraInfo]";
|
||||
}
|
||||
|
||||
$DisplayName .= $ExtraInfo;
|
||||
$TorrentTags = new Tags($TorrentTags);
|
||||
} else {
|
||||
$DisplayName = $TitleString." (Deleted)";
|
||||
else:
|
||||
$DisplayName = $TitleString.' (Deleted)';
|
||||
$TorrentTags = new Tags($TagString);
|
||||
}
|
||||
endif;
|
||||
|
||||
?>
|
||||
<tr class="group_torrent row<?=$Highlight?>">
|
||||
<td style="padding:8px;text-align:center;"><strong><?=$Rank?></strong></td>
|
||||
<td style="padding: 8px; text-align: center;"><strong><?=$Rank?></strong></td>
|
||||
<td class="center cats_col"><div title="<?=$TorrentTags->title()?>" class="<?=Format::css_category($GroupCategoryID)?> <?=$TorrentTags->css_name()?>"></div></td>
|
||||
<td>
|
||||
<span><?=($GroupID ? '<a href="torrents.php?action=download&id='.$TorrentID.'&authkey='.$LoggedUser['AuthKey'].'&torrent_pass='.$LoggedUser['torrent_pass'].' title="Download" class="brackets">DL</a>' : '(Deleted)')?></span>
|
||||
@ -156,7 +183,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
endforeach;
|
||||
?>
|
||||
</table><br />
|
||||
</div>
|
||||
|
@ -12,6 +12,7 @@
|
||||
die();
|
||||
}
|
||||
|
||||
include(SERVER_ROOT.'/sections/torrents/functions.php'); //Has get_reports($TorrentID);
|
||||
if(empty($_GET['type']) || $_GET['type'] == 'torrents') {
|
||||
include(SERVER_ROOT.'/sections/top10/torrents.php');
|
||||
} else {
|
||||
|
@ -33,8 +33,8 @@
|
||||
|
||||
} else {
|
||||
// error out on invalid requests (before caching)
|
||||
if(isset($_GET['details'])) {
|
||||
if(in_array($_GET['details'], array('day','week','overall','snatched','data','seeded','month','year'))) {
|
||||
if (isset($_GET['details'])) {
|
||||
if (in_array($_GET['details'], array('day','week','overall','snatched','data','seeded','month','year'))) {
|
||||
$Details = $_GET['details'];
|
||||
} else {
|
||||
error(404);
|
||||
@ -62,7 +62,7 @@
|
||||
</div>
|
||||
<?
|
||||
|
||||
if(check_perms('site_advanced_top10')) {
|
||||
if (check_perms('site_advanced_top10')) {
|
||||
?>
|
||||
<form class="search_form" name="torrents" action="" method="get">
|
||||
<input type="hidden" name="advanced" value="1" />
|
||||
@ -70,7 +70,7 @@
|
||||
<tr id="tagfilter">
|
||||
<td class="label">Tags (comma-separated):</td>
|
||||
<td class="ft_taglist">
|
||||
<input type="text" name="tags" size="75" value="<? if(!empty($_GET['tags'])) { echo display_str($_GET['tags']);} ?>" />
|
||||
<input type="text" name="tags" size="75" value="<? if (!empty($_GET['tags'])) { echo display_str($_GET['tags']);} ?>" />
|
||||
<input type="radio" id="rdoAll" name="anyall" value="all"<?=($_GET['anyall']!='any'?' checked="checked"':'')?> /><label for="rdoAll"> All</label>
|
||||
<input type="radio" id="rdoAny" name="anyall" value="any"<?=($_GET['anyall']=='any'?' checked="checked"':'')?> /><label for="rdoAny"> Any</label>
|
||||
</td>
|
||||
@ -81,7 +81,7 @@
|
||||
<select name="format" style="width:auto;" class="ft_format">
|
||||
<option value="">Any</option>
|
||||
<? foreach ($Formats as $FormatName) { ?>
|
||||
<option value="<?=display_str($FormatName)?>"<? if(isset($_GET['format']) && $FormatName==$_GET['format']) { ?> selected="selected"<? } ?>><?=display_str($FormatName)?></option>
|
||||
<option value="<?=display_str($FormatName)?>"<? if (isset($_GET['format']) && $FormatName==$_GET['format']) { ?> selected="selected"<? } ?>><?=display_str($FormatName)?></option>
|
||||
<? } ?> </select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -98,7 +98,7 @@
|
||||
// default setting to have them shown
|
||||
$DisableFreeTorrentTop10 = (isset($LoggedUser['DisableFreeTorrentTop10']) ? $LoggedUser['DisableFreeTorrentTop10'] : 0);
|
||||
// did they just toggle it?
|
||||
if(isset($_GET['freeleech'])) {
|
||||
if (isset($_GET['freeleech'])) {
|
||||
// what did they choose?
|
||||
$NewPref = ($_GET['freeleech'] == 'hide') ? 1 : 0;
|
||||
|
||||
@ -161,7 +161,7 @@
|
||||
FROM torrents AS t
|
||||
LEFT JOIN torrents_group AS g ON g.ID = t.GroupID ";
|
||||
|
||||
if($Details=='all' || $Details=='day') {
|
||||
if ($Details=='all' || $Details=='day') {
|
||||
$TopTorrentsActiveLastDay = $Cache->get_value('top10tor_day_'.$Limit.$WhereSum);
|
||||
if ($TopTorrentsActiveLastDay === false) {
|
||||
if ($Cache->get_query_lock('top10')) {
|
||||
@ -182,7 +182,7 @@
|
||||
}
|
||||
generate_torrent_table('Most Active Torrents Uploaded in the Past Day', 'day', $TopTorrentsActiveLastDay, $Limit);
|
||||
}
|
||||
if($Details=='all' || $Details=='week') {
|
||||
if ($Details=='all' || $Details=='week') {
|
||||
$TopTorrentsActiveLastWeek = $Cache->get_value('top10tor_week_'.$Limit.$WhereSum);
|
||||
if ($TopTorrentsActiveLastWeek === false) {
|
||||
if ($Cache->get_query_lock('top10')) {
|
||||
@ -204,7 +204,7 @@
|
||||
generate_torrent_table('Most Active Torrents Uploaded in the Past Week', 'week', $TopTorrentsActiveLastWeek, $Limit);
|
||||
}
|
||||
|
||||
if($Details=='all' || $Details=='month') {
|
||||
if ($Details=='all' || $Details=='month') {
|
||||
$TopTorrentsActiveLastMonth = $Cache->get_value('top10tor_month_'.$Limit.$WhereSum);
|
||||
if ($TopTorrentsActiveLastMonth === false) {
|
||||
if ($Cache->get_query_lock('top10')) {
|
||||
@ -225,7 +225,7 @@
|
||||
generate_torrent_table('Most Active Torrents Uploaded in the Past Month', 'month', $TopTorrentsActiveLastMonth, $Limit);
|
||||
}
|
||||
|
||||
if($Details=='all' || $Details=='year') {
|
||||
if ($Details=='all' || $Details=='year') {
|
||||
$TopTorrentsActiveLastYear = $Cache->get_value('top10tor_year_'.$Limit.$WhereSum);
|
||||
if ($TopTorrentsActiveLastYear === false) {
|
||||
if ($Cache->get_query_lock('top10')) {
|
||||
@ -251,7 +251,7 @@
|
||||
generate_torrent_table('Most Active Torrents Uploaded in the Past Year', 'year', $TopTorrentsActiveLastYear, $Limit);
|
||||
}
|
||||
|
||||
if($Details=='all' || $Details=='overall') {
|
||||
if ($Details=='all' || $Details=='overall') {
|
||||
$TopTorrentsActiveAllTime = $Cache->get_value('top10tor_overall_'.$Limit.$WhereSum);
|
||||
if ($TopTorrentsActiveAllTime === false) {
|
||||
if ($Cache->get_query_lock('top10')) {
|
||||
@ -276,7 +276,7 @@
|
||||
generate_torrent_table('Most Active Torrents of All Time', 'overall', $TopTorrentsActiveAllTime, $Limit);
|
||||
}
|
||||
|
||||
if(($Details=='all' || $Details=='snatched') && !$Filtered) {
|
||||
if (($Details=='all' || $Details=='snatched') && !$Filtered) {
|
||||
$TopTorrentsSnatched = $Cache->get_value('top10tor_snatched_'.$Limit.$WhereSum);
|
||||
if ($TopTorrentsSnatched === false) {
|
||||
if ($Cache->get_query_lock('top10')) {
|
||||
@ -296,7 +296,7 @@
|
||||
generate_torrent_table('Most Snatched Torrents', 'snatched', $TopTorrentsSnatched, $Limit);
|
||||
}
|
||||
|
||||
if(($Details=='all' || $Details=='data') && !$Filtered) {
|
||||
if (($Details=='all' || $Details=='data') && !$Filtered) {
|
||||
$TopTorrentsTransferred = $Cache->get_value('top10tor_data_'.$Limit.$WhereSum);
|
||||
if ($TopTorrentsTransferred === false) {
|
||||
if ($Cache->get_query_lock('top10')) {
|
||||
@ -320,7 +320,7 @@
|
||||
generate_torrent_table('Most Data Transferred Torrents', 'data', $TopTorrentsTransferred, $Limit);
|
||||
}
|
||||
|
||||
if(($Details=='all' || $Details=='seeded') && !$Filtered) {
|
||||
if (($Details=='all' || $Details=='seeded') && !$Filtered) {
|
||||
$TopTorrentsSeeded = $Cache->get_value('top10tor_seeded_'.$Limit.$WhereSum);
|
||||
if ($TopTorrentsSeeded === false) {
|
||||
if ($Cache->get_query_lock('top10')) {
|
||||
@ -350,7 +350,7 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
|
||||
global $LoggedUser,$Categories,$ReleaseTypes;
|
||||
?>
|
||||
<h3>Top <?=$Limit.' '.$Caption?>
|
||||
<? if(empty($_GET['advanced'])){ ?>
|
||||
<? if (empty($_GET['advanced'])){ ?>
|
||||
<small class="top10_quantity_links">
|
||||
<?
|
||||
switch($Limit) {
|
||||
@ -415,7 +415,7 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
|
||||
}
|
||||
$Artists = Artists::get_artists($GroupIDs);
|
||||
|
||||
foreach ($Details as $Detail) {
|
||||
foreach ($Details as $Detail) :
|
||||
list($TorrentID,$GroupID,$GroupName,$GroupCategoryID,$WikiImage,$TagsList,
|
||||
$Format,$Encoding,$Media,$Scene,$HasLog,$HasCue,$LogScore,$Year,$GroupYear,
|
||||
$RemasterTitle,$Snatched,$Seeders,$Leechers,$Data,$ReleaseType,$Size) = $Detail;
|
||||
@ -428,40 +428,47 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
|
||||
$Highlight = ($Rank % 2 ? 'a' : 'b');
|
||||
|
||||
// generate torrent's title
|
||||
$DisplayName='';
|
||||
$DisplayName = '';
|
||||
|
||||
|
||||
if(!empty($Artists[$GroupID])) {
|
||||
if (!empty($Artists[$GroupID])) {
|
||||
$DisplayName = Artists::display_artists($Artists[$GroupID], true, true);
|
||||
}
|
||||
|
||||
$DisplayName.= "<a href=\"torrents.php?id=$GroupID&torrentid=$TorrentID\" title=\"View Torrent\" dir=\"ltr\">$GroupName</a>";
|
||||
|
||||
if($GroupCategoryID==1 && $GroupYear>0) {
|
||||
if ($GroupCategoryID == 1 && $GroupYear > 0) {
|
||||
$DisplayName.= " [$GroupYear]";
|
||||
}
|
||||
if($GroupCategoryID==1 && $ReleaseType > 0) {
|
||||
if ($GroupCategoryID == 1 && $ReleaseType > 0) {
|
||||
$DisplayName.= ' ['.$ReleaseTypes[$ReleaseType].']';
|
||||
}
|
||||
|
||||
// append extra info to torrent title
|
||||
$ExtraInfo='';
|
||||
$AddExtra='';
|
||||
if($Format) { $ExtraInfo.=$Format; $AddExtra=' / '; }
|
||||
if($Encoding) { $ExtraInfo.=$AddExtra.$Encoding; $AddExtra=' / '; }
|
||||
if ($Format) { $ExtraInfo.=$Format; $AddExtra=' / '; }
|
||||
if ($Encoding) { $ExtraInfo.=$AddExtra.$Encoding; $AddExtra=' / '; }
|
||||
// "FLAC / Lossless / Log (100%) / Cue / CD";
|
||||
if($HasLog) { $ExtraInfo.=$AddExtra."Log (".$LogScore."%)"; $AddExtra=' / '; }
|
||||
if($HasCue) { $ExtraInfo.=$AddExtra."Cue"; $AddExtra=' / '; }
|
||||
if($Media) { $ExtraInfo.=$AddExtra.$Media; $AddExtra=' / '; }
|
||||
if($Scene) { $ExtraInfo.=$AddExtra.'Scene'; $AddExtra=' / '; }
|
||||
if($Year>0) { $ExtraInfo.=$AddExtra.$Year; $AddExtra=' '; }
|
||||
if($RemasterTitle) { $ExtraInfo.=$AddExtra.$RemasterTitle; }
|
||||
if($IsSnatched) { if($GroupCategoryID == 1) { $ExtraInfo .= ' / '; } $ExtraInfo.= Format::torrent_label('Snatched!'); }
|
||||
if($ExtraInfo!='') {
|
||||
if ($HasLog) { $ExtraInfo.=$AddExtra."Log (".$LogScore."%)"; $AddExtra=' / '; }
|
||||
if ($HasCue) { $ExtraInfo.=$AddExtra."Cue"; $AddExtra=' / '; }
|
||||
if ($Media) { $ExtraInfo.=$AddExtra.$Media; $AddExtra=' / '; }
|
||||
if ($Scene) { $ExtraInfo.=$AddExtra.'Scene'; $AddExtra=' / '; }
|
||||
if ($Year>0) { $ExtraInfo.=$AddExtra.$Year; $AddExtra=' '; }
|
||||
if ($RemasterTitle) { $ExtraInfo.=$AddExtra.$RemasterTitle; }
|
||||
if ($IsSnatched) { if ($GroupCategoryID == 1) { $ExtraInfo .= ' / '; } $ExtraInfo.= Format::torrent_label('Snatched!'); }
|
||||
if ($ExtraInfo!='') {
|
||||
$ExtraInfo = "- [$ExtraInfo]";
|
||||
}
|
||||
|
||||
$TorrentTags = new Tags($TagsList);
|
||||
|
||||
//Get report info, use the cache if available, if not, add to it.
|
||||
$Reported = false;
|
||||
$Reports = get_reports($TorrentID);
|
||||
if (count($Reports) > 0) {
|
||||
$Reported = true;
|
||||
}
|
||||
|
||||
// print row
|
||||
?>
|
||||
@ -469,38 +476,38 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
|
||||
<td style="padding:8px;text-align:center;"><strong><?=$Rank?></strong></td>
|
||||
<td class="center cats_col"><div title="<?=$TorrentTags->title()?>" class="<?=Format::css_category($GroupCategoryID)?> <?=$TorrentTags->css_name()?>"></div></td>
|
||||
<td class="big_info">
|
||||
<? if ($LoggedUser['CoverArt']) : ?>
|
||||
<? if ($LoggedUser['CoverArt']) : ?>
|
||||
<div class="group_image float_left clear">
|
||||
<? ImageTools::cover_thumb($WikiImage, $GroupCategoryID - 1) ?>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<? endif; ?>
|
||||
<div class="group_info clear">
|
||||
|
||||
<span>[ <a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a> ]</span>
|
||||
<span><a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download" class="brackets">DL</a></span>
|
||||
|
||||
<strong><?=$DisplayName?></strong> <?=$ExtraInfo?>
|
||||
<span class="bookmark" style="float:right;">
|
||||
<strong><?=$DisplayName?></strong> <?=$ExtraInfo?><?if($Reported){?> - <strong class="torrent_label tl_reported" title="Reported">Reported</strong><?}?>
|
||||
<span class="bookmark" style="float: right;">
|
||||
<?
|
||||
if($IsBookmarked) {
|
||||
if ($IsBookmarked) {
|
||||
?>
|
||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a>
|
||||
<? } else { ?>
|
||||
<? } else { ?>
|
||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</span>
|
||||
<div class="tags"><?=$TorrentTags->format()?></div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="text-align:right" class="nobr"><?=Format::get_size($Size)?></td>
|
||||
<td style="text-align:right" class="nobr"><?=Format::get_size($Data)?></td>
|
||||
<td style="text-align:right"><?=number_format((double) $Snatched)?></td>
|
||||
<td style="text-align:right"><?=number_format((double) $Seeders)?></td>
|
||||
<td style="text-align:right"><?=number_format((double) $Leechers)?></td>
|
||||
<td style="text-align:right"><?=number_format($Seeders+$Leechers)?></td>
|
||||
<td style="text-align: right;" class="nobr"><?=Format::get_size($Size)?></td>
|
||||
<td style="text-align: right;" class="nobr"><?=Format::get_size($Data)?></td>
|
||||
<td style="text-align: right;"><?=number_format((double) $Snatched)?></td>
|
||||
<td style="text-align: right;"><?=number_format((double) $Seeders)?></td>
|
||||
<td style="text-align: right;"><?=number_format((double) $Leechers)?></td>
|
||||
<td style="text-align: right;"><?=number_format($Seeders + $Leechers)?></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
endforeach;
|
||||
?>
|
||||
</table><br />
|
||||
<?
|
||||
|
@ -5,15 +5,15 @@
|
||||
|
||||
$UserVotes = Votes::get_user_votes($LoggedUser['ID']);
|
||||
|
||||
if(!empty($_GET['advanced']) && check_perms('site_advanced_top10')) {
|
||||
if (!empty($_GET['advanced']) && check_perms('site_advanced_top10')) {
|
||||
$Details = 'all';
|
||||
$Limit = 25;
|
||||
|
||||
if($_GET['tags']) {
|
||||
if ($_GET['tags']) {
|
||||
$Tags = explode(',', str_replace(".","_",trim($_GET['tags'])));
|
||||
foreach ($Tags as $Tag) {
|
||||
$Tag = preg_replace('/[^a-z0-9_]/', '', $Tag);
|
||||
if($Tag != '') {
|
||||
if ($Tag != '') {
|
||||
$Where[]="g.TagList REGEXP '[[:<:]]".db_string($Tag)."[[:>:]]'";
|
||||
}
|
||||
}
|
||||
@ -45,13 +45,13 @@
|
||||
// Unlike the other top 10s, this query just gets some raw stats
|
||||
// We'll need to do some fancy-pants stuff to translate it into
|
||||
// BPCI scores before getting the torrent data
|
||||
$Query = "SELECT v.GroupID, v.Ups, v.Total, v.Score
|
||||
FROM torrents_votes AS v";
|
||||
$Query = 'SELECT v.GroupID, v.Ups, v.Total, v.Score
|
||||
FROM torrents_votes AS v';
|
||||
if (!empty($Where)) {
|
||||
$Query .= " JOIN torrents_group AS g ON g.ID = v.GroupID
|
||||
WHERE $Where AND ";
|
||||
WHERE $Where AND ";
|
||||
} else {
|
||||
$Query .= " WHERE ";
|
||||
$Query .= ' WHERE ';
|
||||
}
|
||||
$Query .= "Score > 0 ORDER BY Score DESC LIMIT $Limit";
|
||||
|
||||
@ -94,7 +94,7 @@
|
||||
</div>
|
||||
<?
|
||||
|
||||
if(check_perms('site_advanced_top10')) { ?>
|
||||
if (check_perms('site_advanced_top10')) { ?>
|
||||
<form class="search_form" name="votes" action="" method="get">
|
||||
<input type="hidden" name="advanced" value="1" />
|
||||
<input type="hidden" name="type" value="votes" />
|
||||
@ -102,17 +102,17 @@
|
||||
<tr id="tagfilter">
|
||||
<td class="label">Tags (comma-separated):</td>
|
||||
<td class="ft_taglist">
|
||||
<input type="text" name="tags" size="75" value="<? if(!empty($_GET['tags'])) { echo display_str($_GET['tags']);} ?>" />
|
||||
<input type="radio" id="rdoAll" name="anyall" value="all"<?=($_GET['anyall']!='any'?' checked="checked"':'')?> /><label for="rdoAll"> All</label>
|
||||
<input type="radio" id="rdoAny" name="anyall" value="any"<?=($_GET['anyall']=='any'?' checked="checked"':'')?> /><label for="rdoAny"> Any</label>
|
||||
<input type="text" name="tags" size="75" value="<? if (!empty($_GET['tags'])) { echo display_str($_GET['tags']);} ?>" />
|
||||
<input type="radio" id="rdoAll" name="anyall" value="all"<?=($_GET['anyall'] != 'any' ? ' checked="checked"' : '')?> /><label for="rdoAll"> All</label>
|
||||
<input type="radio" id="rdoAny" name="anyall" value="any"<?=($_GET['anyall'] == 'any' ? ' checked="checked"' : '')?> /><label for="rdoAny"> Any</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="yearfilter">
|
||||
<td class="label">Year:</td>
|
||||
<td class="ft_year">
|
||||
<input type="text" name="year1" size="4" value="<? if(!empty($_GET['year1'])) { echo display_str($_GET['year1']);} ?>" />
|
||||
<input type="text" name="year1" size="4" value="<? if (!empty($_GET['year1'])) { echo display_str($_GET['year1']);} ?>" />
|
||||
to
|
||||
<input type="text" name="year2" size="4" value="<? if(!empty($_GET['year2'])) { echo display_str($_GET['year2']);} ?>" />
|
||||
<input type="text" name="year2" size="4" value="<? if (!empty($_GET['year2'])) { echo display_str($_GET['year2']);} ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -129,7 +129,7 @@
|
||||
?>
|
||||
<h3>Top <?=$Limit.' '.$Caption?>
|
||||
<?
|
||||
if(empty($_GET['advanced'])){ ?>
|
||||
if (empty($_GET['advanced'])) { ?>
|
||||
<small class="top10_quantity_links">
|
||||
<?
|
||||
switch($Limit) {
|
||||
@ -137,12 +137,12 @@
|
||||
- <a href="top10.php?type=votes" class="brackets">Top 25</a>
|
||||
- <span class="brackets">Top 100</span>
|
||||
- <a href="top10.php?type=votes&limit=250" class="brackets">Top 250</a>
|
||||
<? break;
|
||||
<? break;
|
||||
case 250: ?>
|
||||
- <a href="top10.php?type=votes" class="brackets">Top 25</a>
|
||||
- <a href="top10.php?type=votes&limit=100" class="brackets">Top 100</a>
|
||||
- <span class="brackets">Top 250</span>
|
||||
<? break;
|
||||
<? break;
|
||||
default: ?>
|
||||
- <span class="brackets">Top 25</span>
|
||||
- <a href="top10.php?type=votes&limit=100" class="brackets">Top 100</a>
|
||||
@ -177,17 +177,21 @@
|
||||
unset($ExtendedArtists[2]);
|
||||
unset($ExtendedArtists[3]);
|
||||
$DisplayName .= Artists::display_artists($ExtendedArtists);
|
||||
} elseif(count($GroupArtists)>0) {
|
||||
} elseif (count($GroupArtists) > 0) {
|
||||
$DisplayName .= Artists::display_artists(array('1'=>$GroupArtists));
|
||||
}
|
||||
|
||||
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent" dir="ltr">'.$GroupName.'</a>';
|
||||
if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';}
|
||||
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
|
||||
if ($GroupYear > 0) {
|
||||
$DisplayName = $DisplayName. " [$GroupYear]";
|
||||
}
|
||||
if ($GroupVanityHouse) {
|
||||
$DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]';
|
||||
}
|
||||
// Start an output buffer, so we can store this output in $TorrentTable
|
||||
ob_start();
|
||||
|
||||
if(count($Torrents) > 1 || $GroupCategoryID == 1) {
|
||||
if (count($Torrents) > 1 || $GroupCategoryID == 1) :
|
||||
// Grouped torrents
|
||||
$GroupSnatched = false;
|
||||
foreach ($Torrents as &$Torrent) {
|
||||
@ -208,24 +212,24 @@
|
||||
<div title="<?=$TorrentTags->title()?>" class="<?=Format::css_category($GroupCategoryID)?> <?=$TorrentTags->css_name()?>"></div>
|
||||
</td>
|
||||
<td class="big_info">
|
||||
<? if ($LoggedUser['CoverArt']) : ?>
|
||||
<? if ($LoggedUser['CoverArt']) : ?>
|
||||
<div class="group_image float_left clear">
|
||||
<? ImageTools::cover_thumb($WikiImage, $GroupCategoryID - 1) ?>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<? endif; ?>
|
||||
<div class="group_info clear">
|
||||
|
||||
<strong><?=$DisplayName?></strong> <!--<?Votes::vote_link($GroupID,$UserVotes[$GroupID]['Type']);?>-->
|
||||
<? if($IsBookmarked) { ?>
|
||||
<span class="bookmark" style="float:right;"><a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a></span>
|
||||
<? } else { ?>
|
||||
<span class="bookmark" style="float:right;"><a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets add_bookmark" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a></span>
|
||||
<? } ?>
|
||||
<? if ($IsBookmarked) { ?>
|
||||
<span class="bookmark" style="float: right;"><a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a></span>
|
||||
<? } else { ?>
|
||||
<span class="bookmark" style="float: right;"><a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets add_bookmark" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a></span>
|
||||
<? } ?>
|
||||
<div class="tags"><?=$TorrentTags->format()?></div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="4" class="votes_info_td"><strong><?=number_format($Ups)?></strong> upvotes out of <strong><?=number_format($Total)?></strong> total (<span title="Score: <?=number_format($Score*100,4)?>">Score: <?=number_format($Score*100)?></span>).</td>
|
||||
<td colspan="4" class="votes_info_td"><strong><?=number_format($Ups)?></strong> upvotes out of <strong><?=number_format($Total)?></strong> total (<span title="Score: <?=number_format($Score * 100,4)?>">Score: <?=number_format($Score * 100)?></span>).</td>
|
||||
</tr>
|
||||
<?
|
||||
$LastRemasterYear = '-';
|
||||
@ -237,13 +241,19 @@
|
||||
$EditionID = 0;
|
||||
unset($FirstUnknown);
|
||||
|
||||
foreach ($Torrents as $TorrentID => $Torrent) {
|
||||
foreach ($Torrents as $TorrentID => $Torrent) :
|
||||
//Get report info, use the cache if available, if not, add to it.
|
||||
$Reported = false;
|
||||
$Reports = get_reports($TorrentID);
|
||||
if (count($Reports) > 0) {
|
||||
$Reported = true;
|
||||
}
|
||||
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
|
||||
|
||||
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
|
||||
if ($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
|
||||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
|
||||
$EditionID++;
|
||||
?>
|
||||
@ -267,7 +277,7 @@
|
||||
<? } ?>
|
||||
| <a href="reportsv2.php?action=report&id=<?=$TorrentID?>" title="Report">RP</a> ]
|
||||
</span>
|
||||
» <a href="torrents.php?id=<?=$GroupID?>&torrentid=<?=$TorrentID?>"><?=Torrents::torrent_info($Torrent)?></a>
|
||||
» <a href="torrents.php?id=<?=$GroupID?>&torrentid=<?=$TorrentID?>"><?=Torrents::torrent_info($Torrent)?><?if($Reported){?> / <strong class="torrent_label tl_reported" title="Reported">Reported</strong><?}?></a>
|
||||
</td>
|
||||
<td class="nobr"><?=Format::get_size($Torrent['Size'])?></td>
|
||||
<td><?=number_format($Torrent['Snatched'])?></td>
|
||||
@ -275,15 +285,15 @@
|
||||
<td><?=number_format($Torrent['Leechers'])?></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
} else {
|
||||
endforeach;
|
||||
else:
|
||||
// Viewing a type that does not require grouping
|
||||
|
||||
list($TorrentID, $Torrent) = each($Torrents);
|
||||
$Torrent['IsSnatched'] = Torrents::has_snatched($TorrentID);
|
||||
|
||||
$DisplayName = $Number .' - <a href="torrents.php?id='.$GroupID.'" title="View Torrent" dir="ltr">'.$GroupName.'</a>';
|
||||
if($Torrent['IsSnatched']) {
|
||||
if ($Torrent['IsSnatched']) {
|
||||
$DisplayName .= ' ' . Format::torrent_label('Snatched!');
|
||||
}
|
||||
if ($Torrent['FreeTorrent'] == '1') {
|
||||
@ -291,7 +301,7 @@
|
||||
} elseif ($Torrent['FreeTorrent'] == '2') {
|
||||
$DisplayName .= ' ' . Format::torrent_label('Neutral leech!');
|
||||
} elseif (Torrents::has_token($TorrentID)) {
|
||||
$DisplayName .= ' ' . Format::torrent_label('Personal Freeleech!');
|
||||
$DisplayName .= ' ' . Format::torrent_label('Personal freeleech!');
|
||||
}
|
||||
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
|
||||
?>
|
||||
@ -302,11 +312,11 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class="nobr big_info">
|
||||
<? if ($LoggedUser['CoverArt']) : ?>
|
||||
<? if ($LoggedUser['CoverArt']) : ?>
|
||||
<div class="group_image float_left clear">
|
||||
<? ImageTools::cover_thumb($WikiImage, $GroupCategoryID - 1) ?>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<? endif; ?>
|
||||
<div class="group_info clear">
|
||||
<span>
|
||||
[ <a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a>
|
||||
@ -314,7 +324,7 @@
|
||||
| <a href="torrents.php?action=download&id=<?=$TorrentID ?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>&usetoken=1" title="Use a FL Token" onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a>
|
||||
<? } ?>
|
||||
| <a href="reportsv2.php?action=report&id=<?=$TorrentID?>" title="Report">RP</a>
|
||||
<? if($IsBookmarked) { ?>
|
||||
<? if ($IsBookmarked) { ?>
|
||||
| <a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a>
|
||||
<? } else { ?>
|
||||
| <a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a>
|
||||
@ -330,8 +340,8 @@
|
||||
<td<?=($Torrent['Seeders']==0)?' class="r00"':''?>><?=number_format($Torrent['Seeders'])?></td>
|
||||
<td><?=number_format($Torrent['Leechers'])?></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
<?
|
||||
endif;
|
||||
$TorrentTable.=ob_get_clean();
|
||||
}
|
||||
?>
|
||||
@ -346,7 +356,7 @@
|
||||
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" alt="Leechers" title="Leechers" /></td>
|
||||
</tr>
|
||||
<?
|
||||
if($TorrentList === false) { ?>
|
||||
if ($TorrentList === false) { ?>
|
||||
<tr>
|
||||
<td colspan="7" class="center">Server is busy processing another top list request. Please try again in a minute.</td>
|
||||
</tr>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -537,8 +537,8 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
|
||||
$HideFilter = isset($LoggedUser['ShowTorFilter']) && $LoggedUser['ShowTorFilter'] == 0;
|
||||
// This is kinda ugly, but the enormous if paragraph was really hard to read
|
||||
$AdvancedSearch = !empty($_GET['action']) && $_GET['action'] == "advanced";
|
||||
$AdvancedSearch |= !empty($LoggedUser['SearchType']) && (empty($_GET['action']) || $_GET['action'] == "advanced");
|
||||
$AdvancedSearch = !empty($_GET['action']) && $_GET['action'] == 'advanced';
|
||||
$AdvancedSearch |= !empty($LoggedUser['SearchType']) && (empty($_GET['action']) || $_GET['action'] == 'advanced');
|
||||
$AdvancedSearch &= check_perms('site_advanced_search');
|
||||
if ($AdvancedSearch) {
|
||||
$Action = 'action=advanced';
|
||||
@ -595,7 +595,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<tr id="catalogue_number_year" class="ftr_advanced<?=$HideAdvanced?>">
|
||||
<td class="label">Catalogue number:</td>
|
||||
<td class="ft_cataloguenumber">
|
||||
<input type="text" size="40" name="cataloguenumber" class="inputtext smallest fti_advanced" value="<?Format::form('cataloguenumber')?>" />
|
||||
<input type="text" size="40" name="cataloguenumber" class="inputtext smallest fti_advanced" value="<?Format::form('cataloguenumber')?>" />
|
||||
</td>
|
||||
<td class="label">Year:</td>
|
||||
<td class="ft_year">
|
||||
@ -647,24 +647,24 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<select id="bitrate" name="encoding" class="ft_bitrate fti_advanced">
|
||||
<option value="">Bitrate</option>
|
||||
<? foreach ($Bitrates as $BitrateName) { ?>
|
||||
<option value="<?=display_str($BitrateName); ?>" <?Format::selected('encoding', $BitrateName)?>><?=display_str($BitrateName); ?></option>
|
||||
<option value="<?=display_str($BitrateName); ?>"<?Format::selected('encoding', $BitrateName)?>><?=display_str($BitrateName); ?></option>
|
||||
<? } ?> </select>
|
||||
|
||||
<select name="format" class="ft_format fti_advanced">
|
||||
<option value="">Format</option>
|
||||
<? foreach ($Formats as $FormatName) { ?>
|
||||
<option value="<?=display_str($FormatName); ?>" <?Format::selected('format', $FormatName)?>><?=display_str($FormatName); ?></option>
|
||||
<option value="<?=display_str($FormatName); ?>"<?Format::selected('format', $FormatName)?>><?=display_str($FormatName); ?></option>
|
||||
<? } ?> </select>
|
||||
<select name="media" class="ft_media fti_advanced">
|
||||
<option value="">Media</option>
|
||||
<? foreach ($Media as $MediaName) { ?>
|
||||
<option value="<?=display_str($MediaName); ?>" <?Format::selected('media',$MediaName)?>><?=display_str($MediaName); ?></option>
|
||||
<option value="<?=display_str($MediaName); ?>"<?Format::selected('media',$MediaName)?>><?=display_str($MediaName); ?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<select name="releasetype" class="ft_releasetype fti_advanced">
|
||||
<option value="">Release type</option>
|
||||
<? foreach ($ReleaseTypes as $ID=>$Type) { ?>
|
||||
<option value="<?=display_str($ID); ?>" <?Format::selected('releasetype',$ID)?>><?=display_str($Type); ?></option>
|
||||
<option value="<?=display_str($ID); ?>"<?Format::selected('releasetype',$ID)?>><?=display_str($Type); ?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
@ -674,32 +674,32 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<td class="nobr ft_misc" colspan="3">
|
||||
<select name="haslog" class="ft_haslog fti_advanced">
|
||||
<option value="">Has Log</option>
|
||||
<option value="1" <?Format::selected('haslog','1')?>>Yes</option>
|
||||
<option value="0" <?Format::selected('haslog','0')?>>No</option>
|
||||
<option value="100" <?Format::selected('haslog','100')?>>100% only</option>
|
||||
<option value="-1" <?Format::selected('haslog','-1')?>><100%/Unscored</option>
|
||||
<option value="1"<?Format::selected('haslog','1')?>>Yes</option>
|
||||
<option value="0"<?Format::selected('haslog','0')?>>No</option>
|
||||
<option value="100"<?Format::selected('haslog','100')?>>100% only</option>
|
||||
<option value="-1"<?Format::selected('haslog','-1')?>><100%/Unscored</option>
|
||||
</select>
|
||||
<select name="hascue" class="ft_hascue fti_advanced">
|
||||
<option value="">Has Cue</option>
|
||||
<option value="1" <?Format::selected('hascue',1)?>>Yes</option>
|
||||
<option value="0" <?Format::selected('hascue',0)?>>No</option>
|
||||
<option value="1"<?Format::selected('hascue',1)?>>Yes</option>
|
||||
<option value="0"<?Format::selected('hascue',0)?>>No</option>
|
||||
</select>
|
||||
<select name="scene" class="ft_scene fti_advanced">
|
||||
<option value="">Scene</option>
|
||||
<option value="1" <?Format::selected('scene',1)?>>Yes</option>
|
||||
<option value="0" <?Format::selected('scene',0)?>>No</option>
|
||||
<option value="1"<?Format::selected('scene',1)?>>Yes</option>
|
||||
<option value="0"<?Format::selected('scene',0)?>>No</option>
|
||||
</select>
|
||||
<select name="vanityhouse" class="ft_vanityhouse fti_advanced">
|
||||
<option value="">Vanity House</option>
|
||||
<option value="1" <?Format::selected('vanityhouse',1)?>>Yes</option>
|
||||
<option value="0" <?Format::selected('vanityhouse',0)?>>No</option>
|
||||
<option value="1"<?Format::selected('vanityhouse',1)?>>Yes</option>
|
||||
<option value="0"<?Format::selected('vanityhouse',0)?>>No</option>
|
||||
</select>
|
||||
<select name="freetorrent" class="ft_freetorrent fti_advanced">
|
||||
<option value="">Leech Status</option>
|
||||
<option value="1" <?Format::selected('freetorrent',1)?>>Freeleech</option>
|
||||
<option value="2" <?Format::selected('freetorrent',2)?>>Neutral Leech</option>
|
||||
<option value="3" <?Format::selected('freetorrent',3)?>>Either</option>
|
||||
<option value="0" <?Format::selected('freetorrent',0)?>>Normal</option>
|
||||
<option value="1"<?Format::selected('freetorrent',1)?>>Freeleech</option>
|
||||
<option value="2"<?Format::selected('freetorrent',2)?>>Neutral Leech</option>
|
||||
<option value="3"<?Format::selected('freetorrent',3)?>>Either</option>
|
||||
<option value="0"<?Format::selected('freetorrent',0)?>>Normal</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -713,13 +713,13 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<td class="label">Tags (comma-separated):</td>
|
||||
<td colspan="3" class="ft_taglist">
|
||||
<input type="text" size="40" id="tags" name="taglist" class="inputtext smaller" title="Use !tag to exclude tag" value="<?=str_replace('_','.',Format::form('taglist', true))?>" />
|
||||
<input type="radio" name="tags_type" id="tags_type0" value="0" <?Format::selected('tags_type',0,'checked')?> /><label for="tags_type0"> Any</label>
|
||||
<input type="radio" name="tags_type" id="tags_type1" value="1" <?Format::selected('tags_type',1,'checked')?> /><label for="tags_type1"> All</label>
|
||||
<input type="radio" name="tags_type" id="tags_type0" value="0"<?Format::selected('tags_type',0,'checked')?> /><label for="tags_type0"> Any</label>
|
||||
<input type="radio" name="tags_type" id="tags_type1" value="1"<?Format::selected('tags_type',1,'checked')?> /><label for="tags_type1"> All</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="order">
|
||||
<td class="label">Order by:</td>
|
||||
<td colspan="3" colspan="3" class="ft_order">
|
||||
<td colspan="3" class="ft_order">
|
||||
<select name="order_by" style="width:auto;" class="ft_order_by">
|
||||
<option value="time"<?Format::selected('order_by','time')?>>Time added</option>
|
||||
<option value="year"<?Format::selected('order_by','year')?>>Year</option>
|
||||
@ -731,7 +731,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
</select>
|
||||
<select name="order_way" class="ft_order_way">
|
||||
<option value="desc"<?Format::selected('order_way','desc')?>>Descending</option>
|
||||
<option value="asc" <?Format::selected('order_way','asc')?>>Ascending</option>
|
||||
<option value="asc"<?Format::selected('order_way','asc')?>>Ascending</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -740,16 +740,16 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<label for="group_results">Group by release:</label>
|
||||
</td>
|
||||
<td colspan="3" class="ft_group_results">
|
||||
<input type="checkbox" value="1" name="group_results" id="group_results" <?Format::selected('group_results',1,'checked')?> />
|
||||
<input type="checkbox" value="1" name="group_results" id="group_results"<?Format::selected('group_results',1,'checked')?> />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="layout cat_list ft_cat_list">
|
||||
<?
|
||||
$x=0;
|
||||
$x = 0;
|
||||
reset($Categories);
|
||||
foreach ($Categories as $CatKey => $CatName) {
|
||||
if ($x%7==0) {
|
||||
if ($x % 7 == 0) {
|
||||
if ($x > 0) {
|
||||
?>
|
||||
</tr>
|
||||
@ -760,8 +760,8 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
$x++;
|
||||
?>
|
||||
<td>
|
||||
<input type="checkbox" name="filter_cat[<?=($CatKey+1)?>]" id="cat_<?=($CatKey+1)?>" value="1" <? if (isset($_GET['filter_cat'][$CatKey+1])) { ?>checked="checked" <? } ?>/>
|
||||
<label for="cat_<?=($CatKey+1)?>"><?=$CatName?></label>
|
||||
<input type="checkbox" name="filter_cat[<?=($CatKey + 1) ?>]" id="cat_<?=($CatKey + 1) ?>" value="1"<? if (isset($_GET['filter_cat'][$CatKey + 1])) { ?> checked="checked" <? } ?>/>
|
||||
<label for="cat_<?=($CatKey + 1) ?>"><?=$CatName?></label>
|
||||
</td>
|
||||
<?
|
||||
}
|
||||
@ -774,8 +774,8 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
$GenreTags = $Cache->get_value('genre_tags');
|
||||
if (!$GenreTags) {
|
||||
$DB->query('SELECT Name FROM tags WHERE TagType=\'genre\' ORDER BY Name');
|
||||
$GenreTags = $DB->collect('Name');
|
||||
$Cache->cache_value('genre_tags', $GenreTags, 3600*6);
|
||||
$GenreTags = $DB->collect('Name');
|
||||
$Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
|
||||
}
|
||||
|
||||
$x = 0;
|
||||
@ -784,42 +784,42 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<td width="12.5%"><a href="#" onclick="add_tag('<?=$Tag?>');return false;"><?=$Tag?></a></td>
|
||||
<?
|
||||
$x++;
|
||||
if ($x%7==0) {
|
||||
if ($x % 7 == 0) {
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<?
|
||||
}
|
||||
}
|
||||
if ($x%7!=0) { // Padding
|
||||
if ($x % 7 != 0) { // Padding
|
||||
?>
|
||||
<td colspan="<?=7-($x%7)?>"> </td>
|
||||
<td colspan="<?=7 - ($x % 7) ?>"> </td>
|
||||
<? } ?>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="layout cat_list" width="100%">
|
||||
<tr>
|
||||
<td class="label">
|
||||
<a class="brackets" href="#" onclick="$('#taglist').toggle(); if (this.innerHTML=='View tags'){this.innerHTML='Hide tags';} else {this.innerHTML='View tags';}; return false;"><?=(empty($LoggedUser['ShowTags'])) ? 'View tags' : 'Hide tags'?></a>
|
||||
<a class="brackets" href="#" onclick="$('#taglist').toggle(); if (this.innerHTML=='View tags') {this.innerHTML='Hide tags';} else {this.innerHTML='View tags';}; return false;"><?=(empty($LoggedUser['ShowTags'])) ? 'View tags' : 'Hide tags'?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="submit ft_submit">
|
||||
<span style="float:left;"><?=number_format($TorrentCount)?> Results</span>
|
||||
<input type="submit" value="Filter Torrents" />
|
||||
<span style="float: left;"><?=number_format($TorrentCount)?> Results</span>
|
||||
<input type="submit" value="Filter torrents" />
|
||||
<input type="hidden" name="action" id="ft_type" value="<?=$AdvancedSearch ? 'advanced' : 'basic'?>" />
|
||||
<input type="hidden" name="searchsubmit" value="1" />
|
||||
<input type="button" value="Reset" onclick="location.href='torrents.php<? if (isset($_GET['action']) && $_GET['action']=="advanced") { ?>?action=advanced<? } ?>'" />
|
||||
<input type="button" value="Reset" onclick="location.href='torrents.php<? if (isset($_GET['action']) && $_GET['action'] == 'advanced') { ?>?action=advanced<? } ?>'" />
|
||||
|
||||
<? if ($Filtered) { ?>
|
||||
<input type="submit" name="setdefault" value="Make Default" />
|
||||
<? if ($Filtered) { ?>
|
||||
<input type="submit" name="setdefault" value="Make default" />
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($LoggedUser['DefaultSearch'])) {
|
||||
if (!empty($LoggedUser['DefaultSearch'])) {
|
||||
?>
|
||||
<input type="submit" name="cleardefault" value="Clear Default" />
|
||||
<? } ?>
|
||||
<input type="submit" name="cleardefault" value="Clear default" />
|
||||
<? } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -830,16 +830,16 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
tags.Name,
|
||||
((COUNT(tags.Name)-2)*(SUM(tt.PositiveVotes)-SUM(tt.NegativeVotes)))/(tags.Uses*0.8) AS Score
|
||||
FROM xbt_snatched AS s
|
||||
INNER JOIN torrents AS t ON t.ID=s.fid
|
||||
INNER JOIN torrents_group AS g ON t.GroupID=g.ID
|
||||
INNER JOIN torrents_tags AS tt ON tt.GroupID=g.ID
|
||||
INNER JOIN tags ON tags.ID=tt.TagID
|
||||
INNER JOIN torrents AS t ON t.ID=s.fid
|
||||
INNER JOIN torrents_group AS g ON t.GroupID=g.ID
|
||||
INNER JOIN torrents_tags AS tt ON tt.GroupID=g.ID
|
||||
INNER JOIN tags ON tags.ID=tt.TagID
|
||||
WHERE s.uid='$LoggedUser[ID]'
|
||||
AND tt.TagID<>'13679'
|
||||
AND tt.TagID<>'4820'
|
||||
AND tt.TagID<>'2838'
|
||||
AND g.CategoryID='1'
|
||||
AND tags.Uses > '10'
|
||||
AND tt.TagID<>'13679'
|
||||
AND tt.TagID<>'4820'
|
||||
AND tt.TagID<>'2838'
|
||||
AND g.CategoryID='1'
|
||||
AND tags.Uses > '10'
|
||||
GROUP BY tt.TagID
|
||||
ORDER BY Score DESC
|
||||
LIMIT 8");
|
||||
@ -847,20 +847,20 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<div class="box pad" align="center">
|
||||
<h2>Your search did not match anything.</h2>
|
||||
<p>Make sure all names are spelled correctly, or try making your search less specific.</p>
|
||||
<p>You might like (Beta): <? while (list($Tag)=$DB->next_record()) { ?><a href="torrents.php?taglist=<?=$Tag?>"><?=$Tag?></a> <? } ?></p>
|
||||
<p>You might like (beta): <? while (list($Tag) = $DB->next_record()) { ?><a href="torrents.php?taglist=<?=$Tag?>"><?=$Tag?></a><? } ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
View::show_footer();die();
|
||||
}
|
||||
|
||||
if ($TorrentCount < ($Page-1)*TORRENTS_PER_PAGE+1) {
|
||||
$LastPage = ceil($TorrentCount/TORRENTS_PER_PAGE);
|
||||
if ($TorrentCount < ($Page - 1) * TORRENTS_PER_PAGE + 1) {
|
||||
$LastPage = ceil($TorrentCount / TORRENTS_PER_PAGE);
|
||||
$Pages = Format::get_pages(0, $TorrentCount, TORRENTS_PER_PAGE);
|
||||
?>
|
||||
<div class="box pad" align="center">
|
||||
<h2>The requested page contains no matches.</h2>
|
||||
<p>You are requesting page <?=$Page?>, but the search returned only <?=$LastPage?> pages.</p>
|
||||
<p>You are requesting page <?=$Page?>, but the search returned only <?=number_format($LastPage) ?> pages.</p>
|
||||
</div>
|
||||
<div class="linkbox">Go to page <?=$Pages?></div>
|
||||
</div>
|
||||
@ -937,7 +937,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
// These torrents are in a group
|
||||
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent" dir="ltr">'.$GroupName.'</a>';
|
||||
if ($GroupYear > 0) {
|
||||
$DisplayName .= " [".$GroupYear."]";
|
||||
$DisplayName .= " [$GroupYear]";
|
||||
}
|
||||
if ($GroupVanityHouse) {
|
||||
$DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]';
|
||||
@ -958,11 +958,11 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" class="big_info">
|
||||
<? if ($LoggedUser['CoverArt']) : ?>
|
||||
<? if ($LoggedUser['CoverArt']) : ?>
|
||||
<div class="group_image float_left clear">
|
||||
<? ImageTools::cover_thumb($GroupInfo['WikiImage'], $GroupInfo['CategoryID'] - 1) ?>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<? endif; ?>
|
||||
<div class="group_info clear">
|
||||
<?=$DisplayName?>
|
||||
<? if (in_array($GroupID, $Bookmarks)) { ?>
|
||||
@ -997,13 +997,20 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
if (!isset($TorrentIDs[$TorrentID])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//Get report info for each torrent, use the cache if available, if not, add to it.
|
||||
$Reported = false;
|
||||
$Reports = get_reports($TorrentID);
|
||||
if (count($Reports) > 0) {
|
||||
$Reported = true;
|
||||
}
|
||||
|
||||
if ($Data['Remastered'] && !$Data['RemasterYear']) {
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
$SnatchedTorrentClass = $Data['IsSnatched'] ? ' snatched_torrent' : '';
|
||||
|
||||
if (isset($GroupedCategories[$CategoryID-1])
|
||||
if (isset($GroupedCategories[$CategoryID - 1])
|
||||
&& ($Data['RemasterTitle'] != $LastRemasterTitle
|
||||
|| $Data['RemasterYear'] != $LastRemasterYear
|
||||
|| $Data['RemasterRecordLabel'] != $LastRemasterRecordLabel
|
||||
@ -1024,7 +1031,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
$LastRemasterCatalogueNumber = $Data['RemasterCatalogueNumber'];
|
||||
$LastMedia = $Data['Media'];
|
||||
?>
|
||||
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><?=$SnatchedTorrentClass . $SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1 ? ' hidden' : '')?>">
|
||||
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><?=$SnatchedTorrentClass . $SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
|
||||
<td colspan="3">
|
||||
<span>
|
||||
[ <a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download"><?=$Data['HasFile'] ? 'DL' : 'Missing'?></a>
|
||||
@ -1033,13 +1040,13 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<? } ?>
|
||||
| <a href="reportsv2.php?action=report&id=<?=$TorrentID?>" title="Report">RP</a> ]
|
||||
</span>
|
||||
» <a href="torrents.php?id=<?=$GroupID?>&torrentid=<?=$TorrentID?>"><?=Torrents::torrent_info($Data)?></a>
|
||||
» <a href="torrents.php?id=<?=$GroupID?>&torrentid=<?=$TorrentID?>"><?=Torrents::torrent_info($Data)?><?if($Reported){?> / <strong class="torrent_label tl_reported" title="Reported">Reported</strong><?}?></a>
|
||||
</td>
|
||||
<td><?=$Data['FileCount']?></td>
|
||||
<td class="nobr"><?=time_diff($Data['Time'], 1)?></td>
|
||||
<td class="nobr"><?=Format::get_size($Data['Size'])?></td>
|
||||
<td><?=number_format($Data['Snatched'])?></td>
|
||||
<td<?=($Data['Seeders']==0)?' class="r00"':''?>><?=number_format($Data['Seeders'])?></td>
|
||||
<td<?=($Data['Seeders'] == 0) ? ' class="r00"' : ''?>><?=number_format($Data['Seeders'])?></td>
|
||||
<td><?=number_format($Data['Leechers'])?></td>
|
||||
</tr>
|
||||
<?
|
||||
@ -1049,9 +1056,9 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
|
||||
list($TorrentID, $Data) = each($Torrents);
|
||||
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'&torrentid='.$TorrentID.'#torrent'.$TorrentID.'" title="View Torrent" dir="ltr">'.$GroupName.'</a>';
|
||||
if (isset($GroupedCategories[$CategoryID-1])) {
|
||||
if (isset($GroupedCategories[$CategoryID - 1])) {
|
||||
if ($GroupYear) {
|
||||
$DisplayName .= " [".$GroupYear."]";
|
||||
$DisplayName .= " [$GroupYear]";
|
||||
}
|
||||
if ($CategoryID == 1 && $ReleaseType > 0) {
|
||||
$DisplayName .= ' ['.$ReleaseTypes[$ReleaseType].']';
|
||||
@ -1072,11 +1079,11 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<div title="<?=$TorrentTags->title()?>" class="<?=Format::css_category($CategoryID)?> <?=$TorrentTags->css_name()?>"></div>
|
||||
</td>
|
||||
<td class="big_info">
|
||||
<? if ($LoggedUser['CoverArt']) : ?>
|
||||
<? if ($LoggedUser['CoverArt']) : ?>
|
||||
<div class="group_image float_left clear">
|
||||
<? ImageTools::cover_thumb($GroupInfo['WikiImage'], $CategoryID - 1) ?>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<? endif; ?>
|
||||
<div class="group_info clear">
|
||||
<span>
|
||||
[ <a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a>
|
||||
@ -1094,7 +1101,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<td class="nobr"><?=time_diff($Data['Time'],1)?></td>
|
||||
<td class="nobr"><?=Format::get_size($Data['Size'])?></td>
|
||||
<td><?=number_format($Data['Snatched'])?></td>
|
||||
<td<?=($Data['Seeders']==0)?' class="r00"':''?>><?=number_format($Data['Seeders'])?></td>
|
||||
<td<?=($Data['Seeders'] == 0) ? ' class="r00"' : ''?>><?=number_format($Data['Seeders'])?></td>
|
||||
<td><?=number_format($Data['Leechers'])?></td>
|
||||
</tr>
|
||||
<?
|
||||
|
@ -30,9 +30,9 @@ function compare($X, $Y) {
|
||||
$GroupTime, $GroupVanityHouse, $TorrentTags, $TorrentTagIDs, $TorrentTagUserIDs,
|
||||
$TagPositiveVotes, $TagNegativeVotes, $GroupFlags) = array_values($TorrentDetails);
|
||||
|
||||
$DisplayName=$GroupName;
|
||||
$AltName=$GroupName; // Goes in the alt text of the image
|
||||
$Title=$GroupName; // goes in <title>
|
||||
$DisplayName = $GroupName;
|
||||
$AltName = $GroupName; // Goes in the alt text of the image
|
||||
$Title = $GroupName; // goes in <title>
|
||||
$WikiBody = $Text->full_format($WikiBody);
|
||||
|
||||
$Artists = Artists::get_artist($GroupID);
|
||||
@ -44,11 +44,11 @@ function compare($X, $Y) {
|
||||
}
|
||||
|
||||
if ($GroupYear > 0) {
|
||||
$DisplayName.=' ['.$GroupYear.']';
|
||||
$AltName.=' ['.$GroupYear.']';
|
||||
$Title.= ' ['.$GroupYear.']';
|
||||
$DisplayName.= " [$GroupYear]";
|
||||
$AltName.= " [$GroupYear]";
|
||||
$Title.= " [$GroupYear]";
|
||||
}
|
||||
if ($GroupVanityHouse){
|
||||
if ($GroupVanityHouse) {
|
||||
$DisplayName.=' [Vanity House]';
|
||||
$AltName.=' [Vanity House]';
|
||||
}
|
||||
@ -59,17 +59,17 @@ function compare($X, $Y) {
|
||||
|
||||
$Tags = array();
|
||||
if ($TorrentTags != '') {
|
||||
$TorrentTags=explode('|',$TorrentTags);
|
||||
$TorrentTagIDs=explode('|',$TorrentTagIDs);
|
||||
$TorrentTagUserIDs=explode('|',$TorrentTagUserIDs);
|
||||
$TagPositiveVotes=explode('|',$TagPositiveVotes);
|
||||
$TagNegativeVotes=explode('|',$TagNegativeVotes);
|
||||
$TorrentTags = explode('|',$TorrentTags);
|
||||
$TorrentTagIDs = explode('|',$TorrentTagIDs);
|
||||
$TorrentTagUserIDs = explode('|',$TorrentTagUserIDs);
|
||||
$TagPositiveVotes = explode('|',$TagPositiveVotes);
|
||||
$TagNegativeVotes = explode('|',$TagNegativeVotes);
|
||||
|
||||
foreach ($TorrentTags as $TagKey => $TagName) {
|
||||
$Tags[$TagKey]['name'] = $TagName;
|
||||
$Tags[$TagKey]['score'] = ($TagPositiveVotes[$TagKey] - $TagNegativeVotes[$TagKey]);
|
||||
$Tags[$TagKey]['id']=$TorrentTagIDs[$TagKey];
|
||||
$Tags[$TagKey]['userid']=$TorrentTagUserIDs[$TagKey];
|
||||
$Tags[$TagKey]['id'] = $TorrentTagIDs[$TagKey];
|
||||
$Tags[$TagKey]['userid'] = $TorrentTagUserIDs[$TagKey];
|
||||
}
|
||||
uasort($Tags, 'compare');
|
||||
}
|
||||
@ -93,7 +93,7 @@ function compare($X, $Y) {
|
||||
<? } ?>
|
||||
<a href="torrents.php?action=history&groupid=<?=$GroupID?>" class="brackets">View history</a>
|
||||
<? if ($RevisionID && check_perms('site_edit_wiki')) { ?>
|
||||
<a href="/torrents.php?action=revert&groupid=<?=$GroupID ?>&revisionid=<?=$RevisionID ?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Revert to this revision</a>
|
||||
<a href="torrents.php?action=revert&groupid=<?=$GroupID ?>&revisionid=<?=$RevisionID ?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Revert to this revision</a>
|
||||
<? }
|
||||
if (Bookmarks::has_bookmarked('torrent', $GroupID)) {
|
||||
?>
|
||||
@ -118,7 +118,7 @@ function compare($X, $Y) {
|
||||
<div class="box box_image box_image_albumart box_albumart"><!-- .box_albumart deprecated -->
|
||||
<div class="head"><strong>Cover</strong></div>
|
||||
<?
|
||||
if ($WikiImage != "") {
|
||||
if ($WikiImage != '') {
|
||||
$WikiImageThumb = ImageTools::wiki_image($WikiImage);
|
||||
if (check_perms('site_proxy_images')) {
|
||||
$WikiImage = ImageTools::proxy_url($WikiImage);
|
||||
@ -128,18 +128,18 @@ function compare($X, $Y) {
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
<p align="center"><img src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$GroupCategoryID-1]?>" alt="<?=$Categories[$GroupCategoryID-1]?>" title="<?=$Categories[$GroupCategoryID-1]?>" width="220" height="220" border="0" /></p>
|
||||
<p align="center"><img src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$GroupCategoryID - 1]?>" alt="<?=$Categories[$GroupCategoryID - 1]?>" title="<?=$Categories[$GroupCategoryID - 1]?>" width="220" height="220" border="0" /></p>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
if ($Categories[$GroupCategoryID-1] == 'Music') {
|
||||
if ($Categories[$GroupCategoryID - 1] == 'Music') {
|
||||
$ShownWith = false;
|
||||
?>
|
||||
<div class="box box_artists">
|
||||
<div class="head"><strong>Artists</strong>
|
||||
<?=(check_perms('torrents_edit')) ? '<span style="float:right;" class="edit_artists"><a onclick="ArtistManager(); return false;" href="#" class="brackets">Edit</a></span>' : ''?>
|
||||
<?=(check_perms('torrents_edit')) ? '<span style="float: right;" class="edit_artists"><a onclick="ArtistManager(); return false;" href="#" class="brackets">Edit</a></span>' : ''?>
|
||||
</div>
|
||||
<ul class="stats nobullet" id="artist_list">
|
||||
<? if (!empty($Artists[4]) && count($Artists[4]) > 0) {
|
||||
|
@ -176,3 +176,302 @@ function get_group_requests($GroupID) {
|
||||
$Requests = Requests::get_requests($Requests);
|
||||
return $Requests['matches'];
|
||||
}
|
||||
|
||||
//Used to get reports info on a unison cache in both browsing pages and torrent pages.
|
||||
function get_reports($TorrentID){
|
||||
global $Cache, $DB;
|
||||
$Reports = $Cache->get_value('reports_torrent_' . $TorrentID);
|
||||
if ($Reports === false) {
|
||||
$DB->query("SELECT r.ID,
|
||||
r.ReporterID,
|
||||
r.Type,
|
||||
r.UserComment,
|
||||
r.ReportedTime
|
||||
FROM reportsv2 AS r
|
||||
WHERE TorrentID = $TorrentID
|
||||
AND Type != 'edited'
|
||||
AND Status != 'Resolved'");
|
||||
$Reports = $DB->to_array();
|
||||
$Cache->cache_value('reports_torrent_' . $TorrentID, $Reports, 0);
|
||||
}
|
||||
return $Reports;
|
||||
}
|
||||
|
||||
//Used by both sections/torrents/details.php and sections/reportsv2/report.php
|
||||
function build_torrents_table($Cache, $DB, $LoggedUser, $GroupID, $GroupName, $GroupCategoryID, $ReleaseType, $TorrentList, $Types, $Text, $Username, $ReportedTimes) {
|
||||
|
||||
function filelist($Str) {
|
||||
return "</td><td>" . Format::get_size($Str[1]) . "</td></tr>";
|
||||
}
|
||||
|
||||
$LastRemasterYear = '-';
|
||||
$LastRemasterTitle = '';
|
||||
$LastRemasterRecordLabel = '';
|
||||
$LastRemasterCatalogueNumber = '';
|
||||
|
||||
$EditionID = 0;
|
||||
foreach ($TorrentList as $Torrent) {
|
||||
//t.ID, t.Media, t.Format, t.Encoding, t.Remastered, t.RemasterYear,
|
||||
//t.RemasterTitle, t.RemasterRecordLabel, t.RemasterCatalogueNumber, t.Scene,
|
||||
//t.HasLog, t.HasCue, t.LogScore, t.FileCount, t.Size, t.Seeders, t.Leechers,
|
||||
//t.Snatched, t.FreeTorrent, t.Time, t.Description, t.FileList,
|
||||
//t.FilePath, t.UserID, t.last_action, HEX(t.info_hash), (bad tags), (bad folders), (bad filenames),
|
||||
//(cassette approved), (lossy master approved), (lossy web approved), t.LastReseedRequest,
|
||||
//LogInDB, (has file), Torrents::torrent_properties()
|
||||
list($TorrentID, $Media, $Format, $Encoding, $Remastered, $RemasterYear,
|
||||
$RemasterTitle, $RemasterRecordLabel, $RemasterCatalogueNumber, $Scene,
|
||||
$HasLog, $HasCue, $LogScore, $FileCount, $Size, $Seeders, $Leechers,
|
||||
$Snatched, $FreeTorrent, $TorrentTime, $Description, $FileList,
|
||||
$FilePath, $UserID, $LastActive, $InfoHash, $BadTags, $BadFolders, $BadFiles,
|
||||
$CassetteApproved, $LossymasterApproved, $LossywebApproved, $LastReseedRequest,
|
||||
$LogInDB, $HasFile, $PersonalFL, $IsSnatched) = array_values($Torrent);
|
||||
|
||||
if ($Remastered && !$RemasterYear) {
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
|
||||
$Reported = false;
|
||||
unset($ReportedTimes);
|
||||
$Reports = $Cache->get_value('reports_torrent_' . $TorrentID);
|
||||
if ($Reports === false) {
|
||||
$DB->query("SELECT r.ID,
|
||||
r.ReporterID,
|
||||
r.Type,
|
||||
r.UserComment,
|
||||
r.ReportedTime
|
||||
FROM reportsv2 AS r
|
||||
WHERE TorrentID = $TorrentID
|
||||
AND Type != 'edited'
|
||||
AND Status != 'Resolved'");
|
||||
$Reports = $DB->to_array();
|
||||
$Cache->cache_value('reports_torrent_' . $TorrentID, $Reports, 0);
|
||||
}
|
||||
if (count($Reports) > 0) {
|
||||
$Reported = true;
|
||||
include(SERVER_ROOT . '/sections/reportsv2/array.php');
|
||||
$ReportInfo = '<table><tr class="colhead_dark" style="font-weight: bold;"><td>This torrent has ' . count($Reports) . ' active ' . (count($Reports) > 1 ? "reports" : "report") . ':</td></tr>';
|
||||
|
||||
foreach ($Reports as $Report) {
|
||||
list($ReportID, $ReporterID, $ReportType, $ReportReason, $ReportedTime) = $Report;
|
||||
|
||||
$Reporter = Users::user_info($ReporterID);
|
||||
$ReporterName = $Reporter['Username'];
|
||||
|
||||
if (array_key_exists($ReportType, $Types[$GroupCategoryID])) {
|
||||
$ReportType = $Types[$GroupCategoryID][$ReportType];
|
||||
} else if (array_key_exists($ReportType, $Types['master'])) {
|
||||
$ReportType = $Types['master'][$ReportType];
|
||||
} else {
|
||||
//There was a type but it wasn't an option!
|
||||
$ReportType = $Types['master']['other'];
|
||||
}
|
||||
$ReportInfo .= "<tr><td>" . (check_perms('admin_reports') ? "<a href='user.php?id=$ReporterID'>$ReporterName</a> <a href='reportsv2.php?view=report&id=$ReportID'>reported it</a> " : "Someone reported it ") . time_diff($ReportedTime, 2, true, true) . " for the reason '" . $ReportType['title'] . "':";
|
||||
$ReportInfo .= "<blockquote>" . $Text->full_format($ReportReason) . "</blockquote></td></tr>";
|
||||
}
|
||||
$ReportInfo .= "</table>";
|
||||
}
|
||||
|
||||
$CanEdit = (check_perms('torrents_edit') || (($UserID == $LoggedUser['ID'] && !$LoggedUser['DisableWiki']) && !($Remastered && !$RemasterYear)));
|
||||
|
||||
$RegenLink = check_perms('users_mod') ? ' <a href="torrents.php?action=regen_filelist&torrentid=' . $TorrentID . '" class="brackets">Regenerate</a>' : '';
|
||||
$FileTable = '
|
||||
<table class="filelist_table">
|
||||
<tr class="colhead_dark"><td>
|
||||
<div class="filelist_title" style="float: left;">File Name' . $RegenLink . '</div>
|
||||
<div class="filelist_path" style="float: right;">' . ($FilePath ? "/$FilePath/" : '') . '</div>
|
||||
</td><td>
|
||||
<strong>Size</strong>
|
||||
</td></tr>';
|
||||
if (substr($FileList, -3) == '}}}') { // Old style
|
||||
$FileListSplit = explode('|||', $FileList);
|
||||
foreach ($FileListSplit as $File) {
|
||||
$NameEnd = strrpos($File, '{{{');
|
||||
$Name = substr($File, 0, $NameEnd);
|
||||
if ($Spaces = strspn($Name, ' ')) {
|
||||
$Name = str_replace(' ', ' ', substr($Name, 0, $Spaces)) . substr($Name, $Spaces);
|
||||
}
|
||||
$FileSize = substr($File, $NameEnd + 3, -3);
|
||||
$FileTable .= sprintf("\n<tr><td>%s</td><td>%s</td></tr>", $Name, Format::get_size($FileSize));
|
||||
}
|
||||
} else {
|
||||
$FileListSplit = explode("\n", $FileList);
|
||||
foreach ($FileListSplit as $File) {
|
||||
$FileInfo = Torrents::filelist_get_file($File);
|
||||
$FileTable .= sprintf("\n<tr><td>%s</td><td>%s</td></tr>", $FileInfo['name'], Format::get_size($FileInfo['size']));
|
||||
}
|
||||
}
|
||||
$FileTable .= '
|
||||
</table>';
|
||||
|
||||
$ExtraInfo = ''; // String that contains information on the torrent (e.g. format and encoding)
|
||||
$AddExtra = ''; // Separator between torrent properties
|
||||
|
||||
$TorrentUploader = $Username; // Save this for "Uploaded by:" below
|
||||
// similar to Torrents::torrent_info()
|
||||
if ($Format) {
|
||||
$ExtraInfo.=display_str($Format);
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Encoding) {
|
||||
$ExtraInfo.=$AddExtra . display_str($Encoding);
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($HasLog) {
|
||||
$ExtraInfo.=$AddExtra . 'Log';
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($HasLog && $LogInDB) {
|
||||
$ExtraInfo.=' (' . (int) $LogScore . '%)';
|
||||
}
|
||||
if ($HasCue) {
|
||||
$ExtraInfo.=$AddExtra . 'Cue';
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Scene) {
|
||||
$ExtraInfo.=$AddExtra . 'Scene';
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if (!$ExtraInfo) {
|
||||
$ExtraInfo = $GroupName;
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($IsSnatched) {
|
||||
$ExtraInfo.=$AddExtra . Format::torrent_label('Snatched!');
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($FreeTorrent == '1') {
|
||||
$ExtraInfo.=$AddExtra . Format::torrent_label('Freeleech!');
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($FreeTorrent == '2') {
|
||||
$ExtraInfo.=$AddExtra . Format::torrent_label('Neutral Leech!');
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($PersonalFL) {
|
||||
$ExtraInfo.=$AddExtra . Format::torrent_label('Personal Freeleech!');
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Reported) {
|
||||
$ExtraInfo.=$AddExtra . Format::torrent_label('Reported');
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if (!empty($BadTags)) {
|
||||
$ExtraInfo.=$AddExtra . Format::torrent_label('Bad Tags');
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if (!empty($BadFolders)) {
|
||||
$ExtraInfo.=$AddExtra . Format::torrent_label('Bad Folders');
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if (!empty($CassetteApproved)) {
|
||||
$ExtraInfo.=$AddExtra . Format::torrent_label('Cassette Approved');
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if (!empty($LossymasterApproved)) {
|
||||
$ExtraInfo.=$AddExtra . Format::torrent_label('Lossy Master Approved');
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if (!empty($LossywebApproved)) {
|
||||
$ExtraInfo.=$AddExtra . Format::torrent_label('Lossy WEB Approved');
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if (!empty($BadFiles)) {
|
||||
$ExtraInfo.=$AddExtra . Format::torrent_label('Bad File Names');
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
|
||||
if ($GroupCategoryID == 1
|
||||
&& ($RemasterTitle != $LastRemasterTitle
|
||||
|| $RemasterYear != $LastRemasterYear
|
||||
|| $RemasterRecordLabel != $LastRemasterRecordLabel
|
||||
|| $RemasterCatalogueNumber != $LastRemasterCatalogueNumber
|
||||
|| $FirstUnknown
|
||||
|| $Media != $LastMedia)) {
|
||||
|
||||
$EditionID++;
|
||||
?>
|
||||
<tr class="releases_<?= $ReleaseType ?> groupid_<?= $GroupID ?> edition group_torrent">
|
||||
<td colspan="5" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?= $GroupID ?>, <?= $EditionID ?>, this, event)" title="Collapse this edition. Hold "Ctrl" while clicking to collapse all editions in this torrent group.">−</a> <?= Torrents::edition_string($Torrent, $TorrentDetails) ?></strong></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
$LastRemasterTitle = $RemasterTitle;
|
||||
$LastRemasterYear = $RemasterYear;
|
||||
$LastRemasterRecordLabel = $RemasterRecordLabel;
|
||||
$LastRemasterCatalogueNumber = $RemasterCatalogueNumber;
|
||||
$LastMedia = $Media;
|
||||
?>
|
||||
|
||||
<tr class="torrent_row releases_<?= $ReleaseType ?> groupid_<?= $GroupID ?> edition_<?= $EditionID ?> group_torrent<?= $IsSnatched ? ' snatched_torrent' : '' ?>" style="font-weight: normal;" id="torrent<?= $TorrentID ?>">
|
||||
<td>
|
||||
<span>[ <a href="torrents.php?action=download&id=<?= $TorrentID ?>&authkey=<?= $LoggedUser['AuthKey'] ?>&torrent_pass=<?= $LoggedUser['torrent_pass'] ?>" title="Download"><?= $HasFile ? 'DL' : 'Missing' ?></a>
|
||||
<? if (Torrents::can_use_token($Torrent)) { ?>
|
||||
| <a href="torrents.php?action=download&id=<?= $TorrentID ?>&authkey=<?= $LoggedUser['AuthKey'] ?>&torrent_pass=<?= $LoggedUser['torrent_pass'] ?>&usetoken=1" title="Use a FL Token" onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a>
|
||||
<? } ?>
|
||||
| <a href="reportsv2.php?action=report&id=<?= $TorrentID ?>" title="Report">RP</a>
|
||||
<? if ($CanEdit) { ?>
|
||||
| <a href="torrents.php?action=edit&id=<?= $TorrentID ?>" title="Edit">ED</a>
|
||||
<? } ?>
|
||||
<? if (check_perms('torrents_delete') || $UserID == $LoggedUser['ID']) { ?>
|
||||
| <a href="torrents.php?action=delete&torrentid=<?= $TorrentID ?>" title="Remove">RM</a>
|
||||
<? } ?>
|
||||
|
||||
| <a href="torrents.php?torrentid=<?= $TorrentID ?>" title="Permalink">PL</a>
|
||||
]</span>
|
||||
» <a href="#" onclick="$('#torrent_<?= $TorrentID ?>').toggle(); return false;"><?= $ExtraInfo; ?></a>
|
||||
</td>
|
||||
<td class="nobr"><?= Format::get_size($Size) ?></td>
|
||||
<td><?= number_format($Snatched) ?></td>
|
||||
<td><?= number_format($Seeders) ?></td>
|
||||
<td><?= number_format($Leechers) ?></td>
|
||||
</tr>
|
||||
<tr class="releases_<?= $ReleaseType ?> groupid_<?= $GroupID ?> edition_<?= $EditionID ?> torrentdetails pad <? if (!isset($_GET['torrentid']) || $_GET['torrentid'] != $TorrentID) { ?>hidden<? } ?>" id="torrent_<?= $TorrentID; ?>">
|
||||
<td colspan="5">
|
||||
<blockquote>
|
||||
Uploaded by <?= Users::format_username($UserID, false, false, false) ?> <?= time_diff($TorrentTime); ?>
|
||||
<? if ($Seeders == 0) { ?>
|
||||
<? if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 1209600) { ?>
|
||||
<br /><strong>Last active: <?= time_diff($LastActive); ?></strong>
|
||||
<? } else { ?>
|
||||
<br />Last active: <?= time_diff($LastActive); ?>
|
||||
<? } ?>
|
||||
<? if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 345678 && time() - strtotime($LastReseedRequest) >= 864000) { ?>
|
||||
<br /><a href="torrents.php?action=reseed&torrentid=<?= $TorrentID ?>&groupid=<?= $GroupID ?>" class="brackets">Request re-seed</a>
|
||||
<? } ?>
|
||||
|
||||
<? } ?>
|
||||
|
||||
</blockquote>
|
||||
<? if (check_perms('site_moderate_requests')) { ?>
|
||||
<div class="linkbox">
|
||||
<a href="torrents.php?action=masspm&id=<?= $GroupID ?>&torrentid=<?= $TorrentID ?>" class="brackets">Mass PM snatchers</a>
|
||||
</div>
|
||||
<? } ?>
|
||||
<div class="linkbox">
|
||||
<a href="#" class="brackets" onclick="show_peers('<?= $TorrentID ?>', 0);return false;">View peer list</a>
|
||||
<? if (check_perms('site_view_torrent_snatchlist')) { ?>
|
||||
<a href="#" class="brackets" onclick="show_downloads('<?= $TorrentID ?>', 0);return false;" title="View the list of users that have clicked the "DL" button.">View download list</a>
|
||||
<a href="#" class="brackets" onclick="show_snatches('<?= $TorrentID ?>', 0);return false;" title="View the list of users that have reported a snatch to the tracker.">View snatch list</a>
|
||||
<? } ?>
|
||||
<a href="#" class="brackets" onclick="show_files('<?= $TorrentID ?>');return false;">View file list</a>
|
||||
<? if ($Reported) { ?>
|
||||
<a href="#" class="brackets" onclick="show_reported('<?= $TorrentID ?>');return false;">View report information</a>
|
||||
<? } ?>
|
||||
</div>
|
||||
<div id="peers_<?= $TorrentID ?>" class="hidden"></div>
|
||||
<div id="downloads_<?= $TorrentID ?>" class="hidden"></div>
|
||||
<div id="snatches_<?= $TorrentID ?>" class="hidden"></div>
|
||||
<div id="files_<?= $TorrentID ?>" class="hidden"><?= $FileTable ?></div>
|
||||
<? if ($Reported) { ?>
|
||||
<div id="reported_<?= $TorrentID ?>" class="hidden"><?= $ReportInfo ?></div>
|
||||
<? } ?>
|
||||
<?
|
||||
if (!empty($Description)) {
|
||||
echo '<blockquote>' . $Text->full_format($Description) . '</blockquote>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
@ -17,44 +17,46 @@
|
||||
if ($UserInfo['Class'] > $LoggedUser['Class']) {
|
||||
error(403);
|
||||
}
|
||||
$URL = "https://" . SSL_SITE_URL . "/torrents.php?id=$GroupID&postid=$PostID#post$PostID";
|
||||
$URL = 'https://' . SSL_SITE_URL . "/torrents.php?id=$GroupID&postid=$PostID#post$PostID";
|
||||
if ($Length != 'verbal') {
|
||||
$Time = ((int) $Length) * (7 * 24 * 60 * 60);
|
||||
Tools::warn_user($UserID, $Time, "$URL - " . $Reason);
|
||||
$Subject = "You have received a warning";
|
||||
$Subject = 'You have received a warning';
|
||||
$PrivateMessage = "You have received a $Length week warning for [url=$URL]this post.[/url]\n\n" . $PrivateMessage;
|
||||
$WarnTime = time_plus($Time);
|
||||
$AdminComment = date("Y-m-d") . ' - Warned until ' . $WarnTime . ' by ' . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n";
|
||||
$AdminComment = date('Y-m-d') . ' - Warned until ' . $WarnTime . ' by ' . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n";
|
||||
} else {
|
||||
$Subject = "You have received a verbal warning";
|
||||
$Subject = 'You have received a verbal warning';
|
||||
$PrivateMessage = "You have received a verbal warning for [url=$URL]this post.[/url]\n\n" . $PrivateMessage;
|
||||
$AdminComment = date("Y-m-d") . ' - Verbally warned by ' . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n";
|
||||
$AdminComment = date('Y-m-d') . ' - Verbally warned by ' . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n";
|
||||
}
|
||||
$DB->query("INSERT INTO users_warnings_forums (UserID, Comment) VALUES('$UserID', '" . db_string($AdminComment)
|
||||
. "')
|
||||
ON DUPLICATE KEY UPDATE Comment = CONCAT('" . db_string($AdminComment) . "', Comment)");
|
||||
$DB->query("INSERT INTO users_warnings_forums (UserID, Comment)
|
||||
VALUES('$UserID', '" . db_string($AdminComment) . "')
|
||||
ON DUPLICATE KEY UPDATE Comment = CONCAT('" . db_string($AdminComment) . "', Comment)");
|
||||
Tools::update_user_notes($UserID, $AdminComment);
|
||||
Misc::send_pm($UserID, $LoggedUser['ID'], $Subject, $PrivateMessage);
|
||||
|
||||
// Mainly
|
||||
$DB->query("SELECT
|
||||
tc.Body,
|
||||
tc.AuthorID,
|
||||
tc.GroupID,
|
||||
tc.AddedTime
|
||||
FROM torrents_comments AS tc
|
||||
WHERE tc.ID='$PostID'");
|
||||
tc.Body,
|
||||
tc.AuthorID,
|
||||
tc.GroupID,
|
||||
tc.AddedTime
|
||||
FROM torrents_comments AS tc
|
||||
WHERE tc.ID='$PostID'");
|
||||
list($OldBody, $AuthorID, $GroupID, $AddedTime) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT ceil(COUNT(ID) / " . TORRENT_COMMENTS_PER_PAGE . ") AS Page FROM torrents_comments WHERE GroupID = $GroupID AND ID <= $PostID");
|
||||
$DB->query("SELECT ceil(COUNT(ID) / " . TORRENT_COMMENTS_PER_PAGE . ") AS Page
|
||||
FROM torrents_comments
|
||||
WHERE GroupID = $GroupID AND ID <= $PostID");
|
||||
list($Page) = $DB->next_record();
|
||||
|
||||
// Perform the update
|
||||
$DB->query("UPDATE torrents_comments SET
|
||||
Body = '" . db_string($Body) . "',
|
||||
EditedUserID = '" . db_string($LoggedUser['ID']) . "',
|
||||
EditedTime = '" . sqltime() . "'
|
||||
WHERE ID='$PostID'");
|
||||
$DB->query("UPDATE torrents_comments
|
||||
SET Body = '" . db_string($Body) . "',
|
||||
EditedUserID = '" . db_string($LoggedUser['ID']) . "',
|
||||
EditedTime = '" . sqltime() . "'
|
||||
WHERE ID='$PostID'");
|
||||
|
||||
// Update the cache
|
||||
$CatalogueID = floor((TORRENT_COMMENTS_PER_PAGE * $Page - TORRENT_COMMENTS_PER_PAGE) / THREAD_CATALOGUE);
|
||||
@ -65,8 +67,7 @@
|
||||
$Cache->commit_transaction(0);
|
||||
|
||||
$DB->query("INSERT INTO comments_edits (Page, PostID, EditUser, EditTime, Body)
|
||||
VALUES ('torrents', " . db_string($_POST['postid']) . ", " . db_string($LoggedUser['ID']) . ", '" . sqltime() . "', '" . db_string($OldBody)
|
||||
. "')");
|
||||
VALUES ('torrents', " . db_string($_POST['postid']) . ", " . db_string($LoggedUser['ID']) . ", '" . sqltime() . "', '" . db_string($OldBody) . "')");
|
||||
|
||||
header("Location: torrents.php?id=$GroupID&postid=$PostID#post$PostID");
|
||||
?>
|
||||
|
@ -4,19 +4,19 @@
|
||||
$Rankings = Votes::get_ranking($GroupID, $GroupYear);
|
||||
$LIs = '';
|
||||
// Display information for the return categories of get_ranking()
|
||||
$GroupDecade = $GroupYear-($GroupYear%10);
|
||||
$GroupDecade = $GroupYear - ($GroupYear % 10);
|
||||
$names = array('overall'=>'<a href="top10.php?type=votes">overall</a>',
|
||||
'decade'=>check_perms('site_advanced_top10') ? 'for the <a href="top10.php?advanced=1&type=votes&year1='.$GroupDecade.'&year2='.($GroupDecade+9).'">'.$GroupDecade.'s</a>' : 'for the '.$GroupDecade.'s',
|
||||
'year'=>check_perms('site_advanced_top10') ? 'for <a href="top10.php?advanced=1&type=votes&year1='.$GroupYear.'&year2=">'.$GroupYear.'</a>' : "for $GroupYear");
|
||||
'decade'=>check_perms('site_advanced_top10') ? 'for the <a href="top10.php?advanced=1&type=votes&year1='.$GroupDecade.'&year2='.($GroupDecade+9).'">'.$GroupDecade.'s</a>' : 'for the '.$GroupDecade.'s',
|
||||
'year'=>check_perms('site_advanced_top10') ? 'for <a href="top10.php?advanced=1&type=votes&year1='.$GroupYear.'&year2=">'.$GroupYear.'</a>' : "for $GroupYear");
|
||||
|
||||
foreach ($names as $key => $text) {
|
||||
if ($Rank = $Rankings[$key]) {
|
||||
if ($Rank <= 10) {
|
||||
$Class = "vr_top_10";
|
||||
$Class = 'vr_top_10';
|
||||
} elseif ($Rank <= 25) {
|
||||
$Class = "vr_top_25";
|
||||
$Class = 'vr_top_25';
|
||||
} elseif ($Rank <= 50) {
|
||||
$Class = "vr_top_50";
|
||||
$Class = 'vr_top_50';
|
||||
}
|
||||
|
||||
$LIs .= '<li id="vote_rank_'.$key.'" class="'.$Class.'">No. '.$Rank.' '.$text.'</li>';
|
||||
|
@ -2,7 +2,10 @@
|
||||
// These stats used to be all together in one UNION'd query
|
||||
// But we broke them up because they had a habit of locking each other to death.
|
||||
// They all run really quickly anyways.
|
||||
$DB->query("SELECT COUNT(x.uid), COUNT(DISTINCT x.fid) FROM xbt_snatched AS x INNER JOIN torrents AS t ON t.ID=x.fid WHERE x.uid='$UserID'");
|
||||
$DB->query("SELECT COUNT(x.uid), COUNT(DISTINCT x.fid)
|
||||
FROM xbt_snatched AS x
|
||||
INNER JOIN torrents AS t ON t.ID=x.fid
|
||||
WHERE x.uid='$UserID'");
|
||||
list($Snatched, $UniqueSnatched) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM torrents_comments WHERE AuthorID='$UserID'");
|
||||
@ -17,51 +20,65 @@
|
||||
$DB->query("SELECT COUNT(ID) FROM collages WHERE Deleted='0' AND UserID='$UserID'");
|
||||
list($NumCollages) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(DISTINCT CollageID) FROM collages_torrents AS ct JOIN collages ON CollageID = ID WHERE Deleted='0' AND ct.UserID='$UserID'");
|
||||
$DB->query("SELECT COUNT(DISTINCT CollageID)
|
||||
FROM collages_torrents AS ct
|
||||
JOIN collages ON CollageID = ID
|
||||
WHERE Deleted='0' AND ct.UserID='$UserID'");
|
||||
list($NumCollageContribs) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(DISTINCT GroupID) FROM torrents WHERE UserID = '$UserID'");
|
||||
list($UniqueGroups) = $DB->next_record();
|
||||
|
||||
$DB->query("SELECT COUNT(ID) FROM torrents WHERE ((LogScore = 100 AND Format = 'FLAC') OR (Media = 'Vinyl' AND Format = 'FLAC') OR (Media = 'WEB' AND Format = 'FLAC') OR (Media = 'DVD' AND Format = 'FLAC') OR (Media = 'Soundboard' AND Format = 'FLAC') OR (Media = 'Cassette' AND Format = 'FLAC') OR (Media = 'SACD' AND Format = 'FLAC') OR (Media = 'Blu-ray' AND Format = 'FLAC') OR (Media = 'DAT' AND Format = 'FLAC')) AND UserID = '$UserID'");
|
||||
$DB->query("SELECT COUNT(ID)
|
||||
FROM torrents
|
||||
WHERE ((LogScore = 100 AND Format = 'FLAC')
|
||||
OR (Media = 'Vinyl' AND Format = 'FLAC')
|
||||
OR (Media = 'WEB' AND Format = 'FLAC')
|
||||
OR (Media = 'DVD' AND Format = 'FLAC')
|
||||
OR (Media = 'Soundboard' AND Format = 'FLAC')
|
||||
OR (Media = 'Cassette' AND Format = 'FLAC')
|
||||
OR (Media = 'SACD' AND Format = 'FLAC')
|
||||
OR (Media = 'Blu-ray' AND Format = 'FLAC')
|
||||
OR (Media = 'DAT' AND Format = 'FLAC'))
|
||||
AND UserID = '$UserID'");
|
||||
list($PerfectFLACs) = $DB->next_record();
|
||||
?>
|
||||
<div class="box box_info box_userinfo_community">
|
||||
<div class="head colhead_dark">Community</div>
|
||||
<ul class="stats nobullet">
|
||||
<li>Forum posts: <?=number_format($ForumPosts)?> <a href="userhistory.php?action=posts&userid=<?=$UserID?>" class="brackets" title="View">View</a></li>
|
||||
<? if (($Override=check_paranoia_here('torrentcomments+'))) { ?>
|
||||
<? if (($Override = check_paranoia_here('torrentcomments+'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Torrent comments: <?=number_format($NumComments)?>
|
||||
<? if ($Override=check_paranoia_here('torrentcomments')) { ?>
|
||||
<? if ($Override = check_paranoia_here('torrentcomments')) { ?>
|
||||
<a href="comments.php?id=<?=$UserID?>" class="brackets<?= $Override===2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Artist comments: <?=number_format($NumArtistComments)?>
|
||||
<? if ($Override=check_paranoia_here('torrentcomments')) { ?>
|
||||
<? if ($Override = check_paranoia_here('torrentcomments')) { ?>
|
||||
<a href="comments.php?id=<?=$UserID?>&action=artists" class="brackets<?= $Override===2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Request comments: <?=number_format($NumRequestComments)?>
|
||||
<? if ($Override=check_paranoia_here('torrentcomments')) { ?>
|
||||
<? if ($Override = check_paranoia_here('torrentcomments')) { ?>
|
||||
<a href="comments.php?id=<?=$UserID?>&action=requests" class="brackets<?= $Override===2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('collages+'))) { ?>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('collages+'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Collages started: <?=number_format($NumCollages)?>
|
||||
<? if (($Override=check_paranoia_here('collages'))) { ?>
|
||||
<? if (($Override = check_paranoia_here('collages'))) { ?>
|
||||
<a href="collages.php?userid=<?=$UserID?>" class="brackets<?= ($Override===2) ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('collagecontribs+'))) { ?>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('collagecontribs+'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Collages contributed to: <? echo number_format($NumCollageContribs); ?>
|
||||
<? if (($Override=check_paranoia_here('collagecontribs'))) { ?>
|
||||
<? if (($Override = check_paranoia_here('collagecontribs'))) { ?>
|
||||
<a href="collages.php?userid=<?=$UserID?>&contrib=1" class="brackets<?= ($Override===2) ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? } ?>
|
||||
<?
|
||||
<? }
|
||||
|
||||
//Let's see if we can view requests because of reasons
|
||||
$ViewAll = check_paranoia_here('requestsfilled_list');
|
||||
$ViewCount = check_paranoia_here('requestsfilled_count');
|
||||
@ -75,12 +92,12 @@
|
||||
<li>Requests filled: <?=number_format($RequestsFilled)?> for <?=Format::get_size($TotalBounty)?></li>
|
||||
<? } elseif ($ViewAll) { ?>
|
||||
<li>
|
||||
<span<?= ($ViewCount===2) ? ' class="paranoia_override"' : ''?>>Requests filled: <?=number_format($RequestsFilled)?></span>
|
||||
<span<?= ($ViewBounty===2) ? ' class="paranoia_override"' : ''?>> for <?=Format::get_size($TotalBounty) ?></span>
|
||||
<a href="requests.php?type=filled&userid=<?=$UserID?>" class="brackets<?= ($ViewAll===2) ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<span<?= ($ViewCount === 2) ? ' class="paranoia_override"' : ''?>>Requests filled: <?=number_format($RequestsFilled)?></span>
|
||||
<span<?= ($ViewBounty === 2) ? ' class="paranoia_override"' : ''?>> for <?=Format::get_size($TotalBounty) ?></span>
|
||||
<a href="requests.php?type=filled&userid=<?=$UserID?>" class="brackets<?= ($ViewAll === 2) ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
</li>
|
||||
<? } ?>
|
||||
<?
|
||||
<? }
|
||||
|
||||
//Let's see if we can view requests because of reasons
|
||||
$ViewAll = check_paranoia_here('requestsvoted_list');
|
||||
$ViewCount = check_paranoia_here('requestsvoted_count');
|
||||
@ -94,86 +111,93 @@
|
||||
<li>Requests voted: <?=number_format($RequestsVoted)?> for <?=Format::get_size($TotalSpent)?></li>
|
||||
<? } elseif ($ViewAll) { ?>
|
||||
<li>
|
||||
<span<?= ($ViewCount===2) ? ' class="paranoia_override"' : ''?>>Requests voted: <?=number_format($RequestsVoted)?></span>
|
||||
<span<?= ($ViewBounty===2) ? ' class="paranoia_override"' : ''?>> for <?=Format::get_size($TotalSpent)?></span>
|
||||
<a href="requests.php?type=voted&userid=<?=$UserID?>" class="brackets<?= ($ViewAll===2) ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<span<?= ($ViewCount === 2) ? ' class="paranoia_override"' : ''?>>Requests voted: <?=number_format($RequestsVoted)?></span>
|
||||
<span<?= ($ViewBounty === 2) ? ' class="paranoia_override"' : ''?>> for <?=Format::get_size($TotalSpent)?></span>
|
||||
<a href="requests.php?type=voted&userid=<?=$UserID?>" class="brackets<?= ($ViewAll === 2) ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('uploads+'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Uploaded: <?=number_format($Uploads)?>
|
||||
<? if (($Override=check_paranoia_here('uploads'))) { ?>
|
||||
<a href="torrents.php?type=uploaded&userid=<?=$UserID?>" class="brackets<?= $Override===2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('uploads+'))) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>>Uploaded: <?=number_format($Uploads)?>
|
||||
<? if (($Override = check_paranoia_here('uploads'))) { ?>
|
||||
<a href="torrents.php?type=uploaded&userid=<?=$UserID?>" class="brackets<?= $Override === 2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? if (check_perms('zip_downloader')) { ?>
|
||||
<a href="torrents.php?action=redownload&type=uploads&userid=<?=$UserID?>" onclick="return confirm('If you no longer have the content, your ratio WILL be affected; be sure to check the size of all torrents before redownloading.');" class="brackets<?= $Override===2 ? ' paranoia_override' : '' ?>" title="Download">Download</a>
|
||||
<a href="torrents.php?action=redownload&type=uploads&userid=<?=$UserID?>" onclick="return confirm('If you no longer have the content, your ratio WILL be affected; be sure to check the size of all torrents before redownloading.');" class="brackets<?= $Override === 2 ? ' paranoia_override' : '' ?>" title="Download">Download</a>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('uniquegroups+'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Unique groups: <? echo number_format($UniqueGroups); ?>
|
||||
<? if (($Override=check_paranoia_here('uniquegroups'))) { ?>
|
||||
<a href="torrents.php?type=uploaded&userid=<?=$UserID?>&filter=uniquegroup" class="brackets<?= $Override===2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('uniquegroups+'))) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>>Unique groups: <? echo number_format($UniqueGroups); ?>
|
||||
<? if (($Override = check_paranoia_here('uniquegroups'))) { ?>
|
||||
<a href="torrents.php?type=uploaded&userid=<?=$UserID?>&filter=uniquegroup" class="brackets<?= $Override === 2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('perfectflacs+'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>"Perfect" FLACs: <? echo number_format($PerfectFLACs); ?>
|
||||
<? if (($Override=check_paranoia_here('perfectflacs'))) { ?>
|
||||
<a href="torrents.php?type=uploaded&userid=<?=$UserID?>&filter=perfectflac" class="brackets<?= $Override===2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('perfectflacs+'))) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>>"Perfect" FLACs: <? echo number_format($PerfectFLACs); ?>
|
||||
<? if (($Override = check_paranoia_here('perfectflacs'))) { ?>
|
||||
<a href="torrents.php?type=uploaded&userid=<?=$UserID?>&filter=perfectflac" class="brackets<?= $Override === 2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? if (check_paranoia_here('seeding+') || check_paranoia_here('leeching+')) {
|
||||
$DB->query("SELECT IF(remaining=0,'Seeding','Leeching') AS Type, COUNT(x.uid) FROM xbt_files_users AS x INNER JOIN torrents AS t ON t.ID=x.fid WHERE x.uid='$UserID' AND x.active=1 GROUP BY Type");
|
||||
<? }
|
||||
if (check_paranoia_here('seeding+') || check_paranoia_here('leeching+')) {
|
||||
$DB->query("SELECT IF(remaining=0,'Seeding','Leeching') AS Type, COUNT(x.uid)
|
||||
FROM xbt_files_users AS x
|
||||
INNER JOIN torrents AS t ON t.ID=x.fid
|
||||
WHERE x.uid='$UserID' AND x.active=1
|
||||
GROUP BY Type");
|
||||
$PeerCount = $DB->to_array(0, MYSQLI_NUM, false);
|
||||
$Seeding = isset($PeerCount['Seeding'][1]) ? $PeerCount['Seeding'][1] : 0;
|
||||
$Leeching = isset($PeerCount['Leeching'][1]) ? $PeerCount['Leeching'][1] : 0;
|
||||
} ?>
|
||||
<? if (($Override=check_paranoia_here('seeding+'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Seeding: <?=number_format($Seeding)?>
|
||||
<? if (($AOverride=check_paranoia_here('seeding'))) {
|
||||
echo ((($Override=check_paranoia_here('snatched')) && $UniqueSnatched > 0 )
|
||||
? '<span'.($Override===2 ? ' class="paranoia_override"' : '').'> (' . 100*min(1,round($Seeding/$UniqueSnatched,2)).'%)</span>' : ''); ?>
|
||||
<a href="torrents.php?type=seeding&userid=<?=$UserID?>" class="brackets<?= $AOverride===2 ? ' paranoia_override' :'' ?>" title="View">View</a>
|
||||
<? if (($Override = check_paranoia_here('seeding+'))) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>>Seeding: <?=number_format($Seeding)?>
|
||||
<? if (($AOverride = check_paranoia_here('seeding'))) {
|
||||
echo ((($Override = check_paranoia_here('snatched')) && $UniqueSnatched > 0 )
|
||||
? '<span'.($Override === 2 ? ' class="paranoia_override"' : '').'> (' . 100 * min(1,round($Seeding / $UniqueSnatched,2)).'%)</span>' : ''); ?>
|
||||
<a href="torrents.php?type=seeding&userid=<?=$UserID?>" class="brackets<?= $AOverride === 2 ? ' paranoia_override' :'' ?>" title="View">View</a>
|
||||
<? if (check_perms('zip_downloader')) { ?>
|
||||
<a href="torrents.php?action=redownload&type=seeding&userid=<?=$UserID?>" onclick="return confirm('If you no longer have the content, your ratio WILL be affected; be sure to check the size of all torrents before redownloading.');" class="brackets" title="Download">Download</a>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('leeching+'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Leeching: <? echo number_format($Leeching); ?>
|
||||
<? if (($Override=check_paranoia_here('leeching'))) { ?>
|
||||
<a href="torrents.php?type=leeching&userid=<?=$UserID?>" class="brackets<?= $Override===2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('leeching+'))) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>>Leeching: <? echo number_format($Leeching); ?>
|
||||
<? if (($Override = check_paranoia_here('leeching'))) { ?>
|
||||
<a href="torrents.php?type=leeching&userid=<?=$UserID?>" class="brackets<?= $Override === 2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? }
|
||||
echo ($DisableLeech == 0 && check_perms('users_view_ips')) ? ' <strong>(Disabled)</strong>' : ''
|
||||
?>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('snatched+'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Snatched: <?=number_format($Snatched)?>
|
||||
<? if (($Override=check_perms('site_view_torrent_snatchlist', $Class))) { ?>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('snatched+'))) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>>Snatched: <?=number_format($Snatched)?>
|
||||
<? if (($Override = check_perms('site_view_torrent_snatchlist', $Class))) { ?>
|
||||
(<?= $Override === 2 ? '<span class="paranoia_override">'.number_format($UniqueSnatched).'</span>' : number_format($UniqueSnatched) ?>)
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('snatched'))) { ?>
|
||||
<a href="torrents.php?type=snatched&userid=<?=$UserID?>" class="brackets<?= $Override===2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? }
|
||||
}
|
||||
if (($Override = check_paranoia_here('snatched'))) { ?>
|
||||
<a href="torrents.php?type=snatched&userid=<?=$UserID?>" class="brackets<?= $Override === 2 ? ' paranoia_override' : '' ?>" title="View">View</a>
|
||||
<? if (check_perms('zip_downloader')) { ?>
|
||||
<a href="torrents.php?action=redownload&type=snatches&userid=<?=$UserID?>" onclick="return confirm('If you no longer have the content, your ratio WILL be affected, be sure to check the size of all torrents before redownloading.');" class="brackets" title="Download">Download</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_perms('site_view_torrent_snatchlist', $Class))) {
|
||||
$DB->query("SELECT COUNT(ud.UserID), COUNT(DISTINCT ud.TorrentID) FROM users_downloads AS ud INNER JOIN torrents AS t ON t.ID=ud.TorrentID WHERE ud.UserID='$UserID'");
|
||||
<? }
|
||||
if (($Override = check_perms('site_view_torrent_snatchlist', $Class))) {
|
||||
$DB->query("SELECT COUNT(ud.UserID), COUNT(DISTINCT ud.TorrentID)
|
||||
FROM users_downloads AS ud
|
||||
INNER JOIN torrents AS t ON t.ID=ud.TorrentID
|
||||
WHERE ud.UserID='$UserID'");
|
||||
list($NumDownloads, $UniqueDownloads) = $DB->next_record();
|
||||
?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Downloaded: <?=number_format($NumDownloads)?> (<?=number_format($UniqueDownloads)?>)
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>>Downloaded: <?=number_format($NumDownloads)?> (<?=number_format($UniqueDownloads)?>)
|
||||
<a href="torrents.php?type=downloaded&userid=<?=$UserID?>" class="brackets" title="View">View</a>
|
||||
</li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('invitedcount'))) {
|
||||
<? }
|
||||
if (($Override=check_paranoia_here('invitedcount'))) {
|
||||
$DB->query("SELECT COUNT(UserID) FROM users_info WHERE Inviter='$UserID'");
|
||||
list($Invited) = $DB->next_record();
|
||||
?>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?
|
||||
|
||||
$UserID = $_REQUEST['userid'];
|
||||
if(!is_number($UserID)){
|
||||
if (!is_number($UserID)) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
@ -21,18 +20,18 @@
|
||||
i.UnseededAlerts,
|
||||
p.Level AS Class
|
||||
FROM users_main AS m
|
||||
JOIN users_info AS i ON i.UserID = m.ID
|
||||
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
|
||||
JOIN users_info AS i ON i.UserID = m.ID
|
||||
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
|
||||
WHERE m.ID = '".db_string($UserID)."'");
|
||||
list($Username,$Email,$IRCKey,$Paranoia,$Info,$Avatar,$Country,$StyleID,$StyleURL,$SiteOptions,$UnseededAlerts,$Class)=$DB->next_record(MYSQLI_NUM, array(3,9));
|
||||
|
||||
|
||||
if($UserID != $LoggedUser['ID'] && !check_perms('users_edit_profiles', $Class)) {
|
||||
if ($UserID != $LoggedUser['ID'] && !check_perms('users_edit_profiles', $Class)) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
$Paranoia = unserialize($Paranoia);
|
||||
if(!is_array($Paranoia)) {
|
||||
if (!is_array($Paranoia)) {
|
||||
$Paranoia = array();
|
||||
}
|
||||
|
||||
@ -63,7 +62,7 @@ function checked($Checked) {
|
||||
|
||||
|
||||
$DB->query("SELECT username FROM lastfm_users WHERE ID = '$UserID'");
|
||||
$LastFMUsername = "";
|
||||
$LastFMUsername = '';
|
||||
list($LastFMUsername) = $DB->next_record();
|
||||
|
||||
echo $Val->GenerateJS('userform');
|
||||
@ -88,7 +87,7 @@ function checked($Checked) {
|
||||
<td class="label"><strong>Stylesheet</strong></td>
|
||||
<td>
|
||||
<select name="stylesheet" id="stylesheet">
|
||||
<? foreach($Stylesheets as $Style) { ?>
|
||||
<? foreach ($Stylesheets as $Style) { ?>
|
||||
<option value="<?=$Style['ID']?>"<? if ($Style['ID'] == $StyleID) { ?> selected="selected"<? } ?>><?=$Style['ProperName']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
@ -242,19 +241,19 @@ function checked($Checked) {
|
||||
<td class="label"><strong>Avatars</strong></td>
|
||||
<td>
|
||||
<select name="disableavatars" id="disableavatars" onclick="ToggleIdenticons();">
|
||||
<option value="1"<? if($SiteOptions['DisableAvatars'] == 1) { ?> selected="selected"<? } ?>>Disable avatars</option>
|
||||
<option value="0"<? if($SiteOptions['DisableAvatars'] == 0) { ?> selected="selected"<? } ?>>Show avatars</option>
|
||||
<option value="2"<? if($SiteOptions['DisableAvatars'] == 2) { ?> selected="selected"<? } ?>>Show avatars or:</option>
|
||||
<option value="3"<? if($SiteOptions['DisableAvatars'] == 3) { ?> selected="selected"<? } ?>>Replace all avatars with:</option>
|
||||
<option value="1"<? if ($SiteOptions['DisableAvatars'] == 1) { ?> selected="selected"<? } ?>>Disable avatars</option>
|
||||
<option value="0"<? if ($SiteOptions['DisableAvatars'] == 0) { ?> selected="selected"<? } ?>>Show avatars</option>
|
||||
<option value="2"<? if ($SiteOptions['DisableAvatars'] == 2) { ?> selected="selected"<? } ?>>Show avatars or:</option>
|
||||
<option value="3"<? if ($SiteOptions['DisableAvatars'] == 3) { ?> selected="selected"<? } ?>>Replace all avatars with:</option>
|
||||
</select>
|
||||
<select name="identicons" id="identicons">
|
||||
<option value="0"<? if($SiteOptions['Identicons'] == 0) { ?> selected="selected"<? } ?>>Identicon</option>
|
||||
<option value="1"<? if($SiteOptions['Identicons'] == 1) { ?> selected="selected"<? } ?>>MonsterID</option>
|
||||
<option value="2"<? if($SiteOptions['Identicons'] == 2) { ?> selected="selected"<? } ?>>Wavatar</option>
|
||||
<option value="3"<? if($SiteOptions['Identicons'] == 3) { ?> selected="selected"<? } ?>>Retro</option>
|
||||
<option value="4"<? if($SiteOptions['Identicons'] == 4) { ?> selected="selected"<? } ?>>Robots 1</option>
|
||||
<option value="5"<? if($SiteOptions['Identicons'] == 5) { ?> selected="selected"<? } ?>>Robots 2</option>
|
||||
<option value="6"<? if($SiteOptions['Identicons'] == 6) { ?> selected="selected"<? } ?>>Robots 3</option>
|
||||
<option value="0"<? if ($SiteOptions['Identicons'] == 0) { ?> selected="selected"<? } ?>>Identicon</option>
|
||||
<option value="1"<? if ($SiteOptions['Identicons'] == 1) { ?> selected="selected"<? } ?>>MonsterID</option>
|
||||
<option value="2"<? if ($SiteOptions['Identicons'] == 2) { ?> selected="selected"<? } ?>>Wavatar</option>
|
||||
<option value="3"<? if ($SiteOptions['Identicons'] == 3) { ?> selected="selected"<? } ?>>Retro</option>
|
||||
<option value="4"<? if ($SiteOptions['Identicons'] == 4) { ?> selected="selected"<? } ?>>Robots 1</option>
|
||||
<option value="5"<? if ($SiteOptions['Identicons'] == 5) { ?> selected="selected"<? } ?>>Robots 2</option>
|
||||
<option value="6"<? if ($SiteOptions['Identicons'] == 6) { ?> selected="selected"<? } ?>>Robots 3</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -9,7 +9,9 @@
|
||||
include(SERVER_ROOT."/classes/class_validate.php");
|
||||
$Val=NEW VALIDATE;
|
||||
|
||||
if(empty($_REQUEST['action'])) { $_REQUEST['action']=''; }
|
||||
if (empty($_REQUEST['action'])) {
|
||||
$_REQUEST['action'] = '';
|
||||
}
|
||||
|
||||
switch ($_REQUEST['action']) {
|
||||
case 'notify':
|
||||
|
@ -1,11 +1,13 @@
|
||||
<?
|
||||
if(isset($_GET['userid']) && check_perms('users_view_invites')){
|
||||
if(!is_number($_GET['userid'])){ error(403); }
|
||||
if (isset($_GET['userid']) && check_perms('users_view_invites')) {
|
||||
if (!is_number($_GET['userid'])) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
$UserID=$_GET['userid'];
|
||||
$Sneaky = true;
|
||||
} else {
|
||||
if(!$UserCount = $Cache->get_value('stats_user_count')){
|
||||
if (!$UserCount = $Cache->get_value('stats_user_count')) {
|
||||
$DB->query("SELECT COUNT(ID) FROM users_main WHERE Enabled='1'");
|
||||
list($UserCount) = $DB->next_record();
|
||||
$Cache->cache_value('stats_user_count', $UserCount, 0);
|
||||
@ -22,16 +24,16 @@
|
||||
$DB->query("SELECT InviteKey, Email, Expires FROM invites WHERE InviterID='$UserID' ORDER BY Expires");
|
||||
$Pending = $DB->to_array();
|
||||
|
||||
$OrderWays = array("username", "email", "joined", "lastseen", "uploaded", "downloaded", "ratio");
|
||||
$OrderWays = array('username', 'email', 'joined', 'lastseen', 'uploaded', 'downloaded', 'ratio');
|
||||
|
||||
if(empty($_GET['order'])) {
|
||||
$CurrentOrder = "id";
|
||||
$CurrentSort = "asc";
|
||||
$NewSort = "desc";
|
||||
if (empty($_GET['order'])) {
|
||||
$CurrentOrder = 'id';
|
||||
$CurrentSort = 'asc';
|
||||
$NewSort = 'desc';
|
||||
} else {
|
||||
if(in_array($_GET['order'], $OrderWays)) {
|
||||
if (in_array($_GET['order'], $OrderWays)) {
|
||||
$CurrentOrder = $_GET['order'];
|
||||
if($_GET['sort'] == 'asc' || $_GET['sort'] == 'desc') {
|
||||
if ($_GET['sort'] == 'asc' || $_GET['sort'] == 'desc') {
|
||||
$CurrentSort = $_GET['sort'];
|
||||
$NewSort = ($_GET['sort'] == 'asc' ? 'desc' : 'asc');
|
||||
} else {
|
||||
@ -91,7 +93,7 @@
|
||||
<div class="header">
|
||||
<h2><?=Users::format_username($UserID, false, false, false)?> > Invites</h2>
|
||||
<div class="linkbox">
|
||||
<a href="user.php?action=invitetree<? if($Sneaky){ echo '&userid='.$UserID; }?>" class="brackets">Invite tree</a>
|
||||
<a href="user.php?action=invitetree<? if ($Sneaky) { echo '&userid='.$UserID; } ?>" class="brackets">Invite tree</a>
|
||||
</div>
|
||||
</div>
|
||||
<? if ($UserCount >= USER_LIMIT && !check_perms('site_can_invite_always')) { ?>
|
||||
@ -112,13 +114,13 @@
|
||||
$DB->query("SELECT can_leech FROM users_main WHERE ID = ".$UserID);
|
||||
list($CanLeech) = $DB->next_record();
|
||||
|
||||
if(!$Sneaky
|
||||
if (!$Sneaky
|
||||
&& !$LoggedUser['RatioWatch']
|
||||
&& $CanLeech
|
||||
&& empty($LoggedUser['DisableInvites'])
|
||||
&& ($LoggedUser['Invites']>0 || check_perms('site_send_unlimited_invites'))
|
||||
&& ($LoggedUser['Invites'] > 0 || check_perms('site_send_unlimited_invites'))
|
||||
&& ($UserCount <= USER_LIMIT || USER_LIMIT == 0 || check_perms('site_can_invite_always'))
|
||||
){ ?>
|
||||
) { ?>
|
||||
<div class="box pad">
|
||||
<p>Please note that the selling, trading or public giving away of our invitations, or responding to public requests, is strictly forbidden, and may result in you and your entire invite tree being banned. This includes offering to give away our invitations on any forum which is not a class-restricted forum on another private tracker.</p>
|
||||
<p>Remember that you are responsible for ALL invitees, and your account and/or privileges may be disabled due to your invitees' actions. You should know the person you're inviting. If you aren't familiar enough with the user to trust them, we suggest not inviting them.</p>
|
||||
@ -141,7 +143,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<?
|
||||
} elseif (!empty($LoggedUser['DisableInvites'])) {?>
|
||||
} elseif (!empty($LoggedUser['DisableInvites'])) { ?>
|
||||
<div class="box pad" style="text-align: center">
|
||||
<strong class="important_text">Your invites have been disabled. Please read <a href="wiki.php?action=article&id=310">this article</a> for more information.</strong>
|
||||
</div>
|
||||
@ -208,7 +210,7 @@
|
||||
<td><?=Format::get_size($Downloaded)?></td>
|
||||
<td><?=Format::get_ratio_html($Uploaded, $Downloaded)?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,11 +1,13 @@
|
||||
<?
|
||||
if(isset($_GET['userid']) && check_perms('users_view_invites')){
|
||||
if(!is_number($_GET['userid'])){ error(403); }
|
||||
if (isset($_GET['userid']) && check_perms('users_view_invites')) {
|
||||
if (!is_number($_GET['userid'])) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
$UserID=$_GET['userid'];
|
||||
$UserID = $_GET['userid'];
|
||||
$Sneaky = true;
|
||||
} else {
|
||||
if(!$UserCount = $Cache->get_value('stats_user_count')){
|
||||
if (!$UserCount = $Cache->get_value('stats_user_count')) {
|
||||
$DB->query("SELECT COUNT(ID) FROM users_main WHERE Enabled='1'");
|
||||
list($UserCount) = $DB->next_record();
|
||||
$Cache->cache_value('stats_user_count', $UserCount, 0);
|
||||
@ -30,4 +32,4 @@
|
||||
<? $Tree->make_tree(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<? View::show_footer(); ?>
|
||||
<? View::show_footer(); ?>
|
||||
|
@ -10,13 +10,13 @@
|
||||
<div class="head colhead_dark">Last.fm</div>
|
||||
<ul class="stats nobullet">
|
||||
<li>
|
||||
Username: <a id="lastfm_username" href="<?= $LastFMInfo['user']['url'] ?>" target="_blank" title="<?= $LastFMInfo['user']['name'] ?> on Last.fm: <?= $LastFMInfo['user']['playcount'] ?> plays, <?= $LastFMInfo['user']['playlists'] ?> playlists."><?= $LastFMInfo['user']['name'] ?></a>
|
||||
Username: <a id="lastfm_username" href="<?= $LastFMInfo['user']['url'] ?>" target="_blank" title="<?= $LastFMInfo['user']['name'] ?> on Last.fm: <?= number_format($LastFMInfo['user']['playcount']) ?> plays, <?= number_format($LastFMInfo['user']['playlists']) ?> playlists."><?= $LastFMInfo['user']['name'] ?></a>
|
||||
</li>
|
||||
<div id="lastfm_stats" <? if ($OwnProfile == true): ?>data-uid="<?= $OwnProfile ?>"<? endif; ?>>
|
||||
<div id="lastfm_stats"<? if ($OwnProfile == true): ?> data-uid="<?= $OwnProfile ?>"<? endif; ?>>
|
||||
</div>
|
||||
<li>
|
||||
<a href="#" id="lastfm_expand" onclick="return false" class="brackets">Show more info</a>
|
||||
<?
|
||||
<?
|
||||
//Append the reload stats button only if allowed on the current user page.
|
||||
$Response = $Cache->get_value('lastfm_clear_cache_' . $LoggedUser . '_' . $_GET['id']);
|
||||
if (empty($Response)) :
|
||||
@ -24,8 +24,9 @@
|
||||
<span id="lastfm_reload_container">
|
||||
<a href="#" id="lastfm_reload" onclick="return false" class="brackets">Reload stats</a>
|
||||
</span>
|
||||
<? endif; ?>
|
||||
<? endif; ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<? } ?>
|
||||
<?
|
||||
} ?>
|
||||
|
@ -1,40 +1,40 @@
|
||||
<?
|
||||
authorize();
|
||||
include(SERVER_ROOT.'/sections/user/linkedfunctions.php');
|
||||
authorize();
|
||||
include(SERVER_ROOT.'/sections/user/linkedfunctions.php');
|
||||
|
||||
if (!check_perms('users_mod')) {
|
||||
if (!check_perms('users_mod')) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
$UserID = $_REQUEST['userid'];
|
||||
|
||||
switch ($_REQUEST['dupeaction']) {
|
||||
case 'remove':
|
||||
unlink_user($_REQUEST['removeid']);
|
||||
break;
|
||||
|
||||
case 'update':
|
||||
if ($_REQUEST['target']) {
|
||||
$Target = $_REQUEST['target'];
|
||||
$DB->query("SELECT ID FROM users_main WHERE Username LIKE '".db_string($Target)."'");
|
||||
if (list($TargetID) = $DB->next_record()) {
|
||||
link_users($UserID, $TargetID);
|
||||
} else {
|
||||
error("User '$Target' not found.");
|
||||
}
|
||||
}
|
||||
|
||||
$DB->query("SELECT GroupID FROM users_dupes WHERE UserID = '$UserID'");
|
||||
list($GroupID) = $DB->next_record();
|
||||
|
||||
if ($_REQUEST['dupecomments'] && $GroupID) {
|
||||
dupe_comments($GroupID, $_REQUEST['dupecomments']);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
error(403);
|
||||
}
|
||||
|
||||
$UserID = $_REQUEST['userid'];
|
||||
|
||||
switch ($_REQUEST['dupeaction']) {
|
||||
case 'remove':
|
||||
unlink_user($_REQUEST['removeid']);
|
||||
break;
|
||||
|
||||
case 'update':
|
||||
if ($_REQUEST['target']) {
|
||||
$Target = $_REQUEST['target'];
|
||||
$DB->query("SELECT ID FROM users_main WHERE Username LIKE '".db_string($Target)."'");
|
||||
if (list($TargetID) = $DB->next_record()) {
|
||||
link_users($UserID, $TargetID);
|
||||
} else {
|
||||
error("User '$Target' not found.");
|
||||
}
|
||||
}
|
||||
|
||||
$DB->query("SELECT GroupID FROM users_dupes WHERE UserID = '$UserID'");
|
||||
list($GroupID) = $DB->next_record();
|
||||
|
||||
if ($_REQUEST['dupecomments'] && $GroupID) {
|
||||
dupe_comments($GroupID, $_REQUEST['dupecomments']);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
error(403);
|
||||
}
|
||||
echo '\o/';
|
||||
header("Location: user.php?id=$UserID");
|
||||
?>
|
||||
}
|
||||
echo '\o/';
|
||||
header("Location: user.php?id=$UserID");
|
||||
?>
|
||||
|
@ -2,14 +2,16 @@
|
||||
|
||||
|
||||
//TODO: restrict to viewing bellow class, username in h2
|
||||
if(isset($_GET['userid']) && check_perms('users_view_ips') && check_perms('users_logout')) {
|
||||
if(!is_number($_GET['userid'])) { error(404); }
|
||||
if (isset($_GET['userid']) && check_perms('users_view_ips') && check_perms('users_logout')) {
|
||||
if (!is_number($_GET['userid'])) {
|
||||
error(404);
|
||||
}
|
||||
$UserID = $_GET['userid'];
|
||||
} else {
|
||||
$UserID = $LoggedUser['ID'];
|
||||
}
|
||||
|
||||
if(isset($_POST['all'])) {
|
||||
if (isset($_POST['all'])) {
|
||||
authorize();
|
||||
|
||||
$DB->query("DELETE FROM users_sessions WHERE UserID='$UserID' AND SessionID<>'$SessionID'");
|
||||
@ -24,7 +26,7 @@
|
||||
}
|
||||
|
||||
$UserSessions = $Cache->get_value('users_sessions_'.$UserID);
|
||||
if(!is_array($UserSessions)) {
|
||||
if (!is_array($UserSessions)) {
|
||||
$DB->query("SELECT
|
||||
SessionID,
|
||||
Browser,
|
||||
@ -64,7 +66,7 @@
|
||||
</tr>
|
||||
<?
|
||||
$Row = 'a';
|
||||
foreach($UserSessions as $Session) {
|
||||
foreach ($UserSessions as $Session) {
|
||||
list($ThisSessionID,$Browser,$OperatingSystem,$IP,$LastUpdate) = array_values($Session);
|
||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
||||
?>
|
||||
@ -78,7 +80,7 @@
|
||||
<input type="hidden" name="action" value="sessions" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="hidden" name="session" value="<?=$ThisSessionID?>" />
|
||||
<input type="submit" value="<?=(($ThisSessionID == $SessionID)?'Current" disabled="disabled':'Log out')?>" />
|
||||
<input type="submit" value="<?=(($ThisSessionID == $SessionID) ? 'Current" disabled="disabled' : 'Log out') ?>" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -130,9 +130,9 @@
|
||||
SHA1(i.AdminComment) AS CommentHash,
|
||||
GROUP_CONCAT(l.PermissionID SEPARATOR ',') AS SecondaryClasses
|
||||
FROM users_main AS m
|
||||
JOIN users_info AS i ON i.UserID = m.ID
|
||||
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
|
||||
LEFT JOIN users_levels AS l ON l.UserID = m.ID
|
||||
JOIN users_info AS i ON i.UserID = m.ID
|
||||
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
|
||||
LEFT JOIN users_levels AS l ON l.UserID = m.ID
|
||||
WHERE m.ID = $UserID
|
||||
GROUP BY m.ID");
|
||||
|
||||
@ -175,7 +175,9 @@
|
||||
$EditSummary = array();
|
||||
|
||||
if ($_POST['ResetRatioWatch'] && check_perms('users_edit_reset_keys')) {
|
||||
$DB->query("UPDATE users_info SET RatioWatchEnds='0000-00-00 00:00:00', RatioWatchDownload='0', RatioWatchTimes='0' WHERE UserID='$UserID'");
|
||||
$DB->query("UPDATE users_info
|
||||
SET RatioWatchEnds='0000-00-00 00:00:00', RatioWatchDownload='0', RatioWatchTimes='0'
|
||||
WHERE UserID='$UserID'");
|
||||
$EditSummary[] = 'RatioWatch history reset';
|
||||
}
|
||||
|
||||
@ -191,9 +193,11 @@
|
||||
if ($_POST['ResetEmailHistory'] && check_perms('users_edit_reset_keys')) {
|
||||
$DB->query("DELETE FROM users_history_emails WHERE UserID='$UserID'");
|
||||
if ($_POST['ResetIPHistory']) {
|
||||
$DB->query("INSERT INTO users_history_emails (UserID, Email, Time, IP) VALUES ('$UserID','$Username@".SITE_URL."','0000-00-00 00:00:00','127.0.0.1')");
|
||||
$DB->query("INSERT INTO users_history_emails (UserID, Email, Time, IP)
|
||||
VALUES ('$UserID','$Username@".SITE_URL."','0000-00-00 00:00:00','127.0.0.1')");
|
||||
} else {
|
||||
$DB->query("INSERT INTO users_history_emails (UserID, Email, Time, IP) VALUES ('$UserID','$Username@".SITE_URL."','0000-00-00 00:00:00','".$Cur['IP']."')");
|
||||
$DB->query("INSERT INTO users_history_emails (UserID, Email, Time, IP)
|
||||
VALUES ('$UserID','$Username@".SITE_URL."','0000-00-00 00:00:00','".$Cur['IP']."')");
|
||||
}
|
||||
$DB->query("UPDATE users_main SET Email='$Username@".SITE_URL."' WHERE ID='$UserID'");
|
||||
$EditSummary[] = 'Email history cleared';
|
||||
@ -230,18 +234,24 @@
|
||||
|
||||
if ($Logs095 !== 0) {
|
||||
$TargetScore = $Logs095 === 100 ? 99 : 100;
|
||||
$Logs = $DB->query("SELECT DISTINCT TorrentID FROM torrents_logs_new JOIN torrents ON ID = TorrentID WHERE Log LIKE 'EAC extraction logfile%' AND UserID = ".$UserID." AND Score = ".$TargetScore." AND (Adjusted = '0' OR Adjusted = '')");
|
||||
$Logs = $DB->query("SELECT DISTINCT TorrentID
|
||||
FROM torrents_logs_new
|
||||
JOIN torrents ON ID = TorrentID
|
||||
WHERE Log LIKE 'EAC extraction logfile%'
|
||||
AND UserID = $UserID
|
||||
AND Score = $TargetScore
|
||||
AND (Adjusted = '0' OR Adjusted = '')");
|
||||
while (list($TorrentID) = $DB->next_record()) {
|
||||
$Results = array();
|
||||
if ($Logs095 === 100) {
|
||||
$Details = "";
|
||||
$Details = '';
|
||||
} else {
|
||||
$Results[] = "The original uploader has chosen to allow this log to be deducted one point for using EAC v0.95., -1 point [1]";
|
||||
$Results[] = 'The original uploader has chosen to allow this log to be deducted one point for using EAC v0.95., -1 point [1]';
|
||||
$Details = db_string(serialize($Results));
|
||||
}
|
||||
|
||||
$DB->query("UPDATE torrents SET LogScore = ".$Logs095." WHERE ID = ".$TorrentID);
|
||||
$DB->query("UPDATE torrents_logs_new SET Score = ".$Logs095.", Details = '".$Details."' WHERE TorrentID = ".$TorrentID);
|
||||
$DB->query("UPDATE torrents SET LogScore = $Logs095 WHERE ID = $TorrentID");
|
||||
$DB->query("UPDATE torrents_logs_new SET Score = $Logs095, Details = '$Details' WHERE TorrentID = $TorrentID");
|
||||
$DB->set_query_id($Logs);
|
||||
}
|
||||
$EditSummary[] = 'EAC v0.95 logs rescored to '.$Logs095;
|
||||
@ -252,9 +262,9 @@
|
||||
// Start building SQL query and edit summary
|
||||
if ($Classes[$Class]['Level'] != $Cur['Class'] && (
|
||||
($Classes[$Class]['Level'] < $LoggedUser['Class'] && check_perms('users_promote_below', $Cur['Class']))
|
||||
|| ($Classes[$Class]['Level'] <= $LoggedUser['Class'] && check_perms('users_promote_to', $Cur['Class']-1)))) {
|
||||
|| ($Classes[$Class]['Level'] <= $LoggedUser['Class'] && check_perms('users_promote_to', $Cur['Class'] - 1)))) {
|
||||
$UpdateSet[] = "PermissionID='$Class'";
|
||||
$EditSummary[] = "class changed to ".Users::make_class_string($Class);
|
||||
$EditSummary[] = 'class changed to '.Users::make_class_string($Class);
|
||||
$LightUpdates['PermissionID'] = $Class;
|
||||
$DeleteKeys = true;
|
||||
|
||||
@ -267,12 +277,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
if ($Username != $Cur['Username'] && check_perms('users_edit_usernames', $Cur['Class']-1)) {
|
||||
if ($Username != $Cur['Username'] && check_perms('users_edit_usernames', $Cur['Class'] - 1)) {
|
||||
$DB->query("SELECT ID FROM users_main WHERE Username = '".$Username."'");
|
||||
if ($DB->next_record() > 0) {
|
||||
list($UsedUsernameID) = $DB->next_record();
|
||||
error("Username already in use by <a href='user.php?id=".$UsedUsernameID."'>".$Username."</a>");
|
||||
header("Location: user.php?id=".$UserID);
|
||||
error('Username already in use by <a href="user.php?id='.$UsedUsernameID."\">$Username</a>");
|
||||
header('Location: user.php?id='.$UserID);
|
||||
die();
|
||||
} else {
|
||||
$UpdateSet[] = "Username='".$Username."'";
|
||||
@ -296,7 +306,7 @@
|
||||
|
||||
if ($Donor != $Cur['Donor'] && check_perms('users_give_donor')) {
|
||||
$UpdateSet[] = "Donor='$Donor'";
|
||||
$EditSummary[] = "donor status changed";
|
||||
$EditSummary[] = 'donor status changed';
|
||||
$LightUpdates['Donor'] = $Donor;
|
||||
}
|
||||
|
||||
@ -309,7 +319,7 @@
|
||||
foreach ($DroppedClasses as $PermID) {
|
||||
$ClassChanges[] = $Classes[$PermID]['Name'];
|
||||
}
|
||||
$EditSummary[] = "Secondary classes dropped: ".implode(', ',$ClassChanges);
|
||||
$EditSummary[] = 'Secondary classes dropped: '.implode(', ',$ClassChanges);
|
||||
$DB->query("DELETE FROM users_levels WHERE UserID = '$UserID' AND PermissionID IN (".implode(',',$DroppedClasses).")");
|
||||
if (count($SecondaryClasses) > 0) {
|
||||
$LightUpdates['ExtraClasses'] = array_fill_keys($SecondaryClasses, 1);
|
||||
|
@ -64,10 +64,10 @@
|
||||
m.FLTokens,
|
||||
SHA1(i.AdminComment)
|
||||
FROM users_main AS m
|
||||
JOIN users_info AS i ON i.UserID = m.ID
|
||||
LEFT JOIN users_main AS inviter ON i.Inviter = inviter.ID
|
||||
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
|
||||
LEFT JOIN forums_posts AS posts ON posts.AuthorID = m.ID
|
||||
JOIN users_info AS i ON i.UserID = m.ID
|
||||
LEFT JOIN users_main AS inviter ON i.Inviter = inviter.ID
|
||||
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
|
||||
LEFT JOIN forums_posts AS posts ON posts.AuthorID = m.ID
|
||||
WHERE m.ID = '".$UserID."' GROUP BY AuthorID");
|
||||
|
||||
if ($DB->record_count() == 0) { // If user doesn't exist
|
||||
@ -103,10 +103,10 @@
|
||||
i.DisableInvites,
|
||||
inviter.username
|
||||
FROM users_main AS m
|
||||
JOIN users_info AS i ON i.UserID = m.ID
|
||||
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
|
||||
LEFT JOIN users_main AS inviter ON i.Inviter = inviter.ID
|
||||
LEFT JOIN forums_posts AS posts ON posts.AuthorID = m.ID
|
||||
JOIN users_info AS i ON i.UserID = m.ID
|
||||
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
|
||||
LEFT JOIN users_main AS inviter ON i.Inviter = inviter.ID
|
||||
LEFT JOIN forums_posts AS posts ON posts.AuthorID = m.ID
|
||||
WHERE m.ID = $UserID GROUP BY AuthorID");
|
||||
|
||||
if ($DB->record_count() == 0) { // If user doesn't exist
|
||||
@ -222,27 +222,27 @@ function check_paranoia_here($Setting) {
|
||||
<div class="head colhead_dark">Stats</div>
|
||||
<ul class="stats nobullet">
|
||||
<li>Joined: <?=$JoinedDate?></li>
|
||||
<? if (($Override = check_paranoia_here('lastseen'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Last seen: <?=$LastAccess?></li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('uploaded'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?> title="<?=Format::get_size($Uploaded, 5)?>">Uploaded: <?=Format::get_size($Uploaded)?></li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('downloaded'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?> title="<?=Format::get_size($Downloaded, 5)?>">Downloaded: <?=Format::get_size($Downloaded)?></li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('ratio'))) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Ratio: <?=Format::get_ratio_html($Uploaded, $Downloaded)?></li>
|
||||
<? } ?>
|
||||
<? if (($Override=check_paranoia_here('requiredratio')) && isset($RequiredRatio)) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Required ratio: <?=number_format((double)$RequiredRatio, 2)?></li>
|
||||
<? } ?>
|
||||
<? if ($OwnProfile || ($Override=check_paranoia_here(false)) || check_perms('users_mod')) { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>><a href="userhistory.php?action=token_history&userid=<?=$UserID?>">Tokens</a>: <?=number_format($FLTokens)?></li>
|
||||
<? }
|
||||
<? if (($Override = check_paranoia_here('lastseen'))) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>>Last seen: <?=$LastAccess?></li>
|
||||
<? }
|
||||
if (($Override=check_paranoia_here('uploaded'))) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?> title="<?=Format::get_size($Uploaded, 5)?>">Uploaded: <?=Format::get_size($Uploaded)?></li>
|
||||
<? }
|
||||
if (($Override=check_paranoia_here('downloaded'))) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?> title="<?=Format::get_size($Downloaded, 5)?>">Downloaded: <?=Format::get_size($Downloaded)?></li>
|
||||
<? }
|
||||
if (($Override=check_paranoia_here('ratio'))) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>>Ratio: <?=Format::get_ratio_html($Uploaded, $Downloaded)?></li>
|
||||
<? }
|
||||
if (($Override=check_paranoia_here('requiredratio')) && isset($RequiredRatio)) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>>Required ratio: <?=number_format((double)$RequiredRatio, 2)?></li>
|
||||
<? }
|
||||
if ($OwnProfile || ($Override=check_paranoia_here(false)) || check_perms('users_mod')) { ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>><a href="userhistory.php?action=token_history&userid=<?=$UserID?>">Tokens</a>: <?=number_format($FLTokens)?></li>
|
||||
<? }
|
||||
if (($OwnProfile || check_perms('users_mod')) && $Warned!='0000-00-00 00:00:00') { ?>
|
||||
<li<?= $Override===2 ? ' class="paranoia_override"' : ''?>>Warning expires: <?= date('Y-m-d H:i', strtotime($Warned)) ?></li>
|
||||
<? } ?>
|
||||
<li<?= $Override === 2 ? ' class="paranoia_override"' : ''?>>Warning expires: <?= date('Y-m-d H:i', strtotime($Warned)) ?></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -252,7 +252,12 @@ function check_paranoia_here($Setting) {
|
||||
include(SERVER_ROOT.'/sections/user/lastfm.php');
|
||||
|
||||
if (check_paranoia_here('requestsfilled_count') || check_paranoia_here('requestsfilled_bounty')) {
|
||||
$DB->query("SELECT COUNT(DISTINCT r.ID), SUM(rv.Bounty) FROM requests AS r LEFT JOIN requests_votes AS rv ON r.ID=rv.RequestID WHERE r.FillerID = ".$UserID);
|
||||
$DB->query("SELECT
|
||||
COUNT(DISTINCT r.ID),
|
||||
SUM(rv.Bounty)
|
||||
FROM requests AS r
|
||||
LEFT JOIN requests_votes AS rv ON r.ID=rv.RequestID
|
||||
WHERE r.FillerID = ".$UserID);
|
||||
list($RequestsFilled, $TotalBounty) = $DB->next_record();
|
||||
} else {
|
||||
$RequestsFilled = $TotalBounty = 0;
|
||||
@ -485,17 +490,17 @@ function check_paranoia_here($Setting) {
|
||||
<? } ?>
|
||||
<div class="box">
|
||||
<div class="head">
|
||||
<span style="float:left;">Profile<? if ($CustomTitle) {?> - </span>
|
||||
<span style="float: left;">Profile<? if ($CustomTitle) {?> - </span>
|
||||
<span class="user_title"><? echo html_entity_decode($DisplayCustomTitle); } ?></span>
|
||||
<span style="float:right;"><?=!empty($Badges)?"$Badges ":''?><a href="#" onclick="$('#profilediv').toggle(); this.innerHTML=(this.innerHTML=='Hide'?'Show':'Hide'); return false;" class="brackets">Hide</a></span>
|
||||
<span style="float: right;"><?=!empty($Badges)?"$Badges ":''?><a href="#" onclick="$('#profilediv').toggle(); this.innerHTML=(this.innerHTML=='Hide'?'Show':'Hide'); return false;" class="brackets">Hide</a></span>
|
||||
</div>
|
||||
<div class="pad" id="profilediv">
|
||||
<? if (!$Info) { ?>
|
||||
<? if (!$Info) { ?>
|
||||
This profile is currently empty.
|
||||
<?
|
||||
} else {
|
||||
echo $Text->full_format($Info);
|
||||
}
|
||||
} else {
|
||||
echo $Text->full_format($Info);
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
@ -509,11 +514,11 @@ function check_paranoia_here($Setting) {
|
||||
g.Name,
|
||||
g.WikiImage
|
||||
FROM xbt_snatched AS s
|
||||
INNER JOIN torrents AS t ON t.ID=s.fid
|
||||
INNER JOIN torrents_group AS g ON t.GroupID=g.ID
|
||||
INNER JOIN torrents AS t ON t.ID=s.fid
|
||||
INNER JOIN torrents_group AS g ON t.GroupID=g.ID
|
||||
WHERE s.uid='$UserID'
|
||||
AND g.CategoryID='1'
|
||||
AND g.WikiImage <> ''
|
||||
AND g.CategoryID='1'
|
||||
AND g.WikiImage <> ''
|
||||
GROUP BY g.ID
|
||||
ORDER BY s.tstamp DESC
|
||||
LIMIT 5");
|
||||
@ -553,10 +558,10 @@ function check_paranoia_here($Setting) {
|
||||
g.Name,
|
||||
g.WikiImage
|
||||
FROM torrents_group AS g
|
||||
INNER JOIN torrents AS t ON t.GroupID=g.ID
|
||||
INNER JOIN torrents AS t ON t.GroupID=g.ID
|
||||
WHERE t.UserID='$UserID'
|
||||
AND g.CategoryID='1'
|
||||
AND g.WikiImage <> ''
|
||||
AND g.CategoryID='1'
|
||||
AND g.WikiImage <> ''
|
||||
GROUP BY g.ID
|
||||
ORDER BY t.Time DESC
|
||||
LIMIT 5");
|
||||
@ -592,7 +597,7 @@ function check_paranoia_here($Setting) {
|
||||
tg.WikiImage,
|
||||
tg.CategoryID
|
||||
FROM collages_torrents AS ct
|
||||
JOIN torrents_group AS tg ON tg.ID=ct.GroupID
|
||||
JOIN torrents_group AS tg ON tg.ID=ct.GroupID
|
||||
WHERE ct.CollageID='$CollageID'
|
||||
ORDER BY ct.Sort LIMIT 5");
|
||||
$Collage = $DB->to_array();
|
||||
@ -921,7 +926,7 @@ function check_paranoia_here($Setting) {
|
||||
<?
|
||||
$DB->query("SELECT p.ID, p.Name, l.UserID
|
||||
FROM permissions AS p
|
||||
LEFT JOIN users_levels AS l ON l.PermissionID = p.ID AND l.UserID = '$UserID'
|
||||
LEFT JOIN users_levels AS l ON l.PermissionID = p.ID AND l.UserID = '$UserID'
|
||||
WHERE p.Secondary = 1
|
||||
ORDER BY p.Name");
|
||||
$i = 0;
|
||||
@ -1104,19 +1109,19 @@ function check_paranoia_here($Setting) {
|
||||
<tr>
|
||||
<td class="label">Disable:</td>
|
||||
<td>
|
||||
<input type="checkbox" name="DisablePosting" id="DisablePosting"<? if ($DisablePosting==1) { ?> checked="checked"<? } ?> /> <label for="DisablePosting">Posting</label>
|
||||
<input type="checkbox" name="DisablePosting" id="DisablePosting"<? if ($DisablePosting == 1) { ?> checked="checked"<? } ?> /> <label for="DisablePosting">Posting</label>
|
||||
<? if (check_perms('users_disable_any')) { ?> |
|
||||
<input type="checkbox" name="DisableAvatar" id="DisableAvatar"<? if ($DisableAvatar==1) { ?> checked="checked"<? } ?> /> <label for="DisableAvatar">Avatar</label> |
|
||||
<input type="checkbox" name="DisableInvites" id="DisableInvites"<? if ($DisableInvites==1) { ?> checked="checked"<? } ?> /> <label for="DisableInvites">Invites</label> |
|
||||
<input type="checkbox" name="DisableForums" id="DisableForums"<? if ($DisableForums==1) { ?> checked="checked"<? } ?> /> <label for="DisableForums">Forums</label> |
|
||||
<input type="checkbox" name="DisableTagging" id="DisableTagging"<? if ($DisableTagging==1) { ?> checked="checked"<? } ?> /> <label for="DisableTagging" title="This only disables a user's ability to delete tags.">Tagging</label> |
|
||||
<input type="checkbox" name="DisableRequests" id="DisableRequests"<? if ($DisableRequests==1) { ?> checked="checked"<? } ?> /> <label for="DisableRequests">Requests</label>
|
||||
<input type="checkbox" name="DisableAvatar" id="DisableAvatar"<? if ($DisableAvatar == 1) { ?> checked="checked"<? } ?> /> <label for="DisableAvatar">Avatar</label> |
|
||||
<input type="checkbox" name="DisableInvites" id="DisableInvites"<? if ($DisableInvites == 1) { ?> checked="checked"<? } ?> /> <label for="DisableInvites">Invites</label> |
|
||||
<input type="checkbox" name="DisableForums" id="DisableForums"<? if ($DisableForums == 1) { ?> checked="checked"<? } ?> /> <label for="DisableForums">Forums</label> |
|
||||
<input type="checkbox" name="DisableTagging" id="DisableTagging"<? if ($DisableTagging == 1) { ?> checked="checked"<? } ?> /> <label for="DisableTagging" title="This only disables a user's ability to delete tags.">Tagging</label> |
|
||||
<input type="checkbox" name="DisableRequests" id="DisableRequests"<? if ($DisableRequests == 1) { ?> checked="checked"<? } ?> /> <label for="DisableRequests">Requests</label>
|
||||
<br />
|
||||
<input type="checkbox" name="DisableUpload" id="DisableUpload"<? if ($DisableUpload==1) { ?> checked="checked"<? } ?> /> <label for="DisableUpload">Upload</label> |
|
||||
<input type="checkbox" name="DisableWiki" id="DisableWiki"<? if ($DisableWiki==1) { ?> checked="checked"<? } ?> /> <label for="DisableWiki">Wiki</label> |
|
||||
<input type="checkbox" name="DisableLeech" id="DisableLeech"<? if ($DisableLeech==0) { ?> checked="checked"<? } ?> /> <label for="DisableLeech">Leech</label> |
|
||||
<input type="checkbox" name="DisablePM" id="DisablePM"<? if ($DisablePM==1) { ?> checked="checked"<? } ?> /> <label for="DisablePM">PM</label> |
|
||||
<input type="checkbox" name="DisableIRC" id="DisableIRC"<? if ($DisableIRC==1) { ?> checked="checked"<? } ?> /> <label for="DisableIRC">IRC</label>
|
||||
<input type="checkbox" name="DisableUpload" id="DisableUpload"<? if ($DisableUpload == 1) { ?> checked="checked"<? } ?> /> <label for="DisableUpload">Upload</label> |
|
||||
<input type="checkbox" name="DisableWiki" id="DisableWiki"<? if ($DisableWiki == 1) { ?> checked="checked"<? } ?> /> <label for="DisableWiki">Wiki</label> |
|
||||
<input type="checkbox" name="DisableLeech" id="DisableLeech"<? if ($DisableLeech == 0) { ?> checked="checked"<? } ?> /> <label for="DisableLeech">Leech</label> |
|
||||
<input type="checkbox" name="DisablePM" id="DisablePM"<? if ($DisablePM == 1) { ?> checked="checked"<? } ?> /> <label for="DisablePM">PM</label> |
|
||||
<input type="checkbox" name="DisableIRC" id="DisableIRC"<? if ($DisableIRC == 1) { ?> checked="checked"<? } ?> /> <label for="DisableIRC">IRC</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -2,7 +2,9 @@
|
||||
/*
|
||||
User collage subscription page
|
||||
*/
|
||||
if(!check_perms('site_collages_subscribe')) { error(403); }
|
||||
if (!check_perms('site_collages_subscribe')) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
include(SERVER_ROOT.'/classes/class_text.php'); // Text formatting class
|
||||
$Text = new TEXT;
|
||||
@ -16,22 +18,22 @@
|
||||
c.Name,
|
||||
c.NumTorrents,
|
||||
s.LastVisit
|
||||
FROM collages AS c
|
||||
JOIN users_collage_subs AS s ON s.CollageID = c.ID
|
||||
JOIN collages_torrents AS ct ON ct.CollageID = c.ID
|
||||
WHERE s.UserID=$LoggedUser[ID] AND c.Deleted='0'
|
||||
AND ct.AddedOn>s.LastVisit
|
||||
GROUP BY c.ID";
|
||||
FROM collages AS c
|
||||
JOIN users_collage_subs AS s ON s.CollageID = c.ID
|
||||
JOIN collages_torrents AS ct ON ct.CollageID = c.ID
|
||||
WHERE s.UserID=$LoggedUser[ID] AND c.Deleted='0'
|
||||
AND ct.AddedOn>s.LastVisit
|
||||
GROUP BY c.ID";
|
||||
} else {
|
||||
$sql = "SELECT c.ID,
|
||||
c.Name,
|
||||
c.NumTorrents,
|
||||
s.LastVisit
|
||||
FROM collages AS c
|
||||
JOIN users_collage_subs AS s ON s.CollageID = c.ID
|
||||
LEFT JOIN collages_torrents AS ct ON ct.CollageID = c.ID
|
||||
WHERE s.UserID=$LoggedUser[ID] AND c.Deleted='0'
|
||||
GROUP BY c.ID";
|
||||
FROM collages AS c
|
||||
JOIN users_collage_subs AS s ON s.CollageID = c.ID
|
||||
LEFT JOIN collages_torrents AS ct ON ct.CollageID = c.ID
|
||||
WHERE s.UserID=$LoggedUser[ID] AND c.Deleted='0'
|
||||
GROUP BY c.ID";
|
||||
}
|
||||
|
||||
$DB->query($sql);
|
||||
@ -40,11 +42,11 @@
|
||||
?>
|
||||
<div class="thin">
|
||||
<div class="header">
|
||||
<h2>Subscribed collages<?=($ShowAll?'':' with new additions')?></h2>
|
||||
<h2>Subscribed collages<?=($ShowAll ? '' : ' with new additions')?></h2>
|
||||
|
||||
<div class="linkbox">
|
||||
<?
|
||||
if($ShowAll) {
|
||||
if ($ShowAll) {
|
||||
?>
|
||||
<br /><br />
|
||||
<a href="userhistory.php?action=subscribed_collages&showall=0" class="brackets">Only display collages with new additions</a>
|
||||
@ -60,7 +62,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
if(!$NumResults) {
|
||||
if (!$NumResults) {
|
||||
?>
|
||||
<div class="center">
|
||||
No subscribed collages<?=($ShowAll ? '' : ' with new additions')?>
|
||||
@ -85,7 +87,7 @@
|
||||
//$Artists = Artists::get_artists($GroupID);
|
||||
|
||||
$GroupIDs = $DB->collect('GroupID');
|
||||
if(count($GroupIDs)>0) {
|
||||
if (count($GroupIDs) > 0) {
|
||||
$TorrentList = Torrents::get_groups($GroupIDs);
|
||||
$TorrentList = $TorrentList['matches'];
|
||||
} else {
|
||||
@ -110,18 +112,22 @@
|
||||
unset($ExtendedArtists[2]);
|
||||
unset($ExtendedArtists[3]);
|
||||
$DisplayName .= Artists::display_artists($ExtendedArtists);
|
||||
} elseif(count($Artists)>0) {
|
||||
} elseif (count($Artists) > 0) {
|
||||
$DisplayName .= Artists::display_artists(array('1'=>$Artists));
|
||||
}
|
||||
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
|
||||
if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';}
|
||||
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
|
||||
if ($GroupYear > 0) {
|
||||
$DisplayName = $DisplayName. " [$GroupYear]";
|
||||
}
|
||||
if ($GroupVanityHouse) {
|
||||
$DisplayName .= ' [<abbr title="This is a Vanity House release">VH</abbr>]';
|
||||
}
|
||||
|
||||
$SnatchedGroupClass = $GroupFlags['IsSnatched'] ? ' snatched_group' : '';
|
||||
|
||||
// Start an output buffer, so we can store this output in $TorrentTable
|
||||
ob_start();
|
||||
if(count($Torrents)>1 || $GroupCategoryID==1) {
|
||||
if (count($Torrents) > 1 || $GroupCategoryID == 1) {
|
||||
?>
|
||||
<tr class="group discog<?=$SnatchedGroupClass?>" id="group_<?=$CollageID?><?=$GroupID?>">
|
||||
<td class="center">
|
||||
@ -158,7 +164,7 @@
|
||||
}
|
||||
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
|
||||
|
||||
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
|
||||
if ($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
|
||||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
|
||||
$EditionID++;
|
||||
?>
|
||||
@ -194,10 +200,10 @@
|
||||
|
||||
$DisplayName = '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
|
||||
|
||||
if($Torrent['IsSnatched']) {
|
||||
if ($Torrent['IsSnatched']) {
|
||||
$DisplayName .=' ' . Format::torrent_label('Snatched!');
|
||||
}
|
||||
if(!empty($Torrent['FreeTorrent'])) {
|
||||
if (!empty($Torrent['FreeTorrent'])) {
|
||||
$DisplayName .=' ' . Format::torrent_label('Freeleech!');
|
||||
}
|
||||
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
|
||||
@ -260,7 +266,7 @@
|
||||
</table>
|
||||
<? } // foreach() ?>
|
||||
<?
|
||||
} // else -- if(empty($NumResults)) ?>
|
||||
} // else -- if (empty($NumResults)) ?>
|
||||
</div>
|
||||
<?
|
||||
|
||||
|
@ -387,7 +387,7 @@ tr.torrent .bookmark>a:after {
|
||||
}
|
||||
|
||||
.brackets {
|
||||
text-indent: 0px;
|
||||
text-indent: 0px;
|
||||
}
|
||||
|
||||
.votespan.brackets:before {
|
||||
@ -422,7 +422,7 @@ tr.torrent .bookmark>a:after {
|
||||
clear:both;
|
||||
}
|
||||
.group_image + .group_info {
|
||||
margin-left: 100px;
|
||||
margin-left: 100px;
|
||||
}
|
||||
|
||||
.group_image img {
|
||||
@ -442,31 +442,31 @@ tr.torrent .bookmark>a:after {
|
||||
* Fix flowing issues in the report resolving pages.
|
||||
*/
|
||||
.wrap_overflow, .filelist_table td, .reportinfo_table, .torrentdetails blockquote {
|
||||
word-break: normal;
|
||||
-ms-word-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
hyphens: auto;
|
||||
/* Note that IE will have different behavior on word-break,
|
||||
* but this is required to keep the layout from breaking. */
|
||||
-ms-word-break: break-all;
|
||||
word-break: normal;
|
||||
-ms-word-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
hyphens: auto;
|
||||
/* Note that IE will have different behavior on word-break,
|
||||
* but this is required to keep the layout from breaking. */
|
||||
-ms-word-break: break-all;
|
||||
}
|
||||
/* Non-web-standard for webkit */
|
||||
.torrentdetails blockquote {
|
||||
word-break: break-word;
|
||||
word-break: break-word;
|
||||
}
|
||||
/* Fix long filename tables overflowing (Chrome only). */
|
||||
.filelist_table td:first-child {
|
||||
word-break: break-all;
|
||||
word-break: break-all;
|
||||
}
|
||||
/* Fix long overflow for Opera (doesn't support word-break). */
|
||||
.reportinfo_table {
|
||||
table-layout:fixed;
|
||||
table-layout:fixed;
|
||||
}
|
||||
/* Wrap release info for consistent DOM and to limit table expansion. */
|
||||
.no_overflow {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -241,28 +241,28 @@ ul.thin li { margin:0px 0px; padding:0px; }
|
||||
#searchbars ul li {
|
||||
margin: 0px;
|
||||
display: inline;
|
||||
list-style: none;
|
||||
position: relative;
|
||||
list-style: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#searchbars ul li ul {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
border: 1px solid #98AAB1;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
border: 1px solid #98AAB1;
|
||||
background: #F4F6FB;
|
||||
width: 12em;
|
||||
margin-top: 12px;
|
||||
width: 12em;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
#searchbars ul li ul li {
|
||||
margin: 0 0 0 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
margin: 0 0 0 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#searchbars ul li ul li.highlight {
|
||||
|
@ -250,21 +250,21 @@ ul.thin li { margin:0px 0px; padding:0px; }
|
||||
}
|
||||
|
||||
#searchbars ul li ul {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
background-color: #999;
|
||||
width: 12em;
|
||||
margin-top: 12px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
background-color: #999;
|
||||
width: 12em;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
#searchbars ul li ul li {
|
||||
margin: 0 0 0 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin: 0 0 0 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#searchbars ul li ul li.highlight {
|
||||
@ -750,9 +750,9 @@ ul .invitetree {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: black;
|
||||
z-index:1001;
|
||||
z-index: 1001;
|
||||
-moz-opacity: 0.8;
|
||||
opacity:.80;
|
||||
opacity: .80;
|
||||
filter: alpha(opacity=80);
|
||||
}
|
||||
|
||||
@ -764,7 +764,7 @@ ul .invitetree {
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
padding: 0px;
|
||||
z-index:1002;
|
||||
z-index: 1002;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@ -779,8 +779,8 @@ ul .invitetree {
|
||||
}
|
||||
|
||||
tr.torrent .bookmark > a:before {
|
||||
color: black;
|
||||
color: black;
|
||||
}
|
||||
tr.torrent .bookmark > a:after {
|
||||
color: black;
|
||||
color: black;
|
||||
}
|
||||
|
@ -221,8 +221,8 @@ ul.thin li { margin:0px 0px; padding:0px; }
|
||||
|
||||
#searchbars ul {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
text-align: center;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#searchbars ul li {
|
||||
@ -233,21 +233,21 @@ ul.thin li { margin:0px 0px; padding:0px; }
|
||||
}
|
||||
|
||||
#searchbars ul li ul {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
background-color: #999;
|
||||
width: 12em;
|
||||
margin-top: 12px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
background-color: #999;
|
||||
width: 12em;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
#searchbars ul li ul li {
|
||||
margin: 0 0 0 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin: 0 0 0 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#searchbars ul li form {
|
||||
|
@ -28,10 +28,10 @@
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
#musicbrainz_popup h2 {
|
||||
text-align: left;
|
||||
color: #6FA5FD;
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
text-align: left;
|
||||
color: #6FA5FD;
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
border-bottom: 1px dotted #D3D3D3;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
@ -311,20 +311,20 @@ ul.thin li {
|
||||
}
|
||||
|
||||
#searchbars ul li ul {
|
||||
display: block;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
width: 12em;
|
||||
top: 1em;
|
||||
left: 0;
|
||||
margin-top: 12px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
width: 12em;
|
||||
top: 1em;
|
||||
left: 0;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
#searchbars ul li ul li {
|
||||
margin: 0
|
||||
padding: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
|
@ -329,35 +329,35 @@ ul.thin li {
|
||||
|
||||
#searchbars ul {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
text-align: center;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#searchbars ul li {
|
||||
display: inline;
|
||||
margin: 0px 1px;
|
||||
list-style: none;
|
||||
position: relative;
|
||||
list-style: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
#searchbars ul li ul {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
border: 1px solid #B8E8FB;
|
||||
background: #fff;
|
||||
width: 11.5em;
|
||||
margin-top: 5px;
|
||||
z-index: 1000;
|
||||
border: 1px solid #B8E8FB;
|
||||
background: #fff;
|
||||
width: 11.5em;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#searchbars ul li ul li {
|
||||
margin: 0 0 0 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin: 0 0 0 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#searchbars ul li ul li.highlight {
|
||||
|
@ -2,7 +2,7 @@
|
||||
.last_read {width: 15px; height: 15px; background: url(images/go_last_read.png) no-repeat center center; margin-left: 5px;}
|
||||
.last_read a { border: none; width: 100%; height: 100%; display: block; }
|
||||
.last_read a:hover { border: none; }
|
||||
strong.quoteheader {color: #666}
|
||||
strong.quoteheader {color: #666;}
|
||||
|
||||
ul.collage_images {
|
||||
width: 650px !important;
|
||||
@ -14,7 +14,7 @@ ul.collage_images li {
|
||||
}
|
||||
|
||||
ul.collage_images li a {
|
||||
height: 130px !important;
|
||||
height: 130px !important;
|
||||
}
|
||||
|
||||
ul.collage_images img {
|
||||
@ -23,15 +23,15 @@ ul.collage_images img {
|
||||
}
|
||||
|
||||
#drag_drop_textnote ul {
|
||||
padding-left: 25px;
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
|
||||
tr.torrent .bookmark > a:before { content:""; }
|
||||
tr.torrent .bookmark > a:after { content:""; }
|
||||
tr.torrent .bookmark > a:before { content: ""; }
|
||||
tr.torrent .bookmark > a:after { content: ""; }
|
||||
|
||||
.navigation_list li {
|
||||
margin-left: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.linkbox .brackets:before, .linkbox .brackets:after {
|
||||
|
@ -731,7 +731,7 @@ pre {
|
||||
background: url(images/go_last_read.png) no-repeat center center;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.last_read a {
|
||||
.last_read a {
|
||||
border: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -752,7 +752,7 @@ ul.collage_images li {
|
||||
}
|
||||
|
||||
ul.collage_images li a {
|
||||
height: 130px !important;
|
||||
height: 130px !important;
|
||||
}
|
||||
|
||||
ul.collage_images img {
|
||||
@ -761,15 +761,15 @@ ul.collage_images img {
|
||||
}
|
||||
|
||||
#drag_drop_textnote ul {
|
||||
padding-left: 25px;
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
|
||||
tr.torrent .bookmark > a:before { content:""; }
|
||||
tr.torrent .bookmark > a:after { content:""; }
|
||||
tr.torrent .bookmark > a:before { content: ""; }
|
||||
tr.torrent .bookmark > a:after { content: ""; }
|
||||
|
||||
.navigation_list li {
|
||||
margin-left: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.linkbox .brackets:before,
|
||||
|
Loading…
Reference in New Issue
Block a user