<?php 
include 'session.php';
include 'controller.php';
    
    $sess_id = $_SESSION['sess_id'];
    $email = $_SESSION['email'];
    $role = $_SESSION['role'];
    $privilege_id = $_SESSION['privilege_id'];
    $institut_id = $_SESSION['institut_id'];
    $fmly_name = $_SESSION['family_name'];
    $fst_name = $_SESSION['first_name'];
    $usaccess = $_SESSION['us_access'];
    $phne  = $_SESSION['phone'];
    $u_function = $_SESSION['u_function'];
    $accid =  $_SESSION['accid'];
    
    $SqlPdo = $conn->prepare("SELECT * FROM tbl_user_accounts u
    INNER JOIN tbl_role r ON r.role_id=u.user_role 
    INNER JOIN tbl_user_access a ON a.last_acc = u.user_id 
    INNER JOIN tbl_title t ON t.title_id = a.title_id 
    INNER JOIN tbl_rank rk ON rk.rank_id = a.rank_id 
    WHERE a.last_acc='".$accid."'");
    $SqlPdo->execute();
    while($GetPdo = $SqlPdo->fetch()){
        
     $family_name = $GetPdo['fst_name'];
     $first_name = $GetPdo['fmly_name'];
     $acc_id = $GetPdo['u_id'];
     $role_id = $GetPdo['role_id'];
     $role_name = $GetPdo['role_name'];
     $priviledge = $GetPdo['u_function'];
     $userid = $GetPdo['user_id'];
     $tle_id = $GetPdo['title_id'];
     $pvge = $GetPdo['privilege_id'];
     $rankId = $GetPdo['rank_id'];
     $title_name = $GetPdo['title_name'];
     $RkName = $GetPdo['rank_name'];
          
     $check_path = $db->prepare('SELECT *FROM tbl_path_uploads WHERE stt=1');
     $check_path->execute();
     $getPath = $check_path->fetch();
     $path_upload = $getPath['path_upload'];
     $down_path = $getPath['down_path'];
     
    }

?>