コード例 #1
0
    <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">Cadastrar Participante</li>
    </ul>';
$oG = new Grupo();
$idGrupo = $oG->md5_decrypt($_REQUEST['idGrupo']);
$oG->getById($idGrupo);
$tpl->NOME_GRUPO = $oG->nomePacote;
$oQuarto = new Quarto();
$oCliente = new Cliente();
$oUf = new Uf();
$oCidade = new cidade();
$oEstCivil = new EstadoCivil();
$oPartic = new Participante();
$idGrupo = $oCliente->md5_decrypt($_REQUEST['idGrupo']);
$oG->getById($idGrupo);
$tpl->NOME_PACOTE = $oG->nomePacote;
if ($oG->possuiPacoteOpcional == 1) {
    $tpl->NOME_PACOTE_OPCIONAL = $oG->nomePacoteOpcional;
    $tpl->block("BLOCK_PACOTE_OPCIONAL");
}
$tpl->ID_GRUPO_HASH = $_REQUEST['idGrupo'];
$tpl->ACAO = "Incluir";
$tpl->ID_GRUPO = $_REQUEST['idGrupo'];
コード例 #2
0
<?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;
コード例 #3
0
<?php

include "tupi.inicializar.php";
$codAcesso = 11;
include "tupi.seguranca.php";
//classes
$oQuarto = new Quarto();
//inclusao de perfil
if (isset($_REQUEST['acao'])) {
    if ($_REQUEST['acao'] == "Incluir") {
        $oQuarto->incluir();
    }
    if ($_REQUEST['acao'] == "Excluir") {
        $oQuarto->excluir();
    }
    if ($_REQUEST['acao'] == "Alterar") {
        $oQuarto->alterar();
    }
} else {
    $_SESSION['tupi.mensagem'] = 5;
}
header("Location:quarto.lista.php?idGrupo=" . $_REQUEST['idGrupo']);
コード例 #4
0
 public function incluir()
 {
     $this->modeloContrato = $_POST['modeloContrato'];
     $this->modeloFicha = $_POST['modeloFicha'];
     $this->nomePacote = $_POST['nomePacote'];
     $this->dataEmbarque = $this->convdata($_POST['dataEmbarque'], "ntm");
     $this->dataChegada = $this->convdata($_POST['dataChegada'], "ntm");
     $this->dataModificacao = date("Y-m-d");
     $this->destino = $_POST['destino'];
     $this->plano = $_POST['plano'];
     $this->valorPacote = $this->money($_POST['valorPacote'] == '' ? 0 : $_POST['valorPacote'], "bta");
     $this->valorTaxaEmbarque = $this->money($_POST['valorTaxaEmbarque'] == '' ? 0 : $_POST['valorTaxaEmbarque'], "bta");
     $this->valorAdesao = $this->money($_POST['valorAdesao'] == '' ? 0 : $_POST['valorAdesao'], "bta");
     $this->valorCusto = $this->money($_POST['valorCusto'] == '' ? 0 : $_POST['valorCusto'], "bta");
     $this->cotacaoCusto = $this->money($_POST['cotacaoCusto'] == '' ? 0 : $_POST['cotacaoCusto'], "bta");
     $this->ano = $_REQUEST['ano'];
     //uploadArquivo roteiro
     if ($_FILES['roteiro']['name'] != '') {
         $nomeImagem = date("d_m_Y_H_i_s") . $this->removerAcento($_FILES['roteiro']['name']);
         $diretorio = $this->URI . "/docs/";
         $this->uploadArquivo($_FILES['roteiro'], $nomeImagem, $diretorio);
         $this->roteiroAnexo = $nomeImagem;
     }
     //uploadArquivo pauta
     if ($_FILES['pauta']['name'] != '') {
         $nomeImagem = date("d_m_Y_H_i_s") . $this->removerAcento($_FILES['pauta']['name']);
         $diretorio = $this->URI . "/docs/";
         $this->uploadArquivo($_FILES['pauta'], $nomeImagem, $diretorio);
         $this->pautaAnexo = $nomeImagem;
     }
     if ($_POST['nomePacoteOpcional'] != '') {
         $this->possuiPacoteOpcional = 1;
         $this->nomePacoteOpcional = $_POST['nomePacoteOpcional'];
         $this->valorPacoteOpcional = $this->money($_POST['valorPacoteOpcional'] == '' ? 0 : $_POST['valorPacoteOpcional'], "bta");
         $this->valorTaxaEmbarqueOpcional = $this->money($_POST['valorTaxaEmbarqueOpcional'] == '' ? 0 : $_POST['valorTaxaEmbarqueOpcional'], "bta");
         $this->valorAdesaoOpcional = $this->money($_POST['valorAdesaoOpcional'] == '' ? 0 : $_POST['valorAdesaoOpcional'], "bta");
         $this->valorCustoOpcional = $this->money($_POST['valorCustoOpcional'] == '' ? 0 : $_POST['valorCustoOpcional'], "bta");
     } else {
         $this->possuiPacoteOpcional = 0;
         $this->nomePacoteOpcional = "";
         $this->valorPacoteOpcional = 0;
         $this->valorTaxaEmbarqueOpcional = 0;
         $this->valorAdesaoOpcional = 0;
         $this->valorCustoOpcional = 0;
     }
     $oM = new Moeda();
     $oM->id = $_REQUEST['moeda'];
     $oE = new StatusGrupo();
     $oE->id = $_REQUEST['status'];
     $this->moeda = $oM;
     $this->status = $oE;
     $newid = $this->save();
     $_SESSION['tupi.mensagem'] = 20;
     //registrar quartos novos:
     //quartos solteiros
     for ($i = 1; $i < 6; $i++) {
         $oQ = new Quarto();
         $oQ->capacidade = 1;
         $oQ->numero = "I " . str_pad($i, 2, "0", STR_PAD_LEFT);
         $oQ->grupo = $this;
         $oQ->save();
     }
     //quartos casais
     for ($i = 1; $i < 11; $i++) {
         $oQ = new Quarto();
         $oQ->capacidade = 2;
         $oQ->numero = "C " . str_pad($i, 2, "0", STR_PAD_LEFT);
         $oQ->grupo = $this;
         $oQ->save();
     }
     //quartos duplos
     for ($i = 1; $i < 11; $i++) {
         $oQ = new Quarto();
         $oQ->capacidade = 2;
         $oQ->numero = "D " . str_pad($i, 2, "0", STR_PAD_LEFT);
         $oQ->grupo = $this;
         $oQ->save();
     }
     //quartos duplos
     for ($i = 1; $i < 4; $i++) {
         $oQ = new Quarto();
         $oQ->capacidade = 3;
         $oQ->numero = "T " . str_pad($i, 2, "0", STR_PAD_LEFT);
         $oQ->grupo = $this;
         $oQ->save();
     }
     //registrar log
     $logGrupo = new LogGrupo();
     $user = new Usuario();
     $user->id = $_SESSION['ag_idUsuario'];
     $logGrupo->usuario = $user;
     $logGrupo->grupo = $this;
     $logGrupo->dataHora = date("Y-m-d H:i:s");
     $logGrupo->txtLog = 'Criação do Grupo';
     $logGrupo->save();
     return $newid;
 }
コード例 #5
0
    <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">Distribuição</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'];
$oD = new Distribuicao();
$oQuarto = new Quarto();
$oParticipante = new Participante();
$idPartic = $oParticipante->md5_decrypt($_REQUEST['idParticipante']);
$oParticipante->getById($idPartic);
$rsQ = $oQuarto->getRows(0, 999, array("id" => "asc"), array("grupo" => " = " . $idGrupo));
$tpl->NOME_PARTICIPANTE = $oParticipante->cliente->nomeCompleto;
$tpl->ID_PARTICIPANTE_HASH = $_REQUEST['idParticipante'];
foreach ($rsQ as $key => $quarto) {
    $tpl->ID_QUARTO = $quarto->id;
    $tpl->ID_QUARTO_HASH = $oQuarto->md5_encrypt($quarto->id);
    $tpl->NUMERO_QUARTO = $quarto->numero;
    $tpl->CAPACIDADE = $quarto->capacidade;
    $rsd = $oD->getRows(0, 999, array("id" => "asc"), array("quarto" => " = " . $quarto->id));
    $tpl->CLASS_COLLAPSE = 'collapse';
    $tpl->STYLE_COLLAPSE = 'height: 0px;';
    foreach ($rsd as $keyD => $distribuicao) {
コード例 #6
0
include "tupi.template.inicializar.php";
$codAcesso = 11;
include "tupi.seguranca.php";
$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>
    <a href="quarto.lista.php?idGrupo=' . $_REQUEST['idGrupo'] . '">Quarto</a> <span class="divider">/</span>
    </li>
    <li class="active">Edita Quarto</li>
    </ul>';
//configura o grupo na pagina
$oGrupo = new Grupo();
$idGrupo = $oGrupo->md5_decrypt($_REQUEST['idGrupo']);
$oGrupo->getById($idGrupo);
$tpl->NOME_GRUPO = $oGrupo->nomePacote;
$oQuarto = new Quarto();
$tpl->ACAO = "Incluir";
$tpl->ID_GRUPO = $_REQUEST['idGrupo'];
if (isset($_REQUEST['idQuarto'])) {
    $oQuarto->getById($oQuarto->md5_Decrypt($_REQUEST['idQuarto']));
    $tpl->NUMERO = $oQuarto->numero;
    $tpl->CAPACIDADE = $oQuarto->capacidade;
    $tpl->ACAO = "Alterar";
    $tpl->ID = $oQuarto->id;
}
include "tupi.template.finalizar.php";
コード例 #7
0
 public function incluir()
 {
     $oGrupo = new Grupo();
     $oGrupo->getById($oGrupo->md5_decrypt($_REQUEST['idGrupo']));
     $oCliente = new Cliente();
     if ($_REQUEST['idCliente'] != "") {
         $_POST['id'] = $_REQUEST['idCliente'];
         $oCliente->alterarb();
     } else {
         $oCliente->incluir();
     }
     $this->dataInscricao = $this->convdata($_REQUEST['dataInscricao'], "ntm");
     $pacoteOpcional = isset($_REQUEST['pacoteOpcional']) ? 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
     //inclusao em quarto escolhido
     if ($_REQUEST['quarto'] != "0") {
         $oD = new Distribuicao();
         $oD->remover($this->id);
         $oQ = new Quarto();
         $oQ->id = $_REQUEST['quarto'];
         $oD->quarto = $oQ;
         $oD->participante = $this;
         $oD->save();
     } else {
         if ($_REQUEST['nomeQuarto'] != "") {
             $oD = new Distribuicao();
             $oD->remover($this->id);
             $oQ = new Quarto();
             $oQ->numero = $_REQUEST['nomeQuarto'];
             $oQ->capacidade = $_REQUEST['pessoasQuarto'] != "" ? $_REQUEST['pessoasQuarto'] : 1;
             $oQ->grupo = $this->grupo;
             $oQ->save();
             $oD->quarto = $oQ;
             $oD->participante = $this;
             $oD->save();
         }
     }
     return $newid;
 }