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

try this, in torrents-details.php
$TTIMDB = new TTIMDB;
if ((($_data = $TTCache->Get("imdb/$id", 900)) === false) && ($_data = $TTIMDB->Get($row['imdb']))){
               $_data->Poster = $TTIMDB->getImage($_data->Poster, $id);
        if ( ! isset( $_data->imdbTime ) ){
                $_data->imdbTime = time();
                $_data->Alias = 'N/A';
                $_data->imdbVideo = null;
                }
                $TTCache->Set("imdb/$id", $_data, 900);
}

if ( is_object($_data) ) { ?>
        <fieldset class="download">
        <legend><b><?php echo T_("IMDB_SHORT"); ?> - <?php echo $_data->Title; ?></b></legend>
        <table border="0" cellpadding="3" cellspacing="2" width="100%">
    <tr>
        <td width="230"><img src="<?php echo $_data->Poster; ?>" alt="<?php echo $_data->Title; ?>" title="<?php echo $_data->Title; ?>" height="317px" width="214px" /></td>
        <td valign="top">
        <b><?php echo T_("IMDB_LINK"); ?></b><br /> <a href="<?php echo $row['imdb']; ?>" target="_blank"><?php echo htmlspecialchars($row['imdb']); ?></a><br /><br />
        <b><?php echo T_("IMDB_RATED"); ?></b><br /> <?php echo $TTIMDB->getRated( $_data->Rated ); ?><br /><br />
        <b><?php echo T_("IMDB_ALIAS"); ?></b><br /> <?php echo $_data->Alias; ?><br /><br />
        <b><?php echo T_("IMDB_RELEASED"); ?></b><br /> <?php echo $TTIMDB->getReleased($_data->Released); ?><br /><br />
        <b><?php echo T_("IMDB_YEAR"); ?></b><br /> <?php echo $_data->Year; ?><br /><br />
        <b><?php echo T_("IMDB_RUNTIME"); ?></b><br /> <?php echo $_data->Runtime; ?><br /><br />
        <b><?php echo T_("IMDB_GENRE"); ?></b><br /> <?php echo $_data->Genre; ?><br /><br />
        <b><?php echo T_("IMDB_DIRECTOR"); ?></b><br /> <?php echo $_data->Director; ?><br /><br />
        <b><?php echo T_("IMDB_WRITER"); ?></b><br /> <?php echo $_data->Writer; ?><br /><br />
        <b><?php echo T_("IMDB_ACTORS"); ?></b><br /> <?php echo $_data->Actors; ?><br /><br />
        <b><?php echo T_("IMDB_PLOT"); ?></b><br /> <?php echo $_data->Plot; ?>
        </td>
<?php if (($rating = $TTIMDB->getRating($_data->imdbRating)) !== null){ ?>
        <td valign="top" align="center">
<?php echo $rating; ?><br /><br />
        <b><?php echo T_("IMDB_VOTES"); ?></b> <?php echo $_data->imdbVotes; ?>
    </td>
        <?php } ?>
    </tr>
     <tr>
        <td align="right" colspan="3">
        <b><?php echo T_("IMDB_LASTUPDATED"); ?></b> <i><?php echo $TTIMDB->getUpdated($_data->imdbTime); ?></i>
     </td>
     </tr>
     </table>
     </fieldset>
     <br />

<?php if ( strlen( $_data->imdbVideo ) > 3 ){ ?>
        <center><iframe src="http://www.imdb.com/video/imdb/<?php echo $_data->imdbVideo; ?>/player?stop=1" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" height="480" width="643"></iframe></center><br />
<?php }
}
should be. The queries have to be in order
       $ret = SQL_Query_exec("INSERT INTO torrents (filename, owner, name, descr,  vip, image1, image2, category, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, anon, last_action, allocine) VALUES (".sqlesc($fname).", '".$CURUSER['id']."', ".sqlesc($name).", ".sqlesc($descr).", '".$vip."', '".$inames[0]."', '".$inames[1]."', '".$catid."', '" . get_date_time() . "', '".$infohash."', '".$torrentsize."', '".$filecount."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."', '".$langid."','$anon', '".get_date_time()."', ".sqlesc($_POST['allocine']).")"); 
I also have this in account-detail.php. It shows a users IP history
    ///IP history///
begin_frame( "IP History" );
echo "<table align=center cellpadding=0 cellspacing=0 class='ttable_headinner' width='99%'>";
$res = SQL_Query_exec( "SELECT * FROM iplog WHERE userid=$id ORDER BY lastused DESC, timesused ASC" );
echo "<tr><td class='ttable_head'>".T_("IP_ADDRESS")."</td><td class='ttable_head'>".T_("DATE_ADDED")."</td><td class='ttable_head'>".T_("LAST_ACCESS")."</td><td class='ttable_head'>".T_("TIMES_USED")."</td><td class='ttable_head'>Other Users</td></tr>";
$x = 1;
while ( $row = mysqli_fetch_assoc( $res ) ) {
   //Find other users with the same IP
   $res2 = SQL_Query_exec( "SELECT users.id AS id,users.username as username FROM users INNER JOIN iplog ON (iplog.ip = '$row[ip]' AND users.id=iplog.userid AND users.id<>$id)" );
   $usersSame = "";
   while ( $userrow = mysqli_fetch_assoc( $res2 ) ) {
       $usersSame .= "<a href='account-details.php?id=$userrow[id]'>$userrow[username]</a>,&nbsp;";
   }
   echo "<tr align='center'><td>$row[ip]</td><td>" . date( "M d, Y H:i:s", utc_to_tz_time( $row[ 'added' ] ) ) . "</td><td>" . date( "M d, Y H:i:s", utc_to_tz_time( $row[ 'lastused' ] ) ) . "</td><td>" . number_format( $row[ 'timesused' ] ) . "</td><td>$usersSame</td></tr>";
   if ( $x == 1 )
       $x = 2;
   else
       $x = 1;
}
unset( $x );
echo "</table>";
end_frame();
   ///end IP history///
try this account-signup.php. I edited your copy from the post above
<?php
require_once("backend/functions.php");
dbconn();




$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"]) {
       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") {

$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_2"), $password_minlength);
 elseif (strlen($wantpassword) > $password_maxlength)
   $message = sprintf(T_("PASS_TOO_LONG_2"), $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.";

   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);
     
           //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 = '7';
   else
       $signupclass = '1';

SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, last_access, age, country, gender, client, stylesheet, language, class, ip, seedbonus) 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["default_language"], $signupclass, getip(), 0.0))).")");

   $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



stdhead(T_("SIGNUP"));
begin_frame(T_("SIGNUP"));
?>
<?php echo T_("COOKIES"); ?>

<form method="post" action="account-signup.php?takesignup=1">
   <?php if ($invite_row) { ?>
   <input type="hidden" name="invite" value="<?php echo $_GET["invite"]; ?>" />
   <input type="hidden" name="secret" value="<?php echo htmlspecialchars($_GET["secret"]); ?>" />
   <?php } ?>
   <table cellspacing="0" cellpadding="2" border="0">
           <tr>
               <td><?php echo T_("USERNAME"); ?>: <font class="required">*</font></td>
               <td><input type="text" size="40" name="wantusername" /></td>
           </tr>
           <tr>
               <td><?php echo T_("PASSWORD"); ?>: <font class="required">*</font></td>
               <td><input type="password" size="40" name="wantpassword" /></td>
           </tr>
           <tr>
               <td><?php echo T_("CONFIRM"); ?>: <font class="required">*</font></td>
               <td><input type="password" size="40" name="passagain" /></td>
           </tr>
           <?php if (!$invite_row) {?>
           <tr>
               <td><?php echo T_("EMAIL"); ?>: <font class="required">*</font></td>
               <td><input type="text" size="40" name="email" /></td>
           </tr>
           <?php } ?>
           <tr>
               <td><?php echo T_("AGE"); ?>:</td>
               <td><input type="text" size="40" name="age" maxlength="3" /></td>
           </tr>
           <tr>
               <td><?php echo T_("COUNTRY"); ?>:</td>
               <td>
                   <select name="country" size="1">
                       <?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; ?>
                   </select>
               </td>
           </tr>
           <tr>
               <td><?php echo T_("GENDER"); ?>:</td>
               <td>
                   <input type="radio" name="gender" value="Male" /><?php echo T_("MALE"); ?>
                   &nbsp;&nbsp;
                   <input type="radio" name="gender" value="Female" /><?php echo T_("FEMALE"); ?>
               </td>
           </tr>
           <tr>
               <td><?php echo T_("PREF_BITTORRENT_CLIENT"); ?>:</td>
               <td><input type="text" size="40" name="client"  maxlength="20" /></td>
           </tr>
           <tr>
               <td align="center" colspan="2">
               <input type="submit" value="<?php echo T_("SIGNUP"); ?>" />
             </td>
           </tr>
   </table>
</form>
<?php
end_frame();
stdfoot();
?>
I have this in an old account-signup
            //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>";
   }
TorrentTrader 3.0 — 2019-10-25 23:34:54 in v3 Download
feel free to help out any way you can. I think I made it pretty easy to convert things from the 2.08 to 3.0. The main part of 3.0 was a conversion to php 7+. The rest is pretty standard. Take the code and do anything you wish to it. This may help you https://www.torrenttrader.xyz/index.php?threads/php-7-functions-cheat-sheet.9780/
Nice looking layout, but I have to agree with shadows, if you have something coded, maybe people can help tweak it, but rewriting a whole script, thats something else unfortunately
paypal will shut it down. Lots of sites try to use paypal and have gotten the paypal turned off. I dont know what else you could do, but there are lots of sites that have a hard time using paypal. Maybe create a front end site and add some nonsense content and ask for donations from there, just dont do it directly from a torrent site
online today — 2019-10-20 17:51:06 in v3 Mods Requests
the visitors today block does that
Seed Bonus [TTv3] — 2019-10-20 01:50:44 in v3 Mods Completed
can you say if the site_config or CURUSER part worked fine or not? If using spiritblue edit? This seems correct to me. If im wrong, lemme know about it
// Seedbonus upadate 2019 by spiritblue / if() statemement edited by MicroMonkey and beer
if ($site_config["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
loggedinonly();
Torrent listen — 2019-10-07 21:10:55 in v3 Mods Requests
that looks great
Seed Bonus [TTv3] — 2019-10-07 11:07:06 in v3 Mods Completed
try
if ($site_config["SEEDBONUS"])

instead of
if ($CURUSER["SEEDBONUS"])
looks really good
Seed Bonus [TTv3] — 2019-10-06 16:10:40 in v3 Mods Completed
make sure you dont have this twice in your config if using spiritblue edits :) This already exists in your config
$site_config['autoclean_interval'] = '3600'; // Time between each auto cleanup (Seconds).
Seed Bonus [TTv3] — 2019-10-06 15:41:24 in v3 Mods Completed
Good to hear its working for you. You should still disable mysql strict mode unless everything else is working fine for you. Good information found here https://www.torrenttrader.xyz/index.php?threads/please-create-a-video-of-howto-install-torrenttrader-on-a-linux-os.9872/#post-67265
[REQ] BG CHANGER — 2019-10-05 23:23:56 in v2.08 Mod Requests
That is prolly a forum mod, not a TT mod
Seed Bonus [TTv3] — 2019-10-04 22:14:07 in v3 Mods Completed
anyone think this would work in account-signup.php? Just inserting the seedbonus value? Then it should just take over by itself after that. Yes? No? lol
    SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, last_access, age, country, gender, client, stylesheet, language, class, ip, seedbonus) 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["default_language"], $signupclass, getip(), 0.0))).")");
heres mine, maybe it helps. I had this working perfectly in my 2.08 modded release if you wanna grab code from there. https://sourceforge.net/projects/tt-2-08-micro-edition/
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