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] Auto promote function for functio
Controls ·  Search New posts · Mark unread

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

2020-09-26 13:28:48
Hello after some modifications I share with you the auto promote function which works on the v3, it is configured to have the promotion above the ratio of 1.00 below the ratio of 1.00 you will be demoted to members.

I put you two functions vip and power user


you can change this part of the code if you want to allow more in ratio and replace the 1 by the one of your choice    >>>        uploaded / downloaded) >= 1.0");



in the backend folder open the file cleanup.php and at the end of the file just before ?
add the code ... enjoy


[color=rgb(243, 121, 52)]For the vip function[/color]

####################################
# AUTO PROMOTE MEMBERS VIP #
####################################


$gigs = 25*1073741824; // 25 GB

   $res_premote = SQL_Query_exec("SELECT id FROM users WHERE class = 1 AND uploaded >= $gigs AND (uploaded / downloaded) >= 1.0");

   $time = get_date_time();

   while ($arr_premote = mysqli_fetch_assoc($res_premote)) {

       SQL_Query_exec("UPDATE users SET class = 3 WHERE id = $arr_premote[id]");

       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr_premote[id], '$time', 'You have been automatically promoted from User to Power User, If your ratio drops below 1.00 you will be demoted.', 'You have been promoted to: vip')");

   }

               unset($res_premote,$arr_premote);



   $res_demote = SQL_Query_exec("SELECT id FROM users WHERE class = 3 AND uploaded >= $gigs AND (uploaded / downloaded) <= 1.0");

   while ($arr_demote = mysqli_fetch_assoc($res_demote)) {

       SQL_Query_exec("UPDATE users SET class = 1 WHERE id = $arr_demote[id]");

       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr_demote[id], '$time', 'You have been automatically demoted from Power User to User.', 'You have been demoted to User')");

   }

               unset($res_demote,$arr_demote);

##########################
# END AUTO PROMOTE MEMBERS VIP#
##########################








[color=rgb(243, 121, 52)]For the power users function[/color]

####################################

# AUTO PROMOTE POWER USERS #

####################################

$gigs = 25*1073741824; // 25 GB

   $res_premote = SQL_Query_exec("SELECT id FROM users WHERE class = 1 AND uploaded >= $gigs AND (uploaded / downloaded) >= 1.0");

   $time = get_date_time();

   while ($arr_premote = mysqli_fetch_assoc($res_premote)) {

       SQL_Query_exec("UPDATE users SET class = 2 WHERE id = $arr_premote[id]");

       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr_premote[id], '$time', 'You have been automatically promoted from User to Power User, If your ratio drops below 1.00 you will be demoted.', 'You have been promoted to: vip')");


   }

               unset($res_premote,$arr_premote);




   $res_demote = SQL_Query_exec("SELECT id FROM users WHERE class = 2 AND uploaded >= $gigs AND (uploaded / downloaded) <= 1.0");

   while ($arr_demote = mysqli_fetch_assoc($res_demote)) {

       SQL_Query_exec("UPDATE users SET class = 1 WHERE id = $arr_demote[id]");

       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr_demote[id], '$time', 'You have been automatically demoted from Power User to User.', 'You have been demoted to User')");


   }

               unset($res_demote,$arr_demote);


##########################

# END AUTO PROMOTE POWER USERS #

##########################
2020-09-28 09:43:08
Hello, when a member exchange it's seedbonus points for the vip class with the seedbonus function and the member didn't reach 1GO in upload with the auto promote module function the member is still demoted to the member rank would you have an idea so that the member who has to exchange it's points with the seedbonus to get the vip rank is not demoted with the auto promote function?


Bonjour, quand un membre échange ses points seedbonus pour la classe vip avec la fonction seedbonus et que le membre n'a pas atteint 1GO en upload avec la fonction de promotion automatique, le membre est toujours rétrogradé au rang de membre. Avez-vous une idée pour que le membre qui doit échanger ses points avec le seedbonus pour obtenir le rang vip ne soit pas rétrogradé avec la fonction de promotion automatique ?

)
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