function getRelEventosParticipantes($id_evento, $nombre)
{
    $eventos = new eventosModel();
    $relacion = $eventos->getRelEventosParticipantes($id_evento);
    ?>
		<table id="tabla" border="1" cellpadding="10" cellspacing="0">
			<caption>
				PARTICIPANTES INSCRITOS AL EVENTO: <span class="bold"><?php 
    echo strtoupper($nombre);
    ?>
</span>
			</caption>
			<thead>
				<tr>
					<th>NÚMERO AFILIACIÓN</th>
					<th>NOMBRE</th>
					<th>TELÉFONO</th>
					<th>CORREO</th>
					<th>CIUDAD</th>
					<th>ESTADO</th>
					<th>FECHA INSCRIPCIÓN</th>
					<th>PAGO</th>
					<th>MATERIAL</th>
				</tr>
			</thead>
			<tbody>
			<?php 
    foreach ($relacion as $key => $row) {
        echo "<tr>\n\t\t\t\t\t\t<td class='text-left'>" . $row['numero_afiliacion'] . "</td>\n\t\t\t\t\t\t<td class='text-left'>" . $row['nombre'] . "</td>\n\t\t\t\t\t\t<td class='text-left'>" . $row['telefono'] . "</td>\n\t\t\t\t\t\t<td class='text-left'>" . $row['correo'] . "</td>\n\t\t\t\t\t\t<td class='text-left'>" . $row['ciudad'] . "</td>\n\t\t\t\t\t\t<td class='text-left'>" . $row['estado'] . "</td>\n\t\t\t\t\t\t<td class='text-center'>" . $row['fecha_inscripcion'] . "</td>\n\t\t\t\t\t\t<td class='text-left'>" . getEstatusPago($row['estatus_pago']) . "</td>\n\t\t\t\t\t\t<td class='text-left'>" . getEstatusMaterial($row['material']) . "</td>\n\t\t\t\t\t</tr>";
    }
    ?>
			</tbody>
		</table>
		<?php 
}
 /**
  * Funcion que se ejecuta cuando el pago de paypal es correcto
  * @param integer $id [description]
  */
 public function SuccessPayment($id = 0)
 {
     $participante = new participantesModel();
     $id_participante = $_GET['id_participante'];
     $id_evento = $_GET['id_evento'];
     $precio = $_GET['precio'];
     $tipo_asistencia = $_GET['tipo'];
     $result = $participante->setNewEvent($id_participante, $id_evento, 4, $costo_evento, $tipo_asistencia);
     //guardamos el pago en la base de datos.
     if ($result) {
         $id_participantes_eventos = $participante->getLastInsert();
         //obtenemos el id del registro guardado.
         $pago = new eventosModel();
         $pago->updatePago(1, $id_participantes_eventos);
         $this->cargarVista("EL PAGO SE REALIZO CORRECTAMENTE.", "success", "fa fa-thumbs-o-up");
     } else {
         $this->CancelPayment();
     }
 }
 public function deleteBancos()
 {
     $filescripts = array("bancos.js");
     $pag_title = "TABLERO ADMIN - CIEFT";
     $active = 1;
     $id_evento = $_POST['evento'];
     $id_evento_banco = $_POST['txtId_banco'];
     $eventosModel = new eventosModel();
     $participantesModel = new participantesModel();
     $datosEvento = $eventosModel->getEvento($id_evento);
     foreach ($datosEvento as $key => $rowEvent) {
         $nombre_evento = $rowEvent['nombre_evento'];
         $pais = $rowEvent['descripcion'];
         $precio = $rowEvent['costo_evento'];
         $moneda = $rowEvent['CurrencyName'] . " " . $rowEvent['CurrencyISO'] . " " . $rowEvent['Money'] . " " . $rowEvent['Symbol'];
         $nombre_banco = $rowEvent['nombre_banco'];
         $numero_deposito = $rowEvent['numero_deposito'];
         $numero_transferencia = $rowEvent['numero_transferencia'];
         $nombreDeposito = $rowEvent['nombre_deposito'];
     }
     $result = $eventosModel->deleteBanco($id_evento, $id_evento_banco);
     if ($result) {
         $msg = "<div class='alert alert-success'><i class='fa fa-thumbs-o-up'> </i>BANCO ELIMINADO.</div>";
     } else {
         $msg = "<div class='alert alert-danger'><i class='fa fa-thumbs-o-up'> </i>ERROR AL ELIMINAR BANCO.</div>";
     }
     $bancosEventos = $eventosModel->getEventoBancos($id_evento);
     $tiposMonedas = $eventosModel->getEventosMoneda();
     $paises = $participantesModel->getPaises();
     include 'view/head.php';
     include 'view/bancos.php';
     include 'view/footer.php';
 }
 function getDescuentos($id_evento, $id_participante, $id_moneda)
 {
     $eventos = new eventosModel();
     $datosMoneda = $eventos->getDatosMoneda($id_moneda);
     foreach ($datosMoneda as $key => $rowMoneda) {
         $simbolo = $rowMoneda['Symbol'];
         $tipoMoneda = $rowMoneda['CurrencyISO'];
     }
     $result = $eventos->getDescuentos($id_evento, $id_participante);
     $afiliado = $this->getFechasTarifa($id_evento, $id_participante, 1);
     $noafiliado = $this->getFechasTarifa($id_evento, $id_participante, 2);
     if (count($result) == 0) {
         echo "<button class='btn btn-success btn-block' data-tooltip='tooltip' title='ASISTIR' onclick='showModal(\"#modalMsgAsistir\"," . $id_evento . "," . $id_participante . "," . $this->getCostoEvento($id_evento, $id_participante) . ",\"" . $simbolo . "\",\"" . $tipoMoneda . "\"," . $afiliado . "," . $noafiliado . ")'>\n                    <i class='fa fa-check'></i>\n                     </button>";
     } else {
         //muestra icono de descuento
         echo "<i class='fa fa-asterisk' style='position:absolute;color:red'></i>\n                    <button class='btn btn-success btn-block' data-tooltip='tooltip' title='ASISTIR' onclick='showModal(\"#modalMsgAsistir\"," . $id_evento . "," . $id_participante . "," . $this->getCostoEvento($id_evento, $id_participante) . ",\"" . $simbolo . "\",\"" . $tipoMoneda . "\"," . $afiliado . "," . $noafiliado . ")'>\n                    <i class='fa fa-check'></i>\n                     </button>";
     }
 }
    function getBancosEvento2()
    {
        $id_evento = $_POST['id_evento'];
        $eventosModel = new eventosModel();
        $datosEvento = $eventosModel->getEvento($id_evento);
        $bancosEventos = $eventosModel->getEventoBancos($id_evento);
        foreach ($datosEvento as $key => $rowEvent) {
            $nombre_evento = $rowEvent['nombre_evento'];
            $pais = $rowEvent['descripcion'];
            $precio = $rowEvent['costo_evento'];
            $moneda = $rowEvent['CurrencyName'] . " " . $rowEvent['CurrencyISO'] . " " . $rowEvent['Money'] . " " . $rowEvent['Symbol'];
            $nombre_banco = $rowEvent['nombre_banco'];
            $numero_deposito = $rowEvent['numero_deposito'];
            $numero_transferencia = $rowEvent['numero_transferencia'];
            $nombreDeposito = $rowEvent['nombre_deposito'];
        }
        ?>
			<table class="table table-hover table-bordered" id="tabla_bancos">
                <caption class="bold text-center">DATOS DEL EVENTO: <?php 
        echo mb_strtoupper($nombre_evento);
        ?>
</caption>
                <thead>
                    <tr>
                        <th>País</th>
						<!-- <th>Precio</th> -->
						<th>Moneda</th>
						<th>Banco</th>
						<th>Número de deposito</th>
						<th>Número de transferencia</th>
						<th>Nombre de deposito</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
						<td><?php 
        echo $pais;
        ?>
</td>
						<!-- <td><?php 
        echo $precio;
        ?>
</td> -->
						<td><?php 
        echo $moneda;
        ?>
</td>
						<td><?php 
        echo $nombre_banco;
        ?>
</td>
						<td><?php 
        echo $numero_deposito;
        ?>
</td>
						<td><?php 
        echo $numero_transferencia;
        ?>
</td>
						<td><?php 
        echo $nombreDeposito;
        ?>
</td>
					</tr>
					<?php 
        if (count($bancosEventos) > 0) {
            foreach ($bancosEventos as $key => $rowBancos) {
                echo "<tr>\n\t\t\t\t\t\t\t\t\t<td>" . $rowBancos['pais'] . "</td>\n\t\t\t\t\t\t\t\t\t<!--<td>" . $rowBancos['precio'] . "</td>-->\n\t\t\t\t\t\t\t\t\t<td>" . $rowBancos['CurrencyName'] . " " . $rowBancos['CurrencyISO'] . " " . $rowBancos['Money'] . " " . $rowBancos['Symbol'] . "</td>\n\t\t\t\t\t\t\t\t\t<td>" . $rowBancos['nombre_banco'] . "</td>\n\t\t\t\t\t\t\t\t\t<td>" . $rowBancos['numero_deposito'] . "</td>\n\t\t\t\t\t\t\t\t\t<td>" . $rowBancos['numero_transferencia'] . "</td>\n\t\t\t\t\t\t\t\t\t<td>" . $rowBancos['nombre_persona_deposito'] . "</td>\n\t\t\t\t\t\t\t\t</tr>";
            }
        }
        ?>
                </tbody>
            </table>
		<?php 
    }