Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[HACK] List of Dead Torrents
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods Completed

2019-08-11 11:52:18
Hi

Author : BigMax1
Link : Here
Edit By : Spiritblue
SQL : No

Creation of BigMax1 and it was for the external torrent and on my side I needed only the internal torrent.


Go...

Create a file named "torrents-dead.php" and add to the root of your site:


<?php
require_once("backend/functions.php");
dbconn();

   if ($CURUSER["control_panel"] != "yes") { show_error_msg(T_("ERROR"), T_("SORRY_NO_RIGHTS_TO_ACCESS"), 1); }

   $page = (int) $_GET["page"];
   $perpage = 50;

   $res2 = SQL_Query_exec("SELECT COUNT(*) FROM torrents WHERE banned = 'no' AND seeders < 1");
   $row2 = mysqli_fetch_array($res2);
   $count = $row2[0];

   list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "torrents-dead.php?id=$id&amp;");

   $res = SQL_Query_exec("SELECT torrents.id, torrents.name, torrents.owner, torrents.external, torrents.size, torrents.seeders, torrents.leechers, torrents.times_completed, torrents.added, torrents.last_action, users.username FROM torrents LEFT JOIN users ON torrents.owner = users.id WHERE torrents.banned = 'no' AND torrents.seeders < 1 ORDER BY torrents.added DESC $limit");
 
   if ($_POST["do"] == "delete") {
       if (!@count($_POST["torrentids"]))
           show_error_msg("Error", "<div style='margin-top:10px; margin-bottom:10px' align='center'>You must select at least one torrent.  &nbsp; [<a href='torrents-dead.php'><b>Return </b></a>]</div>", 1);
       foreach ($_POST["torrentids"] as $id) {
           deletetorrent(intval($id));
           write_log("<a href=account-details.php?id=$CURUSER[id]><b>$CURUSER[username]</b></a>deleted the torrent ID : [<b>$id</b>]of the page: <i><b>Dead Torrents </b></i>");
       }
       autolink("torrents-dead.php", "The selected torrent has been successfully deleted .");
   }
 
   stdhead("Dead Torrents");

   if ($count < 1) show_error_msg("".T_("NOTHING_FOUND")."", "<div style='margin-top:10px; margin-bottom:10px' align='center'><font size='2'><i>...No Dead Torrents !</i></font></div>", 1);

   begin_frame("The Dead Torrents");

   echo "<div style='margin-top:10px' align='center'><font size='4'>List of dead torrents without being shared and sorted by date of sharing </font></div>";

   echo "<hr class='barre'/><div style='margin-top:16px; margin-bottom:20px' align='center'><font size='4'>We have<font color='IndianRed'><b>$count</b></font> DEAD".($count != 1 ? "s" : "")." torrent".($count != 1 ? "s" : "")."</font></div>";

   If ($count > $perpage) { print($pagertop);
   print("<br />");
   }
 
   ?>
   <form id="myform" method='post' action='torrents-dead.php'>
   <input type='hidden' name='do' value='delete' />
   <table cellpadding="5" cellspacing="0" class="table_table" align="center" width="98%">
       <tr>
           <th class="table_head" align="left"><?php echo T_("TORRENT_NAME"); ?></th>
           <th class="table_head" align="left"><?php echo T_("UPLOADER"); ?></th>
           <th class="table_head"><?php echo T_("SIZE"); ?></th>
           <th class="table_head"><img src="images/seed.gif" border="0" title="Seeders"></th>
           <th class="table_head"><img src="images/leech.gif" border="0" title="Leechers"></th>
           <th class="table_head"><img src="images/ready.png" border="0" title="Completed"></th>
           <th class="table_head" width="1%"><?php echo T_("ADDED"); ?></th>
           <th class="table_head" width="1%"><?php echo T_("LAST_ACTION"); ?></th>
       <?php if (get_user_class() >= 6) { ?>
           <th class='table_head'><input type='checkbox' name='checkall' onclick='checkAll(this.form.id);' /></th>
       <?php } ?>
       </tr>  

       <?php
   while ($row = mysqli_fetch_assoc($res))
   {
       if ($row["username"]) $owner = "<a href='account-details.php?id=".$row["owner"]."'><b>".$row["username"]."</b></a>";
       else $owner = T_("UNKNOWN_USER");
       ?>

       <tr>
           <td class="table_col1"><a href="torrents-details.php?id=<?php echo $row["id"]; ?>"><?php echo CutName(htmlspecialchars($row["name"]), 50) ?></a></td>
           <td class="table_col2"><?php echo $owner; ?></td>
           <td class="table_col2" align="center"><?php echo mksize($row["size"]); ?></td>
           <td class="table_col1" align="center"><font color="limegreen"><b><?php echo number_format($row["seeders"]); ?></b></font></td>
           <td class="table_col2" align="center"><font color="red"><b><?php echo number_format($row["leechers"]); ?></b></font></td>
           <td class="table_col1" align="center"><font color="#0080FF"><b><?php echo number_format($row["times_completed"]); ?></b></font></td>
           <td class="table_col2" align="center"><?php echo date("d.M.Y H:i", utc_to_tz_time($row["added"])) ?></td>
           <td class="table_col2" align="center"><?php echo date("d.M.Y H:i", utc_to_tz_time($row["last_action"])) ?></td>
       <?php if (get_user_class() >= 6) { ?>
           <td class='table_col2' align='center'><input type='checkbox' name='torrentids[]' value='<?php echo $row["id"]; ?>' /></td>
       <?php } ?>
       </tr>    

   <?php
   }
   ?>
   </table>
   <?php if (get_user_class() >= 6) { ?>
       <div style='margin-top:3px' align='right'><input type='submit' value='Remove The Checks ' />&nbsp;</div>
   <?php } ?>
   </form>
   <?php
   If ($count > $perpage) { print($pagerbottom); } else { print("<br />"); }

   end_frame();
   stdfoot();
?>



Add to your lang file :

$LANG["TORRENT_NAME"] = "Torrent Name";
$LANG["UPLOADERS"] = "Uploader";
$LANG["SIZE"] = "Size";
$LANG["ADDED"] = "Add";
$LANG["LAST_ACTION"] = "last&nbsp;Action";
$LANG["UNKNOWN_USER"] = "Unknown member ";
$LANG["NOTHING_FOUND"] = "Nothing was found ";
$LANG["ERROR"] = "Error";
$LANG["SORRY_NO_RIGHTS_TO_ACCESS"] = "Sorry, you are not allowed to access this page !";



~ Add the three images in your folder named "images"
images.zip
Download

2020-08-01 10:40:47
added this to languages
// Dead torrent
$LANG["TORRENT_NAME"] = "Torrent Name";
$LANG["UPLOADERS"] = "Uploader";
$LANG["SIZE"] = "Size";
$LANG["ADDED"] = "Add";
$LANG["LAST_ACTION"] = "last&nbsp;Action";
$LANG["UNKNOWN_USER"] = "Unknown member ";
$LANG["NOTHING_FOUND"] = "Nothing was found ";
$LANG["ERROR"] = "Error";
$LANG["SORRY_NO_RIGHTS_TO_ACCESS"] = "Sorry, you are not allowed to access this page !";
$LANG["torrents_dead"] = "torrents dead";


added to admincp.php
   <td align="center"><a href="torrents-dead.php"><img src="images/admin/torrents-dead.png" border="0" width="32" height="32" alt="" /><br /><?php echo T_("torrents_dead"); ?></a><br /></td>


add image to images/admin/
torrents-dead.png
torrents-dead.png
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728