<?php 
    // include "config/setup.php" ;
    // session_start();
    // $prof_id =  $_SESSION['user_id'];
    // $log = $config->query("SELECT * FROM master_login WHERE Master_id = '$prof_id' ") ;
    // $log_adm = $log->fetch_assoc();        
    // if($log_adm['Master_Type'] == 1){
    //     $_SESSION['id'] = $log_adm['Master_id'];
    //     $_SESSION['username'] = $log_adm['Master_Name'];
    //     $_SESSION['usertype']  = $log_adm['Master_Type'];
    //     $_SESSION['main']  = "Admin";
    //     header("Location:Main/dashboard.php");
    // }else{
    //     header("Location:logout.php");
    // }
?>



<?php 

    include('config/setup.php');
    include('session.php');
     
    if($session__usertype== 1){
        $_SESSION['main'] = 'admin';
        header('location:Main/dashboard.php');
    }else if($session__usertype == 0){
        header('location:users.php');
    }else{
        header('location:logout.php');
    }

?>
