case 'tube':
if ($row["tube"])
print("<td class='ttable_colx1' align='center'><a rel=\"prettyPhoto\" href=".$row['tube']."><".htmlspecialchars($row['tube'])."><img src='".$site_config['SITEURL']."/images/youtube/youtube1.png' border='0' width='41' height='38' alt=\"Watch this Video!\" title=\"".T_("VIDEO_WATCH_THIS_VIDEO")."\" /></a></td>");
else
print("<td class='ttable_colx1' align='center'><img src='".$site_config['SITEURL']."/images/youtube/youtube2.png' border='0' width='41' height='38' alt=\"No Video to watch!\" title=\"".T_("VIDEO_NONE_VIDEO_TO_WATCH")."\" /></td>");
$LANG["VIDEO_NONE_VIDEO_TO_WATCH"] = "Pas de Bande annonce sur Youtube!";
$LANG["VIDEO_WATCH_THIS_VIDEO"] = "Voir la Bande annonce sur Youtube!";
case 'tube':
if ($row["tube"])
print("<td class='ttable_col$x' align='center'><a rel=\"prettyPhoto\" href=".$row['tube']." ><".htmlspecialchars($row['tube'])."><img src='" . $site_config['SITEURL'] . "/images/youtube1.png' border='0' width='50' height='50' alt=\"\" /></a></td>");
else
print("<td class='ttable_colx' align='center'>-</td>");
break; "spiritblue, post: 67259, member: 401":
Some additions to this mod:
~ // Time between each auto cleanup (Seconds).
~ // Set the maximum possible value of your seed bonus.
~ // On or Off ? - true / false.
Search [color=rgb(251, 160, 38)]backend / [/color][color=rgb(243, 121, 52)]config.php[/color] :
//SEEDBONUS
$site_config["bonuspertime"] = 0.5;
Replace with :
// Seed Bonus
$site_config["bonuspertime"] = 0.5; // Set this to what ever you want to give people per torrent.
$site_config['autoclean_interval'] = '3600'; // Time between each auto cleanup (Seconds).
$site_config["bonusmax"] = 3000; // Set the maximum possible value of your seed bonus.
$site_config['SEEDBONUS'] = false; // On or Off ? - true / false.
In [color=rgb(251, 160, 38)]backend /[/color] [color=rgb(243, 121, 52)]cleanup.php[/color] search :
// Seedbonus
$qry = "SELECT DISTINCT userid as peer, (
SELECT DISTINCT COUNT( torrent )
FROM peers
WHERE seeder = 'yes' AND userid = peer) AS count
FROM peers WHERE seeder = 'yes'";
$res = SQL_Query_exec($qry);
while ( $row = mysqli_fetch_object($res) )
{
SQL_Query_exec("UPDATE users SET seedbonus = seedbonus + '" . ($site_config["bonuspertime"] * $row->count) . "' WHERE id = '" . $row->peer . "'");
}
// End
Replace with :
// Seedbonus upadate 2019 by spiritblue
if ($CURUSER["SEEDBONUS"]) {
$qry = "SELECT DISTINCT userid as peer, (
SELECT DISTINCT COUNT( torrent )
FROM peers
WHERE seeder = 'yes' AND userid = peer) AS count
FROM peers WHERE seeder = 'yes'";
$res = SQL_Query_exec($qry);
while ( $row = mysqli_fetch_object($res) )
{
SQL_Query_exec("UPDATE users SET seedbonus = seedbonus + '" . ($site_config["bonuspertime"] * $row->count) . "' WHERE id = '" . $row->peer . "' AND seedbonus < ".$site_config["bonusmax"]."");
}
}
// End Seedbonus
####################################
# 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#
##############################################################
# 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 #
########################## $query = 'SELECT * FROM shoutbox ORDER BY msgid DESC LIMIT '.$lowerlimit.','.$upperlimit;
}else{
$query = 'SELECT * FROM shoutbox ORDER BY msgid DESC LIMIT 20';
}
$donated = ($CURUSER["donated"]);
$userdownloaded = mksize($CURUSER["downloaded"]);
$useruploaded = mksize($CURUSER["uploaded"]);
$privacylevel = $CURUSER["privacy"];
if ($CURUSER["downloaded"] > 0) {
$userratio = number_format($CURUSER["uploaded"] / $CURUSER["downloaded"], 2);
}else{
$userratio = "---";
}
print ("<br>
<div align='center'>
<img src='images/down.gif' title='Downloaded'> : $userdownloaded<-Vos statistiques-><img src='images/up.gif' title='Uploaded'> : $useruploaded<br>". Ratio .": $userratio <img src='images/d.jpg' title='Donation'>:</font><font size=4 color=red> $donated $<img src=images/star.gif alt=dons></font></div></center><br>");
//AUTO PROMOTE USER
$gigs = 25*1073741824; // 25 GB
$res = SQL_Query_exec("SELECT id FROM users WHERE class = 1 AND uploaded >= $gigs AND uploaded >= downloaded");
$time = get_date_time();
while ($arr = mysqli_fetch_assoc($res)) {
SQL_Query_exec("UPDATE users SET class = 2 WHERE id = $arr[id]");
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr[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: Power User')");
}
$res = SQL_Query_exec("SELECT id FROM users WHERE class = 2 AND uploaded >= $gigs AND uploaded < downloaded");
while ($arr = mysqli_fetch_assoc($res)) {
SQL_Query_exec("UPDATE users SET class = 1 WHERE id = $arr[id]");
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr[id], '$time', 'You have been automatically demoted from Power User to User.', 'You have been demoted to User')");
}
//AUTO PROMOTE USER END
// Auto promote VIP
$limit = 25 * 1024 * 1024 * 1024;
$minratio = 3.00;
$maxdt = get_date_time(time() - 86400 * 28);
$res = SQL_Query_exec("SELECT id, username FROM users WHERE class = 1 AND uploaded >= $limit AND uploaded / downloaded >= $minratio AND added < $maxdt");
if ($res) {
$dt = get_date_time();
$msg = "Félicitations, suite a votre bon ratio de partage de 3.00 ou plus vous avez été automatiquement promu VIP. Vous pouvez maintenant faire plus de choses.";
while ($arr = mysql_fetch_assoc($res)) {
SQL_Query_exec("UPDATE users SET class = 3 WHERE id = $arr[id]");
$txt = "Vous avez été promu VIP!";
$event = "$arr[username] a été promu VIP";
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[user_id], NOW(), $txt, 0)");
SQL_Query_exec("INSERT INTO shoutbox (msgid, user, message, date, userid) VALUES (NULL, $arr[username], $event, NOW(), 0)");
write_log("The user <a href=\"/user/?id=$arr[user_id]\">$arr[username]</a> A atteint un bon ratio de partage de 3.00 ou plus et a été automatiquement promu au rang VIP - Bravo !!!.");
}
}
// Auto demote vip
$minratio = 1.80;
$res = $db->query_params("SELECT user_id, username FROM users WHERE class = 3 AND uploaded / downloaded < :minratio", array('minratio' => $minratio));
if ($res) {
$dt = get_date_time();
$msg = "Vous avez été automatiquement rétrogradé de vip a Membre parce que votre ratio de partage est tombé en dessous de.";
while ($arr = $res->fetch()) {
$db->query_params('UPDATE users SET class = 1 WHERE user_id = :user_id', array('user_id' => $arr['user_id']));
$txt = "Vous avez été rétrogradé au rang de membre.";
$event = "$arr[username] a été rétrogradé à Membre";
$db->query_params('INSERT INTO messages (sender, receiver, added, msg, poster, subject) VALUES(0, :user_id, NOW(), :message, 0, :subject)', array('user_id' => $arr['user_id'], 'message' => $txt, 'subject' => 'Demoted!'));
$db->query_params('INSERT INTO shoutbox (msgid, user, message, date, userid) VALUES (NULL, :receiver, :event, NOW(), 0)', array('receiver' => $arr['username'], 'event' => $event));
write_log("The user <a href=\"/user/?id=$arr[user_id]\">$arr[username]</a> a été automatiquement promu au rang d'utilisateur vip.");
}
} SQL_Query_exec("UPDATE users SET class = 3 WHERE id = $arr[id]"); if (!$leftthanks2) {
$button='<br/>
<input src="images/thanks.gif" height="80" width="100"style="border:0px;" type="image" id="refresh">';
} else {
$button='';
} if (!$leftthanks2) {
$button='<br/><input type="button" value="Thanks" id="refresh">';
} else {
$button='';
}