public function migrarParticipantes() { $p = new Participante(); $g = new Grupo(); $gorigem = new Grupo(); $oD = new Distribuicao(); $idGrupo = $g->md5_decrypt($_REQUEST['idGrupoPara']); $idGrupoDe = $g->md5_decrypt($_REQUEST['idGrupoDe']); $g->getById($idGrupo); $gorigem->getById($idGrupoDe); $usuario = new Usuario(); $usuario->id = $_SESSION['ag_idUsuario']; $data = date("Y-m-d H:i:s"); foreach ($_REQUEST['participante'] as $key => $id) { $p->getById($id); $p->grupo = $g; $p->valorTotal = $g->getValorTotal($p->pacoteOpcional); $p->custoTotal = $g->getCustoTotal($p->pacoteOpcional); $p->save(); $p->atualiza_status(); //grava log de pagamento $oLog = new LogUsuario(); $movimento = "MIGRAR PARTICIPANTE<BR> CLIENTE: " . $p->cliente->nomeCompleto . "<BR> GRUPO ORIGEM: " . $gorigem->nomePacote . "<BR> GRUPO DESTINO: " . $g->nomePacote; $oLog->usuario = $usuario; $oLog->data = $data; $oLog->movimento = $movimento; $oLog->save(); //fim da log //remover distribuicao dos quartos $oD->remover($id); } $_SESSION['tupi.mensagem'] = 57; }
public function incluir() { $oGrupo = new Grupo(); $oGrupo->getById($oGrupo->md5_decrypt($_REQUEST['idGrupo'])); $this->grupo = $oGrupo; $this->numero = $_REQUEST['numero']; $this->capacidade = $_REQUEST['capacidade']; $newid = $this->save(); $_SESSION['tupi.mensagem'] = 29; return $newid; }
public function incluir() { $oGrupo = new Grupo(); $oGrupo->getById($oGrupo->md5_decrypt($_REQUEST['idGrupo'])); $oCA = new CompanhiaAerea(); $oCA->id = $_REQUEST['companhiaAerea']; $this->companhiaAerea = $oCA; $this->grupo = $oGrupo; $this->dataEmbarque = $this->convdata($_REQUEST['dataEmbarque'], "ntm"); $this->horaEmbarque = $_REQUEST['horaEmbarque']; $this->horaChegada = $_REQUEST['horaChegada']; $this->trecho = $_REQUEST['trecho']; $this->numeroVoo = $_REQUEST['numeroVoo']; $newid = $this->save(); $_SESSION['tupi.mensagem'] = 26; return $newid; }
include "tupi.seguranca.php"; if (!isset($_REQUEST['ajax'])) { $tpl->BREADCRUMB = ' <ul class="breadcrumb"> <li> <a href="home.php">Home</a> <span class="divider">/</span> </li> <li> <a href="grupos.andamento.php">Grupos</a> <span class="divider">/</span> </li> <li class="active">Lista de Participantes</li> </ul>'; } //configura o grupo na pagina $oGrupo = new Grupo(); $idGrupo = $oGrupo->md5_decrypt($_REQUEST['idGrupo']); $oGrupo->getById($idGrupo); $tpl->NOME_GRUPO = $oGrupo->nomePacote; $tpl->ID_GRUPO_HASH = $_REQUEST['idGrupo']; $oP = new Pagamento(); $oA = new Abatimento(); $oParticipante = new Participante(); $strBusca = isset($_REQUEST['busca']) ? str_replace(".", "", str_replace("-", "", $_REQUEST['busca'])) : ""; $totalParticipantes = $oParticipante->recuperaTotal($idGrupo, $strBusca); $pagina = isset($_REQUEST['pagina']) ? $_REQUEST['pagina'] : 1; $configPaginacao = $oParticipante->paginar($totalParticipantes, $pagina); $rsPartic = $oParticipante->pesquisa($configPaginacao['primeiroRegistro'], $configPaginacao['quantidadePorPagina'], $idGrupo, $strBusca); $tpl->MODELO_CONTRATO = $oGrupo->modeloContrato; $tpl->MODELO_FICHA = $oGrupo->modeloFicha; if ($configPaginacao['totalPaginas'] > 1) { $tpl->block("BLOCK_PAGINACAO");
<?php include "tupi.inicializar.php"; $codTemplate = "tpl_contrato3"; 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); $tpl->ID_GRUPO_HASH = $_REQUEST['idGrupo']; $tpl->ID_PARTICIPANTE_HASH = $_REQUEST['idParticipante']; $oParticipante->getById($oGrupo->md5_decrypt($_REQUEST['idParticipante'])); $cliente = $oParticipante->cliente; if ($oParticipante->contrato == "") { $tpl->CIFRAO = $oGrupo->moeda->cifrao; $tpl->nomeCompleto = $cliente->nomeCompleto; $tpl->nacionalidade = $cliente->nacionalidade; $tpl->estado_civil = $cliente->estadoCivil->descricao; $tpl->rg = $cliente->rg; $tpl->rgOrgaoExpedidor = $cliente->orgaoEmissorRg; $tpl->cpf = $cliente->cpf; $tpl->endereco = $cliente->endereco; $tpl->cidade = $cliente->cidadeEndereco; $tpl->uf = $cliente->estadoEndereco; //$tsinscricao = strtotime($oParticipante->dataInscricao); //$tpl->dia = date("d",$tsinscricao); //$tpl->mes = $oParticipante->mesExtenso(date("m",$tsinscricao));
<?php include "tupi.inicializar.php"; $codTemplate = "relatorio"; include "tupi.template.inicializar.php"; $codAcesso = 15; include "tupi.seguranca.php"; $ogrupo = new Grupo(); $ogrupo->getById($ogrupo->md5_decrypt($_REQUEST['idGrupo'])); $tpl->COD_GRUPO = str_pad($ogrupo->id, 7, "0", STR_PAD_LEFT); $tpl->NOME_GRUPO = $ogrupo->nomePacote; $tpl->ID_GRUPO_HASH = $_REQUEST['idGrupo']; $tpl->DATA_RELATORIO = "Data/Hora:" . date("d/m/Y h:i:s"); $oD = new Distribuicao(); $oQuarto = new Quarto(); $oParticipante = new Participante(); $rsQ = $oQuarto->getRows(0, 999, array("capacidade" => "asc", "numero" => "asc"), array("grupo" => " = " . $ogrupo->id)); foreach ($rsQ as $key => $quarto) { $tpl->N_QUARTO = $quarto->numero; //particpantes no quarto $rsd = $oD->getRows(0, 999, array("id" => "asc"), array("quarto" => " = " . $quarto->id)); foreach ($rsd as $keyD => $distribuicao) { $tpl->OBS = ""; $tpl->LASTNAME = $distribuicao->participante->nomeFamilia(); $tpl->IDADE = $distribuicao->participante->cliente->idade(); $tpl->ACESSO = $distribuicao->participante->cliente->preferencial == 1 ? "Sim " : "Não"; if ($distribuicao->participante->cliente->problemasSaude != "") { $tpl->OBS = "Problemas de saúde:<br/>" . $distribuicao->participante->cliente->problemasSaude; } if ($distribuicao->participante->cliente->restricaoAlimentar != "") { $tpl->OBS .= "<BR>Restrição Alimentar:<br>" . $distribuicao->participante->cliente->restricaoAlimentar;
<li> <a href="home.php">Home</a> <span class="divider">/</span> </li> <li> <a href="grupos.andamento.php">Grupos</a> <span class="divider">/</span> </li> <li> <a href="participante.lista.php?idGrupo=' . $_REQUEST['idGrupo'] . '">Participantes</a> <span class="divider">/</span> </li> <li class="active">Editar Participante</li> </ul>'; $oCliente = new Cliente(); $oPartic = new Participante(); $oG = new Grupo(); $idGrupo = $oG->md5_decrypt($_REQUEST['idGrupo']); $idParticipante = $oG->md5_decrypt($_REQUEST['idParticipante']); $oG->getById($idGrupo); $oPartic->getById($idParticipante); $tpl->SELECTED_OPCIONAL_SIM = $oPartic->pacoteOpcional ? "selected" : ""; $tpl->SELECTED_OPCIONAL_NAO = $oPartic->pacoteOpcional ? "" : "selected"; $tpl->CIFRAO = $oG->moeda->cifrao; $tpl->NOME_GRUPO = $oG->nomePacote; $tpl->CPF = $oPartic->formataCPFCNPJ($oPartic->cliente->cpf); $tpl->NOME = $oPartic->cliente->nomeCompleto; $tpl->custoTotal = $oPartic->money($oPartic->custoTotal, "atb"); $tpl->valorTotal = $oPartic->money($oPartic->valorTotal, "atb"); $tpl->dt_inscr = $oPartic->convdata($oPartic->dataInscricao, "mtn"); $tpl->ID = $oPartic->id; $tpl->ID_GRUPO_HASH = $_REQUEST['idGrupo']; $tpl->ACAO = "Editar";
<li> <a href="grupos.andamento.php">Grupos</a> <span class="divider">/</span> </li> <li> <a href="participante.lista.php?idGrupo=' . $_REQUEST['idGrupo'] . '">Participantes</a> <span class="divider">/</span> </li> <li> <a href="participante.pagamentos.php?idGrupo=' . $_REQUEST['idGrupo'] . '&idParticipante=' . $_REQUEST['idParticipante'] . '">Pagamentos</a> <span class="divider">/</span> </li> <li class="active">Edita Pagamento</li> </ul>'; } //configura o grupo na pagina $oGrupo = new Grupo(); $oPagamento = new Pagamento(); $idGrupo = $oGrupo->md5_decrypt($_REQUEST['idGrupo']); $oGrupo->getById($idGrupo); $tpl->NOME_GRUPO = $oGrupo->nomePacote; $tpl->ID_GRUPO = $_REQUEST['idGrupo']; $tpl->ID_PARTICIPANTE = $_REQUEST['idParticipante']; $tpl->ID_PARTICIPANTE_REP = $oGrupo->md5_decrypt($_REQUEST['idParticipante']); $oPartic = new Participante(); $oPartic->getById($oPartic->md5_decrypt($_REQUEST['idParticipante'])); $tpl->NOME_PARTICIPANTE = $oPartic->cliente->nomeCompleto; $tpl->ACAO = 'IncluirPagamento'; $tpl->DEV = $_REQUEST['dev']; $otp = new TipoPagamento(); $rs = $otp->getRows(); $ofin = new FinalidadePagamento(); $rsf = $ofin->getRows(); $idtp = 0;
public function incluirPorId() { $arrayGrupo = explode(";", $_REQUEST['idGrupo']); $oGrupo = new Grupo(); $oGrupo->getById($oGrupo->md5_decrypt($arrayGrupo[0])); $oCliente = new Cliente(); $oCliente->getById($oGrupo->md5_decrypt($_REQUEST['idCliente'])); if ($this->getByIdCliente($oCliente->id, $oGrupo->id)) { $_SESSION['tupi.mensagem'] = 52; } else { $this->dataInscricao = date("Y-m-d"); $pacoteOpcional = $arrayGrupo[1] == 1 ? 1 : 0; $this->valorTotal = $oGrupo->getValorTotal($pacoteOpcional); $this->custoTotal = $oGrupo->getCustoTotal($pacoteOpcional); $this->grupo = $oGrupo; $this->cliente = $oCliente; $this->contrato = ""; //$this->geraContrato(); $this->pacoteOpcional = $pacoteOpcional; $oSP = new StatusParticipante(); $oSP->id = $this->STATUS_PENDENTE(); $this->status = $oSP; $newid = $this->save(); $_SESSION['tupi.mensagem'] = 24; //log de criacao $log = new LogParticipante(); $user = new Usuario(); $user->id = $_SESSION['ag_idUsuario']; $log->usuario = $user; $log->participante = $this; $log->dataHora = date("Y-m-d H:i:s"); $log->valor = $this->valorTotal; $log->custo = $this->custoTotal; $log->save(); //grava log de usuario $oLog = new LogUsuario(); $data = date("Y-m-d H:i:s"); $movimento = "INCLUIR PARTICIPANTE<BR> CLIENTE: " . $this->cliente->nomeCompleto . "<BR> GRUPO: " . $this->grupo->nomePacote; $oLog->usuario = $user; $oLog->data = $data; $oLog->movimento = $movimento; $oLog->save(); //fim da log return $newid; } }