</ul>'; } $oGrupo = new Grupo(); $totalGrupos = $oGrupo->recuperaTotalAndamento(); $oParticipante = new Participante(); $configPaginacao = $oGrupo->paginar($totalGrupos, isset($_REQUEST['pagina']) ? $_REQUEST['pagina'] : 1); $rsGrupos = $oGrupo->getRows($configPaginacao['primeiroRegistro'], $configPaginacao['quantidadePorPagina'], array("dataEmbarque" => "ASC"), array("status" => "=" . $oGrupo->STATUS_ANDAMENTO())); if ($configPaginacao['totalPaginas'] > 1) { $tpl->block("BLOCK_PAGINACAO"); } $tpl->PAGINA = isset($_REQUEST['pagina']) ? $_REQUEST['pagina'] : 1; $tpl->TOTAL_PAGINAS = $configPaginacao['totalPaginas']; $tpl->PAGINA_ANTERIOR = $configPaginacao['paginaAnterior']; $tpl->PROXIMA_PAGINA = $configPaginacao['proximaPagina']; foreach ($rsGrupos as $key => $Grupo) { $hoje = date("d/m/Y"); $dataviagem = $oGrupo->convdata($Grupo->dataEmbarque, "mtn"); $dias = $oGrupo->diferenca_dias($hoje, $dataviagem); //$tpl->ID = $Grupo->id; $tpl->NOME = $Grupo->nomePacote; $tpl->STATUS_GRUPO = $Grupo->status->descricao; $tpl->QTD_PARTIC = $oParticipante->recuperaTotal($Grupo->id, ""); $tpl->DATA_EMBARQUE = $dataviagem . " - " . $dias . " dias."; $tpl->DATA_CHEGADA = $oGrupo->convdata($Grupo->dataChegada, "mtn"); $tpl->ID_HASH = $oGrupo->md5_encrypt($Grupo->id); $tpl->LINK_ROTEIRO = "docs/" . $Grupo->roteiroAnexo; $tpl->LINK_PAUTA = "docs/" . $Grupo->pautaAnexo; $tpl->MODELO_FICHA = $Grupo->modeloFicha; $tpl->block("BLOCK_ITEM_LISTA"); } include "tupi.template.finalizar.php";
</li> <li> <a href="#">Cadastro</a> <span class="divider">/</span> </li> <li class="active">Lista Grupos</li> </ul>'; } $oGrupo = new Grupo(); $totalGrupos = $oGrupo->recuperaTotal(isset($_REQUEST['ano']) ? $_REQUEST['ano'] : ""); $pagina = isset($_REQUEST['pagina']) ? $_REQUEST['pagina'] : 1; $configPaginacao = $oGrupo->paginar($totalGrupos, $pagina); $rsGrupos = $oGrupo->pesquisa($configPaginacao['primeiroRegistro'], $configPaginacao['quantidadePorPagina'], isset($_REQUEST['ano']) ? $_REQUEST['ano'] : ""); if ($configPaginacao['totalPaginas'] > 1) { $tpl->block("BLOCK_PAGINACAO"); } $tpl->TOTAL_PAGINAS = $configPaginacao['totalPaginas']; $tpl->PAGINA_ANTERIOR = $configPaginacao['paginaAnterior']; $tpl->PROXIMA_PAGINA = $configPaginacao['proximaPagina']; $tpl->PAGINA = $pagina; $tpl->ANO = isset($_REQUEST['ano']) ? $_REQUEST['ano'] : ""; foreach ($rsGrupos as $key => $Grupo) { $dataviagem = $oGrupo->convdata($Grupo->dataEmbarque, "mtn"); $tpl->ID = $Grupo->id; $tpl->NOME = $Grupo->nomePacote; $tpl->ANO_GRUPO = $Grupo->ano; $tpl->DATA_EMBARQUE = $dataviagem; $tpl->STATUS_GRUPO = $Grupo->status->descricao; $tpl->ID_HASH = $oGrupo->md5_encrypt($Grupo->id); $tpl->block("BLOCK_ITEM_LISTA"); } include "tupi.template.finalizar.php";
$codTemplate = "tpl_seguro"; include "tupi.template.inicializar.php"; $codAcesso = 10; include "tupi.seguranca.php"; //configura o grupo na pagina $oParticipante = new Participante(); $oCidade = new Cidade(); $oGrupo = new Grupo(); $idGrupo = $oGrupo->md5_decrypt($_REQUEST['idGrupo']); $oGrupo->getById($idGrupo); $oParticipante->getById($oGrupo->md5_decrypt($_REQUEST['idParticipante'])); $cliente = $oParticipante->cliente; $tpl->NOME = $oParticipante->nomeFamilia(); $tpl->VOUCHER = $oParticipante->voucher; $tpl->PLANO = $oGrupo->plano; $tpl->INI_VIG = $oGrupo->convdata($oGrupo->dataEmbarque, "mtn"); $tpl->FIM_VIG = $oGrupo->convdata($oGrupo->dataChegada, "mtn"); $datetime1 = date_create($oGrupo->dataEmbarque); $datetime2 = date_create($oGrupo->dataChegada); $interval = date_diff($datetime1, $datetime2); $tpl->DIAS_VIG = $interval->format('%a') + 1; $tpl->DESTINO = $oGrupo->destino; $tpl->PASSAGEIRO = $oParticipante->nomeFamilia(); $tpl->SEXO = $oParticipante->cliente->sexo; $tpl->DOCUMENTO = $oParticipante->cliente->passaporte; $imgsCAS = ""; $imgsId = "5"; //RECUPERA OS VOOS $oVoo = new Voo(); $oTicket = new Ticket(); $rsVoo = $oVoo->getRows(0, 999, array("id" => "asc"), array("grupo" => " = " . $idGrupo));
$idGrupo = $oGrupo->md5_decrypt($_REQUEST['idGrupo']); $oGrupo->getById($idGrupo); $tpl->ID_GRUPO_HASH = $_REQUEST['idGrupo']; $tpl->ID_PARTICIPANTE_HASH = $_REQUEST['idParticipante']; $tpl->PACOTE = $oGrupo->nomePacote; $tpl->VALOR = $oGrupo->money($oGrupo->valorPacote + $oGrupo->valorTaxaEmbarque + $oGrupo->valorAdesao, "atb"); if ($oGrupo->possuiPacoteOpcional == 1) { $tpl->OPCIONAL = $oGrupo->nomePacoteOpcional; $tpl->VALOR_OPCIONAL = $oGrupo->money($oGrupo->valorPacoteOpcional + $oGrupo->valorTaxaEmbarqueOpcional + $oGrupo->valorAdesaoOpcional, "atb"); $tpl->block("BLOCK_OPCIONAL"); } if (isset($_REQUEST['idParticipante'])) { $oParticipante->getById($oGrupo->md5_decrypt($_REQUEST['idParticipante'])); $cliente = $oParticipante->cliente; $tpl->NOME = $cliente->nomeCompleto; $tpl->DATA_NASC = $oGrupo->convdata($cliente->dataNascimento, "mtn"); $tpl->ESTADO_CIVIL = $cliente->estadoCivil->descricao; $tpl->CIDADE_NASC = $cliente->cidadeNascimento; $tpl->UF_NASC = $cliente->estadoNascimento; $tpl->PAIS_NASC = $cliente->paisNascimento; $tpl->ENDERECO = $cliente->endereco; $tpl->BAIRRO = $cliente->bairro; $tpl->UF = $cliente->estadoEndereco; $tpl->CEP = $cliente->cep; $tpl->CIDADE = $cliente->cidadeEndereco; //$tpl->PAIS = $cliente->paisEndereco; $tpl->TEL_RES = $cliente->telefoneResidencial; $tpl->TEL_TRAB = $cliente->telefoneComercial; $tpl->CELULAR = $cliente->celular; $tpl->FAX = $cliente->fax; $tpl->EMAIL = $cliente->email;
<a href="cadastro.grupos.php">Grupos</a> <span class="divider">/</span> </li> <li class="active">Editar Grupo</li> </ul>'; //recuperacao do grupo $oGrupo = new Grupo(); $oMoeda = new Moeda(); $oStatusGrupo = new StatusGrupo(); $tpl->ACAO = "Incluir"; $idMoedaAtual = 0; $idEstatusAtual = 0; if (isset($_REQUEST['idGrupo'])) { $oGrupo->getById($oGrupo->md5_Decrypt($_REQUEST['idGrupo'])); $tpl->nomePacote = $oGrupo->nomePacote; $tpl->dataEmbarque = $oGrupo->convdata($oGrupo->dataEmbarque, 'mtn'); $tpl->dataChegada = $oGrupo->convdata($oGrupo->dataChegada, 'mtn'); $tpl->valorPacote = $oGrupo->money($oGrupo->valorPacote, 'atb'); $tpl->valorTaxaEmbarque = $oGrupo->money($oGrupo->valorTaxaEmbarque, 'atb'); $tpl->valorAdesao = $oGrupo->money($oGrupo->valorAdesao, 'atb'); $tpl->valorCusto = $oGrupo->money($oGrupo->valorCusto, 'atb'); $tpl->cotacaoCusto = $oGrupo->money($oGrupo->cotacaoCusto, 'atb'); $tpl->ano = $oGrupo->ano; $idMoedaAtual = $oGrupo->moeda->id; $idEstatusAtual = $oGrupo->status->id; //$tpl->possuiPacoteOpcional = $oGrupo->possuiPacoteOpcional; $tpl->nomePacoteOpcional = $oGrupo->nomePacoteOpcional; $tpl->valorPacoteOpcional = $oGrupo->money($oGrupo->valorPacoteOpcional, 'atb'); $tpl->valorTaxaEmbarqueOpcional = $oGrupo->money($oGrupo->valorTaxaEmbarqueOpcional, 'atb'); $tpl->valorAdesaoOpcional = $oGrupo->money($oGrupo->valorAdesaoOpcional, 'atb'); $tpl->valorCustoOpcional = $oGrupo->money($oGrupo->valorCustoOpcional, 'atb');