ÿØÿà JFIF ÿþ
ÿÛ C
ÿÛ C ÿÀ ÿÄ ÿÄ " #QrÿÄ ÿÄ & 1! A"2qQaáÿÚ ? Øy,æ/3JæÝ¹Èß²Ø5êXw²±ÉyR¾I0ó2PI¾IÌÚiMö¯þrìN&"KgX:íµnTJnLK
@!-ýùúmë;ºgµ&ó±hw¯Õ@Ü9ñ-ë.²1<yà¹ïQÐUÛ?.¦èûbß±©Ö«Âw*V) `$bØÔëXÖ-ËTÜíGÚ3ð«g §¯JxU/ÂÅv_s(Hÿ @TñJÑãõçn!ÈgfbÓc:él[ðQe9ÀPLbÃãCµm[5¿ç'ªjglåÛí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢S x?"¸¦ùYé¨ÒOÈ q`~~ÚtËU¹CÚêV I1Áß_ÿÙ
$path_relativa = "../../";
include_once("".$path_relativa."includes_cms/babesa_kudeaketa.php");
// Para el INDICE
$nodo_mota = 0;
$nodomotak = array();
// Para OPCIONES ACTIVAS del INDICE
$estoyentaxonomias = 0;
$estoyengrupos = 0;
$estoyenusuarios = 0;
// Limpiar PARAMETROS
$kodea = new Codigo();
$miusuario_perfil = $_SESSION['usuario_perfil'];
$miusuario_perfil = $kodea->kodea_garbitu($miusuario_perfil,'int');
$miusuario_id = $_SESSION['usuario'];
$miusuario_id = $kodea->kodea_garbitu($miusuario_id,'int');
// Recuperar parametros GET
$nodoa = 0;
if (isset($_GET['ID'])) {
$nodoa = $_GET['ID'];
$nodoa = $kodea->kodea_garbitu($nodoa,'int');
}
if (isset($_POST['nodoa'])) {
$nodoa = $_POST['nodoa'];
$nodoa = $kodea->kodea_garbitu($nodoa,'int');
}
// Sacar TIPO-NODO
$zebaldintza = "WHERE nodo_ID = ?";
$balioak = array($nodoa);
$nodomota = new Nodo();
$nodomotak = $nodomota->nodo_lista($zebaldintza,$balioak);
// Para el FORMULARIO DE BUSQUEDA y el INDICE IZDO de las PAGINAS DE GESTION
if (count($nodomotak) > 0) {
$nodo_mota = $nodomotak[0]['nodo_mota'];
$_SESSION['tipo_nodo'] = $nodo_mota;
}
$zebaldintza = "WHERE tipo_ID = ?";
$balioak = array($nodomotak[0]['nodo_mota']);
$nodomotak = $nodomota->nodo_mota_lista($zebaldintza,$balioak);
unset($nodomota);
unset($kodea);
// Fecha ACTUAL
$data = new Fecha();
$data->sacarfecha();
$urte = $data->urte;
$hila = $data->hila;
$egun = $data->egun;
$ordua = $data->ordua;
unset($data);
// AADIR
if ((isset($_POST["gehitu"])) && ($_POST["gehitu"] == "gehitu")) {
$kodea = new Codigo();
$eltexto1 = $kodea->html_garbitu(utf8_decode($_POST['texto1']));
$eltexto2 = $kodea->html_garbitu(utf8_decode($_POST['texto2']));
$eltexto3 = $kodea->html_garbitu(utf8_decode($_POST['texto3']));
$eltexto4 = $kodea->html_garbitu(utf8_decode($_POST['texto4']));
$archivo1 = $_FILES['archivo1'];
$archivo2 = $_FILES['archivo2'];
$archivo3 = $_FILES['archivo3'];
$archivo4 = $_FILES['archivo4'];
// Inicializar
$elarchivo1 = '';
$elarchivo2 = '';
$elarchivo3 = '';
$elarchivo4 = '';
// Valores de SUBIDO por defecto
$sehasubido = 0;
$sehasubido1 = 0;
$sehasubido2 = 0;
$sehasubido3 = 0;
$sehasubido4 = 0;
// Creo una funcion propia para checkear el DOMINIO (si existe)
function myCheckDNSRR($hostName, $recType = '') {
if(!empty($hostName)) {
if( $recType == '' ) $recType = "MX";
//MARZO 2019, COMENTADO, EXEC establoqueado en basquetour
//exec("nslookup -type=$recType $hostName", $result);
// Check each line to find the one that starts with the host name.
// If it exists then the function succeeded.
foreach ($result as $line) {
if(eregi("^$hostName",$line)) {
return true;
}
}
// otherwise there was no mail handler for the domain
return false;
}
return false;
}
// ES
if ($archivo1['name'] != '') {
$dokumentua = new Masinfo();
$sehasubido1 = $dokumentua->dokumentua_igo($archivo1,$nodomotak[0]['tipo_titulo1']);
$elarchivo1 = $dokumentua->elnombrearchivo;
unset($dokumentua);
if ($sehasubido1 != 1) $elarchivo1 = '';
} else {
$elarchivo1 = $kodea->html_garbitu($_POST['url1']);
if ($elarchivo1 == 'http://') $elarchivo1 = '';
if ($elarchivo1 != '') {
// PREPARAMOS LA URL EN ABSOLUTAS
// Para saber si en la URL aparece algun DOMINIO existente
$protocolos = array('http://', 'https://', 'ftp://', 'www.');
$url1 = explode('/', str_replace($protocolos, '', $elarchivo1));
$dominio1 = $url1[0];
// Comprobar si existe este DOMINIO
//$existe_dominio1 = 0; // Por defecto NO EXISTE EL DOMINIO
//if (myCheckDNSRR($dominio1) || $dominio1 == 'www.basquetour.eus') $existe_dominio1 = 1; // Si EXISTE EL DOMINIO
// MARZO 2019 - Comprobar si existe este DOMINIO
$existe_dominio1 = 0; // Por defecto NO ENLACE
if ( strpos(strtoupper($elarchivo1),'HTTP://') !== FALSE || strpos(strtoupper($elarchivo1),'HTTPS://') !== FALSE || strpos(strtoupper($elarchivo1),'WWW') !== FALSE ) $existe_dominio1 = 1; // ES ENLACE
// Si NO existe el DOMINIO le aadimos por delante nuestra URL_BASE
if ($existe_dominio1 == 0) { // Si NO EXISTE EL DOMINIO
$elarchivo1 = $urlBASE . $elarchivo1;
}
//if ($existe_dominio1 == 1 && strpos(strtoupper($elarchivo1),'HTTP://') === FALSE) { // Si EXISTE EL DOMINIO y NO tiene 'HTTP://'
//$elarchivo1 = 'http://' . $elarchivo1;
//}
//if ($existe_dominio1 == 1 && strpos(strtoupper($elarchivo1),'HTTPS://') === FALSE) { // Si EXISTE EL DOMINIO y NO tiene 'HTTP://'
//$elarchivo1 = 'https://' . $elarchivo1;
//}
$sehasubido1 = 1;
}
}
// EU
if ($archivo2['name'] != '') {
$dokumentua = new Masinfo();
$sehasubido2 = $dokumentua->dokumentua_igo($archivo2,$nodomotak[0]['tipo_titulo1']);
$elarchivo2 = $dokumentua->elnombrearchivo;
unset($dokumentua);
if ($sehasubido2 != 1) $elarchivo2 = '';
} else {
$elarchivo2 = $kodea->html_garbitu($_POST['url2']);
if ($elarchivo2 == 'http://') $elarchivo2 = '';
if ($elarchivo2 != '') {
// PREPARAMOS LA URL EN ABSOLUTAS
// Para saber si en la URL aparece algun DOMINIO existente
$protocolos = array('http://', 'https://', 'ftp://', 'www.');
$url2 = explode('/', str_replace($protocolos, '', $elarchivo2));
$dominio2 = $url2[0];
// Comprobar si existe este DOMINIO
//$existe_dominio2 = 0; // Por defecto NO EXISTE EL DOMINIO
//if (myCheckDNSRR($dominio2) || $dominio2 == 'www.basquetour.eus') $existe_dominio2 = 1; // Si EXISTE EL DOMINIO
// MARZO 2019 - Comprobar si existe este DOMINIO
$existe_dominio2 = 0; // Por defecto NO ENLACE
if ( strpos(strtoupper($elarchivo2),'HTTP://') !== FALSE || strpos(strtoupper($elarchivo2),'HTTPS://') !== FALSE || strpos(strtoupper($elarchivo2),'WWW') !== FALSE ) $existe_dominio2 = 1; // ES ENLACE
// Si NO existe el DOMINIO le aadimos por delante nuestra URL_BASE
if ($existe_dominio2 == 0) { // Si NO EXISTE EL DOMINIO
$elarchivo2 = $urlBASE . $elarchivo2;
}
//if ($existe_dominio2 == 1 && strpos(strtoupper($elarchivo2),'HTTP://') === FALSE) { // Si EXISTE EL DOMINIO y NO tiene 'HTTP://'
// $elarchivo2 = 'http://' . $elarchivo2;
//}
//if ($existe_dominio2 == 1 && strpos(strtoupper($elarchivo2),'HTTPS://') === FALSE) { // Si EXISTE EL DOMINIO y NO tiene 'HTTP://'
// $elarchivo2 = 'https://' . $elarchivo2;
//}
$sehasubido2 = 1;
}
}
// EN
if ($archivo3['name'] != '') {
$dokumentua = new Masinfo();
$sehasubido3 = $dokumentua->dokumentua_igo($archivo3,$nodomotak[0]['tipo_titulo1']);
$elarchivo3 = $dokumentua->elnombrearchivo;
unset($dokumentua);
if ($sehasubido3 != 1) $elarchivo3 = '';
} else {
$elarchivo3 = $kodea->html_garbitu($_POST['url3']);
if ($elarchivo3 == 'http://') $elarchivo3 = '';
if ($elarchivo3 != '') {
// PREPARAMOS LA URL EN ABSOLUTAS
// Para saber si en la URL aparece algun DOMINIO existente
$protocolos = array('http://', 'https://', 'ftp://', 'www.');
$url3 = explode('/', str_replace($protocolos, '', $elarchivo3));
$dominio3 = $url3[0];
// Comprobar si existe este DOMINIO
//$existe_dominio3 = 0; // Por defecto NO EXISTE EL DOMINIO
//if (myCheckDNSRR($dominio3) || $dominio3 == 'www.basquetour.eus') $existe_dominio3 = 1; // Si EXISTE EL DOMINIO
// MARZO 2019 - Comprobar si existe este DOMINIO
$existe_dominio3 = 0; // Por defecto NO ENLACE
if ( strpos(strtoupper($elarchivo3),'HTTP://') !== FALSE || strpos(strtoupper($elarchivo3),'HTTPS://') !== FALSE || strpos(strtoupper($elarchivo3),'WWW') !== FALSE ) $existe_dominio3 = 1; // ES ENLACE
// Si NO existe el DOMINIO le aadimos por delante nuestra URL_BASE
if ($existe_dominio3 == 0) { // Si NO EXISTE EL DOMINIO
$elarchivo3 = $urlBASE . $elarchivo3;
}
//if ($existe_dominio3 == 1 && strpos(strtoupper($elarchivo3),'HTTP://') === FALSE) { // Si EXISTE EL DOMINIO y NO tiene 'HTTP://'
// $elarchivo3 = 'http://' . $elarchivo3;
//}
//if ($existe_dominio3 == 1 && strpos(strtoupper($elarchivo3),'HTTPS://') === FALSE) { // Si EXISTE EL DOMINIO y NO tiene 'HTTP://'
// $elarchivo3 = 'https://' . $elarchivo3;
//}
$sehasubido3 = 1;
}
}
// FR
if ($archivo4['name'] != '') {
$dokumentua = new Masinfo();
$sehasubido4 = $dokumentua->dokumentua_igo($archivo4,$nodomotak[0]['tipo_titulo1']);
$elarchivo4 = $dokumentua->elnombrearchivo;
unset($dokumentua);
if ($sehasubido4 != 1) $elarchivo4 = '';
} else {
$elarchivo4 = $kodea->html_garbitu($_POST['url4']);
if ($elarchivo4 == 'http://') $elarchivo4 = '';
if ($elarchivo4 != '') {
// PREPARAMOS LA URL EN ABSOLUTAS
// Para saber si en la URL aparece algun DOMINIO existente
$protocolos = array('http://', 'https://', 'ftp://', 'www.');
$url4 = explode('/', str_replace($protocolos, '', $elarchivo4));
$dominio4 = $url4[0];
// Comprobar si existe este DOMINIO
//$existe_dominio4 = 0; // Por defecto NO EXISTE EL DOMINIO
//if (myCheckDNSRR($dominio4) || $dominio4 == 'www.basquetour.eus') $existe_dominio4 = 1; // Si EXISTE EL DOMINIO
// MARZO 2019 - Comprobar si existe este DOMINIO
$existe_dominio4 = 0; // Por defecto NO ENLACE
if ( strpos(strtoupper($elarchivo4),'HTTP://') !== FALSE || strpos(strtoupper($elarchivo4),'HTTPS://') !== FALSE || strpos(strtoupper($elarchivo4),'WWW') !== FALSE ) $existe_dominio4 = 1; // ES ENLACE
// Si NO existe el DOMINIO le aadimos por delante nuestra URL_BASE
if ($existe_dominio4 == 0) { // Si NO EXISTE EL DOMINIO
$elarchivo4 = $urlBASE . $elarchivo4;
}
//if ($existe_dominio4 == 1 && strpos(strtoupper($elarchivo4),'HTTP://') === FALSE) { // Si EXISTE EL DOMINIO y NO tiene 'HTTP://'
// $elarchivo4 = 'http://' . $elarchivo4;
//}
//if ($existe_dominio4 == 1 && strpos(strtoupper($elarchivo4),'HTTPS://') === FALSE) { // Si EXISTE EL DOMINIO y NO tiene 'HTTP://'
// $elarchivo4 = 'https://' . $elarchivo4;
//}
$sehasubido4 = 1;
}
}
if ($sehasubido1 <= 1 && $sehasubido2 <= 1 && $sehasubido3 <= 1 && $sehasubido4 <= 1) { // Si NO hay ERROR de ARCHIVOS SUBIDOS (de los IDIOMAS isertados)
$sehasubido = 1;
}
if ($sehasubido1 != 1 || $sehasubido2 != 1 || $sehasubido3 != 1 || $sehasubido4 != 1) { // Si NO se ha insertado ningun ARCHIVO en ningun IDIOMA o hay algun ERROR en la subida de ARCHIVO de alguno de los IDIOMAS
$sehasubido = 0;
if ($sehasubido4 > 1) $sehasubido = $sehasubido4;
if ($sehasubido3 > 1) $sehasubido = $sehasubido3;
if ($sehasubido2 > 1) $sehasubido = $sehasubido2;
if ($sehasubido1 > 1) $sehasubido = $sehasubido1;
if ($sehasubido == 0 && ($sehasubido1 == 1 || $sehasubido2 == 1 || $sehasubido3 == 1 || $sehasubido4 == 1)) $sehasubido = 1;
}
if ($sehasubido == 1) { // Si se han subido los ARCHIVOS (NO HAY ERROR)
// Guardar VERSION si NO ES NUEVO
if (!isset($_SESSION['esnuevo']) || ($_SESSION['esnuevo'] != $nodoa)) {
$version = new Version();
$version->guardar_version($nodoa);
unset($version);
}
// Parametros POST del NODO GENERICO a modificar
$eleguneratze_egun = $kodea->html_garbitu($_POST['eguneratze_egun']);
$eleguneratze_hila = $kodea->html_garbitu($_POST['eguneratze_hila']);
$eleguneratze_urte = $kodea->html_garbitu($_POST['eguneratze_urte']);
$eleguneratze_ordua = $kodea->html_garbitu($_POST['eguneratze_ordua']);
$eleguneratzaile = $kodea->kodea_garbitu($_POST['eguneratzaile'],'int');
$eleguneratzaileIP = $kodea->html_garbitu($_POST['eguneratzaileIP']);
// Actualizar NODO
$taula = "nodo";
$eremuak = "nodo_egun_egun,nodo_egun_hila,nodo_egun_urte,nodo_egun_ordua,nodo_eguneratzaile,nodo_eguneratzaile_IP";
$balioak = array($eleguneratze_egun,$eleguneratze_hila,$eleguneratze_urte,$eleguneratze_ordua,$eleguneratzaile,$eleguneratzaileIP);
$baldintza = ' WHERE nodo_ID = ' . $nodoa;
$db = new Datubasea();
$db->konektatu();
$db->update($taula,$eremuak,$balioak,$baldintza);
$db->deskonektatu();
unset($db);
// Alimentamos los campos en CASTELLANO por si vienen VACIOS (que tomen los VALORES de los otros IDIOMAS)
if ($eltexto1 == '' && $eltexto4 != '') $eltexto1 = $eltexto4;
if ($eltexto1 == '' && $eltexto3 != '') $eltexto1 = $eltexto3;
if ($eltexto1 == '' && $eltexto2 != '') $eltexto1 = $eltexto2;
if ($elarchivo1 == '' && $elarchivo4 != '') $elarchivo1 = $elarchivo4;
if ($elarchivo1 == '' && $elarchivo3 != '') $elarchivo1 = $elarchivo3;
if ($elarchivo1 == '' && $elarchivo2 != '') $elarchivo1 = $elarchivo2;
//ABRIL 2019, PROBLEMA, SI VIENE ? LO DEVUELVE COMO " ??;
$eltexto1 = str_replace('"','?',$eltexto1);
$eltexto2 = str_replace('"','?',$eltexto2);
$eltexto3 = str_replace('"','?',$eltexto3);
$eltexto4 = str_replace('"','?',$eltexto4);
$elarchivo1 = str_replace('"','?',$elarchivo1);
$elarchivo2 = str_replace('"','?',$elarchivo2);
$elarchivo3 = str_replace('"','?',$elarchivo3);
$elarchivo4 = str_replace('"','?',$elarchivo4);
// Aadir DOCUMENTO
$taula = "masinfo";
$eremuak = "masinfo_nodo,masinfo_titulo1,masinfo_titulo2,masinfo_titulo3,masinfo_titulo4,masinfo_url1,masinfo_url2,masinfo_url3,masinfo_url4";
$balioak = array($nodoa,$eltexto1,$eltexto2,$eltexto3,$eltexto4,$elarchivo1,$elarchivo2,$elarchivo3,$elarchivo4);
$db = new Datubasea();
$db->konektatu();
$db->insert($taula,$eremuak,$balioak);
$db->deskonektatu();
unset($db);
} // Si se has subido los ARCHIVOS (NO HAY ERROR)
unset($kodea);
// Notificar si NO ES NUEVO
if (!isset($_SESSION['esnuevo']) || ($_SESSION['esnuevo'] != $nodoa)) {
$email = new Correo();
$email->notificar_edicion($nodoa);
unset($email);
}
// Se recoge que el NODO ES NUEVO, para crear VERSIONES o NO
$_SESSION['esnuevo'] = $nodoa;
$NoraJo = "docuar.php?subido=" . $sehasubido;
header(sprintf("Location: %s", $NoraJo));
}
// Para ACTUALIZACION
$eguneratze_egun = $egun;
$eguneratze_hila = $hila;
$eguneratze_urte = $urte;
$eguneratze_ordua = $ordua;
// USUARIO
$erabiltzaile = new Usuario();
$erabiltzaile->erabiltzailea_lortu($miusuario_id);
$eguneratzaile = $erabiltzaile->usuario_lista;
$eguneratzailea = $eguneratzaile[0]['usuario_ID'];
$eguneratzaile_ip = $erabiltzaile->IPusuario();
unset($erabiltzaile);
include_once("".$path_relativa."includes_cms/burukoa_htm_kudeaketa.php"); ?>
AÑADIENDO DOCUMENTO...
include_once("".$path_relativa."includes_cms/laguntza.php"); ?>
include_once("".$path_relativa."includes_cms/indice_movil.php"); ?>
include_once("".$path_relativa."includes_cms/indice.php"); ?>
include_once("".$path_relativa."includes_cms/busqueda_nodos.php"); ?>
if ($nodo_mota == 2) { ?>PÁGINA » } ?> if ($nodo_mota == 3) { ?>NOTICIA » } ?> if ($nodo_mota == 4) { ?>DOCUMENTO » } ?> if ($nodo_mota == 5) { ?>EVENTO » } ?>AÑADIR DOCUMENTO
Introduce el nombre del documento, elige el archivo (necesariamente un DOC, DOCX, PDF, ZIP, MP3, MPEG o JPG) en tu disco duro (o red local) y pulsa "AÑADIR". Puedes subir un archivo o asignar un enlace para cada uno de los idiomas. Si el archivo es diferente en otro idioma deberás elegir otro archivo e introducir el nombre en el idioma correspondiente. Si es igual, es suficiente con añadirlo sólo en castellano. Para salir del formulario pulsa "OK".