function ListTableInscritos($evento, $items, $subTitulo, $filter, $headerEvento = true) { $testListTable = new ListTableInscritos(); $testListTable->prepare_items($items); add_action('admin_head', 'my_column_width'); function my_column_width() { echo '<style type="text/css">'; echo '.column-data_inscricao { text-align: center; width:60px !important; overflow:hidden }'; echo '.column-situacao { text-align: center; width:60px !important; overflow:hidden }'; echo '</style>'; } ?> <div class="wrap"> <div id="icon-users" class="icon32"><br/></div> <?php menuEvento($evento, 'inscricao-list', null, 'Inscrições'); echo "<h3>{$subTitulo}</h3>"; $nonce = wp_create_nonce("my_user_vote_nonce"); ?> <a href='admin-ajax.php?page=Inscricoes&action=exportarCsv&id_evento=<?php echo $evento->id; ?> &filter=<?php echo $filter; ?> &nonce=<?php echo $nonce; ?> ' class='add-new-h2'>Exportar CSV</a> <?php if (TGO_EVENTO_FULLCONTACTS === true) { ?> <a href='admin-ajax.php?page=Inscricoes&action=exportarCsvFullContacts&id_evento=<?php echo $evento->id; ?> &filter=<?php echo $filter; ?> &nonce=<?php echo $nonce; ?> ' class='add-new-h2'>Exportar CSV Full Contacts</a> <?php } ?> <!-- --><?php //if ($filter=='naoConfirmados'): ?> <!-- <a href='admin.php?page=Inscricoes&action=cancelarNaoConfirmados&id_evento=--><?php //echo $evento->id; ?> <!--&filter=--><?php //echo $filter; ?> <!--&nonce=--><?php //echo $nonce; ?> <!--' class='add-new-h2'>Cancelar inscrições não confirmados</a>--> <!-- --><?php //endif; ?> <?php $testListTable->display(); ?> <script> function formatMoney(valor, c, d, t) { var n = valor, c = isNaN(c = Math.abs(c)) ? 2 : c, d = d == undefined ? "." : d, t = t == undefined ? "," : t, s = n < 0 ? "-" : "", i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0; return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : ""); } ; function confirmarInscricao(id, valor, formaPagamento) { var valorPago = ''; if (valor) { // Obter valor var valorInformado = prompt("Confirmação de Pagamento", formatMoney(valor, 2, ',', '.')); if (valorInformado == '') return; valorInformado = valorInformado.replace('.', '').replace(',', '.'); valorInformado = parseFloat(valorInformado); valorPago = '&valor_pago=' + valorInformado + '&forma_pagamento=' + formaPagamento; } var nonce = '<?php echo wp_create_nonce("my_user_vote_nonce"); ?> '; var url = '<?php echo admin_url(); ?> /admin-ajax.php?action=inscricao-confirmar&id=' + id + valorPago + '&nonce=' + nonce; // Ajax para atualizar registro getAjax(url, function (data) { try { console.log(data); data = JSON.parse(data); console.log(data); console.log(data.html); if (data.html != undefined) jQuery('#inscricao_' + id).html(data.html); } catch (error) { alert('Houve uma falha ao exibir as informações. Entre em contato com o Suporte. Mensage: ' + error.message); } }); } function cancelarInscricao(id, confirmar) { var nonce = '<?php echo wp_create_nonce("my_user_vote_nonce"); ?> '; var url = '<?php echo admin_url(); ?> /admin-ajax.php?action=inscricao-cancelar&id=' + id + '&nonce=' + nonce; // Ajax para atualizar registro getAjax(url, function (data) { data = JSON.parse(data); console.log(data.html); if (data.html != undefined) jQuery('#inscricao_' + id).html(data.html); }); } function informarValorPagoInscricao(id, valor_pago, forma_pagamento) { var nonce = '<?php echo wp_create_nonce("my_user_vote_nonce"); ?> '; var url = '<?php echo admin_url(); ?> /admin-ajax.php?action=inscricao-informar-valor&id=' + id + '&valor=' + valor_pago + '&forma_pagamento=' + forma_pagamento + '&nonce=' + nonce; // Ajax para atualizar registro getAjax(url, function (data) { data = JSON.parse(data); console.log(data.html); if (data.html != undefined) jQuery('#inscricao_' + id).html(data.html); }); } function marcarPresenca(id) { var nonce = '<?php echo wp_create_nonce("my_user_vote_nonce"); ?> '; var url = '<?php echo admin_url(); ?> /admin-ajax.php?action=inscricao-presenca&id=' + id + '&nonce=' + nonce; // Ajax para atualizar registro getAjax(url, function (data) { data = JSON.parse(data); console.log(data.html); if (data.html != undefined) jQuery('#inscricao_' + id).html(data.html); }); } </script> </div> <?php }
<div class="wrap"> <?php use TiagoGouvea\PLib; menuEvento($evento, 'evento-view'); ?> <div id="poststuff"> <div id="postbox-container-2" class="postbox-container"> <div id="postexcerpt" class="postbox "> <h3 class="hndle"><span>Resumo do Evento</span></h3> <div class="inside"> <table width="100%"> <Tr> <th>Acessos</th> <th>Conversões</th> <th>Evento</th> </Tr> <tr> <td> <?php $pageViews = getPageViewsEvento($id_evento); $visitantes = getVisitantesEvento($id_evento); ?> Page Views: <b><?php echo $pageViews; ?> </b><br> Visitantes Únicos: <b><?php echo $visitantes;
<?php use lib\PagSeguroUtil; use TiagoGouvea\PLib; $perguntas = Perguntas::getInstance()->getByQuestionario(1); $inscritosAvaliacao = Inscricoes::getInstance()->getPresentesComAvaliacao($evento->id); ?> <div class="wrap"> <?php menuEvento($evento, 'evento-inscricoes', null, 'Avaliações'); ?> <div id="poststuff"> <?php require_once 'avaliacoes_resumo.php'; ?> <div id="postbox-container-2" class="postbox-container"> <div id="postexcerpt" class="postbox "> <h3 class="hndle"><span>Avaliações</span></h3> <div class="inside"> <table width="100%"> <tr> <th>Pessoa</th> <?php foreach ($perguntas as $pergunta) { ?> <th><?php echo $pergunta->titulo; ?> </th>
function ListTableDescontosEvento($evento, $items, $subTitulo) { $testListTable = new ListTableDescontosEvento(); $testListTable->prepare_items($items); ?> <div class="wrap"> <div id="icon-users" class="icon32"><br/></div> <?php menuEvento($evento, 'evento-configuracao', null, 'Configurações', 'Tickets de Desconto'); ?> <a href="admin.php?page=Descontos&id_evento=<?php echo $evento->id; ?> &action=add-new" class="add-new-h2">Novo Ticket</a> <?php $testListTable->display(); ?> </div> <?php }
function ListTableCategorias($evento, $items, $subTitulo) { $testListTable = new ListTableCategorias(); //Plib::var_dump($items);die(); $testListTable->prepare_items($items); ?> <div class="wrap"> <div id="icon-users" class="icon32"><br/></div> <?php menuEvento($evento, 'evento-configuracao', null, 'Configurações', 'Categorias'); ?> <a href="admin.php?page=Categorias&id_evento=<?php echo $evento->id; ?> &action=add-new" class="add-new-h2">Nova Categoria</a> <?php $testListTable->display(); ?> </div> <?php }
<div class="wrap"> <?php menuEvento($evento, 'evento-configuracao', null, 'Configurações'); ?> <div id="poststuff"> <?php require_once 'view_bloco_inscricoes_configuracoes.php'; ?> </div> </div>
<div class="wrap"> <?php menuEvento($evento, 'evento-view', null, 'Comunicação'); ?> <div id="poststuff"> <?php require_once 'view_bloco_inscricoes_comunicacao.php'; ?> </div> </div>
<?php use lib\PagSeguroUtil; use TiagoGouvea\PLib; ?> <div class="wrap"> <?php menuEvento($evento, 'evento-inscricoes', null, 'Financeiro'); ?> <div id="poststuff"> <div id="postbox-container-2" class="postbox-container"> <div id="postexcerpt" class="postbox "> <h3 class="hndle"><span>Resumo Financeiro do Evento</span></h3> <div class="inside"> <table width="100%"> <tr> <th>Inscritos</th> <th>Preços/Lotes</th> </tr> <tr> <td> <?php $inscritos = $evento->qtdInscritos; $confirmados = $evento->qtdConfirmados; ?> <a href="admin.php?page=Inscricoes&id_evento=<?php echo $evento->id; ?>
<div class="wrap"> <?php menuEvento($evento, 'evento-inscricoes', null, 'Incrições'); ?> <div id="poststuff"> <?php require_once 'view_bloco_inscricoes.php'; ?> </div> </div>