ok try this the only problem i see so far is that it does not send a message to the user.
in cleanup.php find:
//REMOVE WARNING
$res1 = mysql_query("SELECT id,username FROM users WHERE warned = 'yes' AND enabled='yes' AND uploaded / downloaded >= $minratio AND downloaded >= $downloaded");
if (mysql_num_rows($res1) > 0){
$timenow = get_date_time();
$reason = "Your warning of low ratio has been removed. We highly recommend you to keep a your ratio up to not be warned again.\n";
while ($arr1 = mysql_fetch_assoc($res1)){
write_log("Auto Leech warning has been removed for: <a href=account-details.php?id=".$arr1["id"].">".$arr1["username"]."</a>");
mysql_query("UPDATE users SET warned = 'no' WHERE id = '".$arr["id"]."'");
mysql_query("UPDATE warnings SET expiry = '".$timenow."' WHERE userid = '".$arr["id"]."'");
mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES ('0', '".$arr["id"]."', '".$timenow."', '".$reason."', '0')");
}
}
add after:
// promote to power users
$res = mysql_query("SELECT id,username FROM users WHERE class = 1 AND uploaded >= $promotegigs AND downloaded >= $minratio ");
if (mysql_num_rows($res) > 0)
{
$timenow = get_date_time();
$reason = sqlesc("You have been auto-promoted from User to Power User \n");
while ($arr = mysql_fetch_assoc($res))
{
mysql_query("UPDATE users SET class = 2 WHERE id = $arr[id]");
mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES('0', '".$arr["id"]."', '".$timenow."', '".$reason."', '0')");
}
}
ok now open config.php and find:
$site_config["ratiowarn_daystowarn"] = 14; //Days to ban
add after:
$site_config["ratiowarn_promote"] = true; //Promote power user
$site_config["ratiowarn_promotegigs"] = 25; //Min GB Promote
now that should be it. i know it is ratio warn but i just decided to use that part for promotion also. you can adjust the ratio where you see the minratio in the config.php also you can change the number of gigs with the promotegigs. i hope it works for you enjoy B)