yeah micro take the credits you mf i modded the entire source and i gave it you so that you could start a tracker and now i you post it here with only the style changet .. thats fd up man :shock:
or you could ask someone to add credits :clown:
BaHKoCeKca
5th December 2011 22:14
yeah im aware of the concept of the site .. and all i wanted was for him to at least add credits .. and as above somebody asked the basis of this tracker are of D3SI's probably first source - i can't quite remember. And here, he, as i can see has fd the source up a lot .. soon ill fix it and upload it as it should be .. cheers :drink:
Kewm
13th December 2011 00:01
Quote:
Originally Posted by BaHKoCeKca
(Post 31508)
yeah im aware of the concept of the site .. and all i wanted was for him to at least add credits .. and as above somebody asked the basis of this tracker are of D3SI's probably first source - i can't quite remember. And here, he, as i can see has fd the source up a lot .. soon ill fix it and upload it as it should be .. cheers :drink:
Whens that gonna to happen?
I'd really like this source etc.
// ONLY USE ONE OF THE FOLLOWING DEPENDING ON YOUR O/S!!!
$torrent_dir = "torrents"; # FOR UNIX ONLY - must be writable for httpd user
//$torrent_dir = "torrents"; # FOR WINDOWS ONLY - must be writable for httpd user
# the first one will be displayed on the pages
$announce_urls = array();
$announce_urls[] = "http://localhost/announce.php";
// Set this to your site URL... No ending slash!
$DEFAULTBASEURL = "http://localhost";
//set this to true to make this a tracker that only registered users may use
$MEMBERSONLY = true;
//maximum number of peers (seeders+leechers) allowed before torrents starts to be deleted to make room...
//set this to something high if you don't require this feature
$PEERLIMIT = 50000;
// Email for sender/return path.
$SITEEMAIL = "noreply@domain.com";
// Maximum size of files uploaded into the BitBucket in bytes
$GLOBALS["MAX_UPLOAD_FILESIZE"] = 1024 * 1024;
// Maximum size of the BitBucket per user in bytes
$GLOBALS["MAX_BITBUCKET_SIZE_USER"] = 1024 * 1024;
// Maximum size of the BitBucket for uploaders in bytes
$GLOBALS["MAX_BITBUCKET_SIZE_UPLOADER"] = 5 * 1024 * 1024;
// Path where all Bit-Bucket files are stored. These are:
// User's files, torrent and NFO images
// This path MUST be a subdir of the tracker root, and MUST be
// publicly available, optionally with referrer check
// Webserver MUST have write permission on this directory!
// No trailing slash.
$GLOBALS["BITBUCKET_DIR"] = "bitbucket";
// Relative or absolute URL where all images for the interface are stored.
// MUST include a trailing slash!
$GLOBALS["PIC_BASE_URL"] = "pic/";
//Do not modify -- versioning system
//This will help identify code for support issues at tbdev.net
define ('TBVERSION','TBDEV.NET-12-09-05');
//---------------------------------
//---- Max. Sysops Added by D3SI
//---------------------------------
function maxsysop () {
global $CURUSER;
// Check Staff Names
$lmaxclass = 9;
$lsysopnames = array("BaHKoCeKca"); // Case sensitive. Change this (YOUR SYSOP-ADMIN NAMES GOES HERE) (example: array("adminname1","adminname2","adminname3","adminname4","so far")
if ($CURUSER["class"] >= $lmaxclass)
if (!in_array($CURUSER["username"], $lsysopnames, true)) { // true for strict comparison
$msg = "Fake Account Detected: Username: ".$CURUSER["username"]." - UserID: ".$CURUSER["id"]." - UserIP : ".getip();
write_log($msg);
mysql_query("INSERT INTO messages (poster, sender, receiver, added, msg) VALUES(0, 0, '1', '" . get_date_time() . "', " .sqlesc($msg) . ")") or sqlerr(__FILE__, __LINE__);
stderr("Access Denied!","We come to believe you are using a fake account, therefore we've logged this action!");
}
// Check Staff IDS
define ('UC_STAFF', 9); // Minumum Staff Level (50= UC_MODERATOR)
if ($CURUSER['class'] >= UC_STAFF) {
$allowed_ID = array(1,2); // Change this (YOUR SYSOP-ADMIN IDS GOES HERE) (example: array(1,2,3,4,5))
if (!in_array((int)$CURUSER['id'], $allowed_ID, true)) { // true for strict comparison
$msg = "Fake Account Detected: Username: ".$CURUSER["username"]." - UserID: ".$CURUSER["id"]." - UserIP : ".getip();
write_log($msg);
stderr("Access Denied!","We come to believe you are using a fake account, therefore we've logged this action!");
}
}
}
//---------------------------------
//---- Max. Sysops Added by D3SI
//---------------------------------
function failedloginscheck () {
global $maxloginattempts;
$total = 0;
$ip = sqlesc(getip());
$Query = mysql_query("SELECT SUM(attempts) FROM loginattempts WHERE ip=$ip") or sqlerr(__FILE__, __LINE__);
list($total) = mysql_fetch_array($Query);
if ($total >= $maxloginattempts) {
mysql_query("UPDATE loginattempts SET banned = 'yes' WHERE ip=$ip") or sqlerr(__FILE__, __LINE__);
stderr("Login Locked!", "You have been exceed maximum login attempts, therefore your ip address (".htmlspecialchars($ip).") has been banned.");
}
}
function failedlogins () {
$ip = sqlesc(getip());
$added = sqlesc(get_date_time());
$a = (@mysql_fetch_row(@mysql_query("select count(*) from loginattempts where ip=$ip"))) or sqlerr(__FILE__, __LINE__);
if ($a[0] == 0)
mysql_query("INSERT INTO loginattempts (ip, added, attempts) VALUES ($ip, $added, 1)") or sqlerr(__FILE__, __LINE__);
else
mysql_query("UPDATE loginattempts SET attempts = attempts + 1 where ip=$ip") or sqlerr(__FILE__, __LINE__);
stderr("Login failed!","Error: Username or password incorrectDon't remember your password? Recover your password!");
}
// Patched function to detect REAL IP address if it's valid
function getip() {
if (isset($_SERVER)) {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && validip($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} elseif (isset($_SERVER['HTTP_CLIENT_IP']) && validip($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
} else {
if (getenv('HTTP_X_FORWARDED_FOR') && validip(getenv('HTTP_X_FORWARDED_FOR'))) {
$ip = getenv('HTTP_X_FORWARDED_FOR');
} elseif (getenv('HTTP_CLIENT_IP') && validip(getenv('HTTP_CLIENT_IP'))) {
$ip = getenv('HTTP_CLIENT_IP');
} else {
$ip = getenv('REMOTE_ADDR');
}
}
return $ip;
}
function dbconn($autoclean = false)
{
global $mysql_host, $mysql_user, $mysql_pass, $mysql_db;
if (!@mysql_connect($mysql_host, $mysql_user, $mysql_pass))
{
switch (mysql_errno())
{
case 1040:
case 2002:
if ($_SERVER[REQUEST_METHOD] == "GET")
die("
The server load is very high at the moment. Retrying, please wait...
");
else
die("Too many users. Please press the Refresh button in your browser to retry.");
default:
die("[" . mysql_errno() . "] dbconn: mysql_connect: " . mysql_error());
}
}
mysql_select_db($mysql_db)
or die('dbconn: mysql_select_db: ' + mysql_error());
userlogin();
if ($autoclean)
register_shutdown_function("autoclean");
}
function userlogin() {
global $SITE_ONLINE;
unset($GLOBALS["CURUSER"]);
$ip = getip();
$nip = ip2long($ip);
$res = mysql_query("SELECT * FROM bans WHERE $nip >= first AND $nip <= last") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) > 0)
{
header("HTTP/1.0 403 Forbidden");
print("
403 Forbidden
Unauthorized IP address.\n");
die;
}
if (!$SITE_ONLINE || empty($_COOKIE["uid"]) || empty($_COOKIE["pass"]))
return;
$id = 0 + $_COOKIE["uid"];
if (!$id || strlen($_COOKIE["pass"]) != 32)
return;
$res = mysql_query("SELECT * FROM users WHERE id = $id AND enabled='yes' AND status = 'confirmed'");// or die(mysql_error());
$row = mysql_fetch_array($res);
if (!$row)
return;
$sec = hash_pad($row["secret"]);
if ($_COOKIE["pass"] !== md5($row["passhash"].$_SERVER["REMOTE_ADDR"]))
return;
mysql_query("UPDATE users SET last_access='" . get_date_time() . "', ip=".sqlesc($ip)." WHERE id=" . $row["id"]);// or die(mysql_error());
$row['ip'] = $ip;
$GLOBALS["CURUSER"] = $row;
}
function autoclean() {
global $autoclean_interval;
$now = time();
$docleanup = 0;
$res = mysql_query("SELECT value_u FROM avps WHERE arg = 'lastcleantime'");
$row = mysql_fetch_array($res);
if (!$row) {
mysql_query("INSERT INTO avps (arg, value_u) VALUES ('lastcleantime',$now)");
return;
}
$ts = $row[0];
if ($ts + $autoclean_interval > $now)
return;
mysql_query("UPDATE avps SET value_u=$now WHERE arg='lastcleantime' AND value_u = $ts");
if (!mysql_affected_rows())
return;
docleanup();
}
function unesc($x) {
if (get_magic_quotes_gpc())
return stripslashes($x);
return $x;
}
if ($CURUSER)
{
$ss_a = @mysql_fetch_array(@mysql_query("select uri from stylesheets where id=" . $CURUSER["stylesheet"]));
if ($ss_a) $ss_uri = $ss_a["uri"];
}
if (!$ss_uri)
{
($r = mysql_query("SELECT uri FROM stylesheets WHERE id=1")) or die(mysql_error());
($a = mysql_fetch_array($r)) or die(mysql_error());
$ss_uri = $a["uri"];
}
if ($msgalert && $CURUSER)
{
$res = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " && unread='yes'") or die("OopppsY!");
$arr = mysql_fetch_row($res);
$unread = $arr[0];
}
$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND location IN ('in', 'both')") or print(mysql_error());
$arr1 = mysql_fetch_row($res1);
$messages = $arr1[0];
$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND location IN ('in', 'both') AND unread='yes'") or print(mysql_error());
$arr1 = mysql_fetch_row($res1);
$unread = $arr1[0];
$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE sender=" . $CURUSER["id"] . " AND location IN ('out', 'both')") or print(mysql_error());
$arr1 = mysql_fetch_row($res1);
$outmessages = $arr1[0];
$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " && unread='yes'") or die("OopppsY!");
$arr1 = mysql_fetch_row($res1);
$unread = $arr1[0];
if ($unread)
$inboxpic = "";
else
$inboxpic = "";
//// check active torrents ///////////////////////
$res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . $CURUSER["id"] . " AND seeder='yes'") or print(mysql_error());
$row = mysql_fetch_row($res2);
$activeseed = $row[0];
$res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . $CURUSER["id"] . " AND seeder='no'") or print(mysql_error());
if (get_user_class() >= UC_MODERATOR)
{
$rese = mysql_query("SELECT COUNT(id) as nummessages from staffmessages WHERE answered='no'");
$arre = mysql_fetch_assoc($rese);
$nummessages = $arre[nummessages];
if ($nummessages){
print("
$announcement = $CURUSER['announce'];
if ($announcement == "yes")
print("");
print("");
$res = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=".sqlesc($CURUSER['id'])." AND connectable='no'") or sql_error();
$row = mysql_fetch_row($res);
//=== report link for big red box thanks carphunter18 :)
if (get_user_class() >= UC_MODERATOR) {
$res_reports = mysql_query("SELECT COUNT(*) FROM reports WHERE delt_with = '0'");
$arr_reports = mysql_fetch_row($res_reports);
$num_reports = $arr_reports[0];
if ($num_reports > 0)
echo"
Hey $CURUSER[username]! $num_reports Report" . ($num_reports > 1 ? "s" : "") . " to be dealt withclick HERE to view reports