Main controller creates menu, handles changes in svn repository (database upgrade), ... More...
Public Member Functions | |
__construct () | |
Contruct of controller, creates singleton or return it. | |
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 & | 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. |
Protected Member Functions | |
is_preprocesor_enabled () | |
This methods defines whether the preprocessor of MY_Controller is loaded or not. |
Protected Attributes | |
$member_id | |
$user_id | |
$member_account_id = 1 | |
$session |
Main controller creates menu, handles changes in svn repository (database upgrade), ...
BE CAREFUL HERE, CATCH EVERY EXCEPTION, OTHERWISE FREENETIS WITH JUST SMALL ERROR BECOMES COMPLETELY UNUSABLE
Controller::__construct | ( | ) |
Contruct of controller, creates singleton or return it.
Reimplemented in Settings_Controller, Scheduler_Controller, Js_Controller, Ifaces_Controller, Import_Controller, Notifications_Controller, Device_logs_Controller, Ip_addresses_Controller, Json_Controller, Traffic_Controller, Bank_transfers_Controller, Stats_Controller, Approval_template_items_Controller, Links_Controller, Work_reports_Controller, Requests_Controller, Works_Controller, VoIP_Controller, VoIP_calls_Controller, Votes_Controller, Email_queues_Controller, Invoices_Controller, Members_whitelists_Controller, Approval_templates_Controller, Clouds_Controller, Email_Controller, Phone_invoices_Controller, Subnets_Controller, Device_engineers_Controller, Fees_Controller, Membership_interrupts_Controller, Messages_auto_settings_Controller, Transfers_Controller, Vlans_Controller, Accounts_Controller, Bank_statements_Controller, Device_admins_Controller, Device_templates_Controller, Devices_Controller, Invoice_items_Controller, Members_fees_Controller, Messages_Controller, Phone_operators_Controller, Redirect_Controller, Bank_accounts_Controller, Device_active_links_Controller, Monitoring_Controller, Sms_Controller, Tools_Controller, Variable_Symbols_Controller, and Approval_types_Controller.
Controller::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.
$axo_section | Group of objects to edit | |
$axo_value | Object to delete | |
$member_id | Optional variable, id of other member who is being showed by logged member | |
boolean | $force_own | Force to use own rules for not logged user Used at: Phone_invoices_Controller::user_field() |
Controller::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.
$axo_section | Group of objects to edit | |
$axo_value | Object to edit | |
$member_id | Optional variable, id of other member who is being showed by logged member | |
boolean | $force_own | Force to use own rules for not logged user Used at: Phone_invoices_Controller::user_field() |
Controller::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.
$axo_section | Group of objects to edit | |
$axo_value | Object to add | |
$member_id | Optional variable, id of other member who is being showed by logged member | |
boolean | $force_own | Force to use own rules for not logged user Used at: Phone_invoices_Controller::user_field() |
Controller::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.
$axo_section | Group of objects to view | |
$axo_value | Object to view | |
$member_id | Optional variable, id of other member who is being showed by logged member | |
boolean | $force_own | Force to use own rules for not logged user Used at: Phone_invoices_Controller::user_field() |
Controller::build_menu | ( | ) |
Build menu.
Exception |
|
static |
Function shows error of given message number.
integer | $message_type | |
string | $content |
|
static |
Singleton instance of Controller.
|
protected |
This methods defines whether the preprocessor of MY_Controller is loaded or not.
By default preprocessor is loaded, for changing of this state this method should be overriden in child class. (#328)
Reimplemented in Js_Controller, Json_Controller, and Web_interface_Controller.
Controller::is_user_in_group | ( | $aro_group_id, | |
$aro_id | |||
) |
Checks if user is in ARO group.
integer | $group_id | ARO group ID |
integer | $aro_id | User ID |
Controller::redirect | ( | $uri = NULL , |
|
$id = NULL , |
|||
$glue = '/' |
|||
) |
Redirects to uri according to attribute noredirect.
string | $uri | |
integer | $id | [optional] |
string | $glue | [optional] |
Controller::url | ( | ) |
Return URL for controller and method.
string | $method | |
string | $controller |
|
static |
Function shows warning of given message number.
integer | $message_type | |
string | $content |