//RECUPERA ID DA SESSÃO DO USUÁRIO $cooID = $_SESSION["login_cooperativa"]["id"]; //VERIFICA SE TEM PERMISSÃO if (empty($cooID) || empty($cooID)) { header("Location: adm?res=sem_permissao"); exit; } //PEGA AÇÃO POR GET $dataColeta = isset($_GET['d']) && strlen($_GET['d']) > 9 ? convertDate($_GET['d']) : date('Y-m-d'); //BOTÃO PRÓXIMO DIA E DIA ANTERIOR $beforeDay = convertDate(date('Y-m-d', strtotime("-1 day", strtotime($dataColeta)))); $afterDay = convertDate(date('Y-m-d', strtotime("+1 day", strtotime($dataColeta)))); //INSTANCIA A CLASSE $Coleta = new Coleta(); //CARREGA COOPERATIVA $oColetas = $Coleta->carregarColetas(" AND col_situacao!='excluido' AND coo_id='" . $cooID . "' AND col_data='" . $dataColeta . "'", "col_qtde DESC, col_periodo ='m' DESC, col_periodo DESC", ""); //INSTANCIA A CLASSE $Cooperativa = new Cooperativa(); //CARREGA COOPERATIVA $oCooperativas = $Cooperativa->consultarCooperativa($cooID); //DADOS DA COOPERATIVA $cooNome = $oCooperativas->getNome(); $cooLat = number_format($oCooperativas->getLatitude(), 6); $cooLng = number_format($oCooperativas->getLongitude(), 6); $cooCoord = $cooLat . "%2C" . $cooLng; //INSTANCIA CLASSE $ApiMaps = new ApiMaps(); //INSTANCIA A CLASSE $Usuario = new Usuario(); //INSTANCIA A CLASSE $funcionario = new funcionario();