<?php include('../settings.php');?>

<head>
	<link href="../font-awesome-4.2.0/css/font-awesome.min.css" rel="stylesheet prefetch" type="text/css">
    <style>
    <!--- 2nd August July 2016 new eathquake css for eqlist.php -->
	
eq {
	font-size: .35em;
	text-align: center;
	margin: 32px auto 0 -30px;
	position: absolute;
	font-weight:600;
}
.eqtext {
	position:absolute;
	color: #ccc;
	float: left;
	width:300px;
	margin-left: 140px;
	margin-top: -105px;
	font: 12px / 14px Helvetica,Helvetica,Arial,Helvetica;
	font-weight:normal;
}

.eqtext color{
	font-size: 1em;
	color: #F26C4F;
	font-weight:600;
}
.eqtext depth{
	font-size: 1em;
	color: #F26C4F;
	font-weight:normal;
	
}

.eqtext time{
	font-size: 1em;
	color: #66a1ba;
	font-weight:normal;
	
}




.eq0,.eq3,.eq35,.eq5,.eq67,.eq08 {
	font: 1.7em/2.2em Helvetica,Helvetica,Arial,Helvetica;
	color: #fff;
	margin-top: -25px;
	border-radius: 50%;
	margin-left: 20px;
	border: 2px solid #777;
	width: 70px;
	height: 70px;
	text-align: center;
	margin-bottom:35px;
	
}

.eq0 {
	background: #000;
}

.eq0:after {
	content: 'MINOR';
	position:absolute;
	display: block;
	font-size: 8px;
	line-height:10px;
	margin-top:-15px;
	margin-left:10px
}


.eq3 {
	background: #4c9f83;
}

.eq3:after {
	content: 'MINOR';
	position:absolute;
	display: block;
	font-size: 8px;
	line-height:10px;
	margin-top:-15px;
	margin-left:10px;
	width:50px;
}

.eq5 {
	background: #e48f4c;
}

.eq5:after {
	content: 'MODERATE';
	position:absolute;
	display: block;
	font-size: 8px;
	line-height:10px;
	margin-top:-15px;
	margin-left:10px;
	width:50px;
}



.eq67 {
	background: #ee7259;
}

.eq67:after {
	content: 'STRONG';
	position:absolute;
	display: block;
	font-size: 8px;
	line-height:10px;
	margin-top:-15px;
	margin-left:10px;
	width:50px;
}

.eq08 {
	background: #d15e52;
}

.eq08:after {
	content: 'MAJOR';
	position:absolute;
	display: block;
	font-size: 8px;
	line-height:10px;
	margin-top:-15px;
	margin-left:10px;
	width:50px;
}
.area {
	
	border:0px solid #eee;
	width: 530px;
	height:290px;
	padding:50px;
	margin-top:10px;
	margin-left:10px;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	-o-border-radius: 4px;
	-ms-border-radius: 4px;
	border-radius: 4px;
	-webkit-box-shadow: 0 0 .15em rgba(255,255,255,.3);
	-moz-box-shadow: 0 0 .15em rgba(255,255,255,.3);
	-ms-box-shadow: 0 0 .15em rgba(255,255,255,.3);
	-o-box-shadow: 0 0 .15em rgba(255,255,255,.3);
	box-shadow: 0 0 .15em rgba(255,255,255,.3);
}

.eqtitles {
	position:absolute;
	font-size:14px;
	font-family:'Helvetica',Arial,sans-serif;
	text-align:center;
	top:15px;
	color:#66a1ba;
	margin-left:130px;	
}

.eqtitles span{	
	color:#f26c4f;
	
	
}

.eqscale {
	
	position:absolute;
	margin-top:-65px;
	margin-left:360px;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	-o-border-radius: 4px;
	-ms-border-radius: 4px;
	border-radius: 4px;
	-webkit-box-shadow: 0 0 .15em rgba(0,0,0,.3);
	-moz-box-shadow: 0 0 .15em rgba(0,0,0,.3);
	-ms-box-shadow: 0 0 .15em rgba(0,0,0,.3);
	-o-box-shadow: 0 0 .15em rgba(0,0,0,.3);	
	box-shadow: 0 0 .15em rgba(0,0,0,.3);
	
}



</style>
<?php //current eqlist
date_default_timezone_set($TZ);
$json_string=file_get_contents('http://earthquake-report.com/feeds/recent-eq?json');
//$json_string=file_get_contents('../jsondata/eqnotification.json');
$parsed_json=json_decode($json_string,true);
$magnitude=$parsed_json{0}{'magnitude'};
$eqtitle=$parsed_json{0}['title'];
$depth=$parsed_json{0}['depth'];
$time1=$parsed_json{0}['date_time'];
$lati=$parsed_json{0}['latitude'];
$longi=$parsed_json{0}['longitude'];
$eventime1=date( "d-m-Y H:i", strtotime("$time1") );

$magnitude1=$parsed_json{1}{'magnitude'};
$eqtitle1=$parsed_json{1}['title'];
$depth1=$parsed_json{1}['depth'];
$time2=$parsed_json{1}['date_time'];
$eventime2=date( "d-m-Y H:i", strtotime("$time2") );

$magnitude2=$parsed_json{2}{'magnitude'};
$eqtitle2=$parsed_json{2}['title'];
$depth2=$parsed_json{2}['depth'];
$time3=$parsed_json{2}['date_time'];
$eventime3=date( "d-m-Y H:i", strtotime("$time3") );

$magnitude3=$parsed_json{3}{'magnitude'};
$eqtitle3=$parsed_json{3}['title'];
$depth3=$parsed_json{3}['depth'];
$time4=$parsed_json{3}['date_time'];
$eventime4=date( "d-m-Y H:i", strtotime("$time4") );
?>
</head>
<body>

<div class="area">
<span class="eqtitles">Last 4 <span>Moderate</span> & Significant <span>Earthquakes</span> Worldwide</span>
<!-- EQlist homeweather station earthquakes now with color values 2nd August 2016--> 
<?php
echo " \n";
// EQ Latest earthquake 
if ($magnitude <= 0) {
    echo "<div class=\"\"><value>${magnitude}</value><uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i> $eqtitle <br><time>Time:$eventime1</time><br><depth>Depth:$depth km</depth></div>";
} else if ($magnitude < 4) {
    echo "<div class=\"eq3\"><value>${magnitude}</value><uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i> $eqtitle <br><time>Time:$eventime1</time><br><depth>Depth:$depth km</depth></div>";
} else if ($magnitude < 4.5) {
    echo "<div class=\"eq3\"><value>${magnitude}</value><uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i> $eqtitle <br><time>Time:$eventime1</time><br><depth>Depth:$depth km</depth></div>";
} else if ($magnitude < 5) {
    echo "<div class=\"eq5\"><value>${magnitude}</value><uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i> $eqtitle <br><time>Time:$eventime1</time><br><depth>Depth:$depth km</depth></div>";
} else if ($magnitude< 6) {
    echo "<div class=\"eq5\"><value>${magnitude}</value><uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i> $eqtitle <br><time>Time:$eventime1</time><br><depth>Depth:$depth km</depth></div>";
} else if ($magnitude < 7) {
    echo "<div class=\"eq67\"><value>${magnitude}</value><uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i> $eqtitle <br><time>Time:$eventime1</time><br><depth>Depth:$depth km</depth></div>";
} else if ($magnitude < 8) {
    echo "<div class=\"eq67\"><value>${magnitude}</value><uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i> $eqtitle <br><time>Time:$eventime1</time><br><depth>Depth:$depth km</depth></div>";
} else if ($magnitude < 9) {
    echo "<div class=\"eq08\"><value>${magnitude}</value><uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i> $eqtitle <br><time>Time:$eventime1</time><br><depth>Depth:$depth km</depth></div>";
} 

?> </span>

<?php
echo " \n";
// EQ Latest earthquake 2
if ($magnitude1 <= 0) {
    echo "<div class=\"\">${magnitude1}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle1 <br><time>Time:$eventime2</time><br><depth>Depth:$depth1 km</depth></div>";
} else if ($magnitude1 < 4) {
    echo "<div class=\"eq3\">${magnitude1}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle1 <br><time>Time:$eventime2</time><br><depth>Depth:$depth1 km</depth></div>";
} else if ($magnitude1 < 4.5) {
    echo "<div class=\"eq3\">${magnitude1}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle1 <br><time>Time:$eventime2</time><br><depth>Depth:$depth1 km</depth></div>";
} else if ($magnitude1 < 5) {
    echo "<div class=\"eq5\">${magnitude1}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle1 <br><time>Time:$eventime2</time><br><depth>Depth:$depth1 km</depth></div>";
} else if ($magnitude1 < 6) {
    echo "<div class=\"eq5\">${magnitude1}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle1 <br><time>Time:$eventime2</time><br><depth>Depth:$depth1 km</depth></div>";
} else if ($magnitude1 < 7) {
    echo "<div class=\"eq67\">${magnitude1}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle1 <br><time>Time:$eventime2</time><br><depth>Depth:$depth1 km</depth></div>";
} else if ($magnitude1 < 8) {
    echo "<div class=\"eq67\">${magnitude1}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle1 <br><time>Time:$eventime2</time><br><depth>Depth:$depth1 km</depth></div>";
} else if ($magnitude1 < 9) {
    echo "<div class=\"eq08\">${magnitude1}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle1 <br><time>Time:$eventime2</time><br><depth>Depth:$depth1 km</depth></div>";
} 

?> </span>



<?php
echo " \n";
// EQ Latest earthquake 3
if ($magnitude2 <= 0) {
    echo "<div class=\"eq3\">${magnitude2}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle2 <br><time>Time:$eventime3</time><br><depth>Depth:$depth2 km</depth></div>";
} else if ($magnitude2 < 4) {
    echo "<div class=\"eq3\">${magnitude2}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle2 <br><time>Time:$eventime3</time><br><depth>Depth:$depth2 km</depth></div>";
} else if ($magnitude2 < 4.5) {
    echo "<div class=\"eq3\">${magnitude2}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle2 <br><time>Time:$eventime3</time><br><depth>Depth:$depth2 km</depth></div>";
} else if ($magnitude2 < 5) {
    echo "<div class=\"eq5\">${magnitude2}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle2 <br><time>Time:$eventime3</time><br><depth>Depth:$depth2 km</depth></div>";
} else if ($magnitude2 < 6) {
    echo "<div class=\"eq5\">${magnitude2}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle2 <br><time>Time:$eventime3</time><br><depth>Depth:$depth2 km</depth></div>";
} else if ($magnitude2 < 7) {
    echo "<div class=\"eq67\">${magnitude2}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle2 <br><time>Time:$eventime3</time><br><depth>Depth:$depth2 km</depth></div>";
} else if ($magnitude2 < 8) {
    echo "<div class=\"eq67\">${magnitude2}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle2 <br><time>Time:$eventime3</time><br><depth>Depth:$depth2 km</depth></div>";
} else if ($magnitude2 < 9) {
    echo "<div class=\"eq08\">${magnitude2}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle2 <br><time>Time:$eventime3</time><br><depth>Depth:$depth2 km</depth></div>";
} 

?> </span>


<?php
echo " \n";
// EQ Latest earthquake 4
if ($magnitude3 <= 0) {
    echo "<div class=\"eq3\">${magnitude3}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle3 <br><time>Time:$eventime4</time><br><depth>Depth:$depth3 km</depth></div>";
} else if ($magnitude3 < 4) {
    echo "<div class=\"eq3\">${magnitude3}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle3 <br><time>Time:$eventime4</time><br><depth>Depth:$depth3 km</depth></div>";
} else if ($magnitude3 < 4.5) {
    echo "<div class=\"eq3\">${magnitude3}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle3 <br><time>Time:$eventime4</time><br><depth>Depth:$depth3 km</depth></div>";
} else if ($magnitude3 < 5) {
    echo "<div class=\"eq5\">${magnitude3}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle3 <br><time>Time:$eventime4</time><br><depth>Depth:$depth3 km</depth></div>";
} else if ($magnitude3 < 6) {
    echo "<div class=\"eq5\">${magnitude3}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle3 <br><time>Time:$eventime4</time><br><depth>Depth:$depth3 km</depth></div>";
} else if ($magnitude3 < 7) {
    echo "<div class=\"eq67\">${magnitude3}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle3 <br><time>Time:$eventime4</time><br><depth>Depth:$depth3 km</depth></div>";
} else if ($magnitude3 < 8) {
    echo "<div class=\"eq67\">${magnitude3}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle3 <br><time>Time:$eventime4</time><br><depth>Depth:$depth3 km</depth></div>";
} else if ($magnitude3 < 9) {
    echo "<div class=\"eq08\">${magnitude3}<uvi></uvi></div><div class=\"eqtext\"><i class='fa fa-dot-circle-o'></i>  $eqtitle3 <br><time>Time:$eventime4</time><br><depth>Depth:$depth3 km</depth></div>";
} 

?> </span>
<div class="eqscale">
<img src="eqscale.png" alt="homeweatherstation earthquake scale"/></div>
</div>