\IpChange
User IP changing/management implementation
Synopsis
class IpChange
{
- // constants
- const URL_ME = '?module=pl_ipchange';
- // members
- protected string $login = '';
- protected string $currentIp = '';
- protected string $currentMac = '';
- protected array $billingCfg = ;
- protected array $altCfg = ;
- protected array $allServices = ;
- protected bool $customFlag = false;
- protected $messages = '';
- protected bool $dbLockEnabled = false;
- // methods
- public void __construct()
- protected void loadConfigs()
- protected void initMessages()
- protected void loadServices()
- public void setLogin()
- public void initUserParams()
- public string renderMainForm()
- public string ajIpSelector()
- public string renderCurrentIp()
- public string renderFreeIpStats()
- protected bool isNethostExists()
- public void/string changeUserIp()
Constants
Name | Value |
---|---|
URL_ME | '?module=pl_ipchange' |
Members
protected
- $allServices
—
array
Contains available network services as id=>name - $altCfg
—
array
Contains system alter.ini config as key=>value - $billingCfg
—
array
Contains system billing.ini config as key=>value - $currentIp
—
string
Contains current user IP - $currentMac
—
string
Contains current user MAC - $customFlag
—
bool
Flag of IP_CUSTOM_SELECT optional option state - $dbLockEnabled
—
bool
is database locking feature enabled - $login
—
string
Contains current user login - $messages
—
message helper object placeholder
Methods
protected
- initMessages() — Inits message helper object for further usage
- isNethostExists() — Checks have current user IP existing network host
- loadConfigs() — Loads system configs and inits customFlag property
- loadServices() — Loads available network services
public
- __construct()
- ajIpSelector() — Returns IP selector ajax container content
- changeUserIp() — Performs user changing IP subroutine
- initUserParams() — Inits user params as current IP and MAC
- renderCurrentIp() — Renders current IP styled notification
- renderFreeIpStats() — Renders IP usage stats in existing networks
- renderMainForm() — Renders service and IP selection dialog
- setLogin() — Sets current user login