Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Countdown timer To work with fusion

Asked Modified Viewed 1,972 times
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
  • Started this discussions
asked
Fusioneer

Hi I was wondering if someone could change this countdown timer code for me so that I can add it to a New Panel on my site or if someone can tell me what to do?

I tryed adding it as a new panel and I changed all" to ' but it did not work.

countdown timer code
<?
// Bizzar PHP GD Countdown Script
// Written by: Brad Derstine (Brad@BizzarScripts.net)

$month = 9; // Month of the countdown
$day = 7; // Day of the countdown
$year = 2007; // Year of the countdown

// mktime is the marked time, and time() is the current time.
$target = mktime(0,0,0,$month,$day,$year);
$diff = $target - time();

$days = ($diff - ($diff % 86400)) / 86400;
$diff = $diff - ($days * 86400);
$hours = ($diff - ($diff % 3600)) / 3600;
$diff = $diff - ($hours * 3600);
$minutes = ($diff - ($diff % 60)) / 60;
$diff = $diff - ($minutes * 60);
$seconds = ($diff - ($diff % 1)) / 1;

header ("Content-type: image/png");
$imgname = "hl2countdown.png";
$im = @imagecreatefrompng ($imgname);

//Here are some common color codes in case you want to change the colors.
//$white = imagecolorallocate ($im, 255, 255, 255);
//$blue = imagecolorallocate ($im, 0, 0, 255);
//$black = imagecolorallocate ($im,0,0,0);
//$gray = imagecolorallocate ($im,153,153,153);
//$red = imagecolorallocate ($im,255,0,0);
//$orange = imagecolorallocate ($im, 255, 127, 36);

$background_color = imagecolorallocate ($im, 0, 0, 0);
$black = imagecolorallocate ($im,0,0,0);
$red = imagecolorallocate ($im,255,0,0);
imagestring ($im, 3, 20, 5,  " Countdown to The Sims 2 bon Voyage UK

Release:     ", $red);
imagestring ($im, 3, 25, 18,  "[ $days day(s) ] [ $hours hour(s) ] [ $minutes

minute(s) ] [ $seconds second(s) ]", $black);
imagepng ($im);
imagedestroy ($im);
?>
0 replies
There are no post found.

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet