diff --git a/classes/class_torrent.php b/classes/class_torrent.php index 8e9b8251..966486b2 100644 --- a/classes/class_torrent.php +++ b/classes/class_torrent.php @@ -256,18 +256,21 @@ function file_list() { $FileList[]= array($this->Val['info']->Val['length'], $this->Val['info']->Val['name']); } else { // Multiple file mode $FileNames = array(); + $FileSizes = array(); $TotalSize = 0; $Files = $this->Val['info']->Val['files']->Val; foreach($Files as $File) { - $TotalSize+=$File->Val['length']; + $TotalSize += $File->Val['length']; $FileSize = $File->Val['length']; $FileName = ltrim(implode('/',$File->Val['path']->Val), '/'); - - $FileList[] = array($FileSize, $FileName); + $FileSizes[] = $FileSize; $FileNames[] = $FileName; } - array_multisort($FileNames, $FileList); + natcasesort($FileNames); + foreach($FileNames as $Index => $FileName) { + $FileList[] = array($FileSizes[$Index], $FileName); + } } return array($TotalSize, $FileList); } diff --git a/classes/class_torrent_32bit.php b/classes/class_torrent_32bit.php index 78bdff75..2afb118e 100644 --- a/classes/class_torrent_32bit.php +++ b/classes/class_torrent_32bit.php @@ -77,11 +77,15 @@ class BENCODE { var $Pos = 1; // Pointer that indicates our position in the string var $Str = ''; // Torrent string - function BENCODE($Val){ - $this->Str = $Val; - $this->dec(); + function __construct($Val, $IsParsed = false){ + if(!$IsParsed) { + $this->Str = $Val; + $this->dec(); + } else { + $this->Val = $Val; + } } - + // Decode an element based on the type function decode($Type, $Key){ if(ctype_digit($Type)) { // Element is a string @@ -248,16 +252,21 @@ function file_list() { $TotalSize = substr($this->Val['info']->Val['length'],7); $FileList[]= array($TotalSize, $this->Val['info']->Val['name']); } else { // Multiple file mode + $FileNames = array(); + $FileSizes = array(); $TotalSize = 0; $Files = $this->Val['info']->Val['files']->Val; foreach($Files as $File) { - $TotalSize+=substr($File->Val['length'], 7); - $FileSize = substr($File->Val['length'],7); - - $FileName = implode('/',$File->Val['path']->Val); - - $FileList[]=array($FileSize, $FileName); + $FileSize = substr($File->Val['length'], 7); + $TotalSize += $FileSize; + $FileName = ltrim(implode('/',$File->Val['path']->Val), '/'); + $FileSizes[] = $FileSize; + $FileNames[] = $FileName; + } + natcasesort($FileNames); + foreach($FileNames as $Index => $FileName) { + $FileList[] = array($FileSizes[$Index], $FileName); } } return array($TotalSize, $FileList); diff --git a/sections/forums/index.php b/sections/forums/index.php index b2cf0d53..4e15ff7d 100644 --- a/sections/forums/index.php +++ b/sections/forums/index.php @@ -74,7 +74,10 @@ break; case 'add_poll_option': require(SERVER_ROOT.'/sections/forums/add_poll_option.php'); - break; + break; + case 'warn': + require(SERVER_ROOT.'/sections/forums/warn.php'); + break; case 'take_warn': require(SERVER_ROOT.'/sections/forums/take_warn.php'); break; diff --git a/sections/forums/take_warn.php b/sections/forums/take_warn.php index 38be4132..e4db2c93 100644 --- a/sections/forums/take_warn.php +++ b/sections/forums/take_warn.php @@ -11,6 +11,12 @@ $UserID = (int)$_POST['userid']; $Key = (int)$_POST['key']; $SQLTime = sqltime(); + +$UserInfo = user_info($UserID); +if($UserInfo['Class'] > $LoggedUser['Class']) { + error(403); +} + $URL = "https://".SSL_SITE_URL."/forums.php?action=viewthread&postid=$PostID#post$PostID"; if ($Length != 'verbal') { $Time = ((int)$Length) * (7 * 24 * 60 * 60); diff --git a/sections/forums/thread.php b/sections/forums/thread.php index 9f9b3378..e5b9827d 100644 --- a/sections/forums/thread.php +++ b/sections/forums/thread.php @@ -412,9 +412,15 @@ if(check_perms('users_warn') && $AuthorID != $LoggedUser['ID']) { $AuthorInfo = user_info($AuthorID); if($LoggedUser['Class'] >= $AuthorInfo['Class']) { ?> - - [Warn] -" method="post"> + + + + + + - [Warn] + +   diff --git a/sections/forums/warn.php b/sections/forums/warn.php index 6f2a1e1f..bc161478 100644 --- a/sections/forums/warn.php +++ b/sections/forums/warn.php @@ -1,9 +1,9 @@ query("SELECT p.Body, t.ForumID diff --git a/sections/reportsv2/array.php b/sections/reportsv2/array.php index 2c8740c3..dcd6039f 100644 --- a/sections/reportsv2/array.php +++ b/sections/reportsv2/array.php @@ -235,7 +235,8 @@ 'reason' => '-1', 'title' => 'Bonus Tracks Only', 'report_messages' => array( - 'If possible, please provide a link to Amazon.com or another source showing the proper track listing.' + 'If possible, please provide a link to Amazon.com or another source showing the proper track listing.', + 'Per rule 2.4.5, exclusive WEB-sourced bonus tracks are allowed to be uploaded separately.' ), 'report_fields' => array( 'track' => '0', diff --git a/sections/stats/torrents.php b/sections/stats/torrents.php index a6c35ed9..0a4d19e7 100644 --- a/sections/stats/torrents.php +++ b/sections/stats/torrents.php @@ -60,11 +60,11 @@

Uploads by month

- + User Flow Chart

Torrents by category

- +

User Flow

- + User Flow Chart

User Classes

- + User Class Distribution

User Platforms

- + User Platform Distribution

User Browsers

- + User Browsers Market Share

Geographical Distribution Map

- - + Geographical Distribution Map - Worldwide + Geographical Distribution Map - Europe
- - + Geographical Distribution Map - South America + Geographical Distribution Map - Asia
- - + Geographical Distribution Map - Africa + Geographical Distribution Map - Middle East
- + Number of users by country
= $AuthorInfo['Class']) { ?> - - [Warn] +
+ + + + + +
+ - [Warn] + - [Quote] diff --git a/sections/torrents/take_warn.php b/sections/torrents/take_warn.php index cfdbfb0f..ac647010 100644 --- a/sections/torrents/take_warn.php +++ b/sections/torrents/take_warn.php @@ -12,6 +12,10 @@ $UserID = (int)$_POST['userid']; $Key = (int)$_POST['key']; $SQLTime = sqltime(); +$UserInfo = user_info($UserID); +if($UserInfo['Class'] > $LoggedUser['Class']) { + error(403); +} $URL = "https://". SSL_SITE_URL."/torrents.php?id=$GroupID&postid=$PostID#post$PostID"; if ($Length != 'verbal') { $Time = ((int)$Length) * (7 * 24 * 60 * 60); diff --git a/sections/torrents/warn.php b/sections/torrents/warn.php index a34f6067..64d7931f 100644 --- a/sections/torrents/warn.php +++ b/sections/torrents/warn.php @@ -1,11 +1,11 @@ query("SELECT tc.Body,