Example #1
0
 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 static function adicionar()
 {
     $cracha = new Cracha();
     $crachas = $cracha->listar();
     if (!empty($crachas)) {
         $listaIdsCrachas = array();
         foreach ($crachas as $cracha) {
             $listaIdsCrachas[] = $cracha->fk_participante;
         }
     }
     $participante = new Participante();
     $participantes = $participante->listarPorIdFormulario(17, 'confirmou = 1 AND id NOT IN (' . implode(",", $listaIdsCrachas) . ')');
     if (!empty($_POST)) {
         $nomeCracha = $_POST['nome'];
         $idParticipante = $_POST['idParticipante'];
         $funcao = $_POST['funcao'];
         $cracha = new Cracha();
         if (!empty($_FILES["foto_cracha"]["name"])) {
             $nomeFoto = $idParticipante . '-' . Util::substituiCaracteres($nomeCracha) . '.' . pathinfo($_FILES['foto_cracha']['name'], PATHINFO_EXTENSION);
             $foto = WideImage::loadFromUpload('foto_cracha');
             $imagem = $foto->crop($_POST['foto_x'], $_POST['foto_y'], $_POST['foto_w'], $_POST['foto_h']);
             @unlink('../fotosParticipantes/' . $nomeFoto);
             $imagem->saveToFile('../fotosParticipantes/' . $nomeFoto);
             $cracha->foto = $nomeFoto;
         }
         $cracha->nome = $nomeCracha;
         $cracha->funcao = $funcao;
         $cracha->fk_participante = $idParticipante;
         $cracha->salvar();
         self::redirecionar(Configuracao::$baseUrl . 'cracha/listar' . Configuracao::$extensaoPadrao);
     }
     self::$variaveis = array('participantes' => $participantes);
     self::$corpo = "adicionar";
     self::renderizar(self::$viewController);
 }
    public function adiciona(Participante $participante)
    {
        $query = 'insert into Participante(nome, sobrenome, email) 
														values(?, ?, ?)';
        $stmt = $this->conexao->prepare($query);
        $stmt->bind_param('sss', $participante->getNome(), $participante->getSobrenome(), $participante->getEmail());
        $stmt->execute();
    }
Example #4
0
 public static function post_respondida($recibido)
 {
     $opcion = $recibido->opcion;
     unset($recibido->opcion);
     $respondida = new RespondidaReto();
     $respondida->add_data($recibido);
     $respuesta = new stdClass();
     $respuesta->result = $respondida->save();
     if ($respuesta->result) {
         $participante = Participante::where('EMAIL', $recibido->email)->where('CODRETO', $recibido->codreto);
         $campo = '';
         if ($opcion->VALIDEZ == 'CORRECTA') {
             $campo = 'CORRECTAS';
         } else {
             $campo = 'INCORRECTAS';
         }
         $respuesta->result_2 = $participante->increment($campo);
         $respuesta->mensaje = "Respuesta guardada correctamente.";
         //true si termino, false si no.
         $respuesta->respondidas = $participante->sum('CORRECTAS') + $participante->sum('INCORRECTAS');
         $respuesta->termino = $respuesta->respondidas >= 10;
     } else {
         $respuesta->mensaje = "No se pudo guardar la respuesta.";
     }
     return $respuesta;
 }
 function alterarAbatimento()
 {
     $idPagamento = $this->md5_decrypt($_REQUEST['idPagamento']);
     $oPag = new Pagamento();
     $om = new Moeda();
     $oTipoP = new TipoPagamento();
     $oPag->getById($idPagamento);
     $this->getById($_REQUEST['id']);
     $valor = $this->money($_REQUEST['valor'], "bta");
     $oPartic = new Participante();
     $oPartic->getById($_REQUEST['participante']);
     $idMoedaGrupo = $oPag->participante->grupo->moeda->id;
     if ($idMoedaGrupo == $om->DOLLAR()) {
         $valorNovo = $oPag->CALCULA_DOLLAR($valor);
     } else {
         $valorNovo = $oPag->CALCULA_REAL($valor);
     }
     //validacao
     if ($idMoedaGrupo == $om->DOLLAR()) {
         $valorMaximo = $oPag->CALCULA_DOLLAR();
     } else {
         $valorMaximo = $oPag->CALCULA_REAL();
     }
     $total = $this->totalAbatimentos($idPagamento);
     $total = $total - $this->valor;
     if ($oTipoP->CARTAO() == $oPag->tipo->id && $oPag->codAutorizacao != "") {
         $_SESSION['tupi.mensagem'] = 61;
         header("Location:participante.abatimentos.php?idPagamento=" . $_REQUEST['idPagamento']);
         exit;
     }
     if (number_format($total + $valorNovo, 2, ".", "") > number_format($valorMaximo, 2, ".", "")) {
         $_SESSION['tupi.mensagem'] = 40;
         header("Location:participante.abatimentos.php?idPagamento=" . $_REQUEST['idPagamento']);
         exit;
     }
     //configurando o objeto
     $this->valor = $valorNovo;
     $this->pagamento = $oPag;
     $this->participante = $oPartic;
     $idAbatimento = $this->save();
     //FAZ A CONFERENCIA PARA MUDAR O STATUS DO PARTICIPANTE
     $oPartic->atualiza_status();
     $_SESSION['tupi.mensagem'] = 42;
 }
 public function postAct()
 {
     $apagar = Participante::find(Input::get('id'));
     $apagar->nome = Input::get('nome');
     $apagar->bi_nuit = Input::get('identificacao');
     $apagar->data_nasc = Input::get('dataNasc');
     $apagar->sexo = Input::get('sexo');
     $apagar->bairro = Input::get('bairro');
     $apagar->distrito = Input::get('distrito');
     $apagar->update();
     $participantes = Participante::all();
     return View::make('Participante.participanteVisu')->with('participantes', $participantes);
 }
 public static function get_resultados_generales()
 {
     $respuesta = new stdClass();
     $participantes = Participante::all();
     if (count($participantes) != 0) {
         $respuesta->result = false;
         $respuesta->correctas = $participantes->sum('CORRECTAS');
         $respuesta->incorrectas = $participantes->sum('INCORRECTAS');
         $respuesta->resultados = Participante::selectRaw('areas.NOMAREA, sum(CORRECTAS) as CORRECTAS, sum(INCORRECTAS) as INCORRECTAS')->join('retos', 'retos.CODRETO', '=', 'participantes.CODRETO')->join('areas', 'areas.CODAREA', '=', 'retos.CODAREA')->groupBy('areas.CODAREA')->get();
     } else {
         $respuesta->result = false;
         $respuesta->mensaje = "No hay resultados que mostrar.";
     }
     return $respuesta;
 }
Example #8
0
 public function getParticipante()
 {
     $participante = new Participante();
     $participante->selecionarPorId($this->fk_participante);
     return $participante;
 }
Example #9
0
 public static function convert($row)
 {
     $trabalho = new Trabalho();
     $trabalho->id = $row['id'];
     $trabalho->titulo = $row['titulo'];
     $trabalho->resumo = $row['resumo'];
     $trabalho->palavras_chave = $row['palavras_chave'];
     $trabalho->subarea = Subarea::find($row['subarea_id']);
     $trabalho->tipo = TipoTrabalho::find($row['tipo_id']);
     $trabalho->extensao = $row['extensao'];
     $trabalho->autor_principal = Participante::find($row['autor_principal_id']);
     return $trabalho;
 }
Example #10
0
<?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));
<?
include("../tupi.inicializar.php");
include("../tupi.template.inicializar.php"); 
$oTipoP = new TipoPagamento();
$oMoeda = new moeda();
$oBanco = new Banco();
$oTipot = new TipoTransferencia();
$oPag = new Pagamento();
$oCred = new Credito();
$oCliente = new Cliente();
$oCheque = new Cheque();
$oCarne = new Carne();
$oParticipante = new Participante();
$oParticipante->getById($_REQUEST['idParticipante']);
$tpl->ID_PARTICIPANTE_REP = $_REQUEST['idParticipante'];
$tpl->ID_TIPO = $_REQUEST['idTipo'];
$idMoedaEdita = 0;
$idBancoEdita = 0;
$idBandeiraEdita = 0;
$idTipoTransf = 0;
$idCredito = 0;
$tpl->CAMBIO_DOLLAR_REAL = 0;
$tpl->COD_AUTORIZACAO = "";
$tpl->DATA_COMPENSACAO = "";
$tpl->NUMERO_CHEQUE = "";
$tpl->CAMBIO_MOEDA_REAL = 0;

$tpl->NOME_EMISSOR = $oParticipante->cliente->nomeCompleto."-".$oParticipante->cliente->id;
if(isset($_REQUEST['idPagamento']) && strlen($_REQUEST['idPagamento']) > 0){
$oPag->getById($_REQUEST['idPagamento']);
$idMoedaEdita = $oPag->moeda->id;	
$tpl->NOME_GRUPO = $ogrupo->nomePacote;
$tpl->VALOR_GRUPO = $ogrupo->money($ogrupo->getValorTotal(0), "atb");
$tpl->CIFRAO_GRUPO = $ogrupo->moeda->cifrao;
$tpl->MOEDA_GRUPO_PLURAL = $ogrupo->moeda->plural;
//$tpl->DATA_ATUAL = date("d/m/Y");
//pacote opcional
if ($ogrupo->possuiPacoteOpcional == 1) {
    $tpl->NOME_GRUPO_OPCIONAL = $ogrupo->nomePacoteOpcional;
    $tpl->VALOR_GRUPO_OPCIONAL = $ogrupo->money($ogrupo->getValorTotalOpcional(), "atb");
    $tpl->block("BLOCK_OPCIONAL");
}
if ($ogrupo->moeda->id == $om->DOLLAR()) {
    $tpl->block("BLOCK_GRUPO_DOLLAR_HEAD");
}
//recupera participantes aprovados
$opartic = new Participante();
$rs = $opartic->getRows(0, 999, array("id" => "asc"), array("grupo" => "=" . $ogrupo->id, "status" => "in(" . $opartic->STATUS_PENDENTE() . "," . $opartic->STATUS_APROVADO() . ")"));
$cont = 1;
$totalGeralPagoReal = 0;
$totalGeralPagoDollar = 0;
$totalGeralPendente = 0;
foreach ($rs as $key => $p) {
    $totalDollar = 0;
    $totalReal = 0;
    $tpl->ID = $cont;
    $tpl->NOME_PARTICIPANTE = $p->cliente->nomeCompleto;
    $tpl->STATUS = $p->status->descricao;
    $rsabats = $oAbat->getRows(0, 999, array(), array("participante" => "=" . $p->id));
    foreach ($rsabats as $keyA => $abat) {
        $totalDollar += $abat->getValorDollar();
        $totalReal += $abat->getValorReal();
<?php

include "tupi.inicializar.php";
$codTemplate = "relatorio";
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();
$oQuarto = new Quarto();
$oD = new Distribuicao();
$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;
<?php

include "tupi.inicializar.php";
$codTemplate = 'template_envelope';
include "tupi.template.inicializar.php";
$codAcesso = 22;
include "tupi.seguranca.php";
//titulo do relatorio
$tpl->TITULO = "Envelopes de Participantes";
$opartic = new Participante();
$rs = $opartic->getRows(0, 999, array("id" => "asc"), array("grupo" => "=" . $opartic->md5_decrypt($_REQUEST['idGrupo']), "status" => "!=" . $opartic->STATUS_DESISTENTE()));
foreach ($rs as $key => $p) {
    $tpl->NOME_GRUPO = $p->grupo->nomePacote;
    $tpl->DATA_SAIDA = $p->convdata($p->grupo->dataEmbarque, "mtn");
    $tpl->DATA_CHEGADA = $p->convdata($p->grupo->dataChegada, "mtn");
    $sobrenome = explode(" ", $p->nomeFamilia());
    $tpl->SOBRENOME = $sobrenome[0];
    $tpl->NOME = $sobrenome[2];
    $tpl->DATA_NASC = $p->convdata($p->cliente->dataNascimento, "mtn");
    $tpl->CIDADE_NASC = $p->cliente->cidadeNascimento;
    $tpl->FONE1 = $p->cliente->telefoneResidencial;
    $tpl->FONE2 = $p->cliente->telefoneComercial;
    $tpl->FONE3 = $p->cliente->celular;
    $tpl->PASSAPORTE = $p->cliente->passaporte;
    $tpl->EXPEDICAO = $p->convdata($p->cliente->dataEmissaoPassaporte, "mtn");
    $tpl->VALIDADE = $p->convdata($p->cliente->dataValidadePassaporte, "mtn");
    $tpl->VALOR_TOTAL = $p->grupo->moeda->cifrao . " " . $p->money($p->valorTotal, "atb");
    $oAbat = new Abatimento();
    $rsAbats = $oAbat->getRows(0, 999, array(), array("participante" => "=" . $p->id));
    foreach ($rsAbats as $keyA => $abat) {
        $tpl->DATA_PAG = $abat->pagamento->dataPagamento;
<?php

include "tupi.inicializar.php";
$codTemplate = "relatorio";
include "tupi.template.inicializar.php";
$codAcesso = 39;
include "tupi.seguranca.php";
//titulo do relatorio
$tpl->TITULO = "Relatório de Inscrições por Período";
$tpl->DATA_RELATORIO = "Data/Hora:" . date("d/m/Y h:i:s");
//declara as classes
$ol = new Participante();
$om = new Moeda();
$op = new Pagamento();
$dataRelatorio = $ol->convdata($_REQUEST['dataInicio'], "ntm");
$dataFimRelatorio = $ol->convdata($_REQUEST['dataFim'], "ntm");
$rsLogs = $ol->participantesPeriodo($dataRelatorio, $dataFimRelatorio);
$total = 0;
$totalReal = 0;
foreach ($rsLogs as $key => $log) {
    $rsPag = $op->primeiroPagamentoCliente($log->id);
    if (count($rsPag) > 0) {
        $pag = $rsPag[0];
        $tpl->PARTICIPANTE = $log->cliente->nomeCompleto;
        $tpl->DATA = $log->convdata($log->dataInscricao, "mtn");
        $tpl->GRUPO = $log->grupo->nomePacote;
        if ($log->grupo->moeda->id == $om->DOLLAR()) {
            if ($log->pacoteOpcional == 1) {
                $tpl->VALOR_DOLLAR = $log->grupo->moeda->cifrao . " " . $log->money($log->grupo->valorAdesao + $log->grupo->valorAdesaoOpcional, "atb");
                $tpl->VALOR_REAL = "R\$ " . $log->money(($log->grupo->valorAdesao + $log->grupo->valorAdesaoOpcional) * $pag->cotacaoReal, "atb");
                $total += $log->grupo->valorAdesao + $log->grupo->valorAdesaoOpcional;
    <a href="participante.lista.php?idGrupo=' . $_REQUEST['idGrupo'] . '">Participantes</a> <span class="divider">/</span>
    </li>
    <li class="active">Pagamentos</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'];
$tpl->ID_HASH = $_REQUEST['idParticipante'];
$tpl->CIFRAO_GRUPO = $oGrupo->moeda->cifrao;
$oP = new Pagamento();
$oA = new Abatimento();
$oParticipante = new Participante();
$idPartic = $oParticipante->md5_decrypt($_REQUEST['idParticipante']);
$oParticipante->getById($idPartic);
$rsPag = $oP->getRows(0, 999, array("id" => "asc"), array("participante" => " = " . $idPartic, "cancelado" => "=0"));
$tpl->NOME_PARTICIPANTE = $oParticipante->cliente->nomeCompleto;
$totalReal = 0;
$totalDollar = 0;
//$tpl->ID_PARTICIPANTE_HASH = $_REQUEST['idParticipante'];
foreach ($rsPag as $key => $pagamento) {
    $totalAbatMoedaGrupo = $oA->totalAbatimentos($pagamento->id);
    $totalAbatMoedaPagamento = $pagamento->CALCULA_MOEDA($totalAbatMoedaGrupo, $pagamento->participante->grupo->moeda->id);
    if ($pagamento->devolucao == 0) {
        $tpl->STATUS_ABAT = $totalAbatMoedaPagamento < $pagamento->valorPagamento ? 'status-alert' : 'status-ok';
    } else {
        $tpl->STATUS_ABAT = 'status-ok';
    }
$tpl->NOME_GRUPO = $ogrupo->nomePacote;
$tpl->VALOR_GRUPO = $ogrupo->money($ogrupo->getValorTotal(0), "atb");
$tpl->CIFRAO_GRUPO = $ogrupo->moeda->cifrao;
$tpl->MOEDA_GRUPO_PLURAL = $ogrupo->moeda->plural;
//$tpl->DATA_ATUAL = date("d/m/Y");
//pacote opcional
if ($ogrupo->possuiPacoteOpcional == 1) {
    $tpl->NOME_GRUPO_OPCIONAL = $ogrupo->nomePacoteOpcional;
    $tpl->VALOR_GRUPO_OPCIONAL = $ogrupo->money($ogrupo->getValorTotalOpcional(), "atb");
    $tpl->block("BLOCK_OPCIONAL");
}
if ($ogrupo->moeda->id == $om->DOLLAR()) {
    $tpl->block("BLOCK_GRUPO_DOLLAR_HEAD");
}
//recupera participantes aprovados
$opartic = new Participante();
$rs = $opartic->getRows(0, 999, array("id" => "asc"), array("grupo" => "=" . $ogrupo->id, "status" => "=" . $opartic->STATUS_PENDENTE()));
$cont = 1;
$totalGeralPagoReal = 0;
$totalGeralPagoDollar = 0;
$totalGeralPendente = 0;
foreach ($rs as $key => $p) {
    $totalDollar = 0;
    $totalReal = 0;
    $tpl->ID = $cont;
    $tpl->NOME_PARTICIPANTE = $p->cliente->nomeCompleto;
    $rsabats = $oAbat->getRows(0, 999, array(), array("participante" => "=" . $p->id));
    foreach ($rsabats as $keyA => $abat) {
        $totalDollar += $abat->getValorDollar();
        $totalReal += $abat->getValorReal();
    }
<?php

header("Content-Type: text/html; charset=iso-8859-1");
?>
<?
include("../tupi.inicializar.php"); 
$oParticipante = new Participante();
$arrayfiltro  = array("grupo"=>" = '".$oParticipante->md5_decrypt($_REQUEST['idGrupo'])."'");
$arrayorderm  = array("id"=>"ASC");
$participantes = $oParticipante->getRows(0,999,$arrayorderm,$arrayfiltro);
echo '<option value="" selected="selected">Selecione</option>';
foreach($participantes as $key => $partic){
echo '<option value="'.$partic->id.'">'.$partic->cliente->nomeCompleto.'</option>';	
}
?>
<?php

require_once __DIR__ . '/opix/models/Participante.php';
$cURL = curl_init('url ws');
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURL, CURLOPT_POST, true);
curl_setopt($cURL, CURLOPT_POSTFIELDS, http_build_query(array(1 => 1)));
$resposta = curl_exec($cURL);
curl_close($cURL);
$resposta = json_decode($resposta);
$participante = new Participante();
foreach ($resposta as $retorno) {
    $participantes = $participante->listar('nossonumero = ' . $retorno->nossonumero);
    if (!empty($participantes)) {
        $participante = $participantes[0];
        $participante->data_pagamento = $retorno->data_pagamento;
        $participante->pago = 1;
        $participante->salvar();
        echo 'ok.' . date('d/m/Y H:i:s') . '';
    }
}
include "tupi.inicializar.php";
$codTemplate = "relatorioHorizontal";
include "tupi.template.inicializar.php";
$codAcesso = 36;
include "tupi.seguranca.php";
//titulo do relatorio
$tpl->TITULO = "Relatório Geral por período";
$tpl->DATA_RELATORIO = "Data/Hora:" . date("d/m/Y h:i:s");
//declara as classes
$om = new Moeda();
$oP = new Pagamento();
$oTP = new TipoPagamento();
$oTT = new TipoTransferencia();
$oG = new Grupo();
$oPartic = new Participante();
$oC = new Cheque();
//TOTAIS GERAL
$custoDollarTotal = 0;
$recebimentoDollarTotal = 0;
$recebimentoRealTotal = 0;
$valorEspecieTotal = 0;
$valorCartaoTotal = 0;
$valorDebitoTotal = 0;
$valorChequeTotal = 0;
$valorTEDTotal = 0;
$valorDOCTotal = 0;
$valorTransfTotal = 0;
$valorDepositoTotal = 0;
$valorCreditoClienteTotal = 0;
$dataRelatorio = $om->convdata($_REQUEST['dataInicio'], "ntm");
    <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'];
$tpl->dt_inscr = date("d/m/Y");
$idUf = 0;
$idCidade = 0;
$idUfEndereco = 0;
$idCidadeEndereco = 0;
Example #22
0
/** @var ParticipanteController $this */
/** @var Participante $model */
$this->menu = array(array('label' => Yii::t('AweCrud.app', 'Create'), 'icon' => 'plus', 'url' => array('create')));
Util::tsRegisterAssetJs('admin.js');
?>
<div id="flashMsg"  class="flash-messages">

</div> 
<br/>
<div class="panel panel-default">
    <div class="panel-heading"><?php 
echo Yii::t('AweCrud.app', 'Manage');
?>
 <?php 
echo Participante::label(2);
?>
</div>
    <div class="panel-body">
        <div style='overflow:auto'> 
            <?php 
$this->widget('booster.widgets.TbGridView', array('id' => 'participante-grid', 'type' => 'striped  hover advance', 'template' => "{items} {summary} {pager}", 'dataProvider' => $model->activos()->search(), 'filter' => $model, 'columns' => array('nombres', 'apellidos', 'cedula', array('name' => 'telefono', 'value' => '$data->telefono ? $data->telefono : "<span style=\\"color:#EBBBAA; font-style:italic\\" class=\\"vacios\\">--vacío--</span>"', 'type' => 'raw'), array('name' => 'celular', 'value' => '$data->celular ? $data->celular : "<span style=\\"color:#EBBBAA; font-style:italic\\" class=\\"vacios\\">--vacío--</span>"', 'type' => 'raw'), array('name' => 'sector_id', 'value' => 'isset($data->sector) ? $data->sector : null', 'filter' => CHtml::listData(Sector::model()->findAll(), 'id', Sector::representingColumn())), array('name' => 'subsector_id', 'value' => 'isset($data->subsector) ? $data->subsector : null', 'filter' => CHtml::listData(Subsector::model()->findAll(), 'id', Subsector::representingColumn())), array('name' => 'rama_actividad_id', 'value' => 'isset($data->ramaActividad) ? $data->ramaActividad : "<span style=\\"color:#EBBBAA; font-style:italic\\" class=\\"vacios\\">--vacío--</span>"', 'filter' => CHtml::listData(RamaActividad::model()->findAll(), 'id', RamaActividad::representingColumn()), 'type' => 'raw'), array('name' => 'actividad_id', 'value' => '$data->actividad ? $data->actividad : "<span style=\\"color:#EBBBAA; font-style:italic\\" class=\\"vacios\\">--vacío--</span>"', 'filter' => CHtml::listData(Actividad::model()->findAll(), 'id', Actividad::representingColumn()), 'type' => 'raw'), array('htmlOptions' => array('nowrap' => 'nowrap'), 'class' => 'booster.widgets.TbButtonColumn', 'template' => '{view} {update} {delete}', 'afterDelete' => 'function(link,success,data){ 
                    if(success) {
                         $("#flashMsg").empty();
                         $("#flashMsg").css("display","");
                         $("#flashMsg").html(data).animate({opacity: 1.0}, 5500).fadeOut("slow");
                    }
                    }', 'buttons' => array('view' => array('label' => '<button class="btn btn-primary"><i class="icon-pencil"></i></button>', 'options' => array('title' => 'Ver Info'), 'imageUrl' => false), 'update' => array('label' => '<button class="btn btn-primary"><i class="icon-pencil"></i></button>', 'options' => array('title' => 'Actualizar'), 'url' => 'Yii::app()->createUrl("/crm/participante/update/id/".$data->id."/r/0")', 'imageUrl' => false), 'delete' => array('label' => '<button class="btn btn-danger"><i class="icon-trash"></i></button>', 'options' => array('title' => 'Eliminar'), 'imageUrl' => false)), 'htmlOptions' => array('width' => '80px')))));
?>
        </div>
    </div>
Example #23
0
$identidade = $_POST['identidade'];
$cpf = $_POST['cpf'];
$data_nascimento = $_POST['data_nascimento'];
$email = $_POST['email'];
$tipo = TipoParticipante::find($_POST['tipo_id']);
$quantidade_alunos = $_POST['quantidade_alunos'];
if ($_POST['tipo_id'] == 1 || $_POST['tipo_id'] == 2) {
    $campus = Campus::find($_POST['campus_id']);
}
$escola = $_POST['escola'];
$participante = Participante::find_by_cpf($cpf);
if (isset($participante)) {
    header("location: /" . $config['PATH'] . "/inscricoes/form_login.php?syserror=CPF_JA_INSCRITO");
    exit;
}
$participante = new Participante();
$participante->nome = $nome;
$participante->nome_mae = $nome_mae;
$participante->identidade = $identidade;
$participante->cpf = $cpf;
$participante->data_nascimento = $data_nascimento;
$participante->email = $email;
$participante->tipo = $tipo;
if ($tipo->id == 1 || $tipo->id == 2) {
    $participante->campus = $campus;
}
$participante->escola = $escola;
if ($tipo->id == 3) {
    $participante->quantidade_alunos = $quantidade_alunos;
} else {
    $participante->quantidade_alunos = 0;
Example #24
0
 private static function convert($row)
 {
     $inscricao = new Inscricao();
     $inscricao->id = $row['id'];
     $atividade = Atividade::find($row['atividade_id']);
     $participante = Participante::find($row['participante_id']);
     $inscricao->atividade = $atividade;
     $inscricao->participante = $participante;
     $inscricao->emitir_certificado = $row['emitir_certificado'];
     return $inscricao;
 }
    <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");
}
$tpl->TOTAL_PAGINAS = $configPaginacao['totalPaginas'];
$tpl->PAGINA_ANTERIOR = $configPaginacao['paginaAnterior'];
$tpl->PROXIMA_PAGINA = $configPaginacao['proximaPagina'];
$tpl->PAGINA = $pagina;
foreach ($rsPartic as $key => $participante) {
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="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;
Example #27
0
<?php

include_once dirname(__FILE__) . '/../inc/config.inc.php';
include_once dirname(__FILE__) . '/../model/Participante.class.php';
include_once dirname(__FILE__) . '/../model/Atividade.class.php';
include_once dirname(__FILE__) . '/../model/Inscricao.class.php';
include_once dirname(__FILE__) . '/../inc/helper.inc.php';
$cpf = $_POST['cpf'];
$email = $_POST['email'];
$participante = Participante::autenticar($cpf, $email);
if (isset($participante)) {
    session_start();
    $_SESSION['participante'] = $participante;
    header("location: /" . $config['PATH'] . "/inscricoes/index.php");
    exit;
} else {
    header("location: /" . $config['PATH'] . "/inscricoes/form_login.php?syserror=CPF_EMAIL_INCORRETOS");
}
 public static function exportar()
 {
     $formulario = new Formulario();
     $formulario->selecionarPorId($_GET['id']);
     $participante = new Participante();
     $participantes = $participante->listarPorIdFormulario($_GET['id']);
     $idsParticipantes = array();
     foreach ($participantes as $participante) {
         $objetoParticipante = json_decode($participante->respostas);
         $idsParticipantes[] = $objetoParticipante->email;
     }
     $output = implode(", ", $idsParticipantes);
     header("Pragma: public");
     header("Expires: 0");
     header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
     header("Cache-Control: private", false);
     header("Content-Transfer-Encoding: binary;\n");
     header("Content-Disposition: attachment; filename=\"Emails Participantes Formulario " . $formulario->nome . ".txt\";\n");
     header("Content-Type: application/force-download");
     header("Content-Type: application/octet-stream");
     header("Content-Type: application/download");
     header("Content-Description: File Transfer");
     header("Content-Length: " . strlen($output) . ";\n");
     echo $output;
     exit;
 }
$codAcesso = 8;
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</a> <span class="divider">/</span>
    </li>
    <li class="active">Lista Grupos</li>
    </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;
<?php

include "tupi.inicializar.php";
include "tupi.template.inicializar.php";
$codAcesso = 13;
include "tupi.seguranca.php";
$oMoeda = new Moeda();
$oPagamento = new Pagamento();
$oParticipante = new Participante();
$oGrupo = new Grupo();
$idPagamento = $oPagamento->md5_decrypt($_REQUEST['idPagamento']);
$oPagamento->getById($idPagamento);
$nomeGrupo = $oPagamento->participante->grupo->nomePacote;
$idGrupo = $oPagamento->md5_encrypt($oPagamento->participante->grupo->id);
$idParticHash = $oPagamento->md5_encrypt($oPagamento->participante->id);
$valorPagamento = $oPagamento->valorPagamento;
$idPartic = 0;
$idGrupo = 0;
$ano = 0;
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>
    <a href="participante.lista.php?idGrupo=' . $idGrupo . '">Participantes</a> <span class="divider">/</span>
    </li>
	<li>