<?php 
	session_start();
	
	if($_SESSION['logado'] <> 1){
		header("Location: ./index");
	}
	
	
   if($_SESSION['id_loja'] == 0){
	   if($_SESSION['id_type'] != 1){
			  @$view2 = $_GET['view'];

		   switch ($view2){
				case "usuarios":
					header("Location: ./main?view=analise");
					break;
				case "config":
					header("Location: ./main?view=analise");
					break;
				case "dashboard":
					header("Location: ./main?view=analise");
					break; 				
				default:
				
					break;				
		   }
	   }
   }else{
	   
	   @$view2 = $_GET['view'];

	   switch ($view2){
		   
			case "usuarios":
				header("Location: ./main?view=analise");
				break;
			case "config":
				header("Location: ./main?view=analise");
				break;
			case "dashboard":
				header("Location: ./main?view=analise");
				break; 
			default:
			
				break;	
				
	   }
	   
	   
	   
   }

	
	require_once("./backend/config/geral.php");
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
  <meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<title><?php echo $CONFIG_GLOBAL['title']; ?></title>
	<meta content='width=device-width, initial-scale=1.0, shrink-to-fit=no' name='viewport' />
	<link rel="icon" href="./assets/img/icon.ico" type="image/x-icon"/>

	<!-- Fonts and icons -->
	<script src="./assets/js/plugin/webfont/webfont.min.js"></script>
	<script>
		WebFont.load({
			google: {"families":["Lato:300,400,700,900"]},
			custom: {"families":["Flaticon", "Font Awesome 5 Solid", "Font Awesome 5 Regular", "Font Awesome 5 Brands", "simple-line-icons"], urls: ['./assets/css/fonts.min.css']},
			active: function() {
				sessionStorage.fonts = true;
			}
		});
	</script>

	<!-- CSS Files -->
	<link rel="stylesheet" href="./assets/css/bootstrap.min.css">
	<link rel="stylesheet" href="./assets/css/atlantis.min.css">

	<!-- CSS Just for demo purpose, don't include it in your project -->
	<link rel="stylesheet" href="./assets/css/demo.css">
	<!-- slect multiplo -->
	<!-- Latest compiled and minified CSS -->
	<link rel="stylesheet" href="./assets/css/bootstrap-select.min.css">
	<link rel="stylesheet" href="./assets/css/jquery.dataTables.min.css">
    <link rel="stylesheet" href="./assets/css/animate.min.css">
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

	<!-- slect multiplo -->
	
</head>
<body>
	<div class="wrapper">