foto; $meusEventos = sendRequest($url . "eventos_voluntario/".$obj->id, $array_header, null, "GET"); $meusEventos = json_decode($meusEventos, true); $aMsg = lista("mensagens WHERE para =".$obj->id); //Carrega as opions $array_header = array('Content-Type: application/json'); $options = sendRequest($url_options . $obj->id , $array_header, null, "GET"); //echo($options); $options = json_decode($options, true); /*======================Especifico HPT================*/ $proximoEvento = "99/99/9999"; for( $i = 0; $i< count($meusEventos); $i++){ if( $meusEventos[$i]["data_sys"] >= dtos( date("d/m/Y") ) ) { $proximoEvento = $meusEventos[$i]["data"] ; $i = count($meusEventos); } } // Seleciona Template $tpl = new Template( explode('public_html', __DIR__)[0]. "public_html/hospitalhacos" . "/api/v1/templates/views/layout_base.html"); //Seleciona Conteúdo $tpl->addFile('MENU_TEMPLATE', explode('public_html', __DIR__)[0]. "public_html/hospitalhacos" . "/api/v1/templates/views/menu.html"); setMenu($tpl, $obj->id); $tpl->addFile('CONTEUDO', explode('public_html', __DIR__)[0]. "public_html/hospitalhacos" . "/api/v1/templates/views/painel/painel.html"); $tpl->FOTO = $foto; $tpl->NOME = $obj->nome; $tpl->EMAIL = $obj->email; $tpl->PAGE_TITULO = "Painel"; $tpl->PROXIMO_EVENTO = $proximoEvento; $tpl->TOTAL_NOTIFICACOES = count($aMsg) ; $tpl->TOTAL_SALDO = number_format( $options["total"] ,2,",",".") ; $tpl->RESUMO_ATUACOES = number_format( $options["atuacao"]["resumo"],2,",",".") ; $tpl->RESUMO_EXTERNO = number_format( $options["externo"]["resumo"],2,",",".") ; $tpl->RESUMO_TREINAMENTO = number_format( $options["treinamento"]["resumo"],2,",",".") ; $tpl->addFile('FOOTER_TEMPLETE', explode('public_html', __DIR__)[0]. "public_html/hospitalhacos" . "/api/v1/templates/views/footer.html"); // Exibe $tpl->show(); ?>