$nameOfDay = date('D', strtotime($date));
echo " Site Name ".$nameOfDay," - ":time()." ";
echo "
<table width='100%' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td><img src='".THEME."images/headerannounce_01.gif' width='156' height='32' alt='' /></td>
<td style='width: 100%; height: 32px; background-image: url(".THEME."images/headerannounce_stretch.gif')'
id='announcements'>
<marquee direction='left' scrollamount='2' scrolldelay='30' width='100%' onmouseover='this.stop()' onmouseout='this.start
()'>".showsubdate()."</marquee>
</td>
<td><img src='".THEME."images/headerannounce_02.gif' width='73' height='32' alt='' /></td>
</tr>
</table>
";
<?php
echo "Test";
<?php
date_default_timezone_set("America/New_York");
echo date('l - F jS Y - h:i:s A');
Quote
I added it into my main.inc, but the clock stayed fixed unless page was refreshed
if ($this->GetParam('container') == TRUE) {
echo '<div class="container-fluid"><div align="center"><span style="font-size:20px; color:#000;">'.date("F d, Y @ ").'<span id="clock"></span>
<script type="text/Javascript">
<!--
function clock(){
//Save the times in variables
var today = new Date();
var hours = today.getHours();
var minutes = today.getMinutes();
var seconds = today.getSeconds();
//Set the AM or PM time
if (hours >= 12){
meridiem = " <sup>pm</sup>";
}
else {
meridiem = " <sup>am</sup>";
}
//convert hours to 12 hour format and put 0 in front
if (hours>12){
hours = hours - 12;
}
else if (hours===0){
hours = 12;
}
//Put 0 in front of single digit minutes and seconds
if (minutes<10){
minutes = "0" + minutes;
}
else {
minutes = minutes;
}
if (seconds<10){
seconds = "0" + seconds;
}
else {
seconds = seconds;
}
document.getElementById("clock").innerHTML = (hours + ":" + minutes + ":" + seconds + meridiem);
}
setInterval("clock()", 1000);
//-->
</script></span><hr></div>';
}
Category Forum
Modifications and Requests - 9Labels
None yet
Statistics
5 participants
Notifications
You are not receiving notifications from this thread.
Related Questions