Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Torrent Trader
Reply
  #1  
Old 29th August 2019, 20:28
BamBam0077's Avatar
BamBam0077 BamBam0077 is offline
Support
 
Join Date: Jul 2013
P2P
Posts: 311
Default account-login successful redirect script
PHP Code:
else {
    
$successful true;
   if(
$successful === true){ 
     echo 
"<div style='background-color: #353939;border: 1px solid #666;color:green;'>
           <text>Successful Message</text>
           </div> <div style='padding: 0.1em;'></div>
           <text>Thank You!, Accessing Account </text> 
          
           <script>
            setTimeout(function () { window.location.href= 'index.php'; // the redirect goes here 
             },5000); // 5 seconds 
           </script>"
;
    die();
   } else { 
    
// go fuck yourself for not believing!!
          //    header("Refresh: 0; url=index.php");
          //    die();
        
} else {
        
show_error_msg(T_("ACCESS_DENIED"), $message1);
    } 
__________________
\sudo,yum/
Reply With Quote
  #2  
Old 1st September 2019, 14:22
allfree's Avatar
allfree allfree is offline
Member
 
Join Date: Aug 2019
Posts: 6
Default
goes on tbdev 08 ??


should be put in takelogin.php right?
Reply With Quote
The Following User Says Thank You to allfree For This Useful Post:
BamBam0077 (11th September 2019)
  #3  
Old 1st September 2019, 15:59
LeeHowarth's Avatar
LeeHowarth LeeHowarth is offline
TT
 
Join Date: Nov 2008
Posts: 100
Default
I would not use this code, it's alot of crap to be honest.

what is the purpose of:

Code:
 $successful = true; 
 if($successful === true){  
 }
Secondly, javascript should not be used to redirect a user, what happens if they don't have javascript enabled?

A better approach is to use the meta tag.

And lastly

Code:
 } else { 
        show_error_msg(T_("ACCESS_DENIED"), $message, 1);
Will cause a syntax error.
Reply With Quote
The Following 2 Users Say Thank You to LeeHowarth For This Useful Post:
BamBam0077 (11th September 2019), papad (4th September 2019)
  #4  
Old 4th September 2019, 04:49
BamBam0077's Avatar
BamBam0077 BamBam0077 is offline
Support
 
Join Date: Jul 2013
P2P
Posts: 311
Default
Quote:
Originally Posted by allfree View Post
goes on tbdev 08 ??


should be put in takelogin.php right?
Share your takelogin.php script please.

@LeeHowarth
For someone who developed TT you sure seem to either sound like your mum kicked your head in or simply your dad forgot to wear a condom
__________________
\sudo,yum/
Reply With Quote
  #5  
Old 4th September 2019, 14:50
allfree's Avatar
allfree allfree is offline
Member
 
Join Date: Aug 2019
Posts: 6
Post re my takelogin
PHP Code:
<?

require_once("include/bittorrent.php");

if (!mkglobal("username:password"))
    die();

dbconn();

function bark($text = "Username or password incorrect")
{
  stderr("<center>Login failed !</center>", $text);
}

$res = mysql_query("SELECT id, passhash, secret, enabled FROM users WHERE username = " . sqlesc($username) . " AND status = 'confirmed'");
$row = mysql_fetch_array($res);

if (!$row)
    bark();

if ($row["passhash"] != md5($row["secret"] . $password . $row["secret"]))
    bark();

if ($row["enabled"] == "no")
    bark("<center>This account has been disabled.</center>");

// ADN MOD  PERMANENT LOGIN
$expires = (int) $_POST["expires"];

if (!$expires or $expires <= 0 or $expires > 31556926) {
 $expires = 0x7fffffff;
} else {
 $expires = time() + $expires;
}

logincookie($row["id"], $row["passhash"], 1, $expires);  
// END MOD  PERMANENT LOGIN

/// and mod login return
if (!empty($_POST["returnto"]))
    header("Location: $BASEURL$_POST[returnto]");
else
    header("Location: $BASEURL/my.php");
///* end mod login return

?>
Reply With Quote
The Following User Says Thank You to allfree For This Useful Post:
BamBam0077 (11th September 2019)
  #6  
Old 4th September 2019, 14:56
Napon's Avatar
Napon Napon is offline
Senior Member
 
Join Date: Feb 2016
P2P
Posts: 485
Default
ive known LeeHowarth for some years and hes a very good coder and what is saying is sweets code...As for your self you now nothing about codeing at all you just think you do.... Or should we copy and past code do not say you do not Remember the shoutbox you was in with a few coders and the owner wanted a mod and you told the owner nps i can copy and past that it and the owner got shoot of you oh yes we all ermember that too....so do not say shit about LeeHowarth when you now nothing at all

just side allfree this is TT forum not TBDEV takelogin
__________________
https://uploadfiles.io/lgekz
Reply With Quote
The Following User Says Thank You to Napon For This Useful Post:
BamBam0077 (11th September 2019)
  #7  
Old 4th September 2019, 15:34
antimidas's Avatar
antimidas antimidas is offline
Senior Member
 
Join Date: Mar 2011
P2P
Posts: 47
Default
Quote:
Originally Posted by Napon View Post
ive known LeeHowarth for some years and hes a very good coder and what is saying is sweets code...As for your self you now nothing about codeing at all you just think you do.... Or should we copy and past code do not say you do not Remember the shoutbox you was in with a few coders and the owner wanted a mod and you told the owner nps i can copy and past that it and the owner got shoot of you oh yes we all ermember that too....so do not say shit about LeeHowarth when you now nothing at all

just side allfree this is TT forum not TBDEV takelogin
Did you not just run to Thor because of people "slagging" you? SHUT THE FUCK UP!!!! Don't cry about being picked on, then turn around and be a bully. FFS!And for the love of god, learn some fucking english! You live in England for god's sake. Just stay the hell out of it. If not, expect me giving you shit.

[28th August 2019 09:10] Napon: @Thor thax for removing the threads its always some member who starts it off can not keep hes mouth shoot

[29th August 2019 07:57] Napon: @Thor Good you now me i only have ago at them who start it off apart from that im quite mate yes it needs sorting out big time clean it up...ive been on here for years about 10 now ive also help alot of users out here from TSSE to tbdev..too i did have a colur class now its gone..

Tell ya what... You stay the hell out of the u-232 area and leave it to the ACTUAL support ppl, and I will leave you alone. Deal? If not, so be it. I'll just keep fucking with you. Eventually, you are going to make every source leave just like pu-239. Keep giving u-232 users false and otherwise retarded ass advice, and it will leave too. then you can find some other fucking bridge to hide under.
Reply With Quote
The Following User Says Thank You to antimidas For This Useful Post:
BamBam0077 (4th September 2019)
  #8  
Old 4th September 2019, 15:37
fireknight's Avatar
fireknight fireknight is offline
VIP

 
Join Date: Aug 2010
Australia
Posts: 161
Default
Quote:
Originally Posted by Napon View Post
just side allfree this is TT forum not TBDEV takelogin

@ Napon


Not getting into a fight with you - but it could be changed to work with TBDev 08.
If that's what you wanted to do.
Hell any code can be changed to work with any source.
Just depends on your time frame and coding skills.


Yes TBDev 08 is old code.
But end of day - it comes down to the site owners call - to use what ever code they want.


We ( coders ) do not like Xam or his code - because he uses others peoples code - claim it for his code - then encrypts it for his own gain.


But we do not blame people for using his source - Such is life.

Bump:

Last edited by fireknight; 4th September 2019 at 15:46. Reason: Fixng typos - I have broken my tumb at work
Reply With Quote
The Following 2 Users Say Thank You to fireknight For This Useful Post:
BamBam0077 (4th September 2019), papad (4th September 2019)
  #9  
Old 4th September 2019, 18:14
papad's Avatar
papad papad is offline
Elite
 
Join Date: Feb 2013
P2P
Posts: 85
Default
@fireknight well said regarding.....

Quote:
We ( coders ) do not like Xam or his code - because he uses others peoples code - claim it for his code - then encrypts it for his own gain.


But we do not blame people for using his source - Such is life.
Reply With Quote
The Following User Says Thank You to papad For This Useful Post:
BamBam0077 (4th September 2019)
  #10  
Old 4th September 2019, 18:51
BamBam0077's Avatar
BamBam0077 BamBam0077 is offline
Support
 
Join Date: Jul 2013
P2P
Posts: 311
Default
PHP Code:
<?php

require_once("include/bittorrent.php");

if (!
mkglobal("username:password"))
    die();

dbconn();

function 
bark($text "Username or password incorrect")
{
  
stderr("<center>Login failed !</center>"$text);
}

$res mysql_query("SELECT id, passhash, secret, enabled FROM users WHERE username = " sqlesc($username) . " AND status = 'confirmed'");
$row mysql_fetch_array($res);

if (!
$row)
    
bark();

if (
$row["passhash"] != md5($row["secret"] . $password $row["secret"]))
    
bark();

if (
$row["enabled"] == "no")
    
bark("<center>This account has been disabled.</center>");

// ADN MOD  PERMANENT LOGIN
$expires = (int) $_POST["expires"];

if (!
$expires or $expires <= or $expires 31556926) {
 
$expires 0x7fffffff;
} else {
 
$expires time() + $expires;
}

logincookie($row["id"], $row["passhash"], 1$expires);  
// END MOD  PERMANENT LOGIN

/// and mod login return 
if (!empty($_POST["returnto"])) { 
 
header("Location: $BASEURL$_POST[returnto]");
} else { 
 
$successful true
 if(
$successful === true){  
   echo 
"<div style='background-color: #353939;border: 1px solid #666;color:green;'> 
           <text>Successful Message</text> 
           </div> <div style='padding: 0.1em;'></div> 
           <text>Thank You!, Accessing Account </text>  
           
           <script> 
            setTimeout(function () { window.location.href= 'my.php'; // the redirect goes here  
},5000); // 5 seconds  
</script>"
;  
} else {   
 
header("Location: $BASEURL/my.php"); 
}
///* end mod login return
?>
__________________
\sudo,yum/
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 07:35. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2020, vBulletin Solutions Inc.