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

Captcha Google — 2021-09-09 22:21:40 in v3 Mods Requests
I must be overlooking something silly but I cant make m-jay's captcha work...maybe my brain is dumb lol. So I sat and reedited my signup page, which is modded alot and made it work my old way. I would rather use m-jay's simple class version, so I may revisit, but here is my account-signup (yes, it uses html for styling, which I think is where my problem is)
<?php
require_once("backend/functions.php");
dbconn();
session_start();
$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false;
$username_length = 15; // Max username length. You shouldn't set this higher without editing the database first
$password_minlength = 6;
$password_maxlength = 40;

// Disable checks if we're signing up with an invite
if (!is_valid_id($_REQUEST["invite"]) || strlen($_REQUEST["secret"]) != 32) {
//invite only check
if ($site_config["INVITEONLY"]) {
echo '<script>alert("This site is invite only")</script>';
stdfoot();
       die();
// show_error_msg(T_("INVITE_ONLY"), "<br /><br /><center>".T_("INVITE_ONLY_MSG")."<br /><br /></center>",1);
}

//get max members, and check how many users there is
$numsitemembers = get_row_count("users");
if ($numsitemembers >= $site_config["maxusers"])
show_error_msg(T_("SORRY")."...", T_("SITE_FULL_LIMIT_MSG") . number_format($site_config["maxusers"])." ".T_("SITE_FULL_LIMIT_REACHED_MSG")." ".number_format($numsitemembers)." members",1);
} else {
$res = SQL_Query_exec("SELECT id FROM users WHERE id = $_REQUEST[invite] AND MD5(secret) = ".sqlesc($_REQUEST["secret"]));
$invite_row = mysqli_fetch_assoc($res);
if (!$invite_row) {
show_error_msg(T_("ERROR"), T_("INVITE_ONLY_NOT_FOUND")." ".($site_config['signup_timeout']/86400)." days.", 1);
}
}

if ($_GET["takesignup"] == "1") {
$captcha;
if(isset($_POST['g-recaptcha-response']))
{
 $captcha=$_POST['g-recaptcha-response'];
}
if(!$captcha){
?>  
<script type ="text/javascript">
{
window.alert("Please Check the Captcha box");
}
</script>
<?php
header("Refresh: 0; url=account-signup.php");
die();

}
$secretKey = "<?php echo '".$site_config['SECRET']."';?>";
$ip = $_SERVER['REMOTE_ADDR'];
$response="file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$captcha."&remoteip=".$ip.")";
//$message == "";

function validusername($username) {
$allowedchars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
for ($i = 0; $i < strlen($username); ++$i)
if (strpos($allowedchars, $username[$i]) === false)
return false;
return true;
}

$wantusername = $_POST["wantusername"];
$email = $_POST["email"];
$wantpassword = $_POST["wantpassword"];
$passagain = $_POST["passagain"];
$country = $_POST["country"];
$gender = $_POST["gender"];
$client = $_POST["client"];
$age = (int) $_POST["age"];

 if (empty($wantpassword) || (empty($email) && !$invite_row) || empty($wantusername))
$message = T_("DONT_LEAVE_ANY_FIELD_BLANK");
 elseif (strlen($wantusername) > $username_length)
$message = sprintf(T_("USERNAME_TOO_LONG"), $username_length);
 elseif ($wantpassword != $passagain)
$message = T_("PASSWORDS_NOT_MATCH");
 elseif (strlen($wantpassword) < $password_minlength)
$message = sprintf(T_("PASS_TOO_SHORT"), $password_minlength);
 elseif (strlen($wantpassword) > $password_maxlength)
$message = sprintf(T_("PASS_TOO_LONG"), $password_maxlength);
 elseif ($wantpassword == $wantusername)
$message = T_("PASS_CANT_MATCH_USERNAME");
 elseif (!validusername($wantusername))
$message = "Invalid username.";
 elseif (!$invite_row && !validemail($email))
$message = "That doesn't look like a valid email address.";

///captcha shit. Delete if not working////////
unset($_POST['g-recaptcha-response']);
///end captcha shit//////

if ($message == "") {
// Certain checks must be skipped for invites
if (!$invite_row) {
//check email isnt banned
$maildomain = (substr($email, strpos($email, "@") + 1));
$a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from email_bans where mail_domain='$email'")));
if ($a[0] != 0)
$message = sprintf(T_("EMAIL_ADDRESS_BANNED_S"), $email);

$a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from email_bans where mail_domain LIKE '%$maildomain%'")));
if ($a[0] != 0)
$message = sprintf(T_("EMAIL_ADDRESS_BANNED_S"), $email);

 // check if email addy is already in use
 $a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from users where email='$email'")));
 if ($a[0] != 0)
$message = sprintf(T_("EMAIL_ADDRESS_INUSE_S"), $email);
}

  //check username isnt in use
 $a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from users where username='$wantusername'")));
 if ($a[0] != 0)
$message = sprintf(T_("USERNAME_INUSE_S"), $wantusername);

//  $secret = mksecret(); //generate secret field //commented due to IP check also using same vars below
//
//  $wantpassword = passhash($wantpassword);// hash the password //commented due to IP check also using same vars below
}

if ($message != "")
show_error_msg(T_("SIGNUP_FAILED"), $message, 1);

//check if IP is already a peer
           if ($site_config["ipcheck"] && $site_config["accountmax"] >= "1") {
           $ip = $_SERVER['REMOTE_ADDR'];
           $ipq = get_row_count("users", "WHERE ip = '$ip'");
           if ($ipq >= $site_config["accountmax"])
           $message = $site_config["SITENAME"]." only allows " . $site_config["accountmax"] . " user account per IP address. <br> If you want to create a new account, please contact an administrator.<br /><br /><font color=red> The limit for ip : $ip has been reached.</font><br /><br />Registration failed. <br /><a style='cursor: pointer;cursor:hand;' href='account-login.php'><font color=red>Click here to return to the login page.</font></a>";
   }
           $secret = mksecret(); //generate secret field

           $wantpassword = passhash($wantpassword);// hash the password
   

   if ($message != "")
       show_error_msg(T_("SIGNUP_FAILED"), $message, 1);

 if ($message == "") {
if ($invite_row) {
SQL_Query_exec("UPDATE users SET username=".sqlesc($wantusername).", password=".sqlesc($wantpassword).", secret=".sqlesc($secret).", status='confirmed', added='".get_date_time()."' WHERE id=$invite_row[id]");
//send pm to new user
if ($site_config["WELCOMEPMON"]){
$dt = sqlesc(get_date_time());
$msg = sqlesc($site_config["WELCOMEPMMSG"]);
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $invite_row[id], $dt, $msg, 0)");
}
header("Refresh: 0; url=account-confirm-ok.php?type=confirm");
die;
}

if ($site_config["CONFIRMEMAIL"]) { //req confirm email true/false
$status = "pending";
}else{
$status = "confirmed";
}

//make first member admin
if ($numsitemembers == '0')
$signupclass = '8';
else
$signupclass = '1';

    SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, last_access, age, country, gender, client, stylesheet, uploaded, downloaded, language, invites, class, ip) VALUES (" .
    implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["new_member_upload_ratio"], 0, $site_config["default_language"], $site_config["new_member_invites"], $signupclass, getip()))).")");

   $id = mysqli_insert_id($GLOBALS["DBconnector"]);

   $psecret = md5($secret);
   $thishost = $_SERVER["HTTP_HOST"];
   $thisdomain = preg_replace('/^www\./is', "", $thishost);

//ADMIN CONFIRM
if ($site_config["ACONFIRM"]) {
$body = T_("YOUR_ACCOUNT_AT")." ".$site_config['SITENAME']." ".T_("HAS_BEEN_CREATED_YOU_WILL_HAVE_TO_WAIT")."\n\n".$site_config['SITENAME']." ".T_("ADMIN");
}else{//NO ADMIN CONFIRM, BUT EMAIL CONFIRM
$body = T_("YOUR_ACCOUNT_AT")." ".$site_config['SITENAME']." ".T_("HAS_BEEN_APPROVED_EMAIL")."\n\n ".$site_config['SITEURL']."/account-confirm.php?id=$id&secret=$psecret\n\n".T_("HAS_BEEN_APPROVED_EMAIL_AFTER")."\n\n ".T_("HAS_BEEN_APPROVED_EMAIL_DELETED")."\n\n".$site_config['SITENAME']." ".T_("ADMIN");
}

if ($site_config["CONFIRMEMAIL"]){ //email confirmation is on
sendmail($email, "Your $site_config[SITENAME] User Account", $body, "", "-f$site_config[SITEEMAIL]");
header("Refresh: 0; url=account-confirm-ok.php?type=signup&email=" . urlencode($email));
}else{ //email confirmation is off
header("Refresh: 0; url=account-confirm-ok.php?type=noconf");
}
//send pm to new user
if ($site_config["WELCOMEPMON"]){
$dt = sqlesc(get_date_time());
$msg = sqlesc($site_config["WELCOMEPMMSG"]);
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $id, $dt, $msg, 0)");
}

   die;
 }

}//end takesignup

?>
<form method="post" action="account-signup.php?takesignup=1">
<?php if ($invite_row) { ?>
<input type="hidden" autocomplete="off" name="invite" value="<?php echo $_GET["invite"]; ?>" />
<input type="hidden" autocomplete="off" name="secret" value="<?php echo htmlspecialchars($_GET["secret"]); ?>" />
<?php } ?>
<table cellspacing="0" cellpadding="2" border="0">
<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title><?php $site_config["SITENAME"] ?></title>
   <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
   <link rel="stylesheet" type="text/css" href="css/fontawesome-all.min.css">
   <link rel="stylesheet" type="text/css" href="css/iofrm-style.css">
   <link rel="stylesheet" type="text/css" href="css/iofrm-theme14.css">
</head>
<body>
   <div class="form-body" class="container-fluid">
       <div class="row">
           <div class="form-holder">
               <div class="form-content">
                   <div class="form-items">
                       <div class="website-logo-inside">
                           <a href="index.html">
                           </a>
                       </div>
                       <h3>Use the form below to sign up.</h3>
                       <p>Name, Password and E-mail are required.</p>
                       <div class="page-links">
                           <a href="account-login.php">Login</a><a href="account-signup.php" class="active">Register</a><a href="account-recover.php">Recover Account</a>
                       </div>
                       <form>
                           <input class="form-control" autocomplete="off" type="text" name="wantusername" placeholder="Username" required>                          
                           <input class="form-control" autocomplete="off" type="password" name="wantpassword" placeholder="Password" required>
<input class="form-control" autocomplete="off" type="password" name="passagain" placeholder="Confim Password" required>
<input class="form-control" autocomplete="off" type="text" name="email" placeholder="E-mail Address" required>
<input class="form-control" autocomplete="off" type="text" name="age" placeholder="Age" maxlength="3">
<input class="form-control" autocomplete="off" list="country" name="country" placeholder="Country. Click for options">
<datalist id="country">
<?php
$countries = "<option value=\"0\">---- ".T_("NONE_SELECTED")." ----</option>\n";
$ct_r = SQL_Query_exec("SELECT id,name,domain from countries ORDER BY name");
while ($ct_a = mysqli_fetch_assoc($ct_r)) {
$countries .= "<option value=\"$ct_a[id]\">$ct_a[name]</option>\n";
}
?>
<?php echo $countries; ?>
</datalist>
<input class="form-control" list="client" type="text" name="client" placeholder="Torrent Client Used. Click for options" autocomplete="off">

<datalist id="client">
<option value= "ABC">
<option value= "Acquisition">
<option value= "Anatomic P2P">
<option value= "Arctic Torrent">
<option value= "aria2">
<option value= "Azureus">
<option value= "BiglyBT">
<option value= "BitComet">
<option value= "BitFlu">
<option value= "BitLet">
<option value= "BitPump">
<option value= "BitTorrent 5 / Mainline">
<option value= "BitSpirit">
<option value= "BitTyrant">
<option value= "Blizzard Downloader">
<option value= "Blog Torrent">
<option value= "BTPD">
<option value= "BTSharp (library)">
<option value= "burst!">
<option value= "CTorrent">
<option value= "Deluge">
<option value= "FlashGet">
<option value= "Folx">
<option value= "freeloader">
<option value= "G3 Torrent">
<option value= "Gnome BitTorrent">
<option value= "Halite">
<option value= "KTorrent">
<option value= "MLDonkey">
<option value= "MonoTorrent (client library)">
<option value= "MooPolice">
<option value= "Opera">
<option value= "QTorrent">
<option value= "Qbittorrent">
<option value= "rTorrent">
<option value= "Rufus">
<option value= "Shareaza">
<option value= "sharktorrent">
<option value= "SymTorrent">
<option value= "Torrent Swapper">
<option value= "TorrentVolve">
<option value= "Transmission">
<option value= "Turbo Torrent">
<option value= "TorrentSpy Rufus">
<option value= "µTorrent">
<option value= "XTorrent">
<option value= "ZipTorrent">
 </datalist>

 <center><div class="g-recaptcha" data-theme="light" data-sitekey="<?php echo $site_config['SITEKEY']; ?>"></div></center>
                        <div class="form-button">
                               <button id="submit" type="submit" class="ibtn">Register</button>
                           </div>
                       </form>
                   </div>
               </div>
           </div>
       </div>
   </div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>
</table>
</form>

<!--captcha shit. Delete if not working-->
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<!--end captcha shit -->

<?php
//end_frame();
?>
Captcha TTv3 — 2021-09-08 23:27:25 in v3 Mods in Progress
I will try this and see how it works on my version
SQL Error — 2021-09-08 22:15:33 in v3 Support
Maybe this can help you. Wish I could help more, But I havent used cpanel in 15 years https://support.cpanel.net/hc/en-us/articles/360060133213-How-to-disable-MySQL-Strict-Mode-
Captcha Google — 2021-09-07 20:17:45 in v3 Mods Requests
I tried this once before and didnt have any luck. I dont remember why, so I always just used the captcha slider. Do you have the slider at least? Have you tried getting the code from the account-login page?
SQL Error — 2021-09-06 15:32:44 in v3 Support
im not sure, you may have to ask your host
SQL Error — 2021-09-06 13:25:57 in v3 Support
start by disabling strict mode in your sql server
Data problem — 2021-08-29 20:56:55 in v2.08 Support
well, It would be cool if you posted about why that happened. We can all learn something  :thumb
Data problem — 2021-08-28 12:56:53 in v2.08 Support
when did this problem start?
error announce — 2021-08-27 18:45:18 in v3 Support
My personal copy of V3 micro edition has always had this. The copy on github was direct conversion of the 2.08svn without any modifications other than the necessary modifications to operate under php 7+. Maybe I should go ahead and update the announce file in that copy to avoid future confusions. Github announce file updated
////////////////// NOW WE DO THE TRACKER EVENT UPDATES ///////////////////

if ($event == "stopped") { // UPDATE "STOPPED" EVENT
       SQL_Query_exec("DELETE FROM peers WHERE $selfwhere");
       if (mysqli_affected_rows($GLOBALS["DBconnector"])){
           if ($self["seeder"] == "yes")
               $updateset[] = "seeders = (CASE WHEN (seeders < 1) THEN 0 ELSE (seeders - 1) END)";
           else
                $updateset[] = "leechers = (CASE WHEN (leechers < 1) THEN 0 ELSE (leechers - 1) END)";
       }
}

if ($event == "completed") { // UPDATE "COMPLETED" EVENT    
   $updateset[] = "times_completed = times_completed + 1";

if ( $MEMBERSONLY )
{
SQL_Query_exec("INSERT INTO completed (userid, torrentid, date) VALUES ($userid, $torrentid, '".get_date_time()."')");
//uncomment below if using snatched table
//SQL_Query_exec("UPDATE LOW_PRIORITY `snatched` SET `completed` = '1' WHERE `tid` = '$torrentid' AND `uid` = '$userid' AND `utime` = '" . gmtime() . "'");
}
}//END COMPLETED

if (isset($self)){// NO EVENT? THEN WE MUST BE A NEW PEER OR ARE NOW SEEDING A COMPLETED TORRENT
   
   SQL_Query_exec("UPDATE peers SET ip = " . sqlesc($ip) . ", passkey = " . sqlesc($passkey) . ", port = $port, uploaded = $uploaded, downloaded = $downloaded, to_go = $left, last_action = '".get_date_time()."', client = " . sqlesc($agent) . ", seeder = '$seeder' WHERE $selfwhere");

   if (mysqli_affected_rows($GLOBALS["DBconnector"]) && $self["seeder"] != $seeder){
       if ($seeder == "yes"){
           $updateset[] = "seeders = (CASE WHEN (seeders < 1) THEN 0 ELSE (seeders - 1) END)";
            $updateset[] = "leechers = (CASE WHEN (leechers < 1) THEN 0 ELSE (leechers - 1) END)";
       } else {
           $updateset[] = "seeders = (CASE WHEN (seeders < 1) THEN 0 ELSE (seeders - 1) END)";
           $updateset[] = "leechers = (CASE WHEN (leechers < 1) THEN 0 ELSE (leechers - 1) END)";
       }
   }
Well, you definitely dont want your config file to be writeable, thats just asking for problems. I suppose the invite function could be moved outside that file and placed into its own class. I never really thought about it, but maybe something could be done. Maybe someone has already done that. m-jay has been working on something similar with being able to edit the config on site. Lets wait and see what others think about it.
error announce — 2021-08-15 19:43:16 in v3 Support
hmm, nothing in the database on my announce has a BIGINT value. Perhaps you made a change to your database at some point?
I keep mentioning this, but make sure SQL strict mode is turned off. It will cause all kinds of errors that get hard to trace. If you turn it off, then things get simpler.
putty in to your server, or use terminal, add to the bottom of my.cnf by editing it using sudo nano /etc/mysql/my.cnf
[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION

restart mysql server
sudo service mysql restart
I think this is the proper way to write that autoload function, but I still dont know what it does lol
spl_autoload_register(function ($f) {
   require_once('backend/' . $f . '.php');
});
What update are you looking for? Maybe I can help. Are you having problems? If you were waiting for the person who posted above who said "ill do a update on this soon", then you will be waiting forever, because that person was a former member who did nothing to help anyone ever lol. The mod still works just fine. I have fine tuned a few things, but I would need to know what area is a problem for you in order to let you know what I changed
Is this edit even needed. Not quite sure what it ever did to be honest
  function __autoload( $f )
{
require_once('backend/' . $f . '.php');
}
Test site with php 8 — 2021-07-28 19:42:07 in v3 Support
maybe this works for you. I have changed several lines like this, but Im not using php 8, so I cant be 100% sure on it
$shortname = isset(CutName(htmlspecialchars($a["name"]), $char1));
java_klappe issue — 2021-07-09 19:06:29 in v3 Support
yea, yours is probably better spirit
java_klappe issue — 2021-07-08 21:25:55 in v3 Support
I found this issue, not sure if it matters much, but I researched because I got bored and found a solution for it. I assume it works. feel free to try this and see if it even makes a difference. Its a fix for the document ready function in backend/java_klappe.js
  (function($) {   
 $(document).ready(function()
 {
     var items = $('.showHide');

     for ( i = 1; i < items.length + 1; i++ )
     {                                    
         if ( getCookie('slidingDiv' + i) == 'hide' )
         {
             $(".showHide[id="+i+"]").html("");
             $('.slidingDiv' + i).hide();      
         }
         else
         {
             $(".showHide[id="+i+"]").html("");
             $('.slidingDiv' + i).show();  
         }
     }
   }
    ) (jQuery);
TorrentTrader 3.0 — 2021-07-06 10:50:00 in v3 Download
changing SQL_Query_exec to mysqli_query will require a database connection added to the argument line. Just leave it sql_query_exec, that is not your issue. Im betting that its countable that is doing it. and the count for the array. try this code
	if (is_countable($filelist) && count($filelist)) {
foreach ($filelist as $file) {
$dir = '';
$size = $file["length"];
$count = count($file["path"]);
for ($i=0; $i<$count;$i++) {
if (($i+1) == $count)
$fname = $dir.$file["path"][$i];
else
$dir .= $file["path"][$i]."/";
}
SQL_Query_exec("INSERT INTO `files` (`torrent`, `path`, `filesize`) VALUES($id, ".sqlesc($fname).", $size)");
}
} else {
SQL_Query_exec("INSERT INTO `files` (`torrent`, `path`, `filesize`) VALUES($id, ".sqlesc($TorrentInfo[3]).", $torrentsize)");
}

if (!is_array($annlist)) {
$annlist = array(array($announce));
}
foreach ($annlist as $ann) {
foreach ($ann as $val) {
if (strtolower(substr($val, 0, 4)) != "udp:") {
SQL_Query_exec("INSERT INTO `announce` (`torrent`, `url`) VALUES($id, ".sqlesc($val).")");
}
}
}

if ($nfo == 'yes') {
           move_uploaded_file($nfofilename, "$nfo_dir/$id.nfo");
   }
TorrentTrader 3.0 — 2021-07-03 14:47:51 in v3 Download
seems like you made a bad edit somewhere.
I have this commented out in my functions.php file from back when I tried cloudflare, maybe it can be of some use to you
// cloudflare Server use addon 10-8-2014
// Updated getip with validation
//function getip(){    if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {        $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];        return $ip;    }    foreach (array(        'HTTP_CLIENT_IP',        'HTTP_X_FORWARDED_FOR',        'HTTP_X_FORWARDED',        'HTTP_X_CLUSTER_CLIENT_IP',        'HTTP_FORWARDED_FOR',        'HTTP_FORWARDED',        'HTTP_CF_CONNECTING_IP',        'REMOTE_ADDR'    ) as $key) {        if (array_key_exists($key, $_SERVER) === true) {            foreach (array_map('trim', explode(',', $_SERVER[$key])) as $ip) {                if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {                    return $ip;                }            }        }    }}
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: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728