Last Influence Countdown

Forum
Last Post
Threads / Messages

SilverDragonTears

I am your Nemesis.
Premium Member
Joined
Jun 1, 2011
Messages
1,113
Points
36
Mysidian Dollar
51,802
How would I go about showing a countdown until users can influence again?

PHP:
if($type == 'Thylo Silvfox' && $currentlevel <= '4'){
$article_content .= "Influence - (<i>Only adults may influence.</i>)<br>";
}else if($type == 'Thylo Silvfox' && $lastinfluence >= '$lastweek'){
$article_content .= "Influence - You must wait one week before influencing.<br>";
}else 
if($type == 'Thylo Silvfox' && $currentlevel <= '4'){
$article_content .= "";
}else if($type == 'Thylo Silvfox' && $gender == 'f'){

 $article_content .= "<a href='myadopts.php?act=influence&id=".$id."'>Influence</a> Allow an adopt to be influenced female by  ".stripslashes($name).". <br>";
}else if($type == 'Thylo Silvfox' && $gender == 'm'){

 $article_content .= "<a href='myadopts.php?act=influence&id=".$id."'>Influence</a> Allow an adopt to be influenced male by   ".stripslashes($name).".<br>";
}else {
 $article_content .= "";
}
 
Something like this? I'm so bad at math....

PHP:
$article_content .= "Influence - You must wait ";

$target = $lastinfluence ;

$today = time () ;

$difference =($target-$today) ;

$days =(int) ($difference/86400) ;


$article_content .= $days." before influencing.<br>";
}else
 
Ok (this is for breeding too) I'm close but I'm a day off....

PHP:
$target = $lastweek ;

$today = $lastbred ;

$difference =($today-$target) ;

$days =(int) ($difference/86400) ;

$article_content .= "<i> You must wait ".$days." days before breeding.<br>";
}
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,122
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top