3 header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
4 header("Pragma: no-cache"); // HTTP 1.0.
5 header("Expires: 0"); // Proxies.
11 <meta charset="utf-8">
13 <meta name="description" content="">
14 <meta name="author" content="">
15 <style type="text/css">
17 border: 1px solid #f2e3d2;
19 background: -webkit-gradient(linear, left top, left bottom, from(#f2e3d2), to(#c9b7a2));
20 background: -webkit-linear-gradient(top, #f2e3d2, #c9b7a2);
21 background: -moz-linear-gradient(top, #f2e3d2, #c9b7a2);
22 background: -ms-linear-gradient(top, #f2e3d2, #c9b7a2);
23 background: -o-linear-gradient(top, #f2e3d2, #c9b7a2);
24 background-image: -ms-linear-gradient(top, #f2e3d2 0%, #c9b7a2 100%);
25 -webkit-border-radius: 8px;
26 -moz-border-radius: 8px;
28 -webkit-box-shadow: rgba(000,000,000,0.9) 0 1px 2px, inset rgba(255,255,255,0.4) 0 0px 0;
29 -moz-box-shadow: rgba(000,000,000,0.9) 0 1px 2px, inset rgba(255,255,255,0.4) 0 0px 0;
30 box-shadow: rgba(000,000,000,0.9) 0 1px 2px, inset rgba(255,255,255,0.4) 0 0px 0;
31 font-family: 'Helvetica Neue',Helvetica,sans-serif;
32 text-decoration: none;
33 vertical-align: middle;
40 border: 1px solid #c9b7a2;
42 -webkit-border-radius: 4px;
43 -moz-border-radius: 4px;
46 -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px;
47 -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px;
48 box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(000,000,000,0.7) 0 0px 0px;
58 text-shadow: #fdf2e4 0 1px 0;
65 text-shadow: #fdf2e4 0 1px 0;
73 text-shadow: #fdf2e4 0 1px 0;
80 border: 1px solid #447314;
82 background: -webkit-gradient(linear, left top, left bottom, from(#8dc059), to(#6aa436));
83 background: -webkit-linear-gradient(top, #8dc059, #6aa436);
84 background: -moz-linear-gradient(top, #8dc059, #6aa436);
85 background: -ms-linear-gradient(top, #8dc059, #6aa436);
86 background: -o-linear-gradient(top, #8dc059, #6aa436);
87 background-image: -ms-linear-gradient(top, #8dc059 0%, #6aa436 100%);
88 -webkit-border-radius: 4px;
89 -moz-border-radius: 4px;
91 -webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
92 -moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
93 box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
94 text-shadow: #addc7e 0 1px 0;
96 font-family: helvetica, serif;
99 text-decoration: none;
100 vertical-align: middle;
102 .submit-button:hover {
103 border: 1px solid #447314;
104 text-shadow: #31540c 0 1px 0;
106 background: -webkit-gradient(linear, left top, left bottom, from(#8dc059), to(#6aa436));
107 background: -webkit-linear-gradient(top, #8dc059, #6aa436);
108 background: -moz-linear-gradient(top, #8dc059, #6aa436);
109 background: -ms-linear-gradient(top, #8dc059, #6aa436);
110 background: -o-linear-gradient(top, #8dc059, #6aa436);
111 background-image: -ms-linear-gradient(top, #8dc059 0%, #6aa436 100%);
114 .submit-button:active {
115 text-shadow: #31540c 0 1px 0;
116 border: 1px solid #447314;
118 background: -webkit-gradient(linear, left top, left bottom, from(#6aa436), to(#6aa436));
119 background: -webkit-linear-gradient(top, #6aa436, #8dc059);
120 background: -moz-linear-gradient(top, #6aa436, #8dc059);
121 background: -ms-linear-gradient(top, #6aa436, #8dc059);
122 background: -o-linear-gradient(top, #6aa436, #8dc059);
123 background-image: -ms-linear-gradient(top, #6aa436 0%, #8dc059 100%);
133 background-repeat: no-repeat;
134 background-attachment: fixed;
135 background: rgb(167,199,220); /* Old browsers */
136 background: -moz-radial-gradient(center, ellipse cover, rgba(167,199,220,1) 0%, rgba(133,178,211,1) 100%); /* FF3.6-15 */
137 background: -webkit-radial-gradient(center, ellipse cover, rgba(167,199,220,1) 0%,rgba(133,178,211,1) 100%); /* Chrome10-25,Safari5.1-6 */
138 background: radial-gradient(ellipse at center, rgba(167,199,220,1) 0%,rgba(133,178,211,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
139 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a7c7dc', endColorstr='#85b2d3',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
143 <script type="text/javascript">
146 var date = new Date(0);
147 date.setUTCSeconds(utcSeconds);
150 function loadpage(page_request){
151 if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)) {
152 utcSeconds = parseInt(page_request.responseText,10);
153 var tmpdate = new Date(0);
154 tmpdate.setUTCSeconds(utcSeconds);
156 //document.getElementById('times').innerHTML=utcSeconds;
160 function loadpagepps(page_request){
161 if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)) {
162 ppsstatus = page_request.responseText;
163 document.getElementById('ppsstatus').innerHTML='PPS STATUS: '+ppsstatus;
167 function get_time() {
168 var page_request = false
169 if (window.XMLHttpRequest) // if Mozilla, Safari etc
170 page_request = new XMLHttpRequest()
171 else if (window.ActiveXObject){ // if IE
173 page_request = new ActiveXObject("Msxml2.XMLHTTP")
177 page_request = new ActiveXObject("Microsoft.XMLHTTP")
184 page_request.onreadystatechange=function(){
185 loadpage(page_request);
187 page_request.open('GET', '/time-ajax.php', true)
188 page_request.send(null)
191 function update_time() {
192 ntpcounter=ntpcounter+1;
193 date.setSeconds(date.getSeconds() + 1);
194 document.getElementById("updatetime").innerHTML = (date);
195 if (ntpcounter>3600) {
199 setTimeout("update_time()", 1000);
202 function update_pps() {
203 var page_request = false
204 if (window.XMLHttpRequest) // if Mozilla, Safari etc
205 page_request = new XMLHttpRequest()
206 else if (window.ActiveXObject){ // if IE
208 page_request = new ActiveXObject("Msxml2.XMLHTTP")
212 page_request = new ActiveXObject("Microsoft.XMLHTTP")
219 page_request.onreadystatechange=function(){
220 loadpagepps(page_request);
222 page_request.open('GET', '/ppsstatus.php', true)
223 page_request.send(null)
224 setTimeout("update_pps()", 5000);
227 function update_satellite() {
228 var satellite = document.getElementById('satellite');
229 satellite.src = "http://ntp.dyn.spangdorfia.com/gpsd/gpsd.php?op=view&"+ new Date().getTime();
230 setTimeout("update_satellite()", 3000);
235 <body onload="update_time(); update_satellite(); update_pps();">
237 <form class="form-container">
238 <div class="form-title"><h2>Atomic Clock Status</h2></div>
239 <h3><div class="form-title" id="updatetime"></div></h3>
240 <h3><div class="form-title">
242 $contents = file_get_contents("http://localhost/gpsd/gpsd.php?op=json");
243 $contents = utf8_encode($contents);
244 $results = json_decode($contents,true);
245 echo "Total Satellites: " . count($results['sky'][0]['satellites']);
248 <div><h3><img id="satellite" name="satellite" src="http://ntp.dyn.spangdorfia.com/gpsd/gpsd.php?op=view" width="50%" height="50%"></h3></div>
250 <h3><div class="form-title" id="rbstatus">*Rb LOCK: YES</div></h3>
251 <h3><div class="form-title" id="ppsstatus">PPS STATUS: 0</div></h3>
252 <h3><div class="form-title" id="freqstatus">*CURRENT FREQ: 10MHz</div></h3>