diff --git a/sections/tools/data/common_snatches.php b/sections/tools/data/common_snatches.php
deleted file mode 100644
index 2706f923..00000000
--- a/sections/tools/data/common_snatches.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
- User A |
- User B |
- Limit |
-
-
-
-
-
-
-
-
-if(isset($_POST['compare'])) {
- if (isset($_POST['userida']) && is_numeric($_POST['userida']) && isset($_POST['useridb']) && is_numeric($_POST['useridb'])) {
- $UserIDA = (int) $_POST['userida'];
- $UserIDB = (int) $_POST['useridb'];
- if(isset($_POST['limit']) && is_numeric($_POST['limit'])) {
- $Limit = 'LIMIT ' . $_POST['limit'];
- }
- $DB->query("SELECT g.ID, g.Name FROM torrents AS t INNER JOIN torrents_group AS g ON g.ID = t.GroupID JOIN xbt_snatched AS xs ON xs.fid=t.ID WHERE xs.uid IN ($UserIDA,$UserIDB) HAVING COUNT(xs.fid) > 1 ORDER BY xs.tstamp DESC $LIMIT");
-?>
-
-
- Torrent |
-
-
-
- while(list($GroupID, $GroupName) = $DB->next_record()) {
-?>
-
-
- =$GroupName?>
- |
-
-
- }
-?>
-
-
- }
-}
-
-View::show_footer();
-?>
diff --git a/sections/tools/managers/eb.php b/sections/tools/managers/eb.php
index d3da8997..14a30ac5 100644
--- a/sections/tools/managers/eb.php
+++ b/sections/tools/managers/eb.php
@@ -1,67 +1,81 @@
-if (!check_perms('users_view_email')) { error(403);
+define('EMAILS_PER_PAGE', 25);
+if (!check_perms('users_view_email')) {
+ error(403);
}
+list($Page, $Limit) = Format::page_limit(EMAILS_PER_PAGE);
View::show_header('Manage email blacklist');
-$DB -> query("SELECT
+$DB->query("SELECT
+ SQL_CALC_FOUND_ROWS
eb.ID,
eb.UserID,
eb.Time,
eb.Email,
eb.Comment
FROM email_blacklist AS eb
- ORDER BY eb.Time DESC");
+ ORDER BY eb.Time DESC LIMIT $Limit");
+$Results = $DB->to_array(false, MYSQLI_ASSOC, false);
+$DB->query("SELECT FOUND_ROWS()");
+list($NumResults) = $DB->next_record();
?>
+
-
- Email |
- Comment |
- Added |
- Submit |
-
-
- Add Email or Domain to Blacklist |
-
-
-
-
- while(list($ID, $UserID, $Time, $Email, $Comment) = $DB->next_record()) {
+
+ Email |
+ Comment |
+ Added |
+ Submit |
+
+
+ Add Email or Domain to Blacklist |
+
+
+
+
+ foreach($Results as $Result) {
?>
-
-
-
- }?>
+
+
+
+ }?>
- View::show_footer();?>
+ View::show_footer(); ?>
diff --git a/sections/torrents/details.php b/sections/torrents/details.php
index 4aa1c6f4..a5ef26e2 100644
--- a/sections/torrents/details.php
+++ b/sections/torrents/details.php
@@ -585,7 +585,7 @@ function filelist($Str) {
(View snatch list)
} ?>
(View file list)
- if($Reported) { ?>
+ if($Reported) { ?>
(View report information)
} ?>
@@ -593,8 +593,7 @@ function filelist($Str) {
=$FileList?>
-
- if($Reported) { ?>
+ if($Reported) { ?>
=$ReportInfo?>
} ?>
if(!empty($Description)) {
diff --git a/static/functions/browse.js b/static/functions/browse.js
index ea6b8c44..51a16b57 100644
--- a/static/functions/browse.js
+++ b/static/functions/browse.js
@@ -17,7 +17,6 @@ function show_peers (TorrentID, Page) {
$('#downloads_' + TorrentID).hide();
$('#files_' + TorrentID).hide();
$('#reported_' + TorrentID).hide();
- $('#spectrals_' + TorrentID).hide();
}
function show_snatches (TorrentID, Page){
@@ -39,7 +38,6 @@ function show_snatches (TorrentID, Page){
$('#downloads_' + TorrentID).hide();
$('#files_' + TorrentID).hide();
$('#reported_' + TorrentID).hide();
- $('#spectrals_' + TorrentID).hide();
}
function show_downloads (TorrentID, Page){
@@ -61,7 +59,6 @@ function show_downloads (TorrentID, Page){
$('#snatches_' + TorrentID).hide();
$('#files_' + TorrentID).hide();
$('#reported_' + TorrentID).hide();
- $('#spectrals_' + TorrentID).hide();
}
function show_files(TorrentID){
@@ -70,7 +67,6 @@ function show_files(TorrentID){
$('#snatches_' + TorrentID).hide();
$('#downloads_' + TorrentID).hide();
$('#reported_' + TorrentID).hide();
- $('#spectrals_' + TorrentID).hide();
}
function show_reported(TorrentID){
@@ -79,33 +75,6 @@ function show_reported(TorrentID){
$('#snatches_' + TorrentID).hide();
$('#downloads_' + TorrentID).hide();
$('#reported_' + TorrentID).toggle();
- $('#spectrals_' + TorrentID).hide();
-}
-
-function show_spectrals (TorrentID){
- $('#snatches_' + TorrentID).hide();
- $('#peers_' + TorrentID).hide();
- $('#downloads_' + TorrentID).hide();
- $('#files_' + TorrentID).hide();
- $('#reported_' + TorrentID).hide();
-
- $('#spectrals_' + TorrentID).toggle();
- ajax.get('http://archive.org/~abuie/spectral.php?q=' + TorrentID,function(response){
- var json = JSON.parse(response);
- html = "
Loading..."
- $('#spectrals_' + TorrentID).show().raw().innerHTML=html;
- if(json['status']['state'] == 'success') {
- for (var i = 0; i < json['count']; i++) {
- html += "";
- html += "
";
- }
- }
- else {
- html = "
Error: " + json['status']['reason'] + ""
- }
- $('#spectrals_' + TorrentID).show().raw().innerHTML=html;
- });
-
}
function add_tag(tag) {