__construct()
__construct()
index(string $appointment_hash = '')
Display the main backend page.
This method displays the main backend page. All users login permission can view this page which displays a calendar with the events of the selected provider or service. If a user has more priviledges he will see more menus at the top of the page.
string | $appointment_hash | If given, the appointment edit dialog will appear when the page loads. |
update()
This method will update the installation to the latest available version in the server. IMPORTANT: The code files must exist in the server, this method will not fetch any new files but will update the database schema.
This method can be used either by loading the page in the browser or by an ajax request. But it will answer with json encoded data.
hasPrivileges(string $page, boolean $redirect = TRUE) : boolean
Check whether current user is logged in and has the required privileges to view a page.
The backend page requires different privileges from the users to display pages. Not all pages are avaiable to all users. For example secretaries should not be able to edit the system users.
string | $page | This argument must match the roles field names of each section (eg "appointments", "users" ...). |
boolean | $redirect | (OPTIONAL - TRUE) If the user has not the required privileges (either not logged in or insufficient role privileges) then the user will be redirected to another page. Set this argument to FALSE when using ajax. |
Returns whether the user has the required privileges to view the page or not. If the user is not logged in then he will be prompted to log in. If he hasn't the required privileges then an info message will be displayed.