Cuestionario Macrosísmico
Terremotos de magnitud igual o superior a 3.0 o sentidos por la población en el área de la Península Ibérica e Islas Canarias en los últimos 10 días.
current_date - integer '10'
and (a.magnitud >= 2.5 or a.intensidad is not null)
order by a.fecha desc;";
$result = pg_query($dbh, $sql);
$numrows = pg_numrows($result);
if (!$result) {die("Error EN SQL query: " . pg_last_error());
}
$vStatus = "CLOSEME";
?>
| Fecha y hora (LOCAL)* |
Mag |
Localización |
Int. Máx. |
Ver en mapa |
fechalocal)
while ($prueba = pg_fetch_array($result)){
echo $prueba[fechalocal];
}
TODO --> HAY QUE CAMBIAR EL WHILE PARA HACERLO POR PARAMETROS
*/
while ($row = pg_fetch_row($result)) {
$evid = $row[0];
$fechaLocal = $row[1];
$diaLocal = $row[2];
$horaLocal = $row[3];
$magnitud = $row[4];
$localizacion = $row[5];
$intensidad = $row[6];
$strIntensidad = "";
$latitud = $row[7];
$longitud = $row[8];
// Cargamos la imagen del primer mapa
if($cont == 0){
$titulo = $fechaLocal." - ".$localizacion;
$lat = $latitud;
$lon = $longitud;
}
if((strcmp("", $intensidad)!=0) && (strcmp("-1.0", $intensidad)!=0) && (strcmp("-1", $intensidad)!=0)){
if(round(floatval($intensidad), 1)==round(1,1)){
$strIntensidad="I";
}else if(round(floatval($intensidad), 1)==round(1.5,1)){
$strIntensidad="I-II";
}else if(round(floatval($intensidad), 1)==round(2,1)){
$strIntensidad="II";
}else if(round(floatval($intensidad), 1)==round(2.5,1)){
$strIntensidad="II-III";
}else if(round(floatval($intensidad), 1)==round(3,1)){
$strIntensidad="III";
}else if(round(floatval($intensidad), 1)==round(3.5,1)){
$strIntensidad="III-IV";
}else if(round(floatval($intensidad), 1)==round(4,1)){
$strIntensidad="IV";
}else if(round(floatval($intensidad), 1)==round(4.5,1)){
$strIntensidad="IV-V";
}else if(round(floatval($intensidad), 1)==round(5,1)){
$strIntensidad="V";
}else if(round(floatval($intensidad), 1)==round(5.5,1)){
$strIntensidad="V-VI";
}else if(round(floatval($intensidad), 1)==round(6,1)){
$strIntensidad="VI";
}else if(round(floatval($intensidad), 1)==round(6.5,1)){
$strIntensidad="VI-VII";
}else if(round(floatval($intensidad), 1)==round(7,1)){
$strIntensidad="VII";
}else if(round(floatval($intensidad), 1)==round(7.5,1)){
$strIntensidad="VII-VIII";
}else if(round(floatval($intensidad), 1)==round(8,1)){
$strIntensidad="VIII";
}else if(round(floatval($intensidad), 1)==round(8.5,1)){
$strIntensidad="VIII-IX";
}else if(round(floatval($intensidad), 1)==round(9,1)){
$strIntensidad="IX";
}else if(round(floatval($intensidad), 1)==round(9.5,1)){
$strIntensidad="IX-X";
}else if(round(floatval($intensidad), 1)==round(10,1)){
$strIntensidad="X";
}else if(round(floatval($intensidad), 1)==round(10.5,1)){
$strIntensidad="X-XI";
}else if(round(floatval($intensidad), 1)==round(11,1)){
$strIntensidad="XI";
}else if(round(floatval($intensidad), 1)==round(11.5,1)){
$strIntensidad="XI-XII";
}else if(round(floatval($intensidad), 1)==round(12,1)){
$strIntensidad="XII";
}
}else if((strcmp("", $intensidad)!=0) && ((strcmp("-1.0", $intensidad)!=0) || (strcmp("-1", $intensidad)!=0))){
$strIntensidad="Sentido";
}
//echo "";
echo " \n";
// echo " | ".$row["fechaLocal"]." | \n";
echo " ".$fechaLocal." | \n";
echo " ".$magnitud." | \n";
echo " ".$localizacion." | \n";
echo " ".$strIntensidad." | \n";
echo " | \n";
echo "
\n";
$cont++;
}
?>
☆
Epicentro
© Instituto Geográfico Nacional
* Hora oficial española peninsular para terremotos situados entre 20ºW y 6ºE de longitud y 32ºN y 45ºN de latitud.
* Hora oficial canaria para terremotos situados entre 19ºW y 13ºW de longitud y 27ºN y 30ºN de latitud.
Tipo de Magnitud
Escala de intensidad