fixed displaying unlimited premium account

This commit is contained in:
slawkens1 2017-05-19 02:55:27 +02:00
parent 4bd4198e1c
commit 0b315bfda6
3 changed files with 4 additions and 3 deletions

View File

@ -177,11 +177,12 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
if($action == "") if($action == "")
{ {
$freePremium = isset($config['lua']['freePremium']) && getBoolean($config['lua']['freePremium']);
$account_reckey = $account_logged->getCustomField("key"); $account_reckey = $account_logged->getCustomField("key");
if(!$account_logged->isPremium()) if(!$account_logged->isPremium())
$account_status = '<b><font color="red">Free Account</font></b>'; $account_status = '<b><font color="red">Free Account</font></b>';
else else
$account_status = '<b><font color="green">Premium Account, '.$account_logged->getPremDays().' days left</font></b>'; $account_status = '<b><font color="green">Premium Account, ' . ($freePremium ? 'Unlimited' : $account_logged->getPremDays() . ' days left') . '</font></b>';
if(empty($account_reckey)) if(empty($account_reckey))
$account_registred = '<b><font color="red">No</font></b>'; $account_registred = '<b><font color="red">No</font></b>';
else else

View File

@ -74,7 +74,7 @@ if(fetchDatabaseConfig('site_closed_message', $tmp))
<tr> <tr>
<td>Message: (only if closed)</td> <td>Message: (only if closed)</td>
<td> <td>
<textarea name="message" maxlength="255"><?php echo $closed_message; ?></textarea> <textarea name="message" maxlength="255" cols="40" rows="5"><?php echo $closed_message; ?></textarea>
<td> <td>
</tr> </tr>
<tr> <tr>

View File

@ -12,7 +12,7 @@
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
$title = 'Characters'; $title = 'Characters';
//require(SYSTEM . 'item.php'); require(SYSTEM . 'item.php');
$groups = new OTS_Groups_List(); $groups = new OTS_Groups_List();
function generate_search_table($script = false) function generate_search_table($script = false)
{ {