Public Member Functions | |
__toString () | |
Gives IP address is string is writted. | |
get_all_ip_addresses ($limit_from=0, $limit_results=50, $order_by= 'ip_address', $order_by_direction= 'ASC', $filter_sql= '') | |
Function gets all ip addresses. | |
count_all_ip_addresses ($filter_sql= '') | |
Function counts all ip addresses. | |
get_gateway_of_subnet ($subnet_id) | |
Function gets gateway of gievn subnet. | |
get_dhcp_of_subnet ($subnet_id) | |
Function gets gateway of gievn subnet. | |
get_allowed_ip_addresses () | |
Gets all allowed IP addresses. | |
get_unallowed_ip_addresses () | |
Same as previous method, but return unallowed ip addresses. | |
get_unallowed_ip_addresses_by_type ($type) | |
Same as previous method, but return unallowed ip addresses for a specific message type. | |
get_ip_addresses_of_member ($member_id, $subnet_id=NULL, $cloud_id=NULL, $ignore_member_notif_settings=TRUE) | |
Function gets all ip address of interfaces of devices of users of given member. | |
get_ip_addresses_of_user ($user_id, $subnet_id=NULL, $cloud_id=NULL, $ignore_member_notif_settings=TRUE) | |
Function gets all ip address of interfaces of devices of user. | |
get_ip_addresses_of_device ($device_id) | |
Gets all ip addresses of device. | |
get_ip_addresses_of_subnet ($subnet_id) | |
Function gets ip addresses of subnet. | |
get_ip_addresses_with_unallowed_connecting_place () | |
Returns all IDs of IP addresses with unallowed connecting place. | |
get_ip_addresses_with_expired_connection_test () | |
Returns all IDs of IP addresses with expired connection test. | |
get_ip_addresses_with_self_cancel () | |
Returns all ip addresses which can cancel redirect by themselves. | |
get_ips_and_redirections_of_member ($member_id, $sql_offset, $limit_results, $order_by, $order_by_direction) | |
Gets all ip addresses including their redirections. | |
count_ips_and_redirections_of_member ($member_id) | |
Gets count of all ip addresses including their redirections. | |
count_all_ip_addresses_by_member_and_subnet ($member_id, $subnet_id) | |
Counts all ip addresses by member and subnet. | |
get_all_ip_addresses_of_iface ($iface_id, $with_children=FALSE) | |
Returns all ip addresses of iface (optional: and with its children ifaces) | |
delete_ip_addresses_by_subnet_member ($subnet_id, $member_id) | |
Deletes all IP addresses by given subnet and member. | |
count_all_ip_addresses_without_member_by_subnet ($subnet_id) | |
Counts all ip addresses without member by given subnet. | |
delete_ip_address_with_member ($ip_address) | |
Deletes IP address. | |
delete_ip_addresses_of_subnet_with_owner ($subnet_id) | |
Deletes all IP addresses of subnet with owner. | |
get_ip_addresses_qos_ceil_rate () | |
Returns ip addresses of members with set-up qos ceil or rate. | |
select_list_grouped () | |
Gets list of IP addresses ordered by IP address grouped by subnet. | |
get_first_ip_address_of_subnet ($subnet_id, $without_owner=FALSE) | |
Returns first IP address of subnet. | |
get_last_ip_address_of_subnet ($subnet_id, $without_owner=FALSE) | |
Returns last IP address of subnet. | |
get_free_ip_addresses ($ip_address_like) | |
Returns all free IP addresses similar to given IP address. |
Static Public Member Functions | |
static | get_whitelist_types () |
Gets translated whitelist types. |
Public Attributes | |
const | NO_WHITELIST = 0 |
No whitelist means, that is ip address can be redirected in any time (typical state) | |
const | PERMANENT_WHITELIST = 1 |
IP address is in permanent whitelist - it is never redirected (useful for special members), can be redirected only by message which ignores whitelist. | |
const | TEMPORARY_WHITELIST = 2 |
IP address is in temporary whitelist - for limited period of time it is not redirected, for example when someone should be redirected, but he has to pay using internet banking. |
Static Public Attributes | |
static | $whitelist_types |
Protected Attributes | |
$belongs_to = array('iface', 'subnet', 'member') |
Ip_address_Model::__toString | ( | ) |
Gives IP address is string is writted.
Ip_address_Model::count_all_ip_addresses | ( | $filter_sql = '' | ) |
Function counts all ip addresses.
array | $filter_values |
Ip_address_Model::count_all_ip_addresses_by_member_and_subnet | ( | $member_id, | |
$subnet_id | |||
) |
Counts all ip addresses by member and subnet.
integer | $member_id | |
integer | $subnet_id |
Ip_address_Model::count_all_ip_addresses_without_member_by_subnet | ( | $subnet_id | ) |
Counts all ip addresses without member by given subnet.
integer | $subnet_id |
Ip_address_Model::count_ips_and_redirections_of_member | ( | $member_id | ) |
Gets count of all ip addresses including their redirections.
Used in member's profile screen.
integer | $member_id |
Ip_address_Model::delete_ip_address_with_member | ( | $ip_address | ) |
Deletes IP address.
string | $ip_address |
Ip_address_Model::delete_ip_addresses_by_subnet_member | ( | $subnet_id, | |
$member_id | |||
) |
Deletes all IP addresses by given subnet and member.
integer | $subnet_id | |
integer | $member_id |
Ip_address_Model::delete_ip_addresses_of_subnet_with_owner | ( | $subnet_id | ) |
Deletes all IP addresses of subnet with owner.
type | $subnet_id |
Ip_address_Model::get_all_ip_addresses | ( | $limit_from = 0 , |
|
$limit_results = 50 , |
|||
$order_by = 'ip_address' , |
|||
$order_by_direction = 'ASC' , |
|||
$filter_sql = '' |
|||
) |
Function gets all ip addresses.
!!!!!! SECURITY WARNING !!!!!! Be careful when you using this method, param $filter_sql is unprotected for SQL injections, security should be made at controller site using Filter_form class. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
integer | $limit_from | |
integer | $limit_results | |
string | $order_by | |
string | $order_by_direction | |
array | $filter_values |
Ip_address_Model::get_all_ip_addresses_of_iface | ( | $iface_id, | |
$with_children = FALSE |
|||
) |
Returns all ip addresses of iface (optional: and with its children ifaces)
integer | $iface_id | |
type | $with_child |
Ip_address_Model::get_allowed_ip_addresses | ( | ) |
Gets all allowed IP addresses.
These are registered IP addresses, which have no redirection set. Unknown IP addresses (not present in system) and IP addresses with a redirection set are not exported.
Ip_address_Model::get_dhcp_of_subnet | ( | $subnet_id | ) |
Ip_address_Model::get_first_ip_address_of_subnet | ( | $subnet_id, | |
$without_owner = FALSE |
|||
) |
Returns first IP address of subnet.
type | $subnet_id |
Ip_address_Model::get_free_ip_addresses | ( | $ip_address_like | ) |
Returns all free IP addresses similar to given IP address.
type | $ip_address_like |
Ip_address_Model::get_gateway_of_subnet | ( | $subnet_id | ) |
Ip_address_Model::get_ip_addresses_of_device | ( | $device_id | ) |
Gets all ip addresses of device.
integer | $device_id |
Ip_address_Model::get_ip_addresses_of_member | ( | $member_id, | |
$subnet_id = NULL , |
|||
$cloud_id = NULL , |
|||
$ignore_member_notif_settings = TRUE |
|||
) |
Function gets all ip address of interfaces of devices of users of given member.
integer | array | $member_id | Member ID or array of member IDs |
integer | $subnet_id | |
integer | $cloud_id | |
boolean | $ignore_member_notif_settings | Should be member notification setting ignored? |
Ip_address_Model::get_ip_addresses_of_subnet | ( | $subnet_id | ) |
Function gets ip addresses of subnet.
integer | $subnet_id |
Ip_address_Model::get_ip_addresses_of_user | ( | $user_id, | |
$subnet_id = NULL , |
|||
$cloud_id = NULL , |
|||
$ignore_member_notif_settings = TRUE |
|||
) |
Function gets all ip address of interfaces of devices of user.
integer | array | $user_id | User ID or array of user IDs |
integer | $subnet_id | |
integer | $cloud_id | |
boolean | $ignore_member_notif_settings | Should be member notification setting ignored? |
Ip_address_Model::get_ip_addresses_qos_ceil_rate | ( | ) |
Returns ip addresses of members with set-up qos ceil or rate.
Ip_address_Model::get_ip_addresses_with_expired_connection_test | ( | ) |
Returns all IDs of IP addresses with expired connection test.
Ip_address_Model::get_ip_addresses_with_self_cancel | ( | ) |
Returns all ip addresses which can cancel redirect by themselves.
Ip_address_Model::get_ip_addresses_with_unallowed_connecting_place | ( | ) |
Returns all IDs of IP addresses with unallowed connecting place.
Ip_address_Model::get_ips_and_redirections_of_member | ( | $member_id, | |
$sql_offset, | |||
$limit_results, | |||
$order_by, | |||
$order_by_direction | |||
) |
Gets all ip addresses including their redirections.
Used in member's profile screen.
integer | $member_id | |
integer | $sql_offset | |
integer | $limit_results | |
string | $order_by | |
string | $order_by_direction |
Ip_address_Model::get_last_ip_address_of_subnet | ( | $subnet_id, | |
$without_owner = FALSE |
|||
) |
Returns last IP address of subnet.
type | $subnet_id |
Ip_address_Model::get_unallowed_ip_addresses | ( | ) |
Same as previous method, but return unallowed ip addresses.
Ip_address_Model::get_unallowed_ip_addresses_by_type | ( | $type | ) |
Same as previous method, but return unallowed ip addresses for a specific message type.
int | $type | message type constant |
|
static |
Gets translated whitelist types.
Ip_address_Model::select_list_grouped | ( | ) |
Gets list of IP addresses ordered by IP address grouped by subnet.
|
static |