Properties

$privileges

$privileges : 

Type

Methods

__construct()

__construct() 

ajax_get_calendar_appointments()

ajax_get_calendar_appointments() 

[AJAX] Get the registered appointments for the given date period and record.

This method returns the database appointments and unavailable periods for the user selected date period and record type (provider or service).

ajax_save_appointment()

ajax_save_appointment() 

[AJAX] Save appointment changes that are made from the backend calendar page.

ajax_delete_appointment()

ajax_delete_appointment() 

[AJAX] Delete appointment from the database.

This method deletes an existing appointment from the database. Once this action is finished it cannot be undone. Notification emails are send to both provider and customer and the delete action is executed to the Google Calendar account of the provider, if the "google_sync" setting is enabled.

ajax_disable_provider_sync()

ajax_disable_provider_sync() 

[AJAX] Disable a providers sync setting.

This method deletes the "google_sync" and "google_token" settings from the database. After that the provider's appointments will be no longer synced with google calendar.

ajax_filter_customers()

ajax_filter_customers() : array

[AJAX] Filter the customer records with the given key string.

Returns

array —

Returns the search results.

ajax_save_unavailable()

ajax_save_unavailable() 

[AJAX] Insert of update unavailable time period to database.

ajax_delete_unavailable()

ajax_delete_unavailable() 

[AJAX] Delete an unavailable time period from database.

ajax_save_customer()

ajax_save_customer() 

[AJAX] Save (insert or update) a customer record.

ajax_delete_customer()

ajax_delete_customer() 

[AJAX] Delete customer from database.

ajax_save_service()

ajax_save_service() 

[AJAX] Save (insert or update) service record.

ajax_delete_service()

ajax_delete_service() 

[AJAX] Delete service record from database.

ajax_filter_services()

ajax_filter_services() : array

[AJAX] Filter service records by given key string.

Returns

array —

Returns a json encoded array back to client.

ajax_save_service_category()

ajax_save_service_category() 

[AJAX] Save (insert or update) category record.

ajax_delete_service_category()

ajax_delete_service_category() 

[AJAX] Delete category record from database.

ajax_filter_service_categories()

ajax_filter_service_categories() : array

[AJAX] Filter services categories with key string.

Returns

array —

Returns a json encoded array back to client with the category records.

ajax_filter_admins()

ajax_filter_admins() : array

[AJAX] Filter admin records with string key.

Returns

array —

Returns a json encoded array back to client with the admin records.

ajax_save_admin()

ajax_save_admin() : array

[AJAX] Save (insert or update) admin record into database.

Returns

array —

Returns an array with the operation status and the record id that was saved into the database.

ajax_delete_admin()

ajax_delete_admin() : string

[AJAX] Delete an admin record from the database.

Returns

string —

Returns the operation result constant (AJAX_SUCESS or AJAX_FAILURE).

ajax_filter_providers()

ajax_filter_providers() : array

[AJAX] Filter provider records with string key.

Returns

array —

Returns a json encoded array back to client with the provider records.

ajax_save_provider()

ajax_save_provider() : string

[AJAX] Save (insert or update) a provider record into database.

Returns

string —

Returns the success contant 'AJAX_SUCCESS' so javascript knows that everything completed successfully.

ajax_delete_provider()

ajax_delete_provider() : string

[AJAX] Delete a provider record from the database.

Returns

string —

Returns the operation result constant (AJAX_SUCESS or AJAX_FAILURE).

ajax_filter_secretaries()

ajax_filter_secretaries() : array

[AJAX] Filter secretary records with string key.

Returns

array —

Returns a json encoded array back to client with the secretary records.

ajax_save_secretary()

ajax_save_secretary() : string

[AJAX] Save (insert or update) a secretary record into database.

Returns

string —

Returns the success contant 'AJAX_SUCCESS' so javascript knows that everything completed successfully.

ajax_delete_secretary()

ajax_delete_secretary() : string

[AJAX] Delete a secretary record from the database.

Returns

string —

Returns the operation result constant (AJAX_SUCESS or AJAX_FAILURE).

ajax_save_settings()

ajax_save_settings() 

[AJAX] Save a setting or multiple settings in the database.

This method is used to store settings in the database. It can be either system or user settings, one or many. Use the $_POST variables accordingly.

ajax_validate_username()

ajax_validate_username() 

[AJAX] This method checks whether the username already exists in the database.

ajax_change_language()

ajax_change_language() 

[AJAX] Change system language for current user.

The language setting is stored in session data and retrieved every time the user visits any of the system pages.

ajax_get_google_calendars()

ajax_get_google_calendars() 

This method will return a list of the available google calendars.

The user will need to select a specific calendar from this list to sync his appointments with. Google access must be already granted for the specific provider.

ajax_select_google_calendar()

ajax_select_google_calendar() 

Select a specific google calendar for a provider.

All the appointments will be synced with this particular calendar.