Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Last Influence Countdown (http://www.mysidiaadoptables.com/forum/showthread.php?t=2550)

SilverDragonTears 11-29-2011 03:51 PM

Last Influence Countdown
 
How would I go about showing a countdown until users can influence again?

PHP Code:

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 .= "";



SilverDragonTears 11-29-2011 04:28 PM

Something like this? I'm so bad at math....

PHP Code:

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

$target $lastinfluence ;

$today time () ;

$difference =($target-$today) ;

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


$article_content .= $days." before influencing.<br>";
}else 


SilverDragonTears 12-07-2011 10:13 PM

Ok (this is for breeding too) I'm close but I'm a day off....

PHP Code:

$target $lastweek ;

$today $lastbred ;

$difference =($today-$target) ;

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

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




All times are GMT -5. The time now is 09:49 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.