function logged_in_redirect() { if (logged_in() === true) { $session_user_id = $_SESSION['user_id']; $user_data = user_data($session_user_id, 'user_id', 'username', 'password'); if (admin_access($user_data['username']) === false) { header('Location: index.php'); exit; } } }
<?php admin_access(); $is_elements = true; //d($modulsdsdes ); include 'list.php'; ?>