0) { for ($i=0; $i < $comptador; $i++) { $IDGRUP = $arrayGrups[$i][0]; $NOMGRUP = majuscules($arrayGrups[$i][1]); if ($i == 0) $separador = ""; else $separador = "   |   "; $submenu .= "$separador$NOMGRUP "; } $contingut = "
$submenu
\n\n"; } //RECUPERANT VARIABLE DE ZONA A MOSTRAR (CAT, ESP, EUR, INT) if (!isset($_REQUEST["idZona"])) $idZona = $arrayGrups[0][0]; else $idZona = $_REQUEST["idZona"]; //RECUPERANT DADES DELS ENLLAÇOS DEL GRUP SELECCIONAT $tempIdGrup = $idZona; //recuperant nom de zona $query = "select nom_$idioma from categories where id = $idZona"; $result = mysql_query($query); $arr = mysql_fetch_array($result); $tempIdNom = $arr["nom_$idioma"]; switch($tempIdGrup) { case $idCatalunya: if ($idZona != $idCatalunya) continue; $query = "select '$tempIdNom' as GRUP, c.id as IDCAT, c.nom_$idioma as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and d.idcat2 = $idCatalunya and d.idcat2 = c.id order by 3, 4"; break; case $idEspanya: if ($idZona != $idEspanya) continue; $query = "(select '$tempIdNom' as GRUP, c.id as IDCAT, '' as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idEspanya and d.idcat2 = c.id and d.idcat3 = 0)) UNION (select '$tempIdNom' as GRUP, c.id as IDCAT, c.nom_$idioma as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idEspanya and d.idcat3 = c.id and d.idcat3 > 0)) order by 3, 4"; break; case $idEuropa: if ($idZona != $idEuropa) continue; $query = " (select '$tempIdNom' as GRUP, c.id as IDCAT, '' as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idEuropa and d.idcat2 = c.id and d.idcat3 = 0)) UNION (select '$tempIdNom' as GRUP, c.id as IDCAT, c.nom_$idioma as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idEuropa and d.idcat3 = c.id and d.idcat3 > 0)) order by 3, 4"; break; case $idInternacional: if ($idZona != $idInternacional) continue; $query = " (select '$tempIdNom' as GRUP, c.id as IDCAT, '' as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idInternacional and d.idcat2 = c.id and d.idcat3 = 0)) UNION (select '$tempIdNom' as GRUP, c.id as IDCAT, c.nom_$idioma as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idInternacional and d.idcat3 = c.id and d.idcat3 > 0) ) order by 3, 4"; break; } $result = mysql_query($query); $num_results = mysql_num_rows($result); for ($i=0; $i < $num_results; $i++) { $arr = mysql_fetch_array($result); $arrayLinks[] = array($arr["GRUP"], $arr["IDCAT"], $arr["PAIS"], $arr["TITOL"], $arr["RESUM"], $arr["URL"], $arr["URLCAT"], $arr["IDLINK"], $arr["DATA_NOU"]); } //FORMATEJANT DADES $grupActual = ""; $paisActual = ""; $comptador = count($arrayLinks); for ($i=0; $i < $comptador; $i++) { $GRUP = $arrayLinks[$i][0]; $IDCAT = $arrayLinks[$i][1]; $PAIS = majuscules($arrayLinks[$i][2]); $TITOL = $arrayLinks[$i][3]; $RESUM = $arrayLinks[$i][4]; $search = array("

","

"); $replace = array("",""); $RESUM = str_replace($search, $replace, $RESUM); $URL = $arrayLinks[$i][5]; $URLCAT = $arrayLinks[$i][6]; $IDLINK = $arrayLinks[$i][7]; if ($URL == '' or $URL == NULL) $URL = $URLCAT; //comprovant si s'ha de mostrar NOU! segons la data < 30 dies if ($arrayLinks[$i][8] > date("Y-m-d")) $nou = "  $txtNou"; else $nou = ""; if ($GRUP != $grupActual) { $grupActual = $GRUP; $contingut .="

$GRUP

\n"; } else $estil = ""; if (strtoupper($PAIS) != strtoupper($paisActual) and strtoupper($PAIS) != strtoupper($grupActual)) { $paisActual = $PAIS; $contingut .= "

$paisActual

\n"; } $contingut .= "

$TITOL$nou

\n"; $contingut .= "

$RESUM

\n"; } $contingut .= "
"; if ($dossier <> "dossier_monlocal") $contingut .= "

$txtTornar\n"; //$contingut .= "

[ $Txttornar ]

\n"; } /******************************************************************/ /** MODE LLISTAT SENCER D'ENLLAÇOS **/ /******************************************************************/ if ($modeLlistat == "sencer") { $db = mysql_pconnect(DB_HOST,DB_USER,DB_PWD); if (!$db) { echo "ERROR: No s'ha establert connexió amb la base de dades."; exit; } mysql_select_db(DB_BBDD); //RECUPERANT GRUPS GEOGRÀFICS, SI TENEN REGISTRES ASSIGNATS $query = "select c.id, c.nom_$idioma as nom from dossiers d, categories c where d.idcat1 = $idApartat and d.idcat2 = c.id and d.visible = 1 and d.$dossier = 1 group by c.id, c.nom_$idioma order by c.ordre"; $result = mysql_query($query); $num_results = mysql_num_rows($result); $arrayGrups = array(); for ($i=0; $i < $num_results; $i++) { $arr = mysql_fetch_array($result); $arrayGrups[] = array($arr["id"], $arr["nom"]); } //RECUPERANT DADES DELS ENLLAÇOS for ($g=0; $g < count($arrayGrups); $g++) { $tempIdGrup = $arrayGrups[$g][0]; $tempIdNom = majuscules($arrayGrups[$g][1]); switch($tempIdGrup) { case $idCatalunya: $query = "select '$tempIdNom' as GRUP, c.id as IDCAT, c.nom_$idioma as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and d.idcat2 = $idCatalunya and d.idcat2 = c.id order by 3, 4"; break; case $idEspanya: /* $query = "select '$tempIdNom' as GRUP, c.id as IDCAT, c.nom_$idioma as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and ((d.idcat2 = $idEspanya and d.idcat2 = c.id and d.idcat3 = 0) or (d.idcat2 = $idEspanya and d.idcat3 = c.id and d.idcat3 > 0)) order by 3, 4"; */ $query = "(select '$tempIdNom' as GRUP, c.id as IDCAT, '' as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idEspanya and d.idcat2 = c.id and d.idcat3 = 0)) UNION (select '$tempIdNom' as GRUP, c.id as IDCAT, c.nom_$idioma as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idEspanya and d.idcat3 = c.id and d.idcat3 > 0)) order by 3, 4"; break; case $idEuropa: /* //01/07/2008 21:31 ROGER $query = "select '$tempIdNom' as GRUP, c.id as IDCAT, c.nom_$idioma as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and ((d.idcat2 = $idEuropa and d.idcat2 = c.id and d.idcat3 = 0) or (d.idcat2 = $idEuropa and d.idcat3 = c.id and d.idcat3 > 0)) order by 3, 4"; */ $query = " (select '$tempIdNom' as GRUP, c.id as IDCAT, '' as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idEuropa and d.idcat2 = c.id and d.idcat3 = 0)) UNION (select '$tempIdNom' as GRUP, c.id as IDCAT, c.nom_$idioma as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idEuropa and d.idcat3 = c.id and d.idcat3 > 0)) order by 3, 4"; //echo $query; break; case $idInternacional: /* //01/07/2008 21:31 ROGER $query = "select '$tempIdNom' as GRUP, c.id as IDCAT, c.nom_$idioma as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and ((d.idcat2 = $idInternacional and d.idcat2 = c.id and d.idcat3 = 0) or (d.idcat2 = $idInternacional and d.idcat3 = c.id and d.idcat3 > 0)) order by 3, 4"; */ $query = " (select '$tempIdNom' as GRUP, c.id as IDCAT, '' as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idInternacional and d.idcat2 = c.id and d.idcat3 = 0)) UNION (select '$tempIdNom' as GRUP, c.id as IDCAT, c.nom_$idioma as PAIS, d.titol_$idioma as TITOL, d.resum_$idioma as RESUM, d.URL_$idioma as URL, d.URL_cat as URLCAT, d.id as IDLINK, DATE_ADD(d.datamodif, INTERVAL 30 DAY) as DATA_NOU from dossiers d, categories c where d.idcat1 = $idApartat and d.visible = 1 and d.$dossier = 1 and (d.idcat2 = $idInternacional and d.idcat3 = c.id and d.idcat3 > 0) ) order by 3, 4"; break; } $result = mysql_query($query); $num_results = mysql_num_rows($result); for ($i=0; $i < $num_results; $i++) { $arr = mysql_fetch_array($result); $arrayLinks[] = array($arr["GRUP"], $arr["IDCAT"], $arr["PAIS"], $arr["TITOL"], $arr["RESUM"], $arr["URL"], $arr["URLCAT"], $arr["IDLINK"], $arr["DATA_NOU"]); } } //FORMATEJANT DADES $contingut = ""; $grupActual = ""; $paisActual = ""; $comptador = count($arrayLinks); for ($i=0; $i < $comptador; $i++) { $GRUP = $arrayLinks[$i][0]; $IDCAT = $arrayLinks[$i][1]; $PAIS = majuscules($arrayLinks[$i][2]); $TITOL = $arrayLinks[$i][3]; $RESUM = $arrayLinks[$i][4]; $search = array("

","

"); $replace = array("",""); $RESUM = str_replace($search, $replace, $RESUM); $URL = $arrayLinks[$i][5]; $URLCAT = $arrayLinks[$i][6]; $IDLINK = $arrayLinks[$i][7]; if ($URL == '' or $URL == NULL) $URL = $URLCAT; //comprovant si s'ha de mostrar NOU! segons la data < 30 dies if ($arrayLinks[$i][8] > date("Y-m-d")) $nou = "  $txtNou"; else $nou = ""; if ($GRUP != $grupActual) { $grupActual = $GRUP; if ($i > 0) { $contingut .= ""; if ($dossier <> "dossier_monlocal") $contingut .= "

$txtTornar\n"; //$contingut .= "

[ $txtTornar ]

\n"; $contingut .="

$GRUP

\n"; } else $contingut .="

$GRUP

\n"; } else $estil = ""; if ($PAIS != $paisActual and $PAIS != $grupActual) { $paisActual = $PAIS; $contingut .= "

$paisActual

\n"; } $contingut .= "

$TITOL$nou

\n"; $contingut .= "

$RESUM

\n"; } $contingut .= "
"; if ($dossier <> "dossier_monlocal") $contingut .= "

$txtTornar\n"; //$contingut .= "

[ $txtTornar ]

\n"; //PREPARANT SUBMENÚ $comptador = count($arrayGrups); $submenu = ""; if ($comptador > 0) { for ($i=0; $i < $comptador; $i++) { $NOMGRUP = majuscules($arrayGrups[$i][1]); if ($i == 0) $separador = ""; else $separador = "   |   "; $submenu .= "$separador$NOMGRUP "; } $contingut = "
$submenu
\n\n" . $contingut; } } /******************************************************************/ /** MODE BIBLIOGRAFIA **/ /******************************************************************/ if ($modeLlistat == "bibliografia") { //RECUPERANT REGISTRES $db = mysql_pconnect(DB_HOST,DB_USER,DB_PWD); if (!$db) { echo "ERROR: No s'ha establert connexió amb la base de dades."; exit; } mysql_select_db(DB_BBDD); $query = "SELECT c.id as IDCAT, c.nom_$idioma as CATEGORIA, b.id as IDREG, b.autors1, b.titol1, b.autors2, b.titol2, b.any, b.publicacio, b.pagines, b.isbn, b.coleccio, b.consulta_$idioma as CONSULTA, b.url, DATE_ADD(b.datamodif, INTERVAL 30 DAY) as DATA_NOU FROM bibliografia b, categories c WHERE b.idcat1 = c.id and b.visible = 1 and b.$dossier = 1 order by c.ordre, b.autors1, b.any, b.titol1"; $result = mysql_query($query); $num_results = mysql_num_rows($result); $contingut = ""; $catActual = ""; $arrayCategories = array(); for ($i=0; $i < $num_results; $i++) { switch ($idioma) { case "cat" : $textDINS = "dins"; $textONLINE = "en línia"; break; case "esp" : $textDINS = "en"; $textONLINE = "en línea"; break; case "eng" : $textDINS = "in"; $textONLINE = "on line"; break; case "fra" : $textDINS = "dans"; $textONLINE = "en ligne"; break; } $arr = mysql_fetch_array($result); $IDCAT = $arr["IDCAT"]; $CATEGORIA = majuscules($arr["CATEGORIA"]); $IDREG = $arr["IDREG"]; $AUTORS1 = $arr["autors1"]; $TITOL1 = $arr["titol1"]; $AUTORS2 = $arr["autors2"]; if ($AUTORS2 != "") $AUTORS2 = ", $textDINS $AUTORS2"; $TITOL2 = $arr["titol2"]; $ANY = $arr["any"]; $PUBLICACIO = $arr["publicacio"]; $PAGINES = $arr["pagines"]; if ($PUBLICACIO != "" and $PAGINES != "") $PUBLICACIO = "$PUBLICACIO, $PAGINES."; if ($PUBLICACIO == "" and $PAGINES != "") $PUBLICACIO = "$PAGINES."; if ($PUBLICACIO != "" and $PAGINES = "") $PUBLICACIO = "$PAGINES."; if ($PUBLICACIO == "" and $PAGINES == "") $PUBLICACIO = ""; $ISBN = $arr["isbn"]; if ($ISBN != "") $ISBN = "ISBN: $ISBN."; $COLECCIO = $arr["coleccio"]; if ($COLECCIO != "") $COLECCIO = "($COLECCIO)."; $CONSULTA = $arr["CONSULTA"]; if ($CONSULTA != "") $CONSULTA = "[$CONSULTA]."; $URL = $arr["url"]; $prefixURL = ""; $sufixURL = ""; if ($URL != "") { $prefixURL = ""; $sufixURL = ""; } //comprovant si s'ha de mostrar NOU! segons la data < 30 dies if ($arr["DATA_NOU"] > date("Y-m-d")) $nou = "  $txtNou"; else $nou = ""; if ($CATEGORIA != $catActual) { $catActual = $CATEGORIA; if ($i > 0) { $contingut .= ""; $botodalt = "

$txtTornar\n"; if ($dossier == "dossier_monlocal") $botodalt = "
\n"; $contingut .= $botodalt; //$contingut .= "

[ $txtTornar ]

\n"; $contingut .="

$CATEGORIA

\n"; } else $contingut .="

$CATEGORIA

\n"; } //FITXERS $query = "SELECT * from fitxers where taulaseccio = 'bibliografia' and idreg = $IDREG"; $resultF = mysql_query($query); $num_resultsF = mysql_num_rows($resultF); $arrayFitxers = array(); $imgPortada = "biblio_noportada.png"; for ($z=0; $z < $num_resultsF; $z++) { $arrF = mysql_fetch_array($resultF); $NOMVIZ = $arrF["nomviz"]; $NOMFITXER = $arrF["nomfitxer"]; if ($NOMVIZ == "portada") $imgPortada = $NOMFITXER; } //MAQUETACIÓ RESULTATS $contingut .= "
"; switch ($IDCAT) { case 299 : //llibre $contingut .= "\"\"\n"; $contingut .= "

$AUTORS1 ($ANY). $prefixURL$TITOL1$sufixURL. $PUBLICACIO. $ISBN $COLECCIO $nou

\n"; $arrayCategories[$IDCAT] = $CATEGORIA; break; case 300 : //capítol llibre o article $contingut .= "

$AUTORS1 ($ANY). \"$prefixURL$TITOL2$sufixURL\"$AUTORS2. " . "$TITOL1" . ". $PUBLICACIO $ISBN $CONSULTA $nou

\n"; $arrayCategories[$IDCAT] = $CATEGORIA; break; case 301 : //article en línia $contingut .= "

$AUTORS1 ($ANY). $TITOL1 [$textONLINE]. $CONSULTA $nou

\n"; $arrayCategories[$IDCAT] = $CATEGORIA; break; } $contingut .= "
"; } if (($num_results > 0) and ($dossier <> "dossier_monlocal")) { $contingut .= "


$txtTornar\n";} //SUBMENÚ $comptador = count($arrayCategories); $submenu = ""; if ($comptador > 0) { for ($i=0; $i < $comptador; $i++) { $arrayClaus = array_keys($arrayCategories); $clau = $arrayClaus[$i]; $NOMGRUP = $arrayCategories[$clau]; if ($i == 0) $separador = ""; else $separador = "   |   "; $submenu .= "$separador$NOMGRUP "; } $contingut = "
$submenu
\n\n" . $contingut; } } ?> Dossier: Soundscapes | Observatori del Paisatge
 
Dossier: Soundscapes - Observatori del Paisatge
>

Initiatives and Projects

>

Other Websites of Interest

This section lists useful resources, personal websites, public policies, related companies and other curiosities: fragments from the huge nebula of interests on the subject of soundscape.

 

© 2010/2018 Observatori del Paisatge de Catalunya / Hospici, 8 - 17800 OLOT - Tel: +34 972 27 35 64 · observatori@catpaisatge.net