Hi,
This is causing page not to redirect properly
If I remove the headers the page loads, what could the problem be?
This is causing page not to redirect properly
Code:
if ( $auth_ok_check != $_SESSION[auth_ok] )
{
header( "Location: ".$shopurl."secure/login.php?next={$_GET['next']}&shk&p={$_SERVER['PHP_SELF']}" );
exit( );
}
if ( preg_match( "/secure/", "{$_SERVER['PHP_SELF']}" ) )
{
$isaccount = "1";
}
}
if ( preg_match( "/".$adminDir."/", "{$_SERVER['PHP_SELF']}" ) && !preg_match( "/adlogin.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/forgetful.php/", "{$_SERVER['PHP_SELF']}" ) )
{
if ( $admin_ok_check != $_SESSION[admin_ok] )
{
header( "Location: ".$adminurl."adlogin.php" );
exit( );
}
if ( preg_match( "/".$adminDir."/", "{$_SERVER['PHP_SELF']}" ) )
{
$isadmin = "1";
}
}
$noadirs = count( $admin_dirs );
$i = 0;
for ( ; $i <= $noadirs; ++$i )
{
if ( !preg_match( "/admin\\/".$admin_dirs[$i]."/", "{$_SERVER['PHP_SELF']}" ) && preg_match( "/".$admin_dirs[$i]."/", "{$_SESSION['admin_type']}" ) )
{
continue;
}
header( "Location: ".$adminurl."perms.php?noperm={$admin_dirs[$i]}" );
exit( );
}
Comment