 <?php
 include_once('conexao.php');
 include_once('controller.php');
 include_once('DAO/DAOcarrossel.php');
 
 
 $conn          = new conexao();
 $Daocarrossel    = new Daocarrossel();

 
 
 
 ?>
 
<!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="SucatãoRN">
    <meta name="keywords" content="">
    <!--<meta name="author" content="PIXINVENT">-->
    <title><?php include "titulo.php" ?></title>
    <link rel="apple-touch-icon" href="images/ico/apple-icon-120.png">
     <!--Favicon-->
    <link rel="icon" href="../img/core-img/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">
	
	<!--Adicionar-->
	<link rel="stylesheet" type="text/css" href="fonts/feather/style.min.css">
	<link rel="stylesheet" type="text/css" href="fonts/simple-line-icons/style.min.css">
	<link rel="stylesheet" type="text/css" href="fonts/flag-icon-css/css/flag-icon.min.css">
	<link rel="stylesheet" type="text/css" href="vendors/css/extensions/pace.css">
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	

    <!-- BEGIN VENDOR CSS-->
	<link rel="stylesheet" href="assets/font-awesome-4.7.0/css/font-awesome.min.css">
	
    <!--<link rel="stylesheet" type="text/css" href="css/vendors.min.css">-->
	
    <link rel="stylesheet" type="text/css" href="vendors/css/forms/icheck/icheck.css">
    <link rel="stylesheet" type="text/css" href="vendors/css/forms/icheck/custom.css">
    <link rel="stylesheet" type="text/css" href="vendors/css/charts/morris.css">
    <link rel="stylesheet" type="text/css" href="vendors/css/extensions/unslider.css">
    <link rel="stylesheet" type="text/css" href="vendors/css/weather-icons/climacons.min.css">
    <!-- END VENDOR CSS-->
    <!-- BEGIN ROBUST CSS-->
    <link rel="stylesheet" type="text/css" href="css/app.min.css">
    <!-- END ROBUST CSS-->
    <!-- BEGIN Page Level CSS-->
    <link rel="stylesheet" type="text/css" href="css/core/menu/menu-types/horizontal-top-icon-menu.min.css">
    <link rel="stylesheet" type="text/css" href="css/core/colors/palette-climacon.css">
    <link rel="stylesheet" type="text/css" href="css/pages/users.min.css">
	
	<link rel="stylesheet" type="text/css" href="vendors/css/tables/datatable/datatables.min.css">
    <!-- END Page Level CSS-->
    <!-- BEGIN Custom CSS-->
    <link rel="stylesheet" type="text/css" href="assets/css/style.css">
    <!-- END Custom CSS-->
	<style>
	.table-striped tbody tr.even.selected, .table-striped tbody tr.odd.selected {
    background-color: #db602b!important;
    color: #FFF;
	}
	
	.pagination .page-item.active .page-link {
    background-color: #db602b!important;
    border-color: #db602b!important;
    }
	 
	.pagination .page-link {
    color: #000;
    border: 0px solid #db602b!important;
    }
	
    .card.card-fullscreen {
		display: block;
		z-index: 9999;
		position: fixed;
		width: 100% !important;
		height: 100% !important;
		top: 99px;
		right: 0;
		left: 0;
		bottom: 0;
		overflow: auto;
		}
	
	.btn-primary ~ .dropdown-menu .dropdown-item.active {
    background-color: #db602b!important;
    }
	
	div.dataTables_wrapper div.dataTables_filter {
    text-align: right;
    margin-top: -53px;
	} 
	.card-body {
    
    padding: 3.5rem;
}
	</style>
  </head>
  <body class="horizontal-layout horizontal-top-icon-menu 2-columns   menu-expanded" data-open="hover" data-menu="horizontal-menu" data-col="2-columns">

    <!-- Menu-->
    <?php include "menu.php" ?>
    
    <!-- Horizontal navigation-->

    <div class="app-content content">
      <div class="content-wrapper">
        <div class="content-header row">
        </div>
        <div class="content-body"><!--fitness stats-->
<div class="row">
    <div class="col-12">
        <div class="card">
            <div class="card-content">
                <div class="card-body">
				<h4 class="content-header-title" style="margin-top: -25px;"><i class="icon-graph"></i> Admin - Quality Renováveis</h4><br>
                    <div class="row">
					
					
                      <!--  <div class="col-xl-3 col-lg-6 col-md-12 border-right-grey border-right-lighten-3 clearfix">
                            <div class="float-left pl-2">
                                <span class="grey darken-1 block">Serviços</span>
                                <span class="font-large-3 line-height-1 text-bold-300"><?php echo $resultado_carrossels; ?></span>
                            </div>
							
                        </div>

                        <div class="col-xl-3 col-lg-6 col-md-12 border-right-grey border-right-lighten-3 clearfix">
                            <div class="float-left pl-2">
                                <span class="grey darken-1 block">Clientes</span>
                                <span class="font-large-3 line-height-1 text-bold-300"><?php echo $resultado_cliente; ?></span>
                            </div>
                           
                        </div>
                        <div class="col-xl-3 col-lg-6 col-md-12 border-right-grey border-right-lighten-3 clearfix">
                            <div class="float-left pl-2">
                                <span class="grey darken-1 block">Fornecedores</span>
                                <span class="font-large-3 line-height-1 text-bold-300"><?php echo $resultado_fornecedores; ?></span>
                            </div>
                            
                        </div> 
						
						<div class="col-xl-3 col-lg-6 col-md-12 clearfix">
                            <div class="float-left pl-2">
                                <span class="grey darken-1 block">Usuários</span>
                                <span class="font-large-3 line-height-1 text-bold-300"><?php echo $resultado_kg_entrada-$resultado_kg_saida; ?></span>
                            </div>
                           
                        </div>-->
                       
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>



<!--fitness stats-->

<!-- activity charts 
<div class="row match-height">
    <div class="col-xl-12 col-lg-12">
        <div class="card">
            <div class="card-header no-border-bottom">
                <h4 class="card-title">Gráfico <span class="text-muted text-bold-400">Semanal</span></h4>
                <a class="heading-elements-toggle"><i class="ft-more-horizontal font-medium-3"></i></a>
                <div class="heading-elements">
                    <ul class="list-inline mb-0">
                        <li><a data-action="reload"><i class="ft-rotate-cw"></i></a></li>
                    </ul>
                </div>
            </div>
            <div class="card-content">
                <div class="card-body">
                    <ul class="list-inline text-right m-0">
                        <li>
                            <h6><i class="ft-circle primary"></i> Clientes</h6>
                        </li>
                        <li class="ml-1">
                            <h6><i class="ft-circle success"></i> Vendas</h6>
                        </li>
                        <li class="ml-1">
                            <h6><i class="ft-circle warning"></i> carrossels</h6>
                        </li>
                    </ul>
                    <div id="weekly-activity-chart" class="height-250"></div>
                </div>
            </div>
        </div>
    </div>
    
</div>-->

        </div>
      </div>
    </div>
 

    
    
    <?php include "footer.php" ?>
	<script src="js/sweetalert2@10.js"></script>
    <!-- BEGIN VENDOR JS-->
    <script src="vendors/js/vendors.min.js"></script>
    <!-- BEGIN VENDOR JS-->
    <!-- BEGIN PAGE VENDOR JS-->
    <script src="vendors/js/ui/jquery.sticky.js"></script>
    <script src="vendors/js/charts/jquery.sparkline.min.js"></script>
	<script src="vendors/js/forms/select/select2.full.min.js"></script>
    <script src="vendors/js/tables/datatable/datatables.min.js"></script>
    <script src="vendors/js/tables/datatable/dataTables.buttons.min.js"></script>
    <script src="vendors/js/tables/buttons.flash.min.js"></script>
    <script src="vendors/js/tables/jszip.min.js"></script>
    <script src="vendors/js/tables/pdfmake.min.js"></script>
    <script src="vendors/js/tables/vfs_fonts.js"></script>
    <script src="vendors/js/tables/buttons.html5.min.js"></script>
    <script src="vendors/js/tables/buttons.print.min.js"></script>
	
    <!-- END PAGE VENDOR JS-->
    <!-- BEGIN ROBUST JS-->
    <script src="js/core/app-menu.min.js"></script>
    <script src="js/core/app.min.js"></script>
    <script src="js/scripts/customizer.min.js"></script>
    <!-- END ROBUST JS-->
    <!-- BEGIN PAGE LEVEL JS-->
    <script src="js/scripts/ui/breadcrumbs-with-stats.min.js"></script>
	 <script src="js/scripts/forms/select/form-select2.min.js"></script>
   <script src="js/scripts/tables/datatables/datatable-advanced.min.js"></script>
    <!-- END PAGE LEVEL JS-->
	 <!--Script Https-->
	  <script>
	  if("<?php echo $resultado_agendamentos_hoje ?>" > '0'){
		
		const Toast = Swal.mixin({
		  toast: true,
		  position: 'center-end',
		  showConfirmButton: false,
		  timer: 8000,
		  timerProgressBar: true,
		  didOpen: (toast) => {
			toast.addEventListener('mouseenter', Swal.stopTimer)
			toast.addEventListener('mouseleave', Swal.resumeTimer)
		  }
		})

		Toast.fire({
		  icon: 'warning',
		  title: 'Temos coleta para hoje!'
		})
		
		
	  }
	  
	  	$("#dataTables-example2").dataTable({
			"processing": true,
			"serverSide": false,   
			"autoWidth": true,
			destroy: true,				
			"ajax": "buscar_cliente_agendados.php",
			"deferRender": true,
			select: true,
			dom: 'Blfrtip',
            "order": [[ 4, "asc" ]],
			"pageLength": -1,
			"lengthMenu": [[-1], ["Tudo"]],
			dom:"Bfrtip",
			buttons: [

					'pageLength'
					
				],
				
				 //"lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ],
			
			//buttons:["copy","csv","excel","pdf","print",'pageLength'],
              "bJQueryUI": true,
              "oLanguage": {
                  "sProcessing":   "Processando...",
                  "sLengthMenu":   "Mostrar _MENU_ registros",
                  "sZeroRecords":  "Não foram encontrados resultados",
                  "sInfo":         "Mostrando de _START_ até _END_ de _TOTAL_ registros",
                  "sInfoEmpty":    "Mostrando de 0 até 0 de 0 registros",
                  "sInfoFiltered": "",
                  "sInfoPostFix":  "",
                  "sSearch":       "Buscar:",
                  "sUrl":          "",
				  "lengthMenu": "Display 0 records per page",
                  "oPaginate": {
                      "sFirst":    "Primeiro",
                      "sPrevious": "Anterior",
                      "sNext":     "Seguinte",
                      "sLast":     "Último"
                  },              
			}
    });
	  
	  
	  
	  if (location.protocol !== 'https:') {
		location.replace(`https:${location.href.substring(location.protocol.length)}`);
	  }
	  </script>
  </body>
</html>