This topic is locked

Desperate on date coutdown

7/8/2008 2:45:25 PM
PHPRunner General questions
M
mmponline author

I've realy tried many hours to get this right. The following code displays correct when inserted in the ClosingTime's curtom code but the start date must be hard coded. I need this to be drawn from the BidCloseTime field, but I can't get it right.

global $return;

$year = '2008';

$month= '12';

$day = '31';

$hour = '00';

$minute = '00';

$second = '00';

//Countdown Function

function countdown($year, $month, $day, $hour, $minute, $second)

{

global $return;

global $countdown_date;

$countdown_date = mktime($hour, $minute, $second, $month, $day, $year);

$today = time();

$diff = $countdown_date - $today;

if ($diff < 0)$diff = 0;

$dl = floor($diff/60/60/24);

$hl = floor(($diff - $dl*60*60*24)/60/60);

$ml = floor(($diff - $dl*60*60*24 - $hl*60*60)/60);

$sl = floor(($diff - $dl*60*60*24 - $hl*60*60 - $ml*60));

// OUTPUT

$return = array($dl, $hl, $ml, $sl);

return $return;

}
countdown($year, $month, $day, $hour, $minute, $second);

list($dl,$hl,$ml,$sl) = $return;

$value= "Countdown ".$dl." days ".$hl." hours ".$ml." minutes ".$sl." seconds left"."\n<br>";


PLEASE HELP!!!

J
Jane 7/9/2008

Stephan,
send this code to support@xlinesoft.com with detailed description of what you want to achieve.