Hey, I have problem with Gesior AAC 2012. When someone has temporary ban then on the website it should be shown as:
but there is:
and at the bottom (the same warning is in account managment when someone is logged on banned acc):
characters.php
classes/account.php (from line 160)
How can I fix it?
Code:
(Banished until '.date("j F Y, G:i", $account->getBanTime()).')
Code:
Account Status: Premium Account (Banished forever)
and at the bottom (the same warning is in account managment when someone is logged on banned acc):
Code:
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\classes\account.php on line 176
characters.php
Code:
if($account->isBanned())
{
if($account->getBanTime() > 0)
$main_content .= '<font color="red"><b> (Banished until '.date("j F Y, G:i", $account->getBanTime()).')</b></font>';
else
$main_content .= '<font color="red"><b> (Banished forever)</b></font>';
}
classes/account.php (from line 160)
Code:
public function isBanned($forceReload = false)
{
$this->loadBans($forceReload);
$isBanned = false;
foreach($this->bans as $ban)
{
if($ban->getExpires() <= 0 || $ban->getExpires() > time())
$isBanned = true;
}
return $isBanned;
}
public function getBanTime($forceReload = false)
{
$this->loadBans($forceReload);
$lastExpires = 0;
foreach($bans as $ban)
{
if($ban->getExpires() <= 0)
{
$lastExpires = 0;
break;
}
if($ban->getExpires() > time() && $ban->getExpires() > $lastExpires)
$lastExpires = $ban->getExpires();
}
return $lastExpires;
}
How can I fix it?