'.$conexion->getMessage()); } // cosas del postconexion $result = $conexion->simplequery("set client_encoding='LATIN1'"); if (DB::isError($result)){ die('Error al fijar encoding'); } //si hay usuario if($_REQUEST['db_usuario']!='') $whereUsuario = "and usuario='".$_REQUEST['db_usuario']."'"; $select = "SELECT iderror,aplicacion,modulo,version,usuario,fcmn_fechas(fecha,'FECHAHORA') as \"fecha\",tipo,mensaje FROM tcmn_errlog WHERE aplicacion='".$valorAplicacion."' and fecha>'".$valorFecha."' and tipo<=".$_REQUEST['db_tipo']." $whereUsuario ORDER BY iderror DESC"; $resultDatos = $conexion->getAll($select,null,DB_FETCHMODE_ASSOC); if(DB::isError($resultDatos)) $resultDatos = array(); } $htmlResult = ''; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= 'Debugger de gvHIDRA'; $htmlResult.= ''; //REVIEW: creo que el visor del debugger debería estar en el custom $htmlResult.= ""; $htmlResult.= ''; $htmlResult.= ''; //Para meter los parámetros de la consulta $htmlResult.= "
"; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= '
'; $htmlResult.= 'Criterios de filtrado'; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= '  Auto '; $htmlResult.= '
'; $htmlResult.= 'Usuario: '; $htmlResult.= ''; $htmlResult.= '  Fecha: '; $htmlResult.= '  '; $htmlResult.= ' '; $htmlResult.= ' '; $htmlResult.= ' '; $htmlResult.= ' '; $htmlResult.= ''; $htmlResult.= '  Tipo: '; $htmlResult.= ''; $htmlResult.= '  Aplicación: '; $htmlResult.= '
'; $htmlResult.= '
'; $htmlResult.= '
'; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; if(empty($valorUsuario)){ $htmlResult.= ''; } $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; //Iteramos para mostrar los resultados if(count($resultDatos)==0){ $htmlResult.= ''; if(empty($valorUsuario)) $htmlResult.= ''; $htmlResult.= ''; } else{ foreach($resultDatos as $indice=>$tupla){ $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; if(empty($valorUsuario)){ $htmlResult.= ''; } $htmlResult.= ''; $htmlResult.= ''; $htmlResult.= ''; } } $htmlResult.= '
'; $htmlResult.= 'Nº'; $htmlResult.= ''; $htmlResult.= 'FECHA'; $htmlResult.= ''; $htmlResult.= 'USUARIO'; $htmlResult.= ''; $htmlResult.= 'TIPO'; $htmlResult.= ''; $htmlResult.= 'MENSAJE'; $htmlResult.= '
'; else $htmlResult.= ''; $htmlResult.= 'NO HAY DATOS'; $htmlResult.= '
'; $htmlResult.= ($indice+1); $htmlResult.= ''; $htmlResult.= $tupla['fecha']; $htmlResult.= ''; $htmlResult.= $tupla['usuario']; $htmlResult.= ''; switch($tupla['tipo']){ case 0: $htmlResult.= 'PANIC'; break; case 1: $htmlResult.= 'ERROR'; break; case 2: $htmlResult.= 'WARNING'; break; case 3: $htmlResult.= 'NOTICE'; break; case 4: $htmlResult.= 'DEBUG_USER'; break; case 5: $htmlResult.= 'DEBUG_IGEP'; break; } $htmlResult.= ''; $htmlResult.= $tupla['mensaje']; $htmlResult.= '
'; $htmlResult.= ''; $htmlResult.= ''; echo $htmlResult; ?>