2020-04-22 22:48:56 +03:00
|
|
|
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
2015-10-18 20:51:24 +03:00
|
|
|
|
2016-01-01 17:45:01 +02:00
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* Easy!Appointments - Open Source Web Scheduler
|
|
|
|
*
|
|
|
|
* @package EasyAppointments
|
|
|
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
2020-03-11 12:10:59 +03:00
|
|
|
* @copyright Copyright (c) 2013 - 2020, Alex Tselegidis
|
2016-01-01 17:45:01 +02:00
|
|
|
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
|
|
|
* @link http://easyappointments.org
|
|
|
|
* @since v1.1.0
|
|
|
|
* ---------------------------------------------------------------------------- */
|
|
|
|
|
2015-10-18 20:51:24 +03:00
|
|
|
/**
|
|
|
|
* Check if Easy!Appointments is installed.
|
|
|
|
*
|
2020-04-22 22:48:56 +03:00
|
|
|
* This function will check some factors to determine if Easy!Appointments is installed or not. It is possible that the
|
|
|
|
* installation is properly configure without being recognized by this method.
|
2015-10-18 20:51:24 +03:00
|
|
|
*
|
2020-04-22 22:48:56 +03:00
|
|
|
* Notice: You can add more checks into this file in order to further check the installation state of the application.
|
2015-10-18 20:51:24 +03:00
|
|
|
*
|
|
|
|
* @return bool Returns whether E!A is installed or not.
|
|
|
|
*/
|
2017-09-15 14:36:37 +03:00
|
|
|
function is_ea_installed()
|
|
|
|
{
|
2020-04-22 22:48:56 +03:00
|
|
|
$framework =& get_instance();
|
|
|
|
|
|
|
|
return $framework->db->table_exists('ea_users');
|
2015-10-18 20:51:24 +03:00
|
|
|
}
|
2016-01-01 17:45:01 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the data of a sample service.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
2017-09-15 14:36:37 +03:00
|
|
|
function get_sample_service()
|
|
|
|
{
|
|
|
|
return [
|
2016-01-01 17:45:01 +02:00
|
|
|
'name' => 'Test Service',
|
|
|
|
'duration' => 30,
|
|
|
|
'price' => 50.0,
|
|
|
|
'currency' => 'Euro',
|
|
|
|
'description' => 'This is a test service automatically inserted by the installer.',
|
2017-09-15 14:36:37 +03:00
|
|
|
'availabilities_type' => 'flexible',
|
2016-07-24 11:48:57 +03:00
|
|
|
'attendants_number' => 1,
|
2016-01-01 17:45:01 +02:00
|
|
|
'id_service_categories' => NULL
|
2017-09-15 14:36:37 +03:00
|
|
|
];
|
2016-01-01 17:45:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the data of a sample provider.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
2017-09-15 14:36:37 +03:00
|
|
|
function get_sample_provider()
|
|
|
|
{
|
|
|
|
return [
|
2016-01-01 17:45:01 +02:00
|
|
|
'first_name' => 'John',
|
|
|
|
'last_name' => 'Doe',
|
|
|
|
'email' => 'john@doe.com',
|
|
|
|
'phone_number' => '0123456789',
|
2017-09-15 14:36:37 +03:00
|
|
|
'services' => [],
|
|
|
|
'settings' => [
|
2016-01-01 17:45:01 +02:00
|
|
|
'username' => 'johndoe',
|
|
|
|
'password' => '59fe9d073a9c3c606a7e01e402dca4b49b6aa517bd0fdf940c46cb13a7b63dd0',
|
|
|
|
'salt' => 'dc5570debc71fc1fe94b1b0aee444fcde5b8cb83d62a6a2b736ead6557d7a2e1',
|
|
|
|
'working_plan' => '{"monday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"tuesday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"wednesday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"thursday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"friday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"saturday":null,"sunday":null}',
|
|
|
|
'notifications' => FALSE,
|
|
|
|
'google_sync' => FALSE,
|
|
|
|
'sync_past_days' => 5,
|
2016-07-24 11:48:57 +03:00
|
|
|
'sync_future_days' => 5,
|
|
|
|
'calendar_view' => CALENDAR_VIEW_DEFAULT
|
2017-09-15 14:36:37 +03:00
|
|
|
]
|
|
|
|
];
|
2016-01-01 17:45:01 +02:00
|
|
|
}
|