<?php
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
echo '<script>setTimeout(function(){ window.location="../../index.php" }, 10);</script>';
exit;
}


if($blockstat == "Blocked"){
$_SESSION["loggedin"] = false;
echo '<script>setTimeout(function(){ window.location="../../blocked.php" }, 10);</script>';
   exit;
}


if($settings['emailverify'] === "Yes" && $emailverify !== "Completed" ){
$_SESSION["loggedin"] = false;
echo '<script>setTimeout(function(){ window.location="../../blockedactive.php?refid=$accno" }, 10);</script>';
   exit;
}



?>


<!doctype html>
<html lang="en">

<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <!-- Required meta tags -->
    
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="../../assets/vendor/bootstrap/css/bootstrap.min.css">
    <link href="../../assets/vendor/fonts/circular-std/style.css" rel="stylesheet">
    <link rel="stylesheet" href="../../assets/libs/css/style.css">
    <link rel="stylesheet" href="../../assets/vendor/fonts/fontawesome/css/fontawesome-all.css">
    <link rel="stylesheet" href="../../assets/vendor/charts/chartist-bundle/chartist.css">
    <link rel="stylesheet" href="../../assets/vendor/charts/morris-bundle/morris.css">
    <link rel="stylesheet" href="../../assets/vendor/fonts/material-design-iconic-font/css/materialdesignicons.min.css">
    <link rel="stylesheet" href="../../assets/vendor/charts/c3charts/c3.css">
    <link rel="stylesheet" href="../../assets/vendor/fonts/flag-icon-css/flag-icon.min.css">
      <script src="../../assets/vendor/sweetalert2/dist/sweetalert2.min.js"></script>
     <link rel="stylesheet" href="../../assets/vendor/sweetalert2/dist/sweetalert2.min.css">
    <title><?php echo $_SERVER['SERVER_NAME'];?> | Airtime VTU | Electricity Token | Data | TV</title>
    <style>
        
        .responsive {
  width: 100%;
  height: auto;
 
		}

 .cardpay{
	 background-image:url('../../assets/images/paybutton.png');
	 width:220px;
	 height:70px;
	border: 0px;
	font-size: 0;
	 cursor:pointer;
	 background-color:transparent;
	 }


    </style>
</head>

<body>
    <!-- ============================================================== -->
    <!-- main wrapper -->
    <!-- ============================================================== -->
    <div class="dashboard-main-wrapper">
        <!-- ============================================================== -->
        <!-- navbar -->
        <!-- ============================================================== -->
        <div class="dashboard-header">
            <nav class="navbar navbar-expand-lg bg-white fixed-top">
                <a class="navbar-brand" href="../../dashboard.php"><?php logo1($sitelogo)?></a>
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse " id="navbarSupportedContent">
                    <ul class="navbar-nav ml-auto navbar-right-top">
                        <li class="nav-item">
                            <div id="custom-search" class="top-search-bar">
                                <button  class="btn btn-rounded btn-success" onClick="buy()">Credit Wallet</button>
                            </div>
                            
                            <script>
                            
                            function buy(){    
                        window.location="../../buy_credit.php";        
                            }
                            </script>
                        </li>
                      
                        <li class="nav-item dropdown nav-user">
                            <a class="nav-link nav-user-img" href="#" id="navbarDropdownMenuLink2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><img src="../../assets/images/user.png" alt="" class="user-avatar-md rounded-circle"></a>
                            <div class="dropdown-menu dropdown-menu-right nav-user-dropdown" aria-labelledby="navbarDropdownMenuLink2">
                                <div class="nav-user-info">
                                    <h5 class="mb-0 text-white nav-user-name"><?php echo $data['firstname'];?> <?php echo $data['lastname'];?> </h5>
                                    <span class="status"></span><span class="ml-2"><?php echo $data['status'];?></span>
                                </div>
                                  <a class="dropdown-item" href="../../profile.php"><i class="fas fa-user mr-2"></i>Profile</a>
                                <a class="dropdown-item" href="../../resetpass.php"><i class="fas fa-cog mr-2"></i>Change Password</a>
                                <a class="dropdown-item" href="../../logout"><i class="fas fa-power-off mr-2"></i>Logout</a>
                            </div>
                        </li>
                    </ul>
                </div>
            </nav>
        </div>