Public Member Functions | |
__construct () | |
Constructor, only test if networks is enabled. | |
index () | |
Index redirects to show all. | |
show_all ($limit_results=50, $order_by= 'device_id', $order_by_direction= 'ASC', $page_word=null, $page=1) | |
Function shows all devices. | |
show_all_dhcp_servers ($limit_results=50, $order_by= 'access_time', $order_by_direction= 'ASC', $page_word=null, $page=1) | |
Shows all DHCP servers with their access times. | |
show_by_user ($user_id=null, $limit_results=10, $order_by= 'id', $order_by_direction= 'asc', $page_word= 'page', $page=1) | |
Function shows all devices of user. | |
show ($device_id=null) | |
Function shows device. | |
add ($user_id=null, $connection_request_id=NULL) | |
Adds whole device. | |
add_simple ($user_id=null) | |
Function adds simple device without any interfaces, IP addresses ... | |
add_from_connection_request ($connection_request_id=NULL) | |
Help redirect for approving of connection request. | |
edit ($device_id=null) | |
Function edits device. | |
delete ($device_id=null) | |
Deletes device including all its interfaces and ip adresses, etc. | |
export ($device_id=NULL, $format= '', $output= '', $forced=0) | |
Generate export of device. | |
map ($device_id=NULL) | |
Shows page for device map. | |
get_map () | |
Prints array of devices in JSON format. | |
valid_repayment ($input=NULL) | |
Validate repayment of device. | |
topology ($device_id=NULL) | |
Displays topology of device in network. | |
ports_vlans_settings ($device_id=NULL, $vlan_id=NULL) | |
Ports and VLANs settings of given device. | |
Public Member Functions inherited from Controller | |
is_user_in_group ($aro_group_id, $aro_id) | |
Checks if user is in ARO group. | |
acl_check_view ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) | |
Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may view all $axo_value object in $axo_section else return false. | |
acl_check_edit ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) | |
Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may edit all $axo_value object in $axo_section else return false. | |
acl_check_new ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) | |
Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may add all $axo_value object in $axo_section else return false. | |
acl_check_delete ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) | |
Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may delete all $axo_value object in $axo_section else return false. | |
build_menu () | |
Build menu. | |
url () | |
Return URL for controller and method. | |
redirect ($uri=NULL, $id=NULL, $glue= '/') | |
Redirects to uri according to attribute noredirect. |
Static Public Member Functions | |
static | delete_device ($device_id) |
Deletes device including all its interfaces and ip adresses, etc. | |
static | device_filter_form ($default_filter_user=NULL) |
Gets filter form fo devices. | |
Static Public Member Functions inherited from Controller | |
static & | instance () |
Singleton instance of Controller. | |
static | error ($message_type, $content=NULL) |
Function shows error of given message number. | |
static | warning ($message_type, $content=NULL) |
Function shows warning of given message number. |
Additional Inherited Members | |
Public Attributes inherited from Controller | |
const | ICON_ERROR = 1 |
const | ICON_GOOD = 2 |
const | ICON_HELP = 3 |
const | ICON_INFO = 4 |
const | ICON_WARNING = 5 |
$arr | |
$settings = NULL | |
$popup = 0 | |
$dialog = 0 | |
$noredirect = FALSE | |
$user_has_voip = 0 | |
$ip_address_span = '' | |
$unread_user_mails = 0 | |
$count_of_unclosed_logged_errors = 0 | |
$devices_down_count = 0 | |
$user_favourites_pages = NULL | |
$axo_doc_access = FALSE | |
Protected Member Functions inherited from Controller | |
is_preprocesor_enabled () | |
This methods defines whether the preprocessor of MY_Controller is loaded or not. | |
Protected Attributes inherited from Controller | |
$member_id | |
$user_id | |
$member_account_id = 1 | |
$session |
Devices_Controller::add | ( | $user_id = null , |
|
$connection_request_id = NULL |
|||
) |
Adds whole device.
It means it creates new device, new interface assigned to this device and new ip address assigned to this interface.
integer | $user_id | |
integer | $connection_request_id | If device added from connection request |
Devices_Controller::add_from_connection_request | ( | $connection_request_id = NULL | ) |
Help redirect for approving of connection request.
integer | $connection_request_id |
Devices_Controller::add_simple | ( | $user_id = null | ) |
Function adds simple device without any interfaces, IP addresses ...
int | $user_id |
Devices_Controller::delete | ( | $device_id = null | ) |
Deletes device including all its interfaces and ip adresses, etc.
(using FK)
integer | $device_id |
|
static |
Deletes device including all its interfaces and ip adresses, etc.
(using FK)
integer | $device_id |
|
static |
Gets filter form fo devices.
integer | $default_filter_user | Pre-select default user |
Devices_Controller::edit | ( | $device_id = null | ) |
Function edits device.
integer | $device_id |
Devices_Controller::export | ( | $device_id = NULL , |
|
$format = '' , |
|||
$output = '' , |
|||
$forced = 0 |
|||
) |
Generate export of device.
type | $device_id |
Devices_Controller::get_map | ( | ) |
Prints array of devices in JSON format.
Devices_Controller::map | ( | $device_id = NULL | ) |
Shows page for device map.
type | $device_id |
Devices_Controller::ports_vlans_settings | ( | $device_id = NULL , |
|
$vlan_id = NULL |
|||
) |
Ports and VLANs settings of given device.
type | $device_id | |
type | $vlan_id |
Devices_Controller::show | ( | $device_id = null | ) |
Function shows device.
integer | $device_id |
Devices_Controller::show_all | ( | $limit_results = 50 , |
|
$order_by = 'device_id' , |
|||
$order_by_direction = 'ASC' , |
|||
$page_word = null , |
|||
$page = 1 |
|||
) |
Function shows all devices.
integer | $limit_results | devices per page |
string | $order_by | sorting column |
string | $order_by_direction | sorting direction |
Devices_Controller::show_all_dhcp_servers | ( | $limit_results = 50 , |
|
$order_by = 'access_time' , |
|||
$order_by_direction = 'ASC' , |
|||
$page_word = null , |
|||
$page = 1 |
|||
) |
Shows all DHCP servers with their access times.
int | $limit_results | |
string | $order_by | |
string | $order_by_direction | |
string | $page_word | |
int | $page |
Devices_Controller::topology | ( | $device_id = NULL | ) |
Displays topology of device in network.
integer | $device_id |
Devices_Controller::valid_repayment | ( | $input = NULL | ) |
Validate repayment of device.
Form_Field | $input |