<?php
require("../database/dbConection.php");
$stmAcessoValido  = $rsConexao->prepare("SELECT reg_tb_usuario.aceitou_termo FROM reg_tb_usuario WHERE id_usuario='".$_SESSION['idUsuarioLogado']."'");
$stmAcessoValido  ->execute();
$rsAcessoValido   = $stmAcessoValido->fetch(PDO::FETCH_OBJ);
if($rsAcessoValido->aceitou_termo=='N'){
  header("location: ./");
}
  if(isset($_GET['idsol'])){
    $idSolicitacao  = $_GET['idsol'];
    $comandoFechar = 'onunload="' . "fecharTelaABA('$idSolicitacao')" . '"';
  }else{
    $comandoFechar = "";
  }
?>
<!DOCTYPE html>
<html class="loading" lang="pt-BR" data-textdirection="ltr">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="description" content="Expansão Tecnologia e Consultoria">
    <meta name="author" content="Cláudio Magalhães">
    <title>G-Saúde - Módulo Regulação</title>
    <link rel="shortcut icon" type="image/x-icon" href="../app-assets/images/favicon.png">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i%7CMuli:300,400,500,700" rel="stylesheet">
    <!-- BEGIN VENDOR CSS-->
    <link rel="stylesheet" type="text/css" href="../app-assets/css/vendors.min.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/vendors/css/forms/icheck/icheck.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/vendors/css/forms/icheck/custom.css">    
    <link rel="stylesheet" type="text/css" href="../app-assets/vendors/css/ui/jquery-ui.min.css">    
    <link rel="stylesheet" type="text/css" href="../app-assets/vendors/css/tables/datatable/datatables.min.css">
    
    <!-- END VENDOR CSS-->
    <!-- BEGIN ROBUST CSS-->

    <link rel="stylesheet" type="text/css" href="../app-assets/css/app.min.css">
    <!-- END ROBUST CSS-->
    <!-- BEGIN Page Level CSS-->
    <link rel="stylesheet" type="text/css" href="../app-assets/css/core/menu/menu-types/vertical-menu.min.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/css/core/colors/palette-gradient.min.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/css/plugins/ui/jqueryui.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/css/plugins/forms/extended/form-extended.min.css">    
    <link rel="stylesheet" type="text/css" href="../app-assets/vendors/css/forms/toggle/bootstrap-switch.min.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/vendors/css/forms/toggle/switchery.min.css">    
    <link rel="stylesheet" type="text/css" href="../app-assets/icofont/css/icofont.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/css/core/colors/palette-callout.min.css">

    <link rel="stylesheet" type="text/css" href="../app-assets/vendors/css/forms/toggle/bootstrap-switch.min.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/vendors/css/forms/toggle/switchery.min.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/css/plugins/forms/switch.min.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/css/core/colors/palette-switch.min.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/css/plugins/forms/checkboxes-radios.min.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/vendors/css/forms/selects/selectivity-full.min.css">
    <link rel="stylesheet" type="text/css" href="../app-assets/css/plugins/forms/selectivity/selectivity.min.css">        
    <!-- END Page Level CSS-->
    <!-- BEGIN Custom CSS-->
    <link rel="stylesheet" type="text/css" href="assets/css/style.css">    
    <link rel="stylesheet" type="text/css" href="css/mod_regulacao.css">
    <!-- END Custom CSS-->
    
  </head>
  <body class="vertical-layout menu-expanded fixed-navbar" data-open="click" data-menu="vertical-menu" data-col="2-columns" <?php echo $comandoFechar;?>>
    <!-- fixed-top-->
    <nav class="header-navbar navbar-expand-md navbar navbar-with-menu fixed-top navbar-semi-dark navbar-shadow">
      <div class="navbar-wrapper" style="background-color:#005186; color:#fff">
        <div class="navbar-header" style="background-color:#005186;">
          <ul class="nav navbar-nav flex-row">
            <li class="nav-item"><a class="navbar-brand" href="painel"><img class="brand-logo" alt="Logo g-Saúde" src="../app-assets/images/favicon.png">
              <h3 class="brand-text" style='font-size:18pt'>G-Saúde - Módulo Regulação</h3></a></li>
            <li class="nav-item d-md-none"><a class="nav-link open-navbar-container" data-toggle="collapse" data-target="#navbar-mobile"><i class="fa fa-ellipsis-v"></i></a></li>
          </ul>
        </div>
      </div>
    </nav>

    <!-- ////////////////////////////////////////////////////////////////////////////-->

    <div id="embacado">
	    <table align="center" class="tbEmbacado">
	      <tr>
	 		    <td align="center"><br>
    				<img src="../app-assets/images/processando.gif" width="100px" height="100px">
	 	    		<div id="processandoDados" style="margin-top:20px;">Aguarde! Processando dados...</div>
    	 		</td>
	 	    </tr>	  	
    	</table>
    </div>    