president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
Hello everyone, it suppost to works like if > 366 days then says infinite, if < 365 then tells says the days left and if it's equal 0 then says free account, but check the image below. Account has been set with 0 vipdays.
Thanks.
Code:
$dataAtual = time();
$dataProxima = $account_logged->getCustomField('vipdays');
$data1 = $dataProxima - $dataAtual;
$dataCerta = $data1 / 86400;
if($account_logged->getCustomField('vipdays') > 366)
ECHO '<td>Infinite</td>';
if($account_logged->getCustomField('vipdays') < 365)
ECHO '<td>'. floor($dataCerta) .'</td>';
if($account_logged->getCustomField('vipdays') == 0)
ECHO '<td>Free Account</td>';
Thanks.