mroe changes, moving to language file
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
function date_time(id)
|
||||
{
|
||||
date = new Date;
|
||||
year = date.getFullYear();
|
||||
month = date.getMonth();
|
||||
months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
|
||||
d = date.getDate();
|
||||
day = date.getDay();
|
||||
days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
|
||||
h = date.getHours();
|
||||
if(h<10)
|
||||
{
|
||||
h = "0"+h;
|
||||
}
|
||||
m = date.getMinutes();
|
||||
if(m<10)
|
||||
{
|
||||
m = "0"+m;
|
||||
}
|
||||
s = date.getSeconds();
|
||||
if(s<10)
|
||||
{
|
||||
s = "0"+s;
|
||||
}
|
||||
result = ''+days[day]+' '+months[month]+' '+d+' '+year+' '+h+':'+m+':'+s;
|
||||
document.getElementById(id).innerHTML = result;
|
||||
setTimeout('date_time("'+id+'");','1000');
|
||||
return true;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<?php echo date('F d, Y H:i:s') ?>
|
||||
19
lib/timer.js
19
lib/timer.js
@@ -1,19 +0,0 @@
|
||||
function doAjaxGet(dataSource) {
|
||||
if(navigator.appName == "Microsoft Internet Explorer") {
|
||||
objHTTP = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} else {
|
||||
objHTTP = new XMLHttpRequest();
|
||||
}
|
||||
objHTTP.open("POST", dataSource, true);
|
||||
objHTTP.onreadystatechange = function()
|
||||
{
|
||||
if (objHTTP.readyState == 4 && objHTTP.status == 200) {
|
||||
document.getElementById('oClock').innerHTML = objHTTP.responseText;
|
||||
}
|
||||
}
|
||||
objHTTP.send('null');
|
||||
}
|
||||
function startclock() {
|
||||
doAjaxGet('time.inc.php');
|
||||
setTimeout('startclock()',1000);
|
||||
}
|
||||
Reference in New Issue
Block a user