"; // SE ASIGNAN LOS ESTILOS A LA PAGINA echo $estilos = " "; // SE ASIGNAN LOS SCRIPTS Y JAVASCRIPTS PARA MANEJAR EL LIGHT BOX echo $javascript = " "; $sql=" select * from registros order by usuarioid DESC LIMIT 900"; $result=$db->consulta($sql); while($row=$db->fetch_array($result)) { $sql_afiliacion=" select * from afiliacion where usuarioid=".$row["usuarioid"]." ORDER BY fecha DESC"; $result_afiliacion=$db->consulta($sql_afiliacion); $row_afiliacion=$db->fetch_array($result_afiliacion); if($row_afiliacion["estadoid"]==3) { $estado1="label label-danger"; $estado2="En mora"; } else if($row_afiliacion["estadoid"]==2) { $estado1="label label-success"; $estado2="Al día"; } else { $estado1="label label-warning"; $estado2="Pendiente"; } $valores.= "{"; $valores.= "id: '".$row["usuarioid"]." ',"; $valores.= "name: '".$row["nombre"]." ',"; $valores.= "price: '".$row["correo_personal"]."',"; $valores.= "sales: '".$row["empresa_actual"]."',"; $valores.= "documento: '".$row["no_documento"]."',"; $valores.= "estado1: '".$estado1."',"; $valores.= "estado2: '".$estado2."'"; $valores.= "},"; } $registros_tabla = substr($valores, 0, -1); $sql_e=" select * from eventos order by fecha_inicio DESC"; $result_e=$db->consulta($sql_e); while($row_e=$db->fetch_array($result_e)) { $tipo_evento=$db->field_text("nombre","tipoevento","tipoeventoid",$row_e["tipoeventoid"]); $valores_e.= "{"; $valores_e.= "id: '".$row_e["eventoid"]." ',"; $valores_e.= "name: '".$row_e["nombre"]." ',"; $valores_e.= "tipo: '".$tipo_evento."',"; $valores_e.= "fecha: '".$row_e["fecha_inicio"]."',"; $valores_e.= "},"; } $registros_tabla_e = substr($valores_e, 0, -1); $sql_grupo=" select * from grupointeres order by grupointeresid DESC"; $result_grupo=$db->consulta($sql_grupo); while($row_grupo=$db->fetch_array($result_grupo)) { $valores_grupo.= "{"; $valores_grupo.= "id: '".$row_grupo["grupointeresid"]." ',"; $valores_grupo.= "name: '".$row_grupo["nombre"]." ',"; $valores_grupo.= "},"; } $registros_tabla_grupo = substr($valores_grupo, 0, -1); $sql_asistencia=" SELECT a.usuarioeventoid as usuarioevento, c.nombre AS usuario, c.no_documento as documento, b.nombre AS evento, a.estadoeventoid AS estado, a.asistencia FROM usuarioevento a, eventos b, registros c WHERE c.usuarioid = a.usuarioid AND a.eventoid = b.eventoid ORDER BY a.eventoid "; $result_asistencia=$db->consulta($sql_asistencia); while($row_asistencia=$db->fetch_array($result_asistencia)) { $nombre_estado_evento=$db->field_text("estado","estadoevento","estadoeventoid",$row_asistencia["estado"]); if($row_asistencia["estado"]==1) { $estado_evento1="label label-warning"; $estado_evento2=$nombre_estado_evento; } else if($row_asistencia["estado"]==2) { $estado_evento1="label label-success"; $estado_evento2=$nombre_estado_evento; } else if($row_asistencia["estado"]==3) { $estado_evento1="label label-danger"; $estado_evento2=$nombre_estado_evento; } if($row_asistencia["asistencia"]==1) { $asistencia = "checked"; } else if($row_asistencia["asistencia"]==0) { $asistencia = ""; } $valores_asistencia.= "{"; $valores_asistencia.= "id: '".$row_asistencia["usuarioevento"]." ',"; $valores_asistencia.= "usuario: '".$row_asistencia["usuario"]." ',"; $valores_asistencia.= "documento: '".$row_asistencia["documento"]." ',"; $valores_asistencia.= "evento: '".$row_asistencia["evento"]." ',"; $valores_asistencia.= "estadoevento1: '".$estado_evento1." ',"; $valores_asistencia.= "estadoevento2: '".$estado_evento2." ',"; $valores_asistencia.= "asistencia: '".$asistencia."',"; $valores_asistencia.= "},"; } $registros_tabla_asistencia = substr($valores_asistencia, 0, -1); ?> ACIStente