- The controller classes
UniFIandTVS-WebSysare in it's initial state - The initial idea for the whole thing are complete
- The DB Model is in it's initial state as well
- File: inc/unifi.class.php -
Controllerclass of Ubiquiti UniFI
-
Function: Start the
Control$unifiman = new UNIFI_CONTROL(UNIFI_URL, UNIFI_USER, UNIFI_PASS, UNIFI_MAX_TIME);
Args:
UNIFI_URL-> UniFI connection URL (e.g:http://localhost:8443)UNIFI_USER-> UniFI connection usernameUNIFI_PASS-> UniFI connection passwordUNIFI_MAX_TIMEConnection TTL in minutes (default: 30 minutes)
-
Function: Login into UniFI
-
Heads up!-> The data will be inserted on the controller initialization.$unifiman->Login();
-
Function: Logout of UniFI
-
Heads up!-> You mustALWAYSlogout whenever you're done. e.g: Page processing has ended.$unifiman->Logout();
-
Function: Authorize a new client that has connected to the
Guest Portal -
Heads up!-> When the time expire, a new session will be requested.$unifiman->AuthorizeClient(MAC_ADDRESS, TIME)
Args:
MAC_ADDRESS-> Client's MAC AddressTIME-> The time in minutes, to stay connected (A.K.A, TTL xD).
-
Function: Block's the access for specified client based on his MAC Address
-
Heads up!-> The block can only be undone, with theUnBlockClient(Args)function, or through theUniFIcontrol-panel.$unifiman->BlockClient(MAC_ADDRESS)
Args:
MAC_ADDRESS-> Client's MAC Address
-
Function: Unblock's the access for specified client based on his MAC Address
$unifiman->UnBlockClient(MAC_ADDRESS)
Args:
MAC_ADDRESS-> Client's MAC Address
-
Function: Disconnects the clients
-
Heads up!-> When you disconnect a client, he will be able to connect again.$unifiman->DisconnectClient(MAC_ADDRESS)
Args:
MAC_ADDRESS-> Client's MAC Address
-
Function: Restart an Access Point based on it's MAC Address
$unifiman->RestartAP(MAC_ADDRESS)
Args:
MAC_ADDRESS-> AP's MAC Address
-
Function: Returns an
APlist that is configured in your UniFI.$aps = $unifiman->GetAccessPoints()
-
Function: Returns a list of all configured clients in your UniFI.
$clients = $unifiman->GetClients()
- File: inc/tvswebsys.class.php
This is the
PortalController class. Implemented functions:
-
Function: Initialize the controller
$tvswebsys = new TVSWEB_CONTROL(HOST, USER, PASS, DB);
Args:
HOSTMySQL Host (IP)USERMySQL UsernamePASSMySQL PasswordDBMySQL Database
TODO
- Finish the documentation of the TVSWEB_Control class
- Creates an admin system for this
- Create some beautiful templates haha
- Made by
Lucas TesketoTeske Virtual System Ltda. - Now released under the
GPLv3license
- Mobile Detect: https://github.com/serbanghita/Mobile-Detect (Used to detect the client)
- UniFI API: https://github.com/calmh/unifi-api (Re-written to PHP)