Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Torrent Trader (http://www.bvlist.com/forumdisplay.php?f=29)
-   -   Seeders_wanted_mod (http://www.bvlist.com/showthread.php?t=12600)

hax0r 19th September 2022 10:53

Seeders_wanted_mod
 
sqlesc required?! Just asking as scanning through blocks.php
Code:

if($CURUSER)
if (!$site_config["MEMBERSONLY"] || $CURUSER) {
        begin_block(T_("SEEDERS_WANTED"));

        $external = "external = 'no'";
        // Uncomment below to include external torrents
        $external = 1;

        $expires = 600; // Cache time in seconds
        if (($rows = $TTCache->Get("seedwanted_block", $expires)) === false) {
                $res = SQL_Query_exec("SELECT id, name, seeders, leechers FROM torrents WHERE seeders = 0 AND leechers > 0 AND banned = 'no' AND ".sqlesc($external)." ORDER BY leechers DESC LIMIT 5");
                $rows = array();

                while ($row = mysqli_fetch_assoc($res)) {
                        $rows[] = $row;
                }

                $TTCache->Set("seedwanted_block", $rows, $expires);
        }


        if (!$rows) {
                echo "".T_("NOTHING_FOUND")."";
        } else {
                echo "
    \n";
                    foreach ($rows as $row) {
                            $char1 = 18; //cut length
                            $smallname = htmlspecialchars(CutName($row["name"], $char1));
                            echo "
  • $smallname - [".T_("LEECHERS").": " . number_format($row["leechers"]) . "]
  • \n";
                    }
            echo "
\n";
        }
        end_block();
}
?>


EagleLake 4th October 2022 01:16

hello



create name this seedwanted_block.php into folder blocks



Get("seedwanted_block", $expires)) === false) { $res = SQL_Query_exec("SELECT id, name, seeders, leechers FROM torrents WHERE seeders = 0 AND leechers > 0 AND banned = 'no' AND ".sqlesc($external)." ORDER BY leechers DESC LIMIT 5"); $rows = array(); while ($row = mysqli_fetch_assoc($res)) { $rows[] = $row; } $TTCache->Set("seedwanted_block", $rows, $expires); } if (!$rows) { echo "
".T_("NOTHING_FOUND")."
"; } else { echo "
    \n"; foreach ($rows as $row) { $char1 = 18; //cut length $smallname = htmlspecialchars(CutName($row["name"], $char1)); echo "
  • $smallname
    - [".T_("LEECHERS").": " . number_format($row["leechers"]) . "]
  • \n"; } echo "
\n"; } end_block(); } ?>

BamBam0077 26th December 2022 13:13

Thank You :gum:


All times are GMT +2. The time now is 01:48.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.