include "../datos.php";
$url = explode('-', $_GET['url']);
$id= $url['0'];
//
$url = explode('.html', $url['1']);
$poblacion=$url['0'];
if($poblacion){
$componentes=mysql_query("select poblacion from poblaciones where poblacion like '%".strtoupper($poblacion)."%'");
$componente=mysql_fetch_object($componentes);
$pobla=$componente->poblacion;
$pobla=utf8_encode($pobla);
}
//
function limpia($texto){
return str_replace(' ', '-', $texto);
}
function limpiar_acentos($s)
{
$s = ereg_replace(' ', '-', $s);
$s = ereg_replace('á','a',$s);
$s = ereg_replace('Á','A',$s);
$s = ereg_replace('Í','I',$s);
$s = ereg_replace('í','i',$s);
$s = ereg_replace('é','e',$s);
$s = ereg_replace('É','E',$s);
$s = ereg_replace('ó','o',$s);
$s = ereg_replace('Ó','O',$s);
$s = ereg_replace('ú','u',$s);
$s = ereg_replace('Ú','U',$s);
$s = str_replace('ç','c',$s);
$s = str_replace('Ç','C',$s);
$s = str_replace('ñ','n',$s);
$s = str_replace('Ñ','N',$s);
$s = str_replace('Dª','D',$s);
$s = str_replace('dª','d',$s);
$s = str_replace(' ', '-', $s);
return strtolower($s);
}
function cleanSEF($string) {
$string = str_replace(' ', '-', $string);
$string = preg_replace('/[^0-9a-zA-Z-_]/', '', $string);
$string = preg_replace('[ÓÒÔÕ]','O',$string);
$string = ereg_replace('[óòôõº]','o',$string );
$string = str_replace('-', ' ', $string);
$string = preg_replace('/^\s+|\s+$/', '', $string);
$string = preg_replace('/\s+/', ' ', $string);
$string = str_replace(' ', '-', $string);
return strtolower($string);
}
?>
abogadosdesevilla.es
Listado de poblaciones
//$componentes=mysql_query("select c.nombre,c.id from componentes c, abogados a where c.buffete=a.id and a.sevilla = 'si' and a.habilitado = 'si' ",$conexion);
$componentes=mysql_query("select poblacion, id from poblaciones where zona='Sevilla' ",$conexion);
while($componente=mysql_fetch_object($componentes)){?>
echo utf8_encode($componente->poblacion);?>
}?>