Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>$dateFormat = “d F Y — g:i a”; $targetDate = $futureDate;//Change the 25 to however many minutes you want to countdown change date in strtotime $actualDate = $date1; $secondsDiff = $targetDate – $actualDate; $remainingDay = floor($secondsDiff/60/60/24); $remainingHour = floor(($secondsDiff-($remainingDay*60*60*24))/60/60); $remainingMinutes = floor(($secondsDiff-($remainingDay*60*60*24)-($remainingHour*60*60))/60); $remainingSeconds = floor(($secondsDiff-($remainingDay*60*60*24)-($remainingHour*60*60))-($remainingMinutes*60)); $actualDateDisplay = date($dateFormat,$actualDate); $targetDateDisplay = date($dateFormat,$targetDate); &lt;script type=”text/javascript”&gt; var days = &lt;?php echo $remainingDay; ?&gt; var hours = &lt;?php echo $remainingHour; ?&gt; var minutes = &lt;?php echo $remainingMinutes; ?&gt; var seconds = &lt;?php echo $remainingSeconds; ?&gt; function setCountDown(statusfun) {//alert(seconds); var SD; if(days &gt;= 0 &amp;&amp; minutes &gt;= 0){ var dataReturn = jQuery.ajax({ type: “GET”, url: “&lt;?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).’index.php/countdowncont/’; ?&gt;”, async: true, success: function(data){ var data = data.split(“/”); day = data[0]; hours = data[1]; minutes = data[2]; seconds = data[3]; } }); seconds–; if (seconds &lt; 0){ minutes–; seconds = 59 } if (minutes &lt; 0){ hours–; minutes = 59 } if (hours &lt; 0){ days–; hours = 23 } document.getElementById(“remain”).style.display = “block”; document.getElementById(“remain”).innerHTML = ” Your Product Reverse For “+minutes+” minutes, “+seconds+” seconds”; SD=window.setTimeout( “setCountDown()”, 1000 ); }else{ document.getElementById(“remain”).innerHTML = “”; seconds = “00″; window.clearTimeout(SD); jQuery.ajax({ type: “GET”, url: “&lt;?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).’index.php/countdown/’; ?&gt;”, async: false, success: function(html){ } }); document.getElementById(“remain”).innerHTML = “”; window.location = document.URL; // Add your redirect url } } &lt;/script&gt; &lt;?php if($date1 &lt; $futureDate &amp;&amp; ($qtyCart &gt; 0)){ ?&gt; &lt;script type=”text/javascript”&gt; setCountDown(); &lt;/script&gt; &lt;?php }else{ ?&gt; &lt;style&gt; #remain{display:none;} &lt;/style&gt; &lt;?php }}?&gt; &lt;div id=”remain”&gt;&lt;/div&gt; </code></pre> <p>For more information visit <a href="http://urfusion.wordpress.com/2012/10/19/countdown-timer-in-php/" rel="nofollow">urfusion</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload