Request more timezones on index.php from server API

master
YandolsZX 3 years ago
parent 350b9893c3
commit b0b06e9ec7
  1. 56
      index.php

@ -4,6 +4,7 @@
<br/><br/>
<!-- Request Rocknarok Universe datetime from API -->
<script type= "text/javascript" src="jquery-1.4.1.min.js"> </script>
<script type= "text/javascript">
$(document).ready(function() {
@ -15,7 +16,7 @@ $(document).ready(function() {
data: { 'server': 'ru_general' },
timeout: 1000,
success: function(data) {
$("#timer").html(data);
$("#ruclock").html(data);
window.setTimeout(update, 1000);
}
});
@ -26,6 +27,57 @@ $(document).ready(function() {
</script>
<div id="timer"> </div>
<!-- Request St. Sky Universe datetime from API -->
<script type= "text/javascript" src="jquery-1.4.1.min.js"> </script>
<script type= "text/javascript">
$(document).ready(function() {
function update() {
$.ajax({
type: 'POST',
url: 'servertime.php',
data: { 'server': 'ssu_general' },
timeout: 1000,
success: function(data) {
$("#suuclock").html(data);
window.setTimeout(update, 1000);
}
});
}
update();
});
</script>
<!-- Request Kocharion Universe datetime from API -->
<script type= "text/javascript" src="jquery-1.4.1.min.js"> </script>
<script type= "text/javascript">
$(document).ready(function() {
function update() {
$.ajax({
type: 'POST',
url: 'servertime.php',
data: { 'server': 'ku_general' },
timeout: 1000,
success: function(data) {
$("#kuclock").html(data);
window.setTimeout(update, 1000);
}
});
}
update();
});
</script>
<p>Rocknarok Universe Current time:<p>
<div id="ruclock"> </div> <br/>
<p>St. Sky Universe Current time:</p>
<div id="ssuclock"> </div> <br/>
<p>Kocharion Universe Current time:</p>
<div id="kuclock"> </div> <br/>
</html>
Loading…
Cancel
Save