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

[READ] Banned Clients — 2010-09-12 18:16:58 in General Chat
How to block that?

$site_config['BANNED_AGENTS'] = "-AZ21,-BC,-UT11,uTorrent/2040(21515),LIME";

Is this correct?
"whiteshadow1890, post: 63744":
what user id do i habe to insert and where?
lol, lol

[url="http://xxxx.net/account-details.php?id=367"]http://xxxx.net/account-details.php?id=367[/url]

in picture you have only [url="http://xxxx.net/account-details.php"]http://xxxx.net/account-details.php[/url]

id is missing (id=367)

every user have id.

You cant see just account-details.php, you must see someone account!
"whiteshadow1890, post: 63741":
it gives me the error


Can't show details

'Bad ID.'

It says all, you must insert some user id to :blink:
Warned Level — 2010-04-20 19:10:16 in v2 Only Mods Complete
in admin-modtasks.php find:

$ret = mysql_query("UPDATE users SET warned='yes' WHERE id='$userid'");
and replace with this:


$ret = mysql_query("UPDATE users SET warned='yes', timeswarned = timeswarned+1 WHERE id='$userid'");



Not tested.
"Obama, post: 63098":
Please reup silver image plz




$res = mysql_query("SELECT DISTINCT userid FROM peers WHERE seeder = 'yes'") or sqlerr(__FILE__, __LINE__);


DISTINCT
Show webseed — 2010-02-04 20:40:18 in v2 Only Mods Complete
"Juleika, post: 62117":
no permission !!
is there in premium forum ?

Yes there is <_<
Show webseed — 2010-02-04 18:19:32 in v2 Only Mods Complete
same is this:

[url="http://www.torrenttrader.org/index.php?showtopic=11230"]http://www.torrenttrader.org/index.php?showtopic=11230[/url]

only here is defined is highspeed torrent <_<
"leandrosapia, post: 60684":
//delete inactive user accounts$secs = 60*86400;

$dt = sqlesc(get_date_time(gmtime() - $secs));

$maxclass = UC_POWER_USER;

mysql_query("DELETE FROM users WHERE parked='no' AND status='confirmed' AND class <= $maxclass AND last_access < $dt");

;)  ;)

this can
Tnx, great mod, but if i add this mod, then my bb tags dont work anymore in torrent-upload.php page ;)
sendbonus.php:

<?
require_once("backend/functions.php");

dbconn(false);

stdhead("Bonus gift");

loggedinonly();

begin_frame("Seed Bonus Gift");

if ($_SERVER["REQUEST_METHOD"] == "POST") {

$nick = $_POST["nick"];

$amount = (int)$_POST['amount'];

if (empty($nick)) {

show_error_msg($tracker_lang['error'], "Insert name!");

die();

}

if(!preg_match("/^[a-zA-Z0-9_\+]+$/", $nick)) {

show_error_msg($tracker_lang['error'], "Illegal signs!");

die();

}

if ($amount<0) {

show_error_msg($tracker_lang['error'], "I smell the rat!");

die();

}

$msg = @$_POST['msg'];

$res = mysql_query("SELECT * FROM users WHERE `username` = '$nick'") or sqlerr(__FILE__,__LINE__);

$receiver = mysql_fetch_assoc($res);

if(!$receiver['id']) {

show_error_msg($tracker_lang['error'], "No such user: " . $nick ."!");

die();

}

if($receiver['id'] == $CURUSER["id"]) {

show_error_msg($tracker_lang['error'], "Can
takeflush.php

<?

require_once("backend/functions.php");



dbconn();



loggedinonly();



$id = 0 + $_GET["id"];



mysql_query("DELETE FROM peers WHERE userid = $id");



header("Refresh: 0; url=account-details.php?id=$id");

?>


Make somewhere in account-details.php link:

print("<h0>Flush This User Torrents, <a href=takeflush.php?id=$id>$CURUSER[username]</a>!</h0>\n");

Thats it! Greeting to DBdev.
"Diverjh, post: 61736":
config.php
$site_config["ratiowarn_promote"] = true; //Promote Ryb

"TorrentialStorm, post: 39989":
	$gigs = 25*1073741824; // 25 GB

$res = mysql_query("SELECT id FROM users WHERE class = 1 AND uploaded >= $gigs AND uploaded >= downloaded");

$time = get_date_time();

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, 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 = mysql_query("SELECT id FROM users WHERE class = 2 AND uploaded >= $gigs AND uploaded < downloaded");

while ($arr = mysql_fetch_assoc($res)) {

mysql_query("UPDATE users SET class = 1 WHERE id = $arr[id]");

mysql_query("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')");

}




I try with 250GB, promote works fine, but demote dont work  ;) . Any help?

Are you sure that this code counting upload gigs, because its feels like it count only ratio?



// promote to power users

$gigs = 250*1073741824; // 250 GB

$res = mysql_query("SELECT id FROM users WHERE class = 1 AND uploaded >= $gigs AND uploaded >= downloaded");

$time = get_date_time();

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, 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 = mysql_query("SELECT id FROM users WHERE class = 2 AND uploaded >= $gigs AND uploaded < downloaded");

while ($arr = mysql_fetch_assoc($res)) {

mysql_query("UPDATE users SET class = 1 WHERE id = $arr[id]");

mysql_query("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')");

}







mu cleanup.php:



<?php



function do_cleanup() {

global $site_config;



//LOCAL TORRENTS - GET PEERS DATA AND UPDATE BROWSE STATS



$torrents = array();

$res = mysql_query("SELECT torrent, seeder, COUNT(*) AS c FROM peers GROUP BY torrent, seeder");



while ($row = mysql_fetch_assoc($res)) {

if ($row["seeder"] == "yes")

$key = "seeders";

else

$key = "leechers";

$torrents[$row["torrent"]][$key] = $row["c"];



}







$fields = explode(":", "comments:leechers:seeders");

$res = mysql_query("SELECT id, seeders, leechers FROM torrents WHERE external !='yes'");



while ($row = mysql_fetch_assoc($res)) {



$id = $row["id"];

$torr = $torrents[$id];

foreach ($fields as $field) {

if (!isset($torr[$field]))

$torr[$field] = 0;



}



$update = array();

foreach ($fields as $field) {



if ($torr[$field] != $row[$field])

$update[] = "$field = " . $torr[$field];



}



if (count($update))



mysql_query("UPDATE torrents SET " . implode(",", $update) . " WHERE id = $id AND external !='yes'");



}







//LOCAL TORRENTS - MAKE NON-ACTIVE/OLD TORRENTS INVISIBLE



$deadtime = gmtime() - $site_config["max_dead_torrent_time"];



mysql_query("UPDATE torrents SET visible='no' WHERE visible='yes' AND last_action < FROM_UNIXTIME($deadtime) AND external !='yes'");







////////Update Seederbonus/////////

  $res = mysql_query("SELECT DISTINCT userid FROM peers WHERE seeder = 'yes'") or die (mysql_error());

  if (mysql_num_rows($res) > 0)

  {

  while ($arr = mysql_fetch_assoc($res))

  {

  mysql_query("UPDATE users SET seedbonus = seedbonus+0.5 WHERE id = $arr[userid]") or die (mysql_error());

  }

  }

/////////////////////////////////////////









//DELETE OLD NON-ACTIVE PEERS



$res = mysql_query("DELETE FROM peers WHERE ".gmtime()."-UNIX_TIMESTAMP(last_action) >= 2400");







//DELETE PENDING USER ACCOUNTS OVER TIMOUT AGE



$deadtime = gmtime() - $site_config["signup_timeout"];



mysql_query("DELETE FROM users WHERE status = 'pending' AND added < FROM_UNIXTIME($deadtime)");







// promote to power users

$gigs = 250*1073741824; // 250 GB

$res = mysql_query("SELECT id FROM users WHERE class = 1 AND uploaded >= $gigs AND uploaded >= downloaded");

$time = get_date_time();

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, 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 = mysql_query("SELECT id FROM users WHERE class = 2 AND uploaded >= $gigs AND uploaded < downloaded");

while ($arr = mysql_fetch_assoc($res)) {

mysql_query("UPDATE users SET class = 1 WHERE id = $arr[id]");

mysql_query("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')");

}











//LEECHWARN USERS WITH LOW RATIO







if ($site_config["ratiowarn_enable"]){



$minratio = $site_config["ratiowarn_minratio"];

$downloaded = $site_config["ratiowarn_mingigs"]*1024*1024*1024;

$length = $site_config["ratiowarn_daystowarn"];







//ADD WARNING



$res = mysql_query("SELECT id,username FROM users WHERE class = 1 AND warned = 'no' AND enabled='yes' AND uploaded / downloaded < $minratio AND downloaded >= $downloaded");



if (mysql_num_rows($res) > 0){



$timenow = get_date_time();

$reason = "You have been warned because of having low ratio. You need to get a ".$minratio." before next ".$length." days or your account may be banned.";

$expiretime = gmdate("Y-m-d H:i:s", gmtime() + (86400 * $length));



while ($arr = mysql_fetch_assoc($res)){



mysql_query("INSERT INTO warnings (userid, reason, added, expiry, warnedby, type) VALUES ('".$arr["id"]."','".$reason."','".$timenow."','".$expiretime."','0','Poor Ratio')");

mysql_query("UPDATE users SET warned='yes' WHERE id='".$arr["id"]."'");

mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES ('0', '".$arr["id"]."', '".$timenow."', '".$reason."', '0')");

write_log("Auto Leech warning has been <B>added</B> for: <a href=account-details.php?id=".$arr["id"].">".$arr["username"]."</a>");



}



}

//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 = '".$arr1["id"]."'");

mysql_query("UPDATE warnings SET expiry = '".$timenow."' WHERE userid = '".$arr1["id"]."'");

mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES ('0', '".$arr1["id"]."', '".$timenow."', '".$reason."', '0')");



}



}







//BAN WARNED USERS



$res = mysql_query("SELECT id,username FROM users WHERE class = 1 AND enabled='yes' AND warned = 'yes' AND uploaded / downloaded < $minratio AND downloaded >= $downloaded");







if (mysql_num_rows($res) > 0){

$timenow = get_date_time();

$expires = (86400 * $length);







while ($arr = mysql_fetch_assoc($res)){

$r = mysql_query("SELECT id, UNIX_TIMESTAMP(expiry) as expiry FROM warnings WHERE userid=$arr[id]");

$row = mysql_fetch_assoc($r);







if (gmtime() - $row["expiry"] >= 0) {

mysql_query("UPDATE users SET enabled='no', warned='no' WHERE id='".$arr["id"]."'");

write_log("User <a href=account-details.php?id=".$arr["id"].">".$arr["username"]."</a> has been banned (Auto Leech warning).");



}



}



}



}//check if warning system is on



//END//





//OPTIMISE TABLES

mysql_query("OPTIMIZE TABLE `peers` , `torrents` , `tasks` , `guests` , `users` , `messages` , `comments` , `addedrequests` , `bookmarks` , `blackjack`; ");

}//end func







// START LOTTERY

dbconn();

$res = mysql_query("SELECT * FROM lottery_config") or sqlerr(__FILE__, __LINE__);

while ($arr = mysql_fetch_assoc($res))

$arr_config[$arr['name']] = $arr['value'];



if ($arr_config['enable'] == 1)

{

if (get_date_time() > $arr_config['end_date'])

{

if ($arr_config["ticket_amount_type"] == GB)

$arr_config['ticket_amount'] = 1024 * 1024 * 1024 * $arr_config['ticket_amount'];

else if ($arr_config["ticket_amount_type"] == MB)

$arr_config['ticket_amount'] = 1024 * 1024 * $arr_config['ticket_amount'];

$size = $arr_config['ticket_amount'];



if ($arr_config["ticket_amount_type"] == GB)

$arr_config['prize_fund'] = 1024 * 1024 * 1024 * $arr_config['prize_fund'];

else if ($arr_config["ticket_amount_type"] == MB)

$arr_config['prize_fund'] = 1024 * 1024 * $arr_config['prize_fund'];

$prize_fund = $arr_config['prize_fund'];



$total = mysql_num_rows(mysql_query("SELECT * FROM tickets"));

if ($arr_config["use_prize_fund"])

{

$pot = $prize_fund / $arr_config['total_winners'];

$res = mysql_query("SELECT user FROM tickets ORDER BY RAND() LIMIT $arr_config[total_winners]") or sqlerr();

$who_won = array();

$msg = sqlesc("Congratulations, You have won: <b>".mksize($pot)."</b>.<br /><br />This has been added to your upload amount<br /><br />Thanks for playing Lottery.");

while ($arr = mysql_fetch_assoc($res))

{

$res2 = mysql_query("SELECT modcomment FROM users WHERE id = $arr[user]") or sqlerr(__FILE__, __LINE__);

$arr2 = mysql_fetch_assoc($res2);

$modcomment = $arr2['modcomment'];

$modcom = sqlesc("User won the lottery: " . mksize($pot) . " at " . get_date_time() . "\n" . $modcomment);

mysql_query("UPDATE users SET uploaded = uploaded + $pot, modcomment = $modcom WHERE id = $arr[user]") or sqlerr();

mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[user], NOW(), $msg, 0)") or sqlerr(__FILE__, __LINE__);

$who_won[] = $arr['user'];

}

}

else

{

$pot = $total * $size / $arr_config['total_winners'];

$res = mysql_query("SELECT user FROM tickets ORDER BY RAND() LIMIT $arr_config[total_winners]") or sqlerr();

$who_won = array();

$msg = sqlesc("Congratulations, You have won: ".mksize($pot).".\n\nThis has been added to your upload amount.\n\nThanks for playing Lottery.");

while ($arr = mysql_fetch_assoc($res))

{

$res2 = mysql_query("SELECT modcomment FROM users WHERE id = $arr[user]") or sqlerr(__FILE__, __LINE__);

$arr2 = mysql_fetch_assoc($res2);

$modcomment = $arr2['modcomment'];

$modcom = sqlesc("User won the lottery: " . mksize($pot) . " at " . get_date_time() . "\n" . $modcomment);

mysql_query("UPDATE users SET uploaded = uploaded + $pot WHERE id = $arr[user]") or sqlerr();

mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[user], NOW(), $msg, 0)") or sqlerr(__FILE__, __LINE__);

$who_won[] = $arr['user'];

}

}

$who_won = implode("|", $who_won);

$who_won_date = get_date_time();

$who_won_prize = $pot;

mysql_query("TRUNCATE TABLE tickets") or sqlerr(__FILE__, __LINE__);

if ($who_won != '')

{

mysql_query("UPDATE lottery_config SET value = '$who_won' WHERE name = 'lottery_winners'") or sqlerr(__FILE__, __LINE__);

mysql_query("UPDATE lottery_config SET value = '$who_won_prize' WHERE name = 'lottery_winners_amount'") or sqlerr(__FILE__, __LINE__);

mysql_query("UPDATE lottery_config SET value = '$who_won_date' WHERE name = 'lottery_winners_time'") or sqlerr(__FILE__, __LINE__);

}

mysql_query("UPDATE lottery_config SET value = '0' WHERE name = 'enable'") or sqlerr(__FILE__, __LINE__);

}

}

// END LOTTERY



//UPDATE CASINO TRYS

$deadtimec = gmtime() - 18000;

mysql_query("UPDATE casino SET trys='0' WHERE date < FROM_UNIXTIME($deadtimec)");



?>
edit:

nothing ;)
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