-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
51 lines (41 loc) · 988 Bytes
/
header.php
File metadata and controls
51 lines (41 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<table width="100%">
<tr>
<td>
<a href="main.php"><img src="rent.jpg" width="130" height="130"></a>
</td>
<td><h1>Alan's appartment</h1></td>
</tr>
</table>
<div id="time"></div>
<script>
function checkTime(i) {
if (i < 10) {
i = "0" + i;
}
return i;
}
function startTime() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
var hr=0;
var amp;
// add a zero in front of numbers<10
if (h>12 && h<24){
hr=h-12;
amp="pm";
}
else{
hr=h;
amp="am";
}
m = checkTime(m);
s = checkTime(s);
document.getElementById('time').innerHTML = hr + ":" + m + ":" + s +" "+amp;
t = setTimeout(function () {
startTime()
}, 500);
}
startTime();
</script>