db->prepare("SELECT `geonameid` FROM `horloge-new`.`world` WHERE `cle` = :cle"); $query->bindParam(":cle", $U_VARS["cle_old_horloge"], PDO::PARAM_INT); if( $query->execute() ){ $row = $query->fetch( PDO::FETCH_OBJ ); if( $row ){ $U_VARS["show_city"] = $row->geonameid; } } } if( isset( $U_VARS["show_city"] ) ){ $place = new Geoname( $U_VARS["show_city"] ); }else if( isset( $U_VARS["show_continent"] ) ){ $show_preset = $U_VARS["show_continent"]; }else if( isset( $U_VARS["show_country"] ) ){ $boundingBox = getBoundingBox($U_VARS["show_country"]); $x1 = $boundingBox["x1"]; $x2 = $boundingBox["x2"]; $y1 = $boundingBox["y1"]; $y2 = $boundingBox["y2"]; }else if( isset( $U_VARS["rech_id"] ) ){ if( $U_VARS["rech_id"] > 0 ){ $place = new Geoname( $U_VARS["rech_id"] ); $U_VARS["rech"] = strtolower(trim(substr($U_VARS["rech"], 0, strpos($U_VARS["rech"], " - ")))); $U_VARS["rech"] = trim(substr($U_VARS["rech"], 0, strpos($U_VARS["rech"], " ("))); }else{ //var_dump($U_VARS); $max_lines = 10; if( is_numeric($U_VARS["rech"]) ){ if( strlen($U_VARS["rech"]) == 2){ $boundingBox = getBoundingBoxDepartement($U_VARS["rech"]); $x1 = $boundingBox["x1"]; $x2 = $boundingBox["x2"]; $y1 = $boundingBox["y1"]; $y2 = $boundingBox["y2"]; //var_dump($boundingBox); //$U_VARS["rech"] = $U_VARS["rech"] . "000"; } if( strlen($U_VARS["rech"]) == 2 && ! $boundingBox){ $U_VARS["rech"] = $U_VARS["rech"] . "000"; } if( strlen($U_VARS["rech"]) == 5){ $sql = sprintf(" SELECT * FROM `geonames`.`postal_codes` AS t2 INNER JOIN `geonames`.`cities1000` AS t1 ON t1.`name` = t2.`place_name` WHERE t2.`postal_code` LIKE '%s%%' AND t1.`country` ='FR' AND t1.`fclass` ='P' AND t2.`postal_code` NOT LIKE '%%CEDEX' GROUP BY t1.`name` ORDER BY t1.`name` ASC LIMIT 0, %d", $U_VARS["rech"], $max_lines); //print $sql; $query = $engine->db->prepare( $sql ); if( $query->execute() ){ $rows = $query->fetchAll( PDO::FETCH_OBJ ); } if( count($rows) == 1){ $place = new Geoname( $rows[0]->geonameid ); } $have_multiple_cites = count( $rows ) > 1; //print (int) $have_multiple_cites; } } } } /* * TODO * */ ?> Toutes les prévisions météo en France, dans votre région et votre département sur meteos.fr
logo

Météo observations du jour

%s",MyGetDate());?>

Prévisions météo en france à 4 jours