<?php 
session_start();
if($_SESSION['goodlogin'] != true){
  header('location:../login');
}
$view_wire = explode('/',$_SERVER['REQUEST_URI']);
$view_wire = explode('.', $view_wire[2]);

if($view_wire[0] == 'view_wire' || $view_wire[0] == 'view_withdrawal'){
if(isset($_REQUEST['client_email']) || isset($_SESSION['client_email'])){
	if(isset($_REQUEST['client_email'])){
	$_SESSION['client_email'] = $_REQUEST['client_email'];
	}
	$client_id = $_SESSION['client_email'];
}else{
    header('location:view_account.php');
}
}
require('../app/assist.php');
require('controller.php');
$special = new special;
?>
<!DOCTYPE html>
<html lang="en">

<head>
<title>DASHBOARD - CONTROL PANEL</title>
	<link rel="shortcut icon" href="images/bicon.png">
	<!-- for-mobile-apps -->
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
	<script>
		addEventListener("load", function () {
			setTimeout(hideURLbar, 0);
		}, false);

		function hideURLbar() {
			window.scrollTo(0, 1);
		}
	</script>
	<!-- css files -->
	<link href="css/bootstrap.css" rel='stylesheet' type='text/css' /><!-- bootstrap css -->
	<link href="css/istyle.css" rel='stylesheet' type='text/css' /><!-- custom css -->
	<link href="css/style.css" rel='stylesheet' type='text/css' /><!-- custom css -->
	<link href="css/font-awesome.min.css" rel="stylesheet"><!-- fontawesome css -->
	<!-- //css files -->

	<!-- google fonts -->
	<link
		href="//fonts.googleapis.com/css?family=Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&amp;subset=devanagari,latin-ext"
		rel="stylesheet">

	<!-- //google fonts -->
    <script>
    function getToast(type,msg){
        if(type != false && msg != false){
  const Toast = Swal.mixin({
  toast: true,
  position: 'top-end',
  showConfirmButton: false,
  timer: 5000,
  timerProgressBar: true,
  didOpen: (toast) => {
    toast.addEventListener('mouseenter', Swal.stopTimer)
    toast.addEventListener('mouseleave', Swal.resumeTimer)
  }
})

Toast.fire({
  icon: type,
  title: msg
})
        }
    }
</script>
</head>

<body onload="getToast(<?php echo ($GLOBALS['admin_toast_alert'] == '')?'false,false':$GLOBALS['admin_toast_alert']; ?>)">
	<!-- //header -->
	<header>
		<div class="container">
			<!-- nav -->
			<nav class="pt-3">
				<div id="logo">
					<h1> <a href="index.php" class="text-white">CONTROL PANEL</a></h1>
				</div>
				<label for="drop" class="toggle">Menu</label>
				<input type="checkbox" id="drop" />
				<ul class="menu mt-md-2 ml-auto">
					<li class="mr-lg-4 mr-2"><a href="index.php" class="text-white"><div <?php echo ($view_wire[0] == 'index')?'class="badge badge-dark p-2"':''; ?>>Dashboard</div></a></li>
					<li class="mr-lg-4 mr-2"><a href="view_account.php" class="text-white"><div <?php echo ($view_wire[0] == 'view_account')?'class="badge badge-dark p-2"':''; ?>>View accounts</div></a></li>
					<li class="mr-lg-4 mr-2"><a href="view_messages.php" class="text-white"><div <?php echo ($view_wire[0] == 'view_messages')?'class="badge badge-dark p-2"':''; ?>>View Tickets</div></a></li>
					<li class="mr-lg-4 mr-2"><a href="logout.php" class="text-white">Logout</a></li>
				</ul>
			</nav>
			<!-- //nav -->
		</div>
	</header>
	<!-- //header -->
	<!-- inner banner -->
	<div class="inner-banner2" id="home">
		<div class="container">

		</div>
	</div>
	<!-- inner banner -->