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
slot peer class
Controls ·  Search New posts · Mark unread

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

2020-05-12 18:32:34
Pouvez voir le code a ajouter au fichier announce.php car il ne fonctionne pas les torrent ne démarre pas et quand je remet la sauvegarde du fichier announce
.php sa fonctionne, merci d'avance.

Can see the code to add to the file announce.php because it doesn't work the torrent doesn't start and when I put back the save of the file announce.php sa works, thank you in advance.



Run SQL

ALTER TABLE `groups` ADD `maxslots` int(10) NOT NULL DEFAULT '0';



Open admincp.php go near groups management and find...


print("<td class=table_head>Download</td>\n");



Underneath add


print("<td class=table_head>Download Slots</td>\n");




Abit underneath you will find...


print("<td class=table_col1>".$level["can_download"]."</td>\n");






Underneath add


print("<td class=table_col1>".$level["maxslots"]."</td>\n");





Find


<tr><td>Can Download:</td><td>  <?php echo  YES;?> <input type="radio" name="down" value="yes" <?php if  ($level["can_download"]=="yes") echo "checked" ?>  />&nbsp;&nbsp; <?php echo NO;?> <input type="radio"  name="down" value="no" <?php if ($level["can_download"]=="no") echo  "checked" ?> /></td></tr>




Underneath add


<tr><td>Download  Slots:</td><td><input type="text" name="downslots"  value="<?php echo number_format($level["maxslots"]);?>" size="40"  /></td></tr>




Find


$update[]="control_panel='".$_POST["admincp"]."'";




Underneath add


if (is_valid_id($_POST["downslots"]))
            $update[]="maxslots='".$_POST["downslots"]."'";





Find


 $update[]="control_panel='".$level["control_panel"]."'";




Underneath add


$update[]="maxslots='".$level["maxslots"]."'";




open announce.php find...


// FILL $SELF WITH DETAILS FROM PEERS TABLE (CONNECTING PEERS DETAILS)
if (!isset($self)){





Underneath add

if ($MEMBERSONLY){

$query = @mysql_fetch_row(@mysql_query("SELECT COUNT(DISTINCT torrent) FROM `peers` WHERE `userid` = '$userid' AND `seeder`='no'"));




$queries = mysql_query("SELECT `maxslots` FROM `groups` WHERE `group_id` = $user[class]");
$row = mysql_fetch_array($queries);
$maxslot = $row[0];

if ($query[0] >= $maxslot)
err("Maximum Slot exceeded! You may only download $maxslot torrent at a time.");
}






Open login_block.php find


$userratio = "---";



Underneath add


$query = @mysql_fetch_row(@mysql_query("SELECT COUNT(DISTINCT torrent) FROM peers WHERE userid = $CURUSER[id] AND seeder='no'"));
   $slots = number_format($CURUSER["maxslots"]) . "/" . number_format($query[0]);



Find

$userratio


Add after

<BR>Download Slots: $slots
2020-05-13 05:57:13
Does not look like it needs a lot just sqli

In announce it's this line

$query = @mysqli_fetch_row(@SQL_Query_exec("SELECT COUNT(DISTINCT torrent) FROM `peers` WHERE `userid` = '$userid' AND `seeder`='no'"));

$queries = SQL_Query_exec("SELECT `maxslots` FROM `groups` WHERE `group_id` = $user[class]");
$row = mysqli_fetch_array($queries);

In login block this line

@mysqli_fetch_row(@SQL_Query_exec("SELECT COUNT(DISTINCT torrent) FROM peers WHERE userid = $CURUSER[id] AND seeder='no'"));
   $slots = number_format($CURUSER["maxslots"])
2020-05-13 14:01:03
Thank you for the support I just made the modifications and for the file announce.php sa works well the number of slot works correctly but when I replace the code for login_block.php its bug the slot remains at 0/4 the number of download is not displayed
2020-05-18 18:02:44
$query = @mysqli_fetch_row(@SQL_Query_exec("SELECT COUNT(DISTINCT torrent) FROM peers WHERE userid = $CURUSER[id] AND seeder='no'"));
   $slots = number_format($CURUSER["maxslots"]) . "/" . number_format($query[0]);

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2020-05-20 09:14:10
Is this a add-on to original mod, or a support question?
2020-05-20 17:01:05
its in mods in progress so i believe this is the full mod it can be moved to complete if the edits have worked
2020-05-20 17:43:12
Thank you everyone! Thread marked to be moved.
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