Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Torrent Trader (http://www.bvlist.com/forumdisplay.php?f=29)
-   -   account-login successful redirect script (http://www.bvlist.com/showthread.php?t=12143)

BamBam0077 29th August 2019 20:28

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


allfree 1st September 2019 14:22

goes on tbdev 08 ??


should be put in takelogin.php right?

LeeHowarth 1st September 2019 15:59

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.

BamBam0077 4th September 2019 04:49

Quote:

Originally Posted by allfree (Post 54047)
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 :chch:

allfree 4th September 2019 14:50

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 <= 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

?>


Napon 4th September 2019 14:56

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

antimidas 4th September 2019 15:34

Quote:

Originally Posted by Napon (Post 54054)
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.

fireknight 4th September 2019 15:37

Quote:

Originally Posted by Napon (Post 54054)
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:

papad 4th September 2019 18:14

@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.
:drink:

BamBam0077 4th September 2019 18:51

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
?>


Napon 4th September 2019 20:35

Quote:

Originally Posted by fireknight (Post 54058)
@ 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:


@fireknight im a coder like your self make my own code for a start i do not want the crap code above...if i want to make this mod it would not look like the above..i do not neeed any of it as ive made my own cores 2 of then..also the users on here think i have not think again there is one members on here who as seen my core and on the core so shoot the fuck up the want to be coders

LeeHowarth 8th September 2019 17:56

Quote:

Originally Posted by BamBam0077 (Post 54052)
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 :chch:

It is clear that i offended you, if your going to spit your dummy out at abit of criticism then you 100% are not a developer.

BamBam0077 10th September 2019 13:09

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 
?>

https://www.bvlist.com/showthread.php?t=9784

Napon 10th September 2019 15:02

still shit coder

LeeHowarth 10th September 2019 18:34

Quote:

Originally Posted by BamBam0077 (Post 54075)
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 
?>

https://www.bvlist.com/showthread.php?t=9784

That code is not secure. On older versions of PHP a header injection will be possible e.g:

%0DLocation:%20http://google.com/%0D

antimidas 10th September 2019 21:24

Quote:

Originally Posted by Napon (Post 54080)
still shit coder

better coder than you

BamBam0077 11th September 2019 00:42

Secure $msg inside queries duh :war:
https://www.php.net/manual/en/functi...ape-string.php

Update template system to avoid std's :smack:

*sqlesc($username,$id)


All times are GMT +2. The time now is 20:12.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.