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
User Posts

Go to Profile

theme diablo — 2024-04-18 06:56:36 in v3 Themes
To change theme it should be like this


$ss_r = SQL_Query_exec("SELECT * from stylesheets");
$ss_sa = array();

while ($ss_a = mysqli_fetch_assoc($ss_r)){
$ss_id = $ss_a["id"];
$ss_name = $ss_a["name"];
$ss_sa[$ss_name] = $ss_id;
}

ksort($ss_sa);
reset($ss_sa);

while (list($ss_name, $ss_id) = thisEach($ss_sa)){
if ($ss_id == $CURUSER["stylesheet"]) $ss = " selected='selected'"; else $ss = "";
$stylesheets .= "<option value='$ss_id'$ss>$ss_name</option>\n";
}


?>
<form method="post" action="take-theme.php">
<select name="stylesheet" onchange="this.form.submit();"><?=$stylesheets?></select><input type="hidden" name="Submit" value="ok">
</form>
fix torrents name — 2024-02-08 05:39:48 in v3 Support
in /backend/functions.php find
case 'name':
$char1 = 35; //cut name length

Change "35" with your needs

error when download — 2024-02-04 08:35:13 in v3 Support
i am having an issue for 2 days when i try to download i get this error
Quote:
"error: expected value (list, dict, int or string) in bencoded string"

i have tryed utorrent, qbit, rutorrent same error

EDIT: my bad i have made some mistakes in functions . if someone can close or delete Thank you
search for a torrent — 2024-02-01 12:24:45 in v3 Support
@niki welcome
when you search and have more than 1 torrents in search . Just leave your search-torrents.php here and i will look at it
search for a torrent — 2024-01-30 07:27:17 in v3 Support
maybe try this

<?php
if (!$site_config["MEMBERSONLY"] || $CURUSER) {
begin_block(T_("SEARCH"));
?>
<center>
<form method="get" action="torrents-search.php"><br />
   <img src="images/blocks/headersearch.png">
<input type="text" name="search" size="30" value="<?php echo htmlspecialchars($_GET["search"]); ?>" />
   <img src="images/blocks/in.png"> <select name="cat">
<option value="0">(<?php echo T_("ALL_TYPES"); ?>)</option>
<?php


$cats = genrelist();
$catdropdown = "";
foreach ($cats as $cat) {
$catdropdown .= "<option value=\"" . $cat["id"] . "\"";
if ($cat["id"] == $_GET["cat"])
$catdropdown .= " selected=\"selected\"";
$catdropdown .= ">" . htmlspecialchars($cat["parent_cat"]) . ": " . htmlspecialchars($cat["name"]) . "</option>\n";
}
?>
<?php echo $catdropdown; ?>
</select>
   <img src="images/blocks/&.png"> <select name="incldead">
<option value="1"><?php echo T_("INCLUDE_DEAD"); ?></option>
<option value="0"><?php echo T_("ACTIVE"); ?></option>

<option value="2"><?php echo T_("ONLY_DEAD"); ?></option>
</select>
<?php if ($site_config["ALLOWEXTERNAL"]){?>
<select name="inclexternal">
<option value="0"><?php echo T_("LOCAL"); ?>/<?php echo T_("EXTERNAL"); ?></option>
<option value="1"><?php echo T_("LOCAL_ONLY"); ?></option>
<option value="2"><?php echo T_("EXTERNAL_ONLY"); ?></option>
</select>
<?php } ?>
<input type="submit" value="<?php echo T_("SEARCH"); ?>" />
</form>
</center>
<?php
end_block();
}
?>


but you need to edit torrents_search.php thats why you have more than 1 when you search i had the same problem
This is how i have it
info — 2023-12-31 08:33:47 in v3 Support
Thanks. That is an option but if anybody has an ideea feel free to share
info — 2023-12-24 23:36:54 in v3 Support
there you go. Its not on all just a few of them
info — 2023-12-24 19:10:07 in v3 Support
it is making a picture after the info that i upload

here is what i have in torrent details
///DISPLAY NFO BLOCK
begin_frame("NFO");
   if ($row["nfo"] == "yes") {
    echo('<img src="nfoview.php?id=' . $id . '">');
           }
               else {
                   print(T_("NFO_NOT_FOUND"));
              }      
end_frame();
/// END NFO


and the files attched to it

info — 2023-12-24 09:52:09 in v3 Support
see the info part, there is one line that is huge  and it stresch the whole details page
info — 2023-12-22 12:33:51 in v3 Support
i have an info error , well not quite an error it is just when add info , when it displays in torrent details it makes the page huge
one line is over 1000 caracter long and streches all torrent-details
it is an off-topic but i cant post any code or nothing  , i get MISSING FORM DATA maybe M-jay see maybe it is a questio why last post was 2 weks ago
banned download — 2023-08-29 06:38:35 in v3 Mods Requests
can you try this?


// Unwarned
$timenow = gmtime();


SQL_Query_exec("UPDATE warnings SET active = 'no' WHERE active = 'yes' AND expiry < '".get_date_time()."'");

$res = SQL_Query_exec("SELECT users.id, users.username, warnings.expiry FROM users INNER JOIN warnings ON users.id = warnings.userid WHERE warned = 'yes' AND enabled = 'yes' AND warnings.active = 'yes' AND warnings.type = 'Poor Ratio'");

while ($arr1 = mysqli_fetch_assoc($res)) {
   $user = $arr1["id"];

   $subject = "Your poor ratio warning has been removed";
   $msg = "Congratulations! Your poor ratio warning has been removed. You can now download again.";

   // Get the user's current ratio
   $query = "SELECT users.uploaded, users.downloaded
             FROM users
             WHERE users.id = $user";

   $result = SQL_Query_exec($query);
   $data = mysqli_fetch_assoc($result);

   $uploaded = $data['uploaded'];
   $downloaded = $data['downloaded'];

   if ($downloaded > 0) {
       $userRatio = $uploaded / $downloaded;
   } else {
       $userRatio = 0;
   }

 
   $minRatio = $site_config['ratiowarn_minratio'];

   if ($userRatio >= $minRatio) {
       
       SQL_Query_exec("UPDATE users SET warned = 'no' WHERE id = $user");

       
       if ($site_config["ratiowarn_enable"] && $site_config["ratiowarn_daystowarn"] > 0) {
           SQL_Query_exec("UPDATE users SET downloadbanned = 'no' WHERE id = $user");
       }

       // Insert a message to notify the user
       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES (0, $user, '".get_date_time()."', ".sqlesc($subject).", ".sqlesc($msg).", 1)");
   }
}
can you try this?
//start parked
$parked1 = sqlesc(get_date_time(gmtime() - 86400*92));
$res = SQL_Query_exec("SELECT id, username, modcomment FROM users WHERE parked='no' AND enabled ='yes'  AND last_access < $parked1 ");
if (mysqli_num_rows($res) > 0) {
   $dt = sqlesc(get_date_time()); // Corrected placement of the curly brace
   
   while ($arr = mysqli_fetch_assoc($res)) {
       $modcomment = $arr['modcomment'];
       $modcomment3 = gmdate("Y-m-d") . " Account auto parked .";
       $modcomment = $modcomment3 . "\n" . $modcomment; // Changed "n" to "\n" for a new line
       $modcom = sqlesc($modcomment);
       SQL_Query_exec("UPDATE users SET parked = 'yes' , modcomment = $modcom WHERE id = $arr[id]");
       write_log("<b><font color=red>Inactive account:</font> <a href=account-details.php?id=$arr[id]><font color=green><b>$arr[username]</b></font></a> Account auto parked.</b>");
   }
}
//end parked
Be more explicit what bugs?
If you reffer to this
modcomment=? WHERE id=?
it is not a bug. let me try to explain why is like this

The modcomment=? WHERE id=? part is a prepared statement that uses placeholders denoted by ?. The use of prepared statements and placeholders is a security measure to prevent SQL injection attacks.

The placeholders ? are used to indicate where the actual values will be inserted into the query. In this case, there are two placeholders: modcomment=? and WHERE id=?. :)

After preparing the query, the parameters (values) to be inserted into the query are "bound" to the placeholders. The line mysqli_stmt_bind_param($stmt, "si", $modcom, $userId); does this binding. The first argument "si" is a string that defines the types of the parameters: "s" for a string (modcomment) and "i" for an integer (userId). The subsequent arguments ($modcom and $userId) are the actual values that will be inserted into the query. The values are bound to the placeholders, and the prepared statement ensures that they are properly escaped and quoted as needed.

By using prepared statements with bound parameters, the code ensures that any user data used in the SQL query is treated as data rather than executable code, thus preventing SQL injection attacks. It is considered a best practice for interacting with databases in web applications to enhance security.

Hope i have been explicit enough

Auto parked account i did it quiqly offcourse it can be done more good
Something like this.
Additionally, i cast the user ID to an integer using (int) to prevent SQL injection risks.

// Start parked
$parked1 = get_date_time(gmtime() - 86400 * 364);  // 364 - 52 weeks
$parked1 = sqlesc($parked1);
$res = SQL_Query_exec("SELECT id, username, modcomment FROM users WHERE parked='no' AND enabled='yes' AND last_access < $parked1");
if (mysqli_num_rows($res) > 0) {
   while ($arr = mysqli_fetch_assoc($res)) {
       $modcomment = $arr['modcomment'];
       $modcomment3 = gmdate("Y-m-d") . " Account auto parked .";
       $modcomment = $modcomment3 . "\n" . $modcomment; // Use "\n" for a new line
       $modcom = sqlesc($modcomment);


       $userId = (int)$arr['id']; // Cast to integer for safety
       $updateQuery = "UPDATE users SET parked='yes', modcomment=? WHERE id=?";
       $stmt = mysqli_prepare($dbconn, $updateQuery);
       mysqli_stmt_bind_param($stmt, "si", $modcom, $userId);
       mysqli_stmt_execute($stmt);


       $username = $arr['username'];
       write_log("<b><font color=red>Inactive account:</font> <a href=account-details.php?id=$userId><font color=green><b>$username</b></font></a> Account auto parked.</b>");
   }
}
// End parked
@Botanicar i can try and help you how i did it
ALTER TABLE users ADD parked enum ('yes','no') NOT NULL default 'no';


in announce.php:
find
$userfields = "u.id, u.class, u.uploaded, u.downloaded, u.ip, u.passkey,

after add
parked


still iun announce litle bit down find:
if (!$user)
err("Cannot locate a user with that passkey!");

add
if ($user["parked"] == "yes")
err("Error, your account is parked! Please read the FAQ!");


in account.php where ever you want to show add:
print ("<TR><TD align=right class=table_col2><B>Account Parked:</B> </td><td class=table_col2><input type=radio name=parked" . ($CURUSER["parked"] == "yes" ? " checked" : "") . " value=yes><B>Yes</B> <input type=radio name=parked" .  ($CURUSER["parked"] == "no" ? " checked" : "") . " value=no><B>No</B><br><i>You can park your account to prevent it from being deleted because of inactivity if you go away on for example a vacation. When the account has been parked limits are put on the account, for example you cannot use the tracker and browse some of the pages.</i></td></tr>");

still account find
$acceptpms = $_POST["acceptpms"];

add after
$parked = $_POST["parked"];

find:
$updateset[] = "title = ".sqlesc($title);

add after:
$updateset[] = "parked = " . sqlesc($parked);

Save.

in admincp.php add
<td align=center><a href=admincp.php?action=parked><img src=images/admin/confirmaccounts.gif border=0 width=32 height=32><br><center><b>Parked<BR>Users</center></b></a><BR></td>


still in admin cp just before last ?>
   #======================================================================#

#   Parked users

#======================================================================#



if ($action == "parked") {

if ($CURUSER["class"] < "9"){

show_error_msg("Error","Sorry you do not have the rights to view this page!",1);

}

stdhead("Parked Users Management");

navmenu();





$res2 = SQL_Query_exec("SELECT COUNT(*) FROM users WHERE parked='yes'");

$row = mysqli_fetch_array($res2);

$count = $row[0];



$perpage = 50;



list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "admincp.php?action=parked&");



begin_frame("Parked Users Management");



echo $pagertop;

?>

<CENTER><table align=center cellpadding="0" cellspacing="0" class="table_table" width="100%" border="1">

<tr>

<td class=table_head align=center>Username</td>

<td class=table_head align=center>Added</td>

<td class=table_head align=center>Last Visit</td>

<td class=table_head align=center>Uploaded</td>

<td class=table_head align=center>Downloaded</td>

<td class=table_head align=center>Edit?</td>

</tr>

<?



$rqq = "SELECT id, username, last_access, added, uploaded, downloaded FROM users WHERE parked='yes' ORDER BY username $limit ";

$resqq = SQL_Query_exec($rqq);



while ($row = mysqli_fetch_array($resqq)){

extract ($row);



echo "<tr><td class=table_col1><a href=account-details.php?id=$row[id]>$row[username]</a></td><td class=table_col2>".utc_to_tz($row['added'])."</td><td class=table_col1>$row[last_access]</td><td class=table_col2>".mksize($row["uploaded"])."</td><td class=table_col1>".mksize($row["downloaded"])."</td><td class=table_col2><a href=account-details.php?id=$row[id]>EDIT</a></td></tr>\n";

}



echo "</table></CENTER>\n";



print($pagerbottom);



end_frame();

stdfoot();

}

#======================================================================#

#  End Parked users

#======================================================================#


in function.php before last ?> add

function parked() {

 global $CURUSER;

 if ($CURUSER["parked"] == "yes")

show_error_msg("Error", "your account is parked.", 1);

}



in torrents.php, torrent-search.php, and all the pages you want to add the parked just add after loggedinonly();
parked();


Additional if they are parked and you dont want to get warn or not to be autodisable add in cleanup.php

AND parked = 'no'

in query

Add image in images/admin

Hope i didnt forget anything


try this
$maxdt = sqlesc(get_date_time(gmtime() - 86400*60));

$res = SQL_Query_exec("SELECT id, username, modcomment FROM users WHERE parked='no' AND enabled ='yes'  AND last_access != '0000-00-00 00:00:00' AND last_access < $maxdt ");

if (mysqli_num_rows($res) > 0)

{

$dt = sqlesc(get_date_time());


while ($arr = mysqli_fetch_assoc($res))

{
        $modcomment = $row['modcomment'];

      $modcomment3 = gmdate("Y-m-d") . " Account auto parked .";

      $modcomment = $modcomment3 . "n" . $modcomment;

      $modcom = sqlesc($modcomment);



SQL_Query_exec("UPDATE users SET parked = 'yes' , modcomment = $modcom WHERE id = $arr[id]");
    write_log("<a href=account-details.php?id=$arr[id]><b>$arr[username]</b></a> Account auto parked.");
 


}
there you go it is after 60 days, you can change that

$maxdt = sqlesc(get_date_time(gmtime() - 86400*60));

$res = SQL_Query_exec("SELECT id, username, modcomment FROM users WHERE parked='no' AND enabled ='yes'  AND last_access < $maxdt ");

if (mysqli_num_rows($res) > 0)

{

$dt = sqlesc(get_date_time());


while ($arr = mysqli_fetch_assoc($res))

{
        $modcomment = $row['modcomment'];

      $modcomment3 = gmdate("Y-m-d") . " Account auto parked .";

      $modcomment = $modcomment3 . "n" . $modcomment;

      $modcom = sqlesc($modcomment);



SQL_Query_exec("UPDATE users SET parked = 'yes' , modcomment = $modcom WHERE id = $arr[id]");
    write_log("<a href=account-details.php?id=$arr[id]><b>$arr[username]</b></a> Account auto parked.");
 


}

Error sql — 2023-07-24 14:08:49 in v3 Support
it is your announce just modified , at least tried to do that line what your sql error was
maybe this helps
$uid = mysqli_real_escape_string($GLOBALS["DBconnector"], $CURUSER["id"]);
$jquery = SQL_Query_exec("SELECT COUNT(`hnr`) FROM `snatched` WHERE `uid` = '$uid' AND `hnr` = 'yes'");
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728