<?php
include('config.php');
ini_set('error_reporting', 0);
ini_set('display_errors', 0);
    
//    session_start();

    
    if((empty($_SESSION['adminuserName']))){
        session_unset();
        unset($_SESSION['adminuserName']);
//        unset($_SESSION['userEmail']);
//         unset($_SESSION['adminuserName']);
        session_destroy();
        header("location: $admin_baseurl");
    }

//    $userName= $_SESSION['userName'];
    $admin_userName = $_SESSION['adminuserName']; 
//echo $admin_userName;
//    $userEmail= $_SESSION['userEmail']; 
    $sqlAssign = "select * from `user_login` where `username` = '$admin_userName' and `type` = 'admin'";                                           // echo $admin_userName ." " . $sqlAssign;
        $resultAssign = mysqli_query($conn, $sqlAssign);                                            
        if (mysqli_num_rows($resultAssign) > 0) {
        $i=1;
        while($rowAssign = mysqli_fetch_assoc($resultAssign)) {
            
            $name = $rowAssign['name'];            
            $u_type = $rowAssign['type'];
            }
        }
//
//if($p_status == '0'){
//    
//    header('location:verify.php');
//    
//}
    
//    $user="select * from `user` where name = '$userName' and email = '$userEmail'";
//    $all_user = mysqli_query($conn, $user); 
//    if($all_user)
//    {
//        $countUser=mysqli_num_rows($all_user);
//    }
//
//    if($countUser != 1){
//       header('location: analytical-tutor.php');
//
//    }

    ?>

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?php echo $name;?> - Dashboard</title>
    
     <!---------------------------------favicon--------------------------------------->
    <link rel="icon" type="image/png" href="<?php echo $admin_baseurl . 'images/';?>fav.png">
    <!---------------------------------favicon--------------------------------------->
    
    
    
    <link rel="stylesheet" href="<?php echo $admin_baseurl;?>vendor/fontawesome/css/font-awesome.css" />
    <link rel="stylesheet" href="<?php echo $admin_baseurl;?>vendor/metisMenu/dist/metisMenu.css" />
    <link rel="stylesheet" href="<?php echo $admin_baseurl;?>vendor/animate.css/animate.css" />
    <link rel="stylesheet" href="<?php echo $admin_baseurl;?>vendor/bootstrap/dist/css/bootstrap.css" />
     <link rel="stylesheet" href="<?php echo $admin_baseurl;?>vendor/summernote/dist/summernote.css" />
    <link rel="stylesheet" href="<?php echo $admin_baseurl;?>vendor/summernote/dist/summernote-bs3.css" />
    
    <link rel="stylesheet" href="<?php echo $admin_baseurl;?>fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css" />
    <link rel="stylesheet" href="<?php echo $admin_baseurl;?>fonts/pe-icon-7-stroke/css/helper.css" />
    <link rel="stylesheet" href="<?php echo $admin_baseurl;?>styles/style.css">
    <link rel="stylesheet" href="<?php echo $admin_baseurl;?>vendor/datatables.net-bs/css/dataTables.bootstrap.min.css" />
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.2/css/bootstrap-select.min.css">
    <link href="<?php echo $admin_baseurl; ?>ckeditor/plugins/codesnippet/lib/highlight/styles/default.css" rel="stylesheet">
    

    <link rel="stylesheet" href="<?php echo $admin_baseurl;?>styles/custom.css" />
    <link href="<?php echo $admin_baseurl; ?>styles/ckeditor-codesnippet.css" rel="stylesheet">

</head>

<body class="fixed-navbar sidebar-scroll">


    <?php     
    include("$u_type/sidebar.php");
//    echo "dk";
?>

    <div id="wrapper">
