root / template / sbnciface / status.html @ 35a592c0
History | View | Annotate | Download (2.03 KB)
| 1 |
{$header}
|
|---|---|
| 2 |
<form action="" method="post"> |
| 3 |
<table id="tbl" align="center" width="400"> |
| 4 |
{if $uptimeValue == 0}
|
| 5 |
<tr><td width="40%">{$uptimeText}</td><td width="60%" id="uptime">{$disconnectedText}</td></tr> |
| 6 |
{else}
|
| 7 |
<tr><td width="40%">{$uptimeText}</td><td width="60%" id="uptime"></td></tr> |
| 8 |
{/if}
|
| 9 |
<tr><td width="40%">{$nicknameText}</td><td width="60%">{$nicknameValue}</td></tr> |
| 10 |
<tr><td width="40%">{$awaynickText}</td><td width="60%">{$awaynickValue}</td></tr> |
| 11 |
<tr><td width="40%">{$awaymessageText}</td><td width="60%">{$awaymessageValue}</td></tr> |
| 12 |
<tr><td width="40%">{$realnameText}</td><td width="60%">{$realnameValue}</td></tr> |
| 13 |
<tr><td width="40%">{$serverText}</td><td width="60%">{$serverValue}</td></tr> |
| 14 |
<tr><td width="40%">{$trafficText}</td><td width="60%">{$trafficValue}</td></tr> |
| 15 |
</table>
|
| 16 |
</form>
|
| 17 |
<script type="text/javascript"> |
| 18 |
{if $uptimeValue == 0}
|
| 19 |
{else}
|
| 20 |
var UptimeTicks = {$uptimeValue};
|
| 21 |
{/if}
|
| 22 |
function UptimeRefresh ()
|
| 23 |
{
|
| 24 |
var days = Math.floor(UptimeTicks /60/60/24);
|
| 25 |
var hours = Math.floor((UptimeTicks - days*60*60*24)/60/60);
|
| 26 |
var minutes = Math.floor((UptimeTicks - days*60*60*24 - hours*60*60)/60);
|
| 27 |
var seconds = (UptimeTicks - days*60*60*24 - hours*60*60 - minutes*60);
|
| 28 |
document.getElementById('uptime').innerHTML = days + ' days ' + hours + ' hours ' + minutes + ' minutes ' + seconds + ' seconds';
|
| 29 |
UptimeTicks++;
|
| 30 |
}
|
| 31 |
UptimeRefresh();
|
| 32 |
setInterval("UptimeRefresh()", 1000);
|
| 33 |
</script>
|
| 34 |
{$footer}
|