diff --git a/system/libs/pot/OTS_Account.php b/system/libs/pot/OTS_Account.php index b1026a71..45958b06 100644 --- a/system/libs/pot/OTS_Account.php +++ b/system/libs/pot/OTS_Account.php @@ -334,6 +334,9 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable throw new E_OTS_NotLoaded(); } + if(fieldExist('premdays', 'accounts')) + return $this->data['premdays']; + if($this->data['lastday'] == 0) return 0; @@ -345,6 +348,9 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable { global $config; if(isset($config['lua']['freePremium']) && getBoolean($config['lua']['freePremium'])) return true; + if(fieldExist('premdays', 'accounts')) + return $this->data['premdays'] > 0; + return $this->data['lastday'] > time(); //return ($this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday'])) > 0); } diff --git a/system/templates/account.create.html.twig b/system/templates/account.create.html.twig index fc99f1f9..fe5f18b9 100644 --- a/system/templates/account.create.html.twig +++ b/system/templates/account.create.html.twig @@ -123,7 +123,7 @@ Also you have to agree to the terms presented below. If you have done so, your a
- + {{ include('buttons.submit.html.twig') }}