include_once("".$path_relativa."includes_cms/indice.php"); ?>
include_once("".$path_relativa."includes_cms/busqueda_mensajes.php"); ?>
if ($totalmensajes > 0 && isset($consulta_site)) { // Si hay la CONSULTA
// Saca TITULO del SITE
$aux = new Auxiliar();
$zebaldintza = " WHERE site_ID = ?";
$balioak = array($consulta_site);
$siteak = $aux->site_lista($zebaldintza,$balioak);
unset($aux);
if (count($siteak) > 0) { // Si existe el SITE
$titu_site = strtoupper($siteak[0]['site_titulo']);
} // Si existe el SITE
// ID del SITE para botones de ADMINISTRACION
$siteID = $consulta_site;
} // Si hay la CONSULTA
?>
CONSULTA if (isset($consulta_estado) && $consulta_estado == 1) { ?> PENDIENTE } ?> if (isset($consulta_estado) && $consulta_estado == 2) { ?> RESPONDIDA } ?> if (isset($consulta_estado) && $consulta_estado == 3) { ?> RECHAZADA } ?> if (isset($consulta_estado) && $consulta_estado == 4) { ?> REDIRIGIDA } ?> if (isset($titu_site)) { // Si existe el titulo del SITE ?>: echo $titu_site; ?> } // Si existe el titulo del SITE ?> if ((isset($siteak) && count($siteak) == 0) && (isset($consulta_site) && $consulta_site == 0)) { // Si el SITE es 0 ?>: CMS } // Si el SITE es 0 ?>
if ($totalmensajes == 0) { // Si NO existe la CONSULTA ?>
-
LA CONSULTA NO EXISTE O HA SIDO ELIMINADA.
} // Si NO existe LA CONSULTA ?>
if ($totalmensajes > 0) { // Si existe la CONSULTA ?>
echo utf8_encode($consulta_tema_texto) ?>| if (isset($mezu_egoera_class)) { ?> } ?> if (isset($mezu_egoera_titu)) { ?> echo $mezu_egoera_titu; ?> } ?> if (isset($mezu_egoera_class)) { ?> } ?>
if ($bloqueado == false) { // Si esta DESBLOQUEADA ?>
if (isset($consulta_estado) && $consulta_estado != 3) { // Si la CONSULTA NO esta RECHAZADA ?>

} // Si la CONSULTA NO esta RECHAZADA ?>
if (isset($consulta_estado) && $consulta_estado == 1 && count($respuestas) == 0) { // Si la CONSULTA esta PENDIENTE y NO tiene RESPUESTAS todavia ?>

} // Si la CONSULTA esta PENDIENTE y NO tiene RESPUESTAS todavia ?>
if (isset($consulta_site) && $consulta_site > 0 && isset($consulta_estado) && $consulta_estado != 3) { // Si la CONSULTA se realizo desde un SITE/MICROSITE (NO desde CMS) ?>

} // Si la CONSULTA se realizo desde un SITE/MICROSITE (NO desde CMS) ?>
} // Si esta DESBLOQUEADA ?>
FECHA: echo $consulta_egun; ?> echo $consulta_hila_testu; ?> echo $consulta_urte; ?>
|HORA: echo $consulta_ordua; ?>
AUTOR/A: echo utf8_encode($consulta_nombre); ?> echo utf8_encode($consulta_apellidos); ?>
if (isset($consulta_email) && $consulta_email != '') { // Si tiene E-MAIL ?>
E-MAIL: echo $consulta_email; ?>
} // Si tiene E-MAIL ?>
if ((isset($consulta_usuario) && $consulta_usuario <= 0) && (isset($consulta_dni) && $consulta_dni != '')) { // Si existe el USUARIO y tiene DNI ?>
DNI: echo $consulta_dni; ?>
} // Si existe el USUARIO y tiene DNI ?>
if (isset($consulta_telefono) && $consulta_telefono != '') { // Si tiene TELEFONO ?>
TELÉFONO: echo $consulta_telefono; ?>
if (isset($consulta_portelefono) && $consulta_portelefono == 1) { ?>
|DESEA SER CONTACTADO/A POR TELÉFONO } ?>
} // Si tiene TELEFONO ?>
if (isset($consulta_centrotrabajo) && $consulta_centrotrabajo != '') { // Si tiene CENTRO DE TRABAJO ?>
CENTRO DE TRABAJO: echo $consulta_centrotrabajo; ?>
} // Si tiene CENTRO DE TRABAJO ?>
IDIOMA: if ($consulta_idioma == 1) { ?> CASTELLANO } ?> if ($consulta_idioma == 2) { ?> EUSKERA } ?> if ($consulta_idioma == 3) { ?> INGLÉS } ?> if ($consulta_idioma == 4) { ?> FRANCÉS } ?>
if (isset($consulta_texto) && $consulta_texto != '') { // Si tiene CONSULTA ?>
CONSULTA:
if (strpos($consulta_texto,'<p') === FALSE && strpos($consulta_texto,'
?>
$consulta_texto = str_replace("\n","
",$consulta_texto); ?>
} // Si NO tiene
?>
echo utf8_encode(html_entity_decode($consulta_texto)); ?>
} // Si tiene CONSULTA ?>
if ((isset($consulta_redireccion_egun) && $consulta_redireccion_egun != '') && (isset($consulta_redireccion_hila_testu) && $consulta_redireccion_hila_testu != '') && (isset($consulta_redireccion_urte) && $consulta_redireccion_urte != '') && (isset($consulta_redireccion_email) && $consulta_redireccion_email != '')) { // Si tiene datos de haber sido REDIRIGIDA ?>
if ($bloqueado == false) { // Si esta DESBLOQUEADA ?>
if (isset($consulta_estado) && $consulta_estado == 4) { // Si la CONSULTA esta REDIRIGIDA ?>

} // Si la CONSULTA esta REDIRIGIDA ?>
} // Si esta DESBLOQUEADA ?>
CONSULTA REDIRIGIDA:
FECHA DE REDIRECCIÓN: echo $consulta_redireccion_egun; ?> echo $consulta_redireccion_hila_testu; ?> echo $consulta_redireccion_urte; ?>|HORA: echo $consulta_redireccion_ordua; ?>
if (isset($consulta_redireccion_email) && $consulta_redireccion_email != '') { // Si tiene E-MAIL ?>
REDIRIGIDA AL E-MAIL: echo $consulta_redireccion_email; ?>
} // Si tiene E-MAIL ?>
} // Si tiene datos de haber sido REDIRIGIDA ?>
if (count($respuestas) > 0) { // Si hay RESPUESTAS a esta CONSULTA ?>
$n = 1; ?>
foreach ($respuestas as $larespuesta) { // Por cada RESPUESTA ?>
// Sacar datos de la RESPUESTA
$respuesta_ID = $larespuesta['mensaje_ID'];
$respuesta_egun = $larespuesta['mensaje_egun'];
$respuesta_hila = $larespuesta['mensaje_hila'];
$data = new Fecha();
$respuesta_hila_testu = $data->hila_testu($respuesta_hila,1);
unset($data);
$respuesta_urte = $larespuesta['mensaje_urte'];
$respuesta_ordua = $larespuesta['mensaje_ordua'];
$respuesta_ip = $larespuesta['mensaje_ip'];
$respuesta_usuario = $larespuesta['mensaje_usuario'];
$respuesta_elnombre = $larespuesta['mensaje_nombre'];
$respuesta_losapellidos = $larespuesta['mensaje_apellidos'];
$respuesta_dni = $larespuesta['mensaje_dni'];
$respuesta_email = $larespuesta['mensaje_email'];
$respuesta_texto = $larespuesta['mensaje_texto'];
$respuesta_idioma = $larespuesta['mensaje_idioma'];
$respuesta_telefono = $larespuesta['mensaje_telefono'];
$respuesta_portelefono = $larespuesta['mensaje_portelefono'];
$respuesta_centrotrabajo = $larespuesta['mensaje_centrotrabajo'];
$respuesta_hilo = $larespuesta['mensaje_hilo'];
$respuesta_estado = $larespuesta['mensaje_egoera'];
// Datos de REDIRECCION (si tiene)
$respuesta_redireccion_egun = $larespuesta['mensaje_redirigir_egun'];
$respuesta_redireccion_hila = $larespuesta['mensaje_redirigir_hila'];
$data = new Fecha();
$respuesta_redireccion_hila_testu = $data->hila_testu($respuesta_redireccion_hila,1);
unset($data);
$respuesta_redireccion_urte = $larespuesta['mensaje_redirigir_urte'];
$respuesta_redireccion_ordua = $larespuesta['mensaje_redirigir_ordua'];
$respuesta_redireccion_email = $larespuesta['mensaje_redirigir_email'];
$respuesta_titulo = "CONSULTA";
// Desencriptamos los DATOS PERSONALES de la RESPUESTA
$encript = new Codigo();
$respuesta_dni = $encript->encriptar_desencriptar_datos('decrypt',$respuesta_dni,$respuesta_ID);
$respuesta_elnombre = $encript->encriptar_desencriptar_datos('decrypt',$respuesta_elnombre,$respuesta_ID);
$respuesta_losapellidos = $encript->encriptar_desencriptar_datos('decrypt',$respuesta_losapellidos,$respuesta_ID);
$respuesta_email = $encript->encriptar_desencriptar_datos('decrypt',$respuesta_email,$respuesta_ID);
$respuesta_telefono = $encript->encriptar_desencriptar_datos('decrypt',$respuesta_telefono,$respuesta_ID);
$respuesta_centrotrabajo = $encript->encriptar_desencriptar_datos('decrypt',$respuesta_centrotrabajo,$respuesta_ID);
$respuesta_texto = $encript->encriptar_desencriptar_datos('decrypt',$respuesta_texto,$respuesta_ID);
$respuesta_redireccion_email = $encript->encriptar_desencriptar_datos('decrypt',$respuesta_redireccion_email,$respuesta_ID);
unset($encript);
$respuesta_nombre = $respuesta_elnombre . ' ' . $respuesta_losapellidos;
// Si USUARIO es de la INTRANET
if ($larespuesta['mensaje_usuario'] > 0) { // Si es USUARIO IDENTIFICADO, 0 = NO ident
$erabiltzaile = new Usuario();
$erabiltzaile->erabiltzailea_lortu($larespuesta['mensaje_usuario']);
$egile = $erabiltzaile->usuario_lista;
unset($erabiltzaile);
$respuesta_nombre = $egile[0]['usuario_nombre'] . ' ' . $egile[0]['usuario_apellidos'];
$respuesta_titulo = "RESPUESTA";
} // Si es USUARIO IDENTIFICADO, 0 = NO ident
?>
$respuesta_class = "fondo_gris";
if (isset($respuesta_estado) && $respuesta_estado == 3) $respuesta_class = $respuesta_class . " nodo_anulado";
?>
if (count($respuestas) == $n && $respuesta_estado == 3 && $respuesta_usuario > 0) { // Si es la ULTIMA y esta RECAHAZADA y es MENSAJE DE ADMINISTRADOR/MODERADOR ?>
} // Si es la ULTIMA y esta RECAHAZADA y es MENSAJE DE ADMINISTRADOR/MODERADOR ?>
if (count($respuestas) == $n && $respuesta_usuario <= 0) { // Si es la ULTIMA y es MENSAJE DE USUARIO ?>

if (isset($respuesta_estado) && $respuesta_estado == 1) { // Si la RESPUESTA esta PENDIENTE ?>

} // Si la RESPUESTA esta PENDIENTE ?>

} // Si es la ULTIMA y es MENSAJE DE USUARIO ?>
if (isset($respuesta_estado) && $respuesta_estado != 3) { // Si NO es RECHAZADA, ni REDIRIGIDA ?> echo $respuesta_titulo ?> } // Si NO es RECHAZADA, ni REDIRIGIDA ?> if (isset($respuesta_estado) && $respuesta_estado == 3) { // Si es RECHAZADA ?>CONSULTA RECHAZADA } // Si es RECHAZADA ?>:
FECHA: echo $respuesta_egun; ?> echo $respuesta_hila_testu; ?> echo $respuesta_urte; ?>
|HORA: echo $respuesta_ordua; ?>
if (isset($respuesta_estado) && $respuesta_estado != 3 && $respuesta_estado != 4) { // Si NO es RECHAZADA, ni REDIRIGIDA ?>
AUTOR/A: echo utf8_encode($respuesta_nombre); ?>
} // Si NO es RECHAZADA, ni REDIRIGIDA ?>
if (isset($respuesta_estado) && $respuesta_estado == 3) { // Si es RECHAZADA ?>
LA RECHAZÓ: echo utf8_encode($respuesta_nombre); ?>
} // Si es RECHAZADA ?>
if (isset($respuesta_estado) && $respuesta_estado == 4) { // Si es REDIRIGIDA ?>
LA REDIRIGIÓ: echo utf8_encode($respuesta_nombre); ?>
} // Si es REDIRIGIDA ?>
if (isset($respuesta_email) && $respuesta_email != '') { // Si tiene E-MAIL ?>
E-MAIL: echo $respuesta_email; ?>
} // Si tiene E-MAIL ?>
if ((isset($respuesta_usuario) && $respuesta_usuario <= 0) && (isset($respuesta_dni) && $respuesta_dni != '')) { // Si existe el USUARIO y tiene DNI ?>
DNI: echo $respuesta_dni; ?>
} // Si existe el USUARIO y tiene DNI ?>
if (isset($respuesta_telefono) && $respuesta_telefono != '') { // Si tiene TELEFONO ?>
TELÉFONO: echo $respuesta_telefono; ?>
if (isset($respuesta_portelefono) && $respuesta_portelefono == 1) { ?>
|DESEA SER CONTACTADO/A POR TELÉFONO } ?>
} // Si tiene TELEFONO ?>
if (isset($respuesta_centrotrabajo) && $respuesta_centrotrabajo != '') { // Si tiene CENTRO DE TRABAJO ?>
CENTRO DE TRABAJO: echo $respuesta_centrotrabajo; ?>
} // Si tiene CENTRO DE TRABAJO ?>
if (isset($respuesta_estado) && $respuesta_estado != 3 ) { // Si NO es RECHAZADA ?>
IDIOMA: if ($respuesta_idioma == 1) { ?> CASTELLANO } ?> if ($respuesta_idioma == 2) { ?> EUSKERA } ?> if ($respuesta_idioma == 3) { ?> INGLÉS } ?> if ($respuesta_idioma == 4) { ?> FRANCÉS } ?>
} // Si NO es RECHAZADA ?>
if ($respuesta_estado == 3) { // Si es RECHAZADA ?>MOTIVO: } // Si es RECHAZADA ?> if ($respuesta_estado != 3) { // Si NO es RECHAZADA ?> echo $respuesta_titulo ?>: } // Si NO es RECHAZADA ?>
if (strpos($respuesta_texto,'<p') === FALSE && strpos($respuesta_texto,'
?>
$respuesta_texto = str_replace("\n","
",$respuesta_texto); ?>
} // Si NO tiene
?>
echo utf8_encode(html_entity_decode($respuesta_texto)); ?> if ($respuesta_estado != 3 && $respuesta_texto == '') { // Si NO es RECHAZADA y NO hay texto de RESPUESTA ?>Sin echo strtolower($respuesta_titulo) ?>. } // Si NO es RECHAZADA y NO hay texto de RESPUESTA ?> if ($respuesta_estado == 3 && $respuesta_texto == '') { // Si es RECHAZADA y NO indica el MOTIVO ?>Sin indicar el motivo. } // Si es RECHAZADA y NO indica el MOTIVO ?>
if ((isset($respuesta_redireccion_egun) && $respuesta_redireccion_egun != '') && (isset($respuesta_redireccion_hila_testu) && $respuesta_redireccion_hila_testu != '') && (isset($respuesta_redireccion_urte) && $respuesta_redireccion_urte != '') && (isset($respuesta_redireccion_email) && $respuesta_redireccion_email != '')) { // Si tiene datos de haber sido REDIRIGIDA ?>
if ($bloqueado == false) { // Si esta DESBLOQUEADA ?>
if (isset($respuesta_estado) && $respuesta_estado == 4) { // Si la CONSULTA esta REDIRIGIDA ?>

} // Si la CONSULTA esta REDIRIGIDA ?>
} // Si esta DESBLOQUEADA ?>
CONSULTA REDIRIGIDA:
FECHA DE REDIRECCIÓN: echo $respuesta_redireccion_egun; ?> echo $respuesta_redireccion_hila_testu; ?> echo $respuesta_redireccion_urte; ?>|HORA: echo $respuesta_redireccion_ordua; ?>
if (isset($respuesta_redireccion_email) && $respuesta_redireccion_email != '') { // Si tiene E-MAIL ?>
REDIRIGIDA AL E-MAIL: echo $respuesta_redireccion_email; ?>
} // Si tiene E-MAIL ?>
} // Si tiene datos de haber sido REDIRIGIDA ?>
$n = $n + 1; ?>
} // Por cada RESPUESTA ?>
} // Si hay RESPUESTAS a esta CONSULTA ?>
} // Si existe la CONSULTA ?>
// Recuperar PARAMETROS y limpiarlos
$kodea = new Codigo();
$url_volver = "lista_mensajes.php";
if (isset($mezu_egoera_id) || isset($consulta_site)) {
$url_volver = $url_volver . "?";
}
if (isset($mezu_egoera_id)) {
$url_volver = $url_volver . "estadomen=".$mezu_egoera_id;
}
if (isset($mezu_egoera_id) && isset($consulta_site)) {
$url_volver = $url_volver . "&";
}
if (isset($consulta_site)) {
$url_volver = $url_volver . "site=".$consulta_site;
}
if (isset($_SESSION['url_volver']) && $_SESSION['url_volver'] != '') {
$url_volver = $_SESSION['url_volver'];
//$url_volver = $kodea->html_garbitu($url_volver);
}
unset($kodea);
?>
VOLVER A CONSULTAS