Surf, Windsurf, Kitesurf Essaouira
$colname_vivre_focus = '2';
mysql_select_db($database_conn, $conn);
$query_vivre_focus = sprintf("SELECT * FROM vivre_art WHERE id_cat_art = %s ORDER BY id_art DESC Limit 0,2", GetSQLValueString($colname_vivre_focus, "int"));
$vivre_focus = mysql_query($query_vivre_focus, $conn) or die(mysql_error());
$row_vivre_focus = mysql_fetch_assoc($vivre_focus);
$colname_vivre_balade = '5';
mysql_select_db($database_conn, $conn);
$query_vivre_balade = sprintf("SELECT * FROM vivre_art WHERE id_cat_art = %s ORDER BY id_art DESC Limit 0,2", GetSQLValueString($colname_vivre_balade, "int"));
$vivre_balade = mysql_query($query_vivre_balade, $conn) or die(mysql_error());
$row_vivre_balade = mysql_fetch_assoc($vivre_balade);
function cleanChaineCatFocus($nom,$id){
$in = array('à','?','â','?','?','?','?','?','ô','?','?','?','è','é','ê','ë','ç','?','?','î','ï','ù','?','û','ü','?','?',' ','/',"'",'"',',',';',':','?','!','.','(',')','=','U','«','»','E','’','A','');
$out= array('a','a','a','a','a','a','o','o','o','o','o','o','e','e','e','e','c','i','i','i','i','u','u','u','u','y','n','-','-',"-",'','','','','','','-','','','','u','','','e','-','a','e');
$nom = str_replace($in,$out,$nom);
$nom = strtolower($nom);
$nomcomplet= 'focus/'.$nom.'-n'.$id ;
$nbr=floor(strlen($nom)/2);
for($i=0;$i<=$nbr;$i++){ $nomcomplet=str_replace("--","-",$nomcomplet); $nomcomplets=$nomcomplet.'.html' ;}
return $nomcomplets; }
function cleanChaineCatBalade($nom,$id){
$in = array('à','?','â','?','?','?','?','?','ô','?','?','?','è','é','ê','ë','ç','?','?','î','ï','ù','?','û','ü','?','?',' ','/',"'",'"',',',';',':','?','!','.','(',')','=','U','«','»','E','’','A','');
$out= array('a','a','a','a','a','a','o','o','o','o','o','o','e','e','e','e','c','i','i','i','i','u','u','u','u','y','n','-','-',"-",'','','','','','','-','','','','u','','','e','-','a','e');
$nom = str_replace($in,$out,$nom);
$nom = strtolower($nom);
$nomcomplet= 'balade/'.$nom.'-n'.$id ;
$nbr=floor(strlen($nom)/2);
for($i=0;$i<=$nbr;$i++){ $nomcomplet=str_replace("--","-",$nomcomplet); $nomcomplets=$nomcomplet.'.html' ;}
return $nomcomplets; }
?>