Zubrag.com :: Forum

zubrag.com => Password Protect Advanced => Topic started by: therockwwe on November 22, 2007, 06:30:27 PM



Title: Going back to login.php after a person has logged in
Post by: therockwwe on November 22, 2007, 06:30:27 PM
Hi

Really enjoying the script

Just having a few issues:

I have a login graphic in my navigation that points to login.php, when a person logs in then clicks the login graphic again it goes to a blank page

Is there anyway to fix this?

Forgot to mention its a frame based website where the navigation is in one frame

Thanks in advance


Title: Re: Going back to login.php after a person has logged in
Post by: zubrag on November 23, 2007, 04:04:41 AM
Hi! Why would you show login graphic after user is logged in?


Title: Re: Going back to login.php after a person has logged in
Post by: therockwwe on November 23, 2007, 05:19:59 PM
Its not really a 'login' graphic

Its meant to be linked to the password protected page (like a members page)

Except I have individual password protected pages (i.e. John.php, Stacey.php, Joe.php)

Should I be linking to something other than login.php??


Title: Re: Going back to login.php after a person has logged in
Post by: zubrag on November 26, 2007, 06:03:16 AM
Find this code in login.php

  if (!$found) {
    showLoginPasswordProtect("");
  }

and add this code after it

  // need to be redirected?
  if (isset($REDIRECTS[$key]) && !empty($REDIRECTS[$key])) {
    header('Location: '
           . ((REDIRECT_PREFIX != '') && (strpos($REDIRECTS[$key], 'http') !== false) ? '' : REDIRECT_PREFIX)
           . $REDIRECTS[$key]);
    exit();
  }


Title: Re: Going back to login.php after a person has logged in
Post by: therockwwe on November 27, 2007, 12:42:07 AM
Thank you so much zubrag

Your response are absolutely amazing

Thank you very much 


Title: Re: Going back to login.php after a person has logged in
Post by: Woody on December 25, 2008, 11:50:15 AM
That worked for me too! I take it you are no longer posting on the site, but thanx for keeping the forum open so peeps who have only just come across your great script can still find the help they need!

I now don't have to worry about adding the link manually into the manager.php for customers to get to the links when they are already logged in, I can also change the login time from 1 minute!

Merry Xmas & Happy New Year to all on here, especially to you Zubrag for making the scripts free!

All the best,

Woody