| Server IP : 195.130.67.5 / Your IP : 216.73.216.231 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/icd/modules/mod_count/tmpl/ |
Upload File : |
<?php
/**
* Countdown Module
*
* @author Robert Concha <rob@cyfervoid.com>
* @package module
* @copyright Copyright (C) 2008 - 2009 Cyfervoid.com All rights reserved.
*/
defined('_JEXEC') or die('Restricted access');
?>
<script>
countdown = <?=$diff?>;
// Converting date difference from seconds to actual time
function convert_to_time(secs)
{
secs = parseInt(secs);
hh = secs / 3600;
hh = parseInt(hh);
mmt = secs - (hh * 3600);
mm = mmt / 60;
mm = parseInt(mm);
ss = mmt - (mm * 60);
if (hh > 23)
{
dd = hh / 24;
dd = parseInt(dd);
hh = hh - (dd * 24);
} else { dd = 0; }
if (ss < 10) { ss = "0"+ss; }
if (mm < 10) { mm = "0"+mm; }
if (hh < 10) { hh = "0"+hh; }
if (dd == 0) { return (hh+":"+mm+":"+ss); }
else {
if (dd > 1) { return (<?=$front_txt?>); }
else { return (dd+" day "+hh+":"+mm+":"+ss); }
}
}
// Our function that will do the actual countdown
function do_cd()
{
if (countdown < 0)
{
document.getElementById('cd').innerHTML = "<?=$event_text?>";
}
else
{
document.getElementById('cd').innerHTML = convert_to_time(countdown);
setTimeout('do_cd()', 1000);
}
countdown = countdown - 1;
}
document.write("<div id='cd'></div>\n");
do_cd();
</script>