... | ... |
@@ -0,0 +1,65 @@ |
1 |
+<!Doctype> |
|
2 |
+<html> |
|
3 |
+<head> |
|
4 |
+ <meta charset="utf-8"> |
|
5 |
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
6 |
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
7 |
+ <title>Rain Areas SG</title> |
|
8 |
+ <link rel="shortcut icon" href="favicon.png"> |
|
9 |
+ <link rel="icon" type="image/png" href="favicon.png" sizes="16x16"> |
|
10 |
+ <link rel="icon" type="image/png" href="favicon.png" sizes="32x32"> |
|
11 |
+ <style> |
|
12 |
+ [class*="maps-"], |
|
13 |
+ .maps |
|
14 |
+ { |
|
15 |
+ position:absolute; |
|
16 |
+ top: 20px; |
|
17 |
+ left: 10px; |
|
18 |
+ z-index: 1; |
|
19 |
+ /*width: 853; height: 480px;*/ |
|
20 |
+ width: 80%; |
|
21 |
+ } |
|
22 |
+ .maps-0 {opacity: 1;filter: grayscale(0);} |
|
23 |
+ .maps-1 {opacity: 0.9;filter: grayscale(20);} |
|
24 |
+ .maps-2 {opacity: 0.8;filter: grayscale(30);} |
|
25 |
+ .maps-3 {opacity: 0,7;filter: grayscale(40);} |
|
26 |
+ .maps-4 {opacity: 0.6;filter: grayscale(50);} |
|
27 |
+ .maps-5 {opacity: 0.5;filter: grayscale(60);} |
|
28 |
+ .maps-6 {opacity: 0.4;filter: grayscale(70);} |
|
29 |
+ .maps-7 {opacity: 0.3;filter: grayscale(80);} |
|
30 |
+ .maps-8 {opacity: 0.2;filter: grayscale(90);} |
|
31 |
+ .maps-9 {opacity: 0.1;filter: grayscale(100);} |
|
32 |
+ .icon { |
|
33 |
+ font-size: 0.7em; |
|
34 |
+ font-family: "Lucida Sans", sans-serif; |
|
35 |
+ } |
|
36 |
+ </style> |
|
37 |
+</head> |
|
38 |
+<body> |
|
39 |
+<img src="https://www.nea.gov.sg/assets/images/map/base-853.png" class="maps" > |
|
40 |
+<!-- <img src="https://www.nea.gov.sg/assets/images/map/Landmarks.png" class="fishes" > --> |
|
41 |
+<img src="https://www.nea.gov.sg/assets/images/map/SG-Township.png" class="maps" > |
|
42 |
+<?php |
|
43 |
+$currDate = time(); |
|
44 |
+$currDate5 = $currDate - ($currDate % 300); |
|
45 |
+ |
|
46 |
+//TZ correction |
|
47 |
+$currDate5 += 8*3600; |
|
48 |
+ |
|
49 |
+$countImg = 13; |
|
50 |
+$iStart=3; |
|
51 |
+for($i=$countImg;$i>=$iStart;$i--) { |
|
52 |
+ $tempTime=$currDate5-$i*300; |
|
53 |
+ $dt = new DateTime("@$tempTime"); |
|
54 |
+ $urlImg="https://www.nea.gov.sg/docs/default-source/rain-area/dpsri_70km_".$dt->format('YmdHi0000')."dBR.dpsri.png"; |
|
55 |
+ |
|
56 |
+ $classIdx=$i-$iStart; |
|
57 |
+ if($classIdx > 9) $classIdx=9; |
|
58 |
+ echo "<img src=\"$urlImg\" class=\"maps-$classIdx\">".PHP_EOL; |
|
59 |
+ //echo $urlImg."<br>".PHP_EOL; |
|
60 |
+} |
|
61 |
+?> |
|
62 |
+<div class="icon">Icon made by <a href="//www.flaticon.com/authors/smashicons">Smashicons</a> from <a href="//www.flaticon.com">www.flaticon.com</a></div> |
|
63 |
+</body> |
|
64 |
+</html> |
|
65 |
+ |