General_model.php

The functions that have been created in General_model you can use them in any module, controller, model or view using the following syntax $this->fxgeneral->function();

Available functions:

Get the current time:

$this->fxgeneral->getTimestamp();
  • This function doesn't require additional parameters

Validate the accesses to the module (function)

$this->fxgeneral->getAccessModule($permission, $gm = '')

The parameters $permission and $gm are obtained from the module config.

  • Permission:

    /**
    * Permissions
    * 1 = ADMIN
    * 2 = Moderator
    * 0 = User logged
    * -1 = Only disconnected
    * You can use multiple 1,2,0
    * If is empty everyone can register
    */

    You can freely define who has access with this array

  • GM:
    /**
    * Permission GM
    * Specific ranks can use this
    * You can't use this if Permission is Empty
    * the ID is account_access -> gmlevel
    *
    * You can use multiple 1,2,0
    * If is empty ignore all
    */

    You can freely define who has access with this array

The parameter $permission is required and the parameter $gm is optional. The check is done with a return "true or false"