'; $rs = mysql_query($sql) or die(mysql_error()); while ( $arr = mysql_fetch_array($rs) ){ $nome = stripslashes($arr['nome']); $codice = $arr['codice']; $testo.= '
'; } $html_code = '
'.$immagine.'
-
'.$testo.'
'; } mysql_free_result($rs); if ( strlen($html_code_all) > 0 ){ $html_code_all = '
'.$html_code_all; } /* * articoli della stessa sezione */ if ( $id_sito != 2 ){ $sql = "SELECT tipo FROM tb_dati WHERE codice=".$id.";"; $rs = mysql_query($sql) or die(mysql_error()); $arr = mysql_fetch_array($rs); mysql_free_result($rs); if ( $arr['tipo'] == 'P' ){ $codicePadre = trova_padre($id); }else{ $codicePadre = $id; } $sql = "SELECT da.codice,nome FROM tb_dati da, tb_descrizioni de WHERE da.codice = de.codice AND da.id_sito = de.id_sito AND "; $sql.= "codicePadre = ".$codicePadre." AND de.attivo = 1 AND de.id_sito=".$id_sito." AND id_lingua=".$id_lingua." ORDER BY de.ordine;"; $rs = mysql_query($sql) or die(mysql_error()); while ( $arr = mysql_fetch_array($rs) ){ $nome = stripslashes($arr['nome']); $codice = $arr['codice']; $html_code_art.= ' '.$nome.' | '; } mysql_free_result($rs); if ( strlen($html_code_art) > 0 ){ $html_code_art = substr($html_code_art,0,strlen($html_code_art)-strlen(' | ')); } } /* * output $html_code = '
'.$content.'
'.$html_code_all.'
'.$html_code_art.' '; */ $html_code = $content.'
'.$html_code_all.'
'.$html_code_art.' '; echo $html_code; break; default: /* $pagina = 'home_'.$id_lingua.'_'.$id_sito.'.html'; $sql = "SELECT contenuto FROM tb_pagine WHERE id_lingua='".$id_lingua."' AND file_html='".$pagina."';"; $rs = mysql_query($sql) or die(mysql_error()); $num = (int)mysql_num_rows($rs); $arr = mysql_fetch_array($rs); mysql_free_result($rs); if ( $num > 0 ){ echo $arr['contenuto']; } */ require_once('/agenzia_immobiliare/mappa_sito.html'); } ?>