always redirected to index.php - no matter which link I click

Closed
O Other (Pre-Sale Questions, etc.) August 16, 2018
Login to reply
Bernhard Lukas
6 years ago
Resolved.
Bernhard Lukas
6 years ago

Hi, 

my purchase code is: [censored]

I bought a support renewal, but this system says, that the support is not valid any more - so i chose the category other (presale,...)

I have installed advanced security today and have a problem:


Every user who is not admin gets redirected always to the index.php when he clicks on any link. I built some subsites and implemented them into the main navbar. When a user clicks on one of these links, the gets redirected to the index. In the header.php I only check if the user is logged in and show - depending on his role different navbars. It works, that I get displayed the right header for the user. 


you can try it out here: http:// personal.alarmzone.eu


Admin:


admin


admin123


Normal user:


wal123


admin123




my header.php


<?php




include dirname(__FILE__) . '/../ASEngine/AS.php';


// von Bernhard eingefügt


require_once "/html/classes/autoload.inc.php";




if (! app('login')->isLoggedIn()) {


    redirect("login.php");


}




$currentUser = app('current_user');




$user_id = $userId = ASSession::get('user_id');


$currentUserDetails = app('user')->getDetails($user_id);




$role = app('current_user')->role;




?>


<!doctype html>


<html lang="de">


    <head>


        <meta charset="utf-8">


        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">


        <meta name="author" content="BFS Personal">




        <title><?= WEBSITE_NAME ?></title>




        <link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css" media="all" />


        <link rel="stylesheet" href="assets/css/font-awesome.min.css" type="text/css" media="all" />


        <link rel="stylesheet" href="assets/css/app.min.css" type="text/css" media="all" />


        <!-- TODO Produktiv auf .min ändern-->


        <link rel="stylesheet" href="assets/css/mdb.css" type="text/css" media="all" />


        <link rel="stylesheet" href="assets/css/style.min.css" type="text/css" media="all" />


    </head>




    <body class="bfs-skin">


        <div class="cover-container d-flex flex-column">




            <?php


                if($role == 'admin')


                {


                    include 'be_navbar.php';


                }


                else


                {


                    include 'navbar.php';


                }


            ?>






            <!-- start: container -->


            <div class="container pt-4">




// EO header.php


the nabber.php and the be_navbar.php do not contain any php




Thanks in advance for your Help!




best Regards from Austria,


Bernhard