/**
     * Regresa los participantes que ya se inscribieron a un evento en especifico en grupo
     * @return [type] [description]
     */
    public function getRelEventosParticipantesGrupos()
    {
        $eventos = new eventosModel();
        $id_evento = $_POST['id_evento'];
        $nombreEvento = $_POST['nombre'];
        $relacion = $eventos->getRelEventosParticipantesGrupo($id_evento);
        ?>
		<table class="table table-striped table-bordered table-hover" id="tabla2">
			<caption class="bold">
				PARTICIPANTES INSCRITOS AL EVENTO: <span class="bold"><?php 
        echo strtoupper($nombreEvento);
        ?>
</span>
				<a href="../admin/imprimirTablaAdmin?id_evento=<?php 
        echo $id_evento;
        ?>
&nombre=<?php 
        echo $nombreEvento;
        ?>
" class="btn blue-madison" target="_blank"><i class="fa fa-print"></i></a>
				</caption>
			<thead>
				<tr>
					<th>NÚMERO AFILIACIÓN DEL ADMINISTRADOR</th>
					<th>NOMBRE DEL ADMINISTRADOR DE GRUPO</th>
					<th>NÚMERO AFILIACIÓN DEL PARTICIPANTE</th>
					<th>NOMBRE DEL PARTICIPANTE</th>
					<!-- <th>TELÉFONO</th> -->
					<!-- <th>CORREO</th> -->
					<th>CIUDAD</th>
					<th>ESTADO</th>
					<th>MONTO PAGADO</th>
					<th>FICHAS BANCARIAS</th>
					<th>FECHA INSCRIPCIÓN</th>
					<th>PAGO</th>
					<th>MATERIAL</th>
				</tr>
			</thead>
			<tbody>
			<?php 
        //$i=0;
        // while ($i<=20) {
        foreach ($relacion as $key => $row) {
            echo "<tr>";
            $datos = $eventos->getRelacionAdministradores($row['fk_administrador_grupo']);
            foreach ($datos as $key => $rowAdmin) {
                echo "<td class='text-left bold'>" . $rowAdmin['numero_afiliacion'] . "</td>\n\t\t\t\t\t\t\t<td class='text-left bold'>" . $rowAdmin['nombre'] . "</td>";
            }
            echo "\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>";
            /*
            							<td class='text-left'>".$row['telefono']."</td>
            							<td class='text-left'>".$row['correo']."</td>*/
            echo "\n\t\t\t\t\t\t\t<td class='text-left'>" . $row['ciudad'] . "</td>\n\t\t\t\t\t\t\t<td class='text-left'>" . $row['estado'] . "</td>\n\t\t\t\t\t\t\t<td class='text-right'>\$" . $row['cantidad_pago'] . "</td>\n\t\t\t\t\t\t\t<td>";
            if ($row['forma_pago'] != 4) {
                $adjuntos = $eventos->getAdjuntos($row['id_participante'], $id_evento);
                if (count($adjuntos) > 0) {
                    echo "<button class='btn blue-madison' onclick='showAdjuntos({$id_evento}," . $row['id_participante'] . ");'>VER FICHAS BANCARIAS</button>";
                } else {
                    echo "<span class='label label-blue-madison'>NO HAY FICHAS BACARIAS</span>";
                }
            } else {
                echo "<span class='label label-blue-madison'> PAGO POR PAYPAL</span>";
            }
            echo "</td>\n\t\t\t\t\t\t\t<td class='text-center'>" . $row['fecha_inscripcion'] . "</td>\n\t\t\t\t\t\t\t<td class='text-left'>" . $this->getEstatusPago($row['estatus_pago'], $row['id_participantes_eventos']) . "</td>\n\t\t\t\t\t\t\t<td class='text-left'>" . $this->getEstatusMaterial($row['material'], $row['id_participantes_eventos']) . "</td>\n\t\t\t\t\t</tr>";
        }
        // $i++;
        // }
        ?>
			</tbody>
		</table>
		<?php 
    }
 /**
  * Revisa la relación que tiene un participante y un evento ya inscrito.
  * Para mostrar el boton de eliminar asistencia y/o adjuntar fichas
  * @param  [type] $tipo_asistencia [description]
  * @param  [type] $msgDel          [description]
  * @param  [type] $id_participante [description]
  * @param  [type] $id_evento       [description]
  * @param  [type] $pago            [description]
  * @param  [type] $forma_pago      [description]
  * @return [type]                  [description]
  */
 function getOpcionesRelacionEventos($tipo_asistencia, $msgDel, $id_participante, $id_evento, $pago, $forma_pago)
 {
     $eventos = new eventosModel();
     if ($tipo_asistencia == 1) {
         //asistencia individual
         if ($pago == -1) {
             //si no esta pagado puede eliminar su asistencia al evento y adjuntar fichas bancarias
             if ($forma_pago != 4) {
                 //si es metodo diferente a paypal puede adjuntar fichas bancarias
                 echo "<button class='btn blue btn-block' data-tooltip='tooltip' title='ADJUNTAR FICHAS BANCARIAS' ASISTENCIA' onclick='modalAdjuntos(" . $id_evento . ");'>\n                                <i class='fa fa-files-o'></i>\n                            </button>";
             }
             //fin if de forma pago
             $result = $eventos->getAdjuntos($id_participante, $id_evento);
             if (count($result) == 0) {
                 //si no tiene una ficha adjuntada puede eliminar su asistencia.
                 echo "<button class='btn red-thunderbird btn-block' data-tooltip='tooltip' title='CANCELAR ASISTENCIA' onclick='showModalDelEvento(\"CANCELAR ASISTENCIA\",\"" . $msgDel . "\", \"#modalMsg\"," . $id_evento . "," . $id_participante . " )' style='margin-top:5px'>\n                        <i class='fa fa-trash-o'></i>\n                        </button>";
             }
         }
         //fin if de comprobación de estatus de pago
     } else {
         //asistencia grupal.
         $eventosModel = new eventosModel();
         $result = $eventosModel->getOpcionesRelacionEventos($id_participante, $id_evento);
         foreach ($result as $key => $row) {
             $id_participante_administrador = $row['id_participante_administrador'];
         }
         if ($id_participante_administrador == $id_participante) {
             //es el administrador del grupo
             if ($pago == -1) {
                 //si no esta pagado puede eliminar su asistencia al evento y adjuntar fichas bancarias
                 echo "<button class='btn blue btn-block' data-tooltip='tooltip' title='ADJUNTAR FICHAS BANCARIAS' ASISTENCIA' onclick='modalAdjuntos(" . $id_evento . ");'>\n                                <i class='fa fa-files-o'></i>\n                            </button>";
                 $result = $eventosModel->getAdjuntos($id_participante, $id_evento);
                 if (count($result) == 0) {
                     //si no tiene una ficha adjuntada puede eliminar su asistencia.
                     echo "<button class='btn red-thunderbird btn-block' data-tooltip='tooltip' title='CANCELAR ASISTENCIA' onclick='showModalDelEvento(\"CANCELAR ASISTENCIA\",\"" . $msgDel . "\", \"#modalMsg\"," . $id_evento . "," . $id_participante . " )' style='margin-top:5px'>\n                            <i class='fa fa-trash-o'></i>\n                            </button>";
                 }
             }
             //fin if de comprobación de estatus de pago
         }
     }
 }