From 3ec94245e014d29b06a326ee282b03e3ccb50d54 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 30 Dec 2015 23:58:34 +0100 Subject: [PATCH 01/12] Corrected migration class name. --- .../migrations/003_add_customer_notifications_setting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/application/migrations/003_add_customer_notifications_setting.php b/src/application/migrations/003_add_customer_notifications_setting.php index 76879327..36b452fd 100644 --- a/src/application/migrations/003_add_customer_notifications_setting.php +++ b/src/application/migrations/003_add_customer_notifications_setting.php @@ -11,7 +11,7 @@ * @since v1.1.0 * ---------------------------------------------------------------------------- */ -class Migration_Add_google_analytics_setting extends CI_Migration { +class Migration_Add_customer_notifications_setting extends CI_Migration { public function up() { $this->load->model('settings_model'); $this->settings_model->set_setting('customer_notifications', '1'); From 7dbe929218a684789d4056afde5405b415ac4e9e Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 1 Jan 2016 15:23:09 +0100 Subject: [PATCH 02/12] Updated the CHANGELOG.md for v1.1 --- CHANGELOG.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14ad7f5f..3f532805 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,16 +5,20 @@ their custom modifications on the main project codebase. ### Version 1.1.0 - Issue #4: Raising more useful exceptions and enable error logging by default. +- Issue #6: Business Logic created is not getting assigned to service provider. - Issue #10: Unable to use address tags in email address. -- Issue #13 + #16: Updated project to Bootstrap v3.3.4 and modified frontend CSS so that it is responsive. +- Issue #13: Upgrade to Bootstrap 3.x.x. - Issue #14: Add Google Analytics tracking for the booking page. +- Issue #15: Add captcha to booking page. +- Issue #16: Responsive Frontend - Issue #18: Duration is not changing when adding a new appointment. - Issue #21: Fix E!A installation problems with AJAX requests. -- Issue #22: Google Calendar Sync - Time Zone Issue +- Issue #25: Add a disable customer mail notifications setting - Issue #27: Support american time format within the app. - Issue #31: Double booking when two users try to book the same appointment hour and at the same time. - Issue #38: Renamed `configuration.php` file to `config.php` and changed the `SystemConfiguration` class to `Config`. This class will contain constants with the project configuration and will be statically used. -- Issue #39: Added new translations to project (japanese, polish, luxembourgish, protuguese-br, french, chinese, italian, spanish, dutch, danish, slovak, finnish). +- Issue #39: Add latest translations to source code so that user can select them immediately. - Issue #40: Removed `.htaccess` file and updated all the URLs with the `index.php` file so that mod_rewrite problems are eliminated. - Issue #41: Removed `cancel.php` file. Frontend must use the `message.php` file for displaying simple messages to user. - Issue #42: Place all external assets to "ext" directory. +- Issue #66: Trouble with breaks for providers. From 0dc88a85a9ef3a5b29d9d4dec57670ebd0060759 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 1 Jan 2016 15:52:43 +0100 Subject: [PATCH 03/12] Refactored the get_available_providers method. --- src/application/controllers/appointments.php | 11 + src/application/controllers/backend.php | 30 +- src/application/models/providers_model.php | 1147 +++++++++--------- 3 files changed, 600 insertions(+), 588 deletions(-) diff --git a/src/application/controllers/appointments.php b/src/application/controllers/appointments.php index c5b3f805..a8fd125e 100755 --- a/src/application/controllers/appointments.php +++ b/src/application/controllers/appointments.php @@ -62,6 +62,17 @@ class Appointments extends CI_Controller { $company_name = $this->settings_model->get_setting('company_name'); $date_format = $this->settings_model->get_setting('date_format'); + // Remove the data that are not needed inside the $available_providers array. + foreach ($available_providers as $index=>$provider) { + $stripped_data = array( + 'id' => $provider['id'], + 'first_name' => $provider['first_name'], + 'last_name' => $provider['last_name'], + 'services' => $provider['services'] + ); + $available_providers[$index] = $stripped_data; + } + // If an appointment hash is provided then it means that the customer // is trying to edit a registered appointment record. if ($appointment_hash !== ''){ diff --git a/src/application/controllers/backend.php b/src/application/controllers/backend.php index db64ea46..6eafc045 100644 --- a/src/application/controllers/backend.php +++ b/src/application/controllers/backend.php @@ -259,21 +259,6 @@ class Backend extends CI_Controller { return TRUE; } - /** - * Set the user data in order to be available at the view and js code. - * - * @param array $view Contains the view data. - */ - public function set_user_data(&$view) { - $this->load->model('roles_model'); - - // Get privileges - $view['user_id'] = $this->session->userdata('user_id'); - $view['user_email'] = $this->session->userdata('user_email'); - $view['role_slug'] = $this->session->userdata('role_slug'); - $view['privileges'] = $this->roles_model->get_privileges($this->session->userdata('role_slug')); - } - /** * This method will update the installation to the latest available * version in the server. IMPORTANT: The code files must exist in the @@ -301,6 +286,21 @@ class Backend extends CI_Controller { )); } } + + /** + * Set the user data in order to be available at the view and js code. + * + * @param array $view Contains the view data. + */ + private function set_user_data(&$view) { + $this->load->model('roles_model'); + + // Get privileges + $view['user_id'] = $this->session->userdata('user_id'); + $view['user_email'] = $this->session->userdata('user_email'); + $view['role_slug'] = $this->session->userdata('role_slug'); + $view['privileges'] = $this->roles_model->get_privileges($this->session->userdata('role_slug')); + } } /* End of file backend.php */ diff --git a/src/application/models/providers_model.php b/src/application/models/providers_model.php index 25223313..e60a4cb4 100644 --- a/src/application/models/providers_model.php +++ b/src/application/models/providers_model.php @@ -1,573 +1,574 @@ - - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis - * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 - * @link http://easyappointments.org - * @since v1.0.0 - * ---------------------------------------------------------------------------- */ - -/** - * Providers_Model Class - * - * Contains the database operations for the service provider users of - * Easy!Appointmenst. - * - * Data Structure: - * 'fist_name' - * 'last_name' (required) - * 'email' (required) - * 'mobile_number' - * 'phone_number' (required) - * 'address' - * 'city' - * 'state' - * 'zip_code' - * 'notes' - * 'id_roles' - * 'services' >> array that contains the ids that the provider can provide - * 'settings' - * 'username' - * 'password' - * 'notifications' - * 'working_plan' - * 'google_sync' - * 'google_token' - * 'google_calendar' - * 'sync_past_days' - * 'sync_future_days' - * - * @package Models - */ -class Providers_Model extends CI_Model { - /** - * Class Constructor - */ - public function __construct() { - parent::__construct(); - } - - /** - * Add (insert - update) a service provider record. - * - * If the record already exists (id value provided) then it is going to be updated, - * otherwise inserted into the database. - * - * @param array $provider Contains the service provider data. - * @return int Returns the record id. - * @throws Exception When the record data validation fails. - */ - public function add($provider) { - $this->validate($provider); - - if ($this->exists($provider) && !isset($provider['id'])) { - $provider['id'] = $this->find_record_id($provider); - } - - if (!isset($provider['id'])) { - $provider['id'] = $this->insert($provider); - } else { - $provider['id'] = $this->update($provider); - } - - return intval($provider['id']); - } - - /** - * Check whether a particular provider record already exists in the database. - * - * @param array $provider Contains the provider data. The 'email' value is required - * in order to check for a provider. - * @return bool Returns whether the provider record exists or not. - * @throws Exception When the 'email' value is not provided. - */ - public function exists($provider) { - if (!isset($provider['email'])) { - throw new Exception('Provider email is not provided :' . print_r($provider, TRUE)); - } - - // This method shouldn't depend on another method of this class. - $num_rows = $this->db - ->select('*') - ->from('ea_users') - ->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner') - ->where('ea_users.email', $provider['email']) - ->where('ea_roles.slug', DB_SLUG_PROVIDER) - ->get()->num_rows(); - - return ($num_rows > 0) ? TRUE : FALSE; - } - - /** - * Insert a new provider record into the database. - * - * @param array $provider Contains the provider data (must be already validated). - * @return int Returns the new record id. - * @throws Exception When the insert operation fails. - */ - public function insert($provider) { - $this->load->helper('general'); - - // Get provider role id. - $provider['id_roles'] = $this->get_providers_role_id(); - - // Store provider settings and services (must not be present on the $provider array). - $services = $provider['services']; - unset($provider['services']); - $settings = $provider['settings']; - unset($provider['settings']); - - // Insert provider record and save settings. - if (!$this->db->insert('ea_users', $provider)) { - throw new Exception('Could not insert provider into the database'); - } - - $settings['salt'] = generate_salt(); - $settings['password'] = hash_password($settings['salt'], $settings['password']); - - $provider['id'] = $this->db->insert_id(); - $this->save_settings($settings, $provider['id']); - $this->save_services($services, $provider['id']); - - // Return the new record id. - return intval($provider['id']); - } - - /** - * Update an existing provider record in the database. - * - * @param array $provider Contains the provider data. - * @return int Returns the record id. - * @throws Exception When the update operation fails. - */ - public function update($provider) { - $this->load->helper('general'); - - // Store service and settings (must not be present on the $provider array). - $services = $provider['services']; - unset($provider['services']); - $settings = $provider['settings']; - unset($provider['settings']); - - if (isset($settings['password'])) { - $salt = $this->db->get_where('ea_user_settings', array('id_users' => $provider['id']))->row()->salt; - $settings['password'] = hash_password($salt, $settings['password']); - } - - // Update provider record. - $this->db->where('id', $provider['id']); - if (!$this->db->update('ea_users', $provider)) { - throw new Exception('Could not update provider record.'); - } - - $this->save_services($services, $provider['id']); - $this->save_settings($settings, $provider['id']); - - // Return record id. - return intval($provider['id']); - } - - /** - * Find the database record id of a provider. - * - * @param array $provider Contains the provider data. The 'email' value is required - * in order to find the record id. - * @return int Returns the record id. - * @throws Exception When the provider's email value is not provided. - */ - public function find_record_id($provider) { - if (!isset($provider['email'])) { - throw new Exception('Provider email was not provided :' . print_r($provider, TRUE)); - } - - $result = $this->db - ->select('ea_users.id') - ->from('ea_users') - ->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner') - ->where('ea_users.email', $provider['email']) - ->where('ea_roles.slug', DB_SLUG_PROVIDER) - ->get(); - - if ($result->num_rows() == 0) { - throw new Exception('Could not find provider record id.'); - } - - return intval($result->row()->id); - } - - /** - * Validate provider data before the insert or update operation is executed. - * - * @param array $provider Contains the provider data. - * @return bool Returns the validation result. - */ - public function validate($provider) { - $this->load->helper('data_validation'); - - // If a provider id is present, check whether the record exist in the database. - if (isset($provider['id'])) { - $num_rows = $this->db->get_where('ea_users', - array('id' => $provider['id']))->num_rows(); - if ($num_rows == 0) { - throw new Exception('Provided record id does not exist in the database.'); - } - } - - // Validate required fields. - if (!isset($provider['last_name']) - || !isset($provider['email']) - || !isset($provider['phone_number'])) { - throw new Exception('Not all required fields are provided : ' . print_r($provider, TRUE)); - } - - // Validate provider email address. - if (!filter_var($provider['email'], FILTER_VALIDATE_EMAIL)) { - throw new Exception('Invalid email address provided : ' . $provider['email']); - } - - // Validate provider services. - if (!isset($provider['services']) || !is_array($provider['services'])) { - throw new Exception('Invalid provider services given: ' . print_r($provider, TRUE)); - } else { // Check if services are valid numeric values. - foreach($provider['services'] as $service_id) { - if (!is_numeric($service_id)) { - throw new Exception('A provider service with invalid id was found: ' - . print_r($provider, TRUE)); - } - } - } - - // Validate provider settings. - if (!isset($provider['settings']) || count($provider['settings']) == 0 - || !is_array($provider['settings'])) { - throw new Exception('Invalid provider settings given: ' . print_r($provider, TRUE)); - } - - // Check if username exists. - if (isset($provider['settings']['username'])) { - $user_id = (isset($provider['id'])) ? $provider['id'] : ''; - if (!$this->validate_username($provider['settings']['username'], $user_id)) { - throw new Exception ('Username already exists. Please select a different ' - . 'username for this record.'); - } - } - - // Validate provider password - if (isset($provider['settings']['password'])) { - if (strlen($provider['settings']['password']) < MIN_PASSWORD_LENGTH) { - throw new Exception('The user password must be at least ' - . MIN_PASSWORD_LENGTH . ' characters long.'); - } - } - - // When inserting a record the email address must be unique. - $provider_id = (isset($provider['id'])) ? $provider['id'] : ''; - - $num_rows = $this->db - ->select('*') - ->from('ea_users') - ->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner') - ->where('ea_roles.slug', DB_SLUG_PROVIDER) - ->where('ea_users.email', $provider['email']) - ->where('ea_users.id <>', $provider_id) - ->get() - ->num_rows(); - - if ($num_rows > 0) { - throw new Exception('Given email address belongs to another provider record. ' - . 'Please use a different email.'); - } - - return TRUE; - } - - /** - * Delete an existing provider record from the database. - * - * @param numeric $customer_id The record id to be deleted. - * @return bool Returns the delete operation result. - * @throws Exception When the provider id value is not numeric. - */ - public function delete($provider_id) { - if (!is_numeric($provider_id)) { - throw new Exception('Invalid argument type $provider_id : ' . $provider_id); - } - - $num_rows = $this->db->get_where('ea_users', array('id' => $provider_id))->num_rows(); - if ($num_rows == 0) { - return FALSE; // Record does not exist in database. - } - - return $this->db->delete('ea_users', array('id' => $provider_id)); - } - - /** - * Get a specific provider record from the database. - * - * @param int $provider_id The id of the record to be returned. - * @return array Returns an associative array with the selected record's data. Each key - * has the same name as the database field names. - * @throws Exception When the selected record does not exist in database. - */ - public function get_row($provider_id) { - if (!is_numeric($provider_id)) { - throw new Exception('$provider_id argument is not a valid numeric value: ' . $provider_id); - } - - // Check if selected record exists on database. - if ($this->db->get_where('ea_users', array('id' => $provider_id))->num_rows() == 0) { - throw new Exception('Selected record does not exist in the database.'); - } - - // Get provider data. - $provider = $this->db->get_where('ea_users', array('id' => $provider_id))->row_array(); - - - // Include provider services. - $services = $this->db->get_where('ea_services_providers', - array('id_users' => $provider_id))->result_array(); - $provider['services'] = array(); - foreach($services as $service) { - $provider['services'][] = $service['id_services']; - } - - // Include provider settings. - $provider['settings'] = $this->db->get_where('ea_user_settings', - array('id_users' => $provider_id))->row_array(); - unset($provider['settings']['id_users']); - - // Return provider data array. - return $provider; - } - - /** - * Get a specific field value from the database. - * - * @param string $field_name The field name of the value to be returned. - * @param numeric $provider_id Record id of the value to be returned. - * @return string Returns the selected record value from the database. - * @throws Exception When the $field_name argument is not a valid string. - * @throws Exception When the $admin_id is not a valid numeric. - * @throws Exception When the admin record does not exist in the database. - * @throws Exception When the selected field value is not present on database. - */ - public function get_value($field_name, $provider_id) { - if (!is_numeric($provider_id)) { - throw new Exception('Invalid argument provided as $provider_id : ' . $provider_id); - } - - if (!is_string($field_name)) { - throw new Exception('$field_name argument is not a string : ' . $field_name); - } - - // Check whether the admin record exists in database. - $result = $this->db->get_where('ea_users', array('id' => $provider_id)); - if ($result->num_rows() == 0) { - throw new Exception('The record with the $provider_id argument does not exist in ' - . 'the database : ' . $provider_id); - } - - $provider = $result->row_array(); - if (!isset($provider[$field_name])) { - throw new Exception('The given $field_name argument does not exist in the ' - . 'database : ' . $field_name); - } - - return $provider[$field_name]; - } - - /** - * Get all, or specific records from provider's table. - * - * @example $this->Model->get_batch('id = ' . $recordId); - * - * @param mixed $where_clause (OPTIONAL) The WHERE clause of the query to be executed. - * - * NOTICE: DO NOT INCLUDE 'WHERE' KEYWORD. - * - * @return array Returns the rows from the database. - */ - public function get_batch($where_clause = '') { - // CI db class may confuse two where clauses made in the same time, so - // get the role id first and then apply the get_batch() where clause. - $role_id = $this->get_providers_role_id(); - - if ($where_clause != '') { - $this->db->where($where_clause); - } - - $batch = $this->db->get_where('ea_users', - array('id_roles' => $role_id))->result_array(); - - // Include each provider sevices and settings. - foreach($batch as &$provider) { - // Services - $services = $this->db->get_where('ea_services_providers', - array('id_users' => $provider['id']))->result_array(); - $provider['services'] = array(); - foreach($services as $service) { - $provider['services'][] = $service['id_services']; - } - - // Settings - $provider['settings'] = $this->db->get_where('ea_user_settings', - array('id_users' => $provider['id']))->row_array(); - unset($provider['settings']['id_users']); - } - - // Return provider records in an array. - return $batch; - } - - /** - * Get the available system providers. - * - * This method returns the available providers and the services that can - * provide. - * - * @return array Returns an array with the providers data. - * - * @deprecated since version 0.5 - Use get_batch() instead. - */ - public function get_available_providers() { - // Get provider records from database. - $this->db - ->select('ea_users.*') - ->from('ea_users') - ->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner') - ->where('ea_roles.slug', DB_SLUG_PROVIDER); - - $providers = $this->db->get()->result_array(); - - // Include each provider services and settings. - foreach($providers as &$provider) { - // Services - $services = $this->db->get_where('ea_services_providers', - array('id_users' => $provider['id']))->result_array(); - $provider['services'] = array(); - foreach($services as $service) { - $provider['services'][] = $service['id_services']; - } - - // Settings - $provider['settings'] = $this->db->get_where('ea_user_settings', - array('id_users' => $provider['id']))->row_array(); - unset($provider['settings']['id_users']); - } - - // Return provider records. - return $providers; - } - - /** - * Get the providers role id from the database. - * - * @return int Returns the role id for the provider records. - */ - public function get_providers_role_id() { - return $this->db->get_where('ea_roles', array('slug' => DB_SLUG_PROVIDER))->row()->id; - } - - /** - * Get a providers setting from the database. - * - * @param string $setting_name The setting name that is going to be - * returned. - * @param int $provider_id The selected provider id. - * @return string Returs the value of the selected user setting. - */ - public function get_setting($setting_name, $provider_id) { - $provider_settings = $this->db->get_where('ea_user_settings', - array('id_users' => $provider_id))->row_array(); - return $provider_settings[$setting_name]; - } - - /** - * Set a provider's setting value in the database. - * - * The provider and settings record must already exist. - * - * @param string $setting_name The setting's name. - * @param string $value The setting's value. - * @param numeric $provider_id The selected provider id. - */ - public function set_setting($setting_name, $value, $provider_id) { - $this->db->where(array('id_users' => $provider_id)); - return $this->db->update('ea_user_settings', array($setting_name => $value)); - } - - /** - * Save the provider settings (used from insert or update operation). - * - * @param array $settings Contains the setting values. - * @param numeric $provider_id Record id of the provider. - */ - private function save_settings($settings, $provider_id) { - if (!is_numeric($provider_id)) { - throw new Exception('Invalid $provider_id argument given :' . $provider_id); - } - - if (count($settings) == 0 || !is_array($settings)) { - throw new Exception('Invalid $settings argument given:' . print_r($settings, TRUE)); - } - - // Check if the setting record exists in db. - if ($this->db->get_where('ea_user_settings', array('id_users' => $provider_id)) - ->num_rows() == 0) { - $this->db->insert('ea_user_settings', array('id_users' => $provider_id)); - } - - foreach($settings as $name=>$value) { - $this->set_setting($name, $value, $provider_id); - } - } - - /** - * Save the provider services in the database (use on both insert and update operation). - * - * @param array $services Contains the service ids that the selected provider can provide. - * @param numeric $provider_id The selected provider record id. - * @throws Exception When the $services argument type is not array. - * @throws Exception When the $provider_id argumetn type is not numeric. - */ - private function save_services($services, $provider_id) { - // Validate method arguments. - if (!is_array($services)) { - throw new Exception('Invalid argument type $services: ' . $services); - } - - if (!is_numeric($provider_id)) { - throw new Exception('Invalid argument type $provider_id: ' . $provider_id); - } - - // Save provider services in the database (delete old records and add new). - $this->db->delete('ea_services_providers', array('id_users' => $provider_id)); - foreach($services as $service_id) { - $service_provider = array( - 'id_users' => $provider_id, - 'id_services' => $service_id - ); - $this->db->insert('ea_services_providers', $service_provider); - } - } - - /** - * Validate Records Username - * - * @param string $username The provider records username. - * @param numeric $user_id The user record id. - * @return bool Returns the validation result. - */ - public function validate_username($username, $user_id) { - $num_rows = $this->db->get_where('ea_user_settings', - array('username' => $username, 'id_users <> ' => $user_id))->num_rows(); - return ($num_rows > 0) ? FALSE : TRUE; - } -} - -/* End of file providers_model.php */ -/* Location: ./application/models/providers_model.php */ \ No newline at end of file + + * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 + * @link http://easyappointments.org + * @since v1.0.0 + * ---------------------------------------------------------------------------- */ + +/** + * Providers_Model Class + * + * Contains the database operations for the service provider users of + * Easy!Appointmenst. + * + * Data Structure: + * 'fist_name' + * 'last_name' (required) + * 'email' (required) + * 'mobile_number' + * 'phone_number' (required) + * 'address' + * 'city' + * 'state' + * 'zip_code' + * 'notes' + * 'id_roles' + * 'services' >> array that contains the ids that the provider can provide + * 'settings' + * 'username' + * 'password' + * 'notifications' + * 'working_plan' + * 'google_sync' + * 'google_token' + * 'google_calendar' + * 'sync_past_days' + * 'sync_future_days' + * + * @package Models + */ +class Providers_Model extends CI_Model { + /** + * Class Constructor + */ + public function __construct() { + parent::__construct(); + } + + /** + * Add (insert - update) a service provider record. + * + * If the record already exists (id value provided) then it is going to be updated, + * otherwise inserted into the database. + * + * @param array $provider Contains the service provider data. + * @return int Returns the record id. + * @throws Exception When the record data validation fails. + */ + public function add($provider) { + $this->validate($provider); + + if ($this->exists($provider) && !isset($provider['id'])) { + $provider['id'] = $this->find_record_id($provider); + } + + if (!isset($provider['id'])) { + $provider['id'] = $this->insert($provider); + } else { + $provider['id'] = $this->update($provider); + } + + return intval($provider['id']); + } + + /** + * Check whether a particular provider record already exists in the database. + * + * @param array $provider Contains the provider data. The 'email' value is required + * in order to check for a provider. + * @return bool Returns whether the provider record exists or not. + * @throws Exception When the 'email' value is not provided. + */ + public function exists($provider) { + if (!isset($provider['email'])) { + throw new Exception('Provider email is not provided :' . print_r($provider, TRUE)); + } + + // This method shouldn't depend on another method of this class. + $num_rows = $this->db + ->select('*') + ->from('ea_users') + ->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner') + ->where('ea_users.email', $provider['email']) + ->where('ea_roles.slug', DB_SLUG_PROVIDER) + ->get()->num_rows(); + + return ($num_rows > 0) ? TRUE : FALSE; + } + + /** + * Insert a new provider record into the database. + * + * @param array $provider Contains the provider data (must be already validated). + * @return int Returns the new record id. + * @throws Exception When the insert operation fails. + */ + public function insert($provider) { + $this->load->helper('general'); + + // Get provider role id. + $provider['id_roles'] = $this->get_providers_role_id(); + + // Store provider settings and services (must not be present on the $provider array). + $services = $provider['services']; + unset($provider['services']); + $settings = $provider['settings']; + unset($provider['settings']); + + // Insert provider record and save settings. + if (!$this->db->insert('ea_users', $provider)) { + throw new Exception('Could not insert provider into the database'); + } + + $settings['salt'] = generate_salt(); + $settings['password'] = hash_password($settings['salt'], $settings['password']); + + $provider['id'] = $this->db->insert_id(); + $this->save_settings($settings, $provider['id']); + $this->save_services($services, $provider['id']); + + // Return the new record id. + return intval($provider['id']); + } + + /** + * Update an existing provider record in the database. + * + * @param array $provider Contains the provider data. + * @return int Returns the record id. + * @throws Exception When the update operation fails. + */ + public function update($provider) { + $this->load->helper('general'); + + // Store service and settings (must not be present on the $provider array). + $services = $provider['services']; + unset($provider['services']); + $settings = $provider['settings']; + unset($provider['settings']); + + if (isset($settings['password'])) { + $salt = $this->db->get_where('ea_user_settings', array('id_users' => $provider['id']))->row()->salt; + $settings['password'] = hash_password($salt, $settings['password']); + } + + // Update provider record. + $this->db->where('id', $provider['id']); + if (!$this->db->update('ea_users', $provider)) { + throw new Exception('Could not update provider record.'); + } + + $this->save_services($services, $provider['id']); + $this->save_settings($settings, $provider['id']); + + // Return record id. + return intval($provider['id']); + } + + /** + * Find the database record id of a provider. + * + * @param array $provider Contains the provider data. The 'email' value is required + * in order to find the record id. + * @return int Returns the record id. + * @throws Exception When the provider's email value is not provided. + */ + public function find_record_id($provider) { + if (!isset($provider['email'])) { + throw new Exception('Provider email was not provided :' . print_r($provider, TRUE)); + } + + $result = $this->db + ->select('ea_users.id') + ->from('ea_users') + ->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner') + ->where('ea_users.email', $provider['email']) + ->where('ea_roles.slug', DB_SLUG_PROVIDER) + ->get(); + + if ($result->num_rows() == 0) { + throw new Exception('Could not find provider record id.'); + } + + return intval($result->row()->id); + } + + /** + * Validate provider data before the insert or update operation is executed. + * + * @param array $provider Contains the provider data. + * @return bool Returns the validation result. + */ + public function validate($provider) { + $this->load->helper('data_validation'); + + // If a provider id is present, check whether the record exist in the database. + if (isset($provider['id'])) { + $num_rows = $this->db->get_where('ea_users', + array('id' => $provider['id']))->num_rows(); + if ($num_rows == 0) { + throw new Exception('Provided record id does not exist in the database.'); + } + } + + // Validate required fields. + if (!isset($provider['last_name']) + || !isset($provider['email']) + || !isset($provider['phone_number'])) { + throw new Exception('Not all required fields are provided : ' . print_r($provider, TRUE)); + } + + // Validate provider email address. + if (!filter_var($provider['email'], FILTER_VALIDATE_EMAIL)) { + throw new Exception('Invalid email address provided : ' . $provider['email']); + } + + // Validate provider services. + if (!isset($provider['services']) || !is_array($provider['services'])) { + throw new Exception('Invalid provider services given: ' . print_r($provider, TRUE)); + } else { // Check if services are valid numeric values. + foreach($provider['services'] as $service_id) { + if (!is_numeric($service_id)) { + throw new Exception('A provider service with invalid id was found: ' + . print_r($provider, TRUE)); + } + } + } + + // Validate provider settings. + if (!isset($provider['settings']) || count($provider['settings']) == 0 + || !is_array($provider['settings'])) { + throw new Exception('Invalid provider settings given: ' . print_r($provider, TRUE)); + } + + // Check if username exists. + if (isset($provider['settings']['username'])) { + $user_id = (isset($provider['id'])) ? $provider['id'] : ''; + if (!$this->validate_username($provider['settings']['username'], $user_id)) { + throw new Exception ('Username already exists. Please select a different ' + . 'username for this record.'); + } + } + + // Validate provider password + if (isset($provider['settings']['password'])) { + if (strlen($provider['settings']['password']) < MIN_PASSWORD_LENGTH) { + throw new Exception('The user password must be at least ' + . MIN_PASSWORD_LENGTH . ' characters long.'); + } + } + + // When inserting a record the email address must be unique. + $provider_id = (isset($provider['id'])) ? $provider['id'] : ''; + + $num_rows = $this->db + ->select('*') + ->from('ea_users') + ->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner') + ->where('ea_roles.slug', DB_SLUG_PROVIDER) + ->where('ea_users.email', $provider['email']) + ->where('ea_users.id <>', $provider_id) + ->get() + ->num_rows(); + + if ($num_rows > 0) { + throw new Exception('Given email address belongs to another provider record. ' + . 'Please use a different email.'); + } + + return TRUE; + } + + /** + * Delete an existing provider record from the database. + * + * @param numeric $customer_id The record id to be deleted. + * @return bool Returns the delete operation result. + * @throws Exception When the provider id value is not numeric. + */ + public function delete($provider_id) { + if (!is_numeric($provider_id)) { + throw new Exception('Invalid argument type $provider_id : ' . $provider_id); + } + + $num_rows = $this->db->get_where('ea_users', array('id' => $provider_id))->num_rows(); + if ($num_rows == 0) { + return FALSE; // Record does not exist in database. + } + + return $this->db->delete('ea_users', array('id' => $provider_id)); + } + + /** + * Get a specific provider record from the database. + * + * @param int $provider_id The id of the record to be returned. + * @return array Returns an associative array with the selected record's data. Each key + * has the same name as the database field names. + * @throws Exception When the selected record does not exist in database. + */ + public function get_row($provider_id) { + if (!is_numeric($provider_id)) { + throw new Exception('$provider_id argument is not a valid numeric value: ' . $provider_id); + } + + // Check if selected record exists on database. + if ($this->db->get_where('ea_users', array('id' => $provider_id))->num_rows() == 0) { + throw new Exception('Selected record does not exist in the database.'); + } + + // Get provider data. + $provider = $this->db->get_where('ea_users', array('id' => $provider_id))->row_array(); + + + // Include provider services. + $services = $this->db->get_where('ea_services_providers', + array('id_users' => $provider_id))->result_array(); + $provider['services'] = array(); + foreach($services as $service) { + $provider['services'][] = $service['id_services']; + } + + // Include provider settings. + $provider['settings'] = $this->db->get_where('ea_user_settings', + array('id_users' => $provider_id))->row_array(); + unset($provider['settings']['id_users']); + + // Return provider data array. + return $provider; + } + + /** + * Get a specific field value from the database. + * + * @param string $field_name The field name of the value to be returned. + * @param numeric $provider_id Record id of the value to be returned. + * @return string Returns the selected record value from the database. + * @throws Exception When the $field_name argument is not a valid string. + * @throws Exception When the $admin_id is not a valid numeric. + * @throws Exception When the admin record does not exist in the database. + * @throws Exception When the selected field value is not present on database. + */ + public function get_value($field_name, $provider_id) { + if (!is_numeric($provider_id)) { + throw new Exception('Invalid argument provided as $provider_id : ' . $provider_id); + } + + if (!is_string($field_name)) { + throw new Exception('$field_name argument is not a string : ' . $field_name); + } + + // Check whether the admin record exists in database. + $result = $this->db->get_where('ea_users', array('id' => $provider_id)); + if ($result->num_rows() == 0) { + throw new Exception('The record with the $provider_id argument does not exist in ' + . 'the database : ' . $provider_id); + } + + $provider = $result->row_array(); + if (!isset($provider[$field_name])) { + throw new Exception('The given $field_name argument does not exist in the ' + . 'database : ' . $field_name); + } + + return $provider[$field_name]; + } + + /** + * Get all, or specific records from provider's table. + * + * @example $this->Model->get_batch('id = ' . $recordId); + * + * @param mixed $where_clause (OPTIONAL) The WHERE clause of the query to be executed. + * + * NOTICE: DO NOT INCLUDE 'WHERE' KEYWORD. + * + * @return array Returns the rows from the database. + */ + public function get_batch($where_clause = '') { + // CI db class may confuse two where clauses made in the same time, so + // get the role id first and then apply the get_batch() where clause. + $role_id = $this->get_providers_role_id(); + + if ($where_clause != '') { + $this->db->where($where_clause); + } + + $batch = $this->db->get_where('ea_users', + array('id_roles' => $role_id))->result_array(); + + // Include each provider sevices and settings. + foreach($batch as &$provider) { + // Services + $services = $this->db->get_where('ea_services_providers', + array('id_users' => $provider['id']))->result_array(); + $provider['services'] = array(); + foreach($services as $service) { + $provider['services'][] = $service['id_services']; + } + + // Settings + $provider['settings'] = $this->db->get_where('ea_user_settings', + array('id_users' => $provider['id']))->row_array(); + unset($provider['settings']['id_users']); + } + + // Return provider records in an array. + return $batch; + } + + /** + * Get the available system providers. + * + * This method returns the available providers and the services that can + * provide. + * + * @return array Returns an array with the providers data. + */ + public function get_available_providers() { + // Get provider records from database. + $this->db + ->select('ea_users.*') + ->from('ea_users') + ->join('ea_roles', 'ea_roles.id = ea_users.id_roles', 'inner') + ->where('ea_roles.slug', DB_SLUG_PROVIDER); + + $providers = $this->db->get()->result_array(); + + // Include each provider services and settings. + foreach($providers as &$provider) { + // Services + $services = $this->db->get_where('ea_services_providers', + array('id_users' => $provider['id']))->result_array(); + + $provider['services'] = array(); + foreach($services as $service) { + $provider['services'][] = $service['id_services']; + } + + // Settings + $provider['settings'] = $this->db->get_where('ea_user_settings', + array('id_users' => $provider['id']))->row_array(); + unset($provider['settings']['username']); + unset($provider['settings']['password']); + unset($provider['settings']['salt']); + } + + // Return provider records. + return $providers; + } + + /** + * Get the providers role id from the database. + * + * @return int Returns the role id for the provider records. + */ + public function get_providers_role_id() { + return $this->db->get_where('ea_roles', array('slug' => DB_SLUG_PROVIDER))->row()->id; + } + + /** + * Get a providers setting from the database. + * + * @param string $setting_name The setting name that is going to be + * returned. + * @param int $provider_id The selected provider id. + * @return string Returs the value of the selected user setting. + */ + public function get_setting($setting_name, $provider_id) { + $provider_settings = $this->db->get_where('ea_user_settings', + array('id_users' => $provider_id))->row_array(); + return $provider_settings[$setting_name]; + } + + /** + * Set a provider's setting value in the database. + * + * The provider and settings record must already exist. + * + * @param string $setting_name The setting's name. + * @param string $value The setting's value. + * @param numeric $provider_id The selected provider id. + */ + public function set_setting($setting_name, $value, $provider_id) { + $this->db->where(array('id_users' => $provider_id)); + return $this->db->update('ea_user_settings', array($setting_name => $value)); + } + + /** + * Save the provider settings (used from insert or update operation). + * + * @param array $settings Contains the setting values. + * @param numeric $provider_id Record id of the provider. + */ + private function save_settings($settings, $provider_id) { + if (!is_numeric($provider_id)) { + throw new Exception('Invalid $provider_id argument given :' . $provider_id); + } + + if (count($settings) == 0 || !is_array($settings)) { + throw new Exception('Invalid $settings argument given:' . print_r($settings, TRUE)); + } + + // Check if the setting record exists in db. + if ($this->db->get_where('ea_user_settings', array('id_users' => $provider_id)) + ->num_rows() == 0) { + $this->db->insert('ea_user_settings', array('id_users' => $provider_id)); + } + + foreach($settings as $name=>$value) { + $this->set_setting($name, $value, $provider_id); + } + } + + /** + * Save the provider services in the database (use on both insert and update operation). + * + * @param array $services Contains the service ids that the selected provider can provide. + * @param numeric $provider_id The selected provider record id. + * @throws Exception When the $services argument type is not array. + * @throws Exception When the $provider_id argumetn type is not numeric. + */ + private function save_services($services, $provider_id) { + // Validate method arguments. + if (!is_array($services)) { + throw new Exception('Invalid argument type $services: ' . $services); + } + + if (!is_numeric($provider_id)) { + throw new Exception('Invalid argument type $provider_id: ' . $provider_id); + } + + // Save provider services in the database (delete old records and add new). + $this->db->delete('ea_services_providers', array('id_users' => $provider_id)); + foreach($services as $service_id) { + $service_provider = array( + 'id_users' => $provider_id, + 'id_services' => $service_id + ); + $this->db->insert('ea_services_providers', $service_provider); + } + } + + /** + * Validate Records Username + * + * @param string $username The provider records username. + * @param numeric $user_id The user record id. + * @return bool Returns the validation result. + */ + public function validate_username($username, $user_id) { + $num_rows = $this->db->get_where('ea_user_settings', + array('username' => $username, 'id_users <> ' => $user_id))->num_rows(); + return ($num_rows > 0) ? FALSE : TRUE; + } +} + +/* End of file providers_model.php */ +/* Location: ./application/models/providers_model.php */ From 2953b3e492a1245153cd2fa8bfe239e6c6efe2dd Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 1 Jan 2016 15:53:51 +0100 Subject: [PATCH 04/12] Corrected styling issue with provider's settings page. --- src/assets/css/backend.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/assets/css/backend.css b/src/assets/css/backend.css index 0439d9d6..c6218004 100644 --- a/src/assets/css/backend.css +++ b/src/assets/css/backend.css @@ -634,8 +634,8 @@ body .form-horizontal .controls { } #users-page #providers .breaks .btn { -margin-right: 5px; -padding: 4px 7px; + margin-right: 5px; + padding: 4px 7px; } @@ -666,6 +666,7 @@ padding: 4px 7px; #settings-page .tab-content { margin: 15px; + overflow: auto; } #settings-page .nav { From e69f7ca6344228225b97bd421f7c777004bc6cd4 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 1 Jan 2016 16:45:01 +0100 Subject: [PATCH 05/12] Add sample service and provider after the installation completes successfully. --- src/application/controllers/installation.php | 10 ++++ .../helpers/installation_helper.php | 52 +++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/src/application/controllers/installation.php b/src/application/controllers/installation.php index 9ab2c5eb..168056c6 100644 --- a/src/application/controllers/installation.php +++ b/src/application/controllers/installation.php @@ -100,6 +100,16 @@ class Installation extends CI_Controller { $this->settings_model->set_setting('company_email', $company['company_email']); $this->settings_model->set_setting('company_link', $company['company_link']); + // Create sample records. + $this->load->model('services_model'); + $this->load->model('providers_model'); + + $sample_service = get_sample_service(); + $sample_service['id'] = $this->services_model->add($sample_service); + $sample_provider = get_sample_provider(); + $sample_provider['services'][] = $sample_service['id']; + $this->providers_model->add($sample_provider); + echo json_encode(AJAX_SUCCESS); } catch (Exception $exc) { diff --git a/src/application/helpers/installation_helper.php b/src/application/helpers/installation_helper.php index 78e8af83..109c4f1c 100644 --- a/src/application/helpers/installation_helper.php +++ b/src/application/helpers/installation_helper.php @@ -1,5 +1,16 @@ + * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 + * @link http://easyappointments.org + * @since v1.1.0 + * ---------------------------------------------------------------------------- */ + /** * Check if Easy!Appointments is installed. * @@ -16,3 +27,44 @@ function is_ea_installed() { $ci =& get_instance(); return $ci->db->table_exists('ea_users'); } + +/** + * Get the data of a sample service. + * + * @return array + */ +function get_sample_service() { + return array( + 'name' => 'Test Service', + 'duration' => 30, + 'price' => 50.0, + 'currency' => 'Euro', + 'description' => 'This is a test service automatically inserted by the installer.', + 'id_service_categories' => NULL + ); +} + +/** + * Get the data of a sample provider. + * + * @return array + */ +function get_sample_provider() { + return array( + 'first_name' => 'John', + 'last_name' => 'Doe', + 'email' => 'john@doe.com', + 'phone_number' => '0123456789', + 'services' => array(), + 'settings' => array( + '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, + 'sync_future_days' => 5 + ) + ); +} From 0b43e4d918cef2f10634cb7592ce5f852da4c214 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 1 Jan 2016 20:18:03 +0100 Subject: [PATCH 06/12] Changed the CAPTCHA failure display (added input hint below the captcha input). --- src/application/controllers/appointments.php | 6 +++++- src/application/views/appointments/book.php | 1 + src/assets/css/frontend.css | 2 ++ src/assets/js/frontend_book.js | 18 +++++++++++++++++- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/application/controllers/appointments.php b/src/application/controllers/appointments.php index a8fd125e..14d09e20 100755 --- a/src/application/controllers/appointments.php +++ b/src/application/controllers/appointments.php @@ -339,7 +339,11 @@ class Appointments extends CI_Controller { // Validate the CAPTCHA string. if ($this->settings_model->get_setting('require_captcha') === '1' && $this->session->userdata('captcha_phrase') !== $_POST['captcha']) { - throw new Exception($this->lang->line('captcha_is_wrong')); + echo json_encode(array( + 'captcha_verification' => FALSE, + 'expected_phrase' => $this->session->userdata('captcha_phrase') + )); + return; } // Check appointment availability. diff --git a/src/application/views/appointments/book.php b/src/application/views/appointments/book.php index c85902ca..6862f80f 100644 --- a/src/application/views/appointments/book.php +++ b/src/application/views/appointments/book.php @@ -373,6 +373,7 @@ +   diff --git a/src/assets/css/frontend.css b/src/assets/css/frontend.css index 87cbccb8..d612e26d 100644 --- a/src/assets/css/frontend.css +++ b/src/assets/css/frontend.css @@ -198,6 +198,8 @@ body { #book-appointment-wizard .captcha-image { float: right; margin-bottom: 20px; + border-radius: 3px; + box-shadow: 1px 1px 4px rgba(0,0,0,0.4); } #book-appointment-wizard .captcha-text { diff --git a/src/assets/js/frontend_book.js b/src/assets/js/frontend_book.js index b02abf20..26f772a5 100644 --- a/src/assets/js/frontend_book.js +++ b/src/assets/js/frontend_book.js @@ -620,7 +620,7 @@ var FrontendBook = { if ($captchaText.length > 0) { $captchaText.css('border', ''); if ($captchaText.val() === '') { - $captchaText.css('border', '1px solid red'); + $captchaText.css('border', '1px solid #dc3b40'); return; } } @@ -668,6 +668,22 @@ var FrontendBook = { return false; } + if (response.captcha_verification === false) { + $('#captcha-hint') + .text(EALang['captcha_is_wrong'] + '(' + response.expected_phrase + ')') + .fadeTo(400, 1); + + setTimeout(function() { + $('#captcha-hint').fadeTo(400, 0); + }, 3000); + + $('.captcha-title small').trigger('click'); + + $captchaText.css('border', '1px solid #dc3b40'); + + return false; + } + window.location.replace(GlobalVariables.baseUrl + '/index.php/appointments/book_success/' + response.appointment_id); }) From f88c6cb898b58fa23caee54768f946140cd53f87 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 1 Jan 2016 20:34:42 +0100 Subject: [PATCH 07/12] Sometimes captcha generates an error if the session is accessed after there is some output in the response. From now on the captcha phrase will be saved first and then there will be the image output. --- src/application/controllers/captcha.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/application/controllers/captcha.php b/src/application/controllers/captcha.php index 01941b0d..7c64de76 100644 --- a/src/application/controllers/captcha.php +++ b/src/application/controllers/captcha.php @@ -32,8 +32,9 @@ class Captcha extends CI_Controller { public function index() { header('Content-type: image/jpeg'); $builder = new Gregwar\Captcha\CaptchaBuilder; - $builder->build()->output(); + $builder->build(); $this->session->set_userdata('captcha_phrase', $builder->getPhrase()); + $builder->output(); } } From fa992b824a54fcbe8b356e26702ced2934512e8c Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 1 Jan 2016 20:40:10 +0100 Subject: [PATCH 08/12] Moved the customer-notifications setting in the 'general settings' tab. --- src/application/views/backend/settings.php | 24 ++++++++++------------ src/assets/js/backend_settings.js | 10 ++++----- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/application/views/backend/settings.php b/src/application/views/backend/settings.php index d3e2b107..d71ad699 100644 --- a/src/application/views/backend/settings.php +++ b/src/application/views/backend/settings.php @@ -117,6 +117,17 @@ lang->line('date_format_hint'); ?> +
+ +
+ + + lang->line('customer_notifications_hint'); ?> + +
- -
- -

lang->line('customer_notifications'); ?>

- - lang->line('customer_notifications_hint'); ?> - -
- -

lang->line('breaks'); ?>

diff --git a/src/assets/js/backend_settings.js b/src/assets/js/backend_settings.js index 692e54ba..cd2456d2 100644 --- a/src/assets/js/backend_settings.js +++ b/src/assets/js/backend_settings.js @@ -271,6 +271,11 @@ SystemSettings.prototype.get = function() { }); }); + settings.push({ + 'name': 'customer_notifications', + 'value': $('#customer-notifications').hasClass('active') === true ? '1' : '0' + }); + settings.push({ 'name': 'require_captcha', 'value': $('#require-captcha').hasClass('active') === true ? '1' : '0' @@ -287,11 +292,6 @@ SystemSettings.prototype.get = function() { 'value': $('#book-advance-timeout').val() }); - settings.push({ - 'name': 'customer_notifications', - 'value': $('#customer-notifications').hasClass('active') === true ? '1' : '0' - }); - return settings; }; From c7a8b40e27f83beddb8bb68e4a83497c90872c42 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 1 Jan 2016 21:33:06 +0100 Subject: [PATCH 09/12] Fixed backend menu item height for Firefox. --- src/assets/css/backend.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/assets/css/backend.css b/src/assets/css/backend.css index c6218004..4908c9cc 100644 --- a/src/assets/css/backend.css +++ b/src/assets/css/backend.css @@ -54,6 +54,7 @@ root { #header #header-menu .menu-item { float: left; padding: 18px 18px 19px; + height: 70px; min-width: 130px; text-align: center; font-weight: bold; From 648e82840f7f4571d4403d1ce3430375af2d9788 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 1 Jan 2016 21:33:14 +0100 Subject: [PATCH 10/12] Translated new texts for greek and german translations. --- src/application/language/german/translations_lang.php | 10 +++++----- src/application/language/greek/translations_lang.php | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/application/language/german/translations_lang.php b/src/application/language/german/translations_lang.php index 138f4397..764afba5 100644 --- a/src/application/language/german/translations_lang.php +++ b/src/application/language/german/translations_lang.php @@ -264,13 +264,13 @@ $lang['google_calendar_selected'] = 'Google-Kalender ausgewählt wurde erfolgrei $lang['oops_something_went_wrong'] = 'Oops! Etwas ist schiefgelaufen!'; $lang['could_not_add_to_google_calendar'] = 'Ihr Termin konnte nicht in den Google-Kalender-Konto hinzugefügt werden.'; $lang['ea_update_success'] = 'Easy!Appointments wurde erfolgreich aktualisiert!'; -$lang['require_captcha'] = 'Require CAPTCHA'; -$lang['require_captcha_hint'] = 'When enabled, the customers will have to type a random generated CAPTCHA string before booking/updating an appointment.'; +$lang['require_captcha'] = 'Erfordern CAPTCHA'; +$lang['require_captcha_hint'] = 'Wenn Aktiv, werden die Kunden eine zufällig generierte Zeichenfolge (CAPTCHA) eintippen vor die eine Termin buchen/speichern dürfen.'; $lang['captcha_is_wrong'] = 'CAPTCHA Überprüfung fehlgeschlagen, bitte versuchen Sie es wieder.'; $lang['any_provider'] = 'Jeder Anbieter'; -$lang['requested_hour_is_unavailable'] = 'The requested appointment is unfornately not available. Please select a different hour for your appointment.'; -$lang['customer_notifications'] = 'Customer Notifications'; -$lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; +$lang['requested_hour_is_unavailable'] = 'Der gewünschte Termin ist leider nicht verfügbar. Bitte wählen Sie eine andere Zeit für den Termin.'; +$lang['customer_notifications'] = 'Kunden Benachrichtigungen'; +$lang['customer_notifications_hint'] = 'Stellen Sie ein, ob die Kunden eine E-Mail-Benachrichtigungen erhalten, jedes mal es gibt ein neue änderung auf ein Termin.'; $lang['date_format'] = 'Datumsformat'; $lang['date_format_hint'] = 'Ändern Sie das Datumsanzeigeformat (D - Datum, M - Monat, Y - Jahr).'; $lang['google_analytics_code_hint'] = 'Fügen Sie Ihre Google Analytics-ID hinzu, das auf der Buchungsseite enthalten wird.'; diff --git a/src/application/language/greek/translations_lang.php b/src/application/language/greek/translations_lang.php index b8491bc2..6ecb6bb9 100644 --- a/src/application/language/greek/translations_lang.php +++ b/src/application/language/greek/translations_lang.php @@ -264,13 +264,13 @@ $lang['google_calendar_selected'] = 'Το ημερολόγιο της Google ε $lang['oops_something_went_wrong'] = 'Ώχ! Κάτι πήγε στραβά!'; $lang['could_not_add_to_google_calendar'] = 'Το ραντεβού σας δεν μπόρεσε να προστεθεί στον λογαριασμό σας στο Google Calendar.'; $lang['ea_update_success'] = 'Το Easy!Appointments ενημερώθηκε με επιτυχία!'; -$lang['require_captcha'] = 'Απαιτώ CAPTCHA'; +$lang['require_captcha'] = 'Απαίτηση CAPTCHA'; $lang['require_captcha_hint'] = 'Όταν είναι ενεργοποιημένο, οι πελάτες θα χρειαστεί να πληκτρολογήσουν μια τυχαία παραγόμενη συμβολοσειρά CAPTCHA πριν κλείσουν/αποθηκεύσουν ένα ραντεβού.'; $lang['captcha_is_wrong'] = 'Η επαλήθευση του CAPTCHA απέτυχε, παρακαλώ δοκιμάστε πάλι.'; $lang['any_provider'] = 'Οποιοσδήποτε Πάροχος'; $lang['requested_hour_is_unavailable'] = 'Το απαιτούμενο ραντεβού δεν είναι δυστυχώς διαθέσιμο. Παρακαλώ επιλέξτε κάποια άλλη ώρα για το ραντεβού σας.'; -$lang['customer_notifications'] = 'Customer Notifications'; -$lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; +$lang['customer_notifications'] = 'Ειδοποιήσεις Πελατών'; +$lang['customer_notifications_hint'] = 'Ορίζει αν οι πελάτες θα λαμβάνουν ειδοποιήσεις μέσω email κάθε φορά που θα υπαχει μια αλλαγή σε κάποιο από τα ραντεβού τους.'; $lang['date_format'] = 'Μορφή Ημερομηνίας'; $lang['date_format_hint'] = 'Αλλάξτε την μορφή ημερομηνίας (D - Ημέρα, M - Μήνας, Y - Χρόνος).'; $lang['google_analytics_code_hint'] = 'Προσθέστε τον Google Analytics ID σας το οποίο θα συμπεριληφθεί στην σελίδα κράτησης.'; From 0cb586c6fea94635e14b1b3249eea5ecb4462897 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 1 Jan 2016 21:57:44 +0100 Subject: [PATCH 11/12] Added window.console IE9 workaround. --- src/assets/js/backend.js | 4 ++++ src/assets/js/frontend_book.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/assets/js/backend.js b/src/assets/js/backend.js index a9817373..2bd7a9b7 100644 --- a/src/assets/js/backend.js +++ b/src/assets/js/backend.js @@ -13,6 +13,10 @@ * Main javascript code for the backend of Easy!Appointments. */ $(document).ready(function() { + if (window.console === undefined) { + window.console = function() {} // IE compatibility + } + $(window).resize(function() { Backend.placeFooterToBottom(); }).trigger('resize'); diff --git a/src/assets/js/frontend_book.js b/src/assets/js/frontend_book.js index 26f772a5..f9bea6fe 100644 --- a/src/assets/js/frontend_book.js +++ b/src/assets/js/frontend_book.js @@ -41,6 +41,10 @@ var FrontendBook = { manageMode = false; // Default Value } + if (window.console === undefined) { + window.console = function() {} // IE compatibility + } + FrontendBook.manageMode = manageMode; // Initialize page's components (tooltips, datepickers etc). From 86644cfa9c0aaf47b9ef341142aa2410ceebfa6b Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sat, 2 Jan 2016 14:47:04 +0100 Subject: [PATCH 12/12] Updated the copyright date. --- src/application/controllers/appointments.php | 2 +- src/application/controllers/backend.php | 2 +- src/application/controllers/backend_api.php | 2 +- src/application/controllers/captcha.php | 2 +- src/application/controllers/errors.php | 2 +- src/application/controllers/google.php | 2 +- src/application/controllers/installation.php | 2 +- src/application/controllers/test.php | 2 +- src/application/controllers/user.php | 2 +- src/application/helpers/custom_exceptions_helper.php | 2 +- src/application/helpers/data_validation_helper.php | 2 +- src/application/helpers/general_helper.php | 2 +- src/application/helpers/installation_helper.php | 2 +- src/application/libraries/Unit_tests/Unit_tests.php | 2 +- .../libraries/Unit_tests/drivers/Unit_tests_admins_model.php | 2 +- .../Unit_tests/drivers/Unit_tests_appointments_model.php | 2 +- .../libraries/Unit_tests/drivers/Unit_tests_customers_model.php | 2 +- .../libraries/Unit_tests/drivers/Unit_tests_providers_model.php | 2 +- .../Unit_tests/drivers/Unit_tests_secretaries_model.php | 2 +- .../libraries/Unit_tests/drivers/Unit_tests_services_model.php | 2 +- .../libraries/Unit_tests/drivers/Unit_tests_settings_model.php | 2 +- src/application/libraries/google_sync.php | 2 +- src/application/libraries/notifications.php | 2 +- src/application/migrations/001_specific_calendar_sync.php | 2 +- src/application/migrations/002_add_google_analytics_setting.php | 2 +- .../migrations/003_add_customer_notifications_setting.php | 2 +- src/application/migrations/004_add_date_format_setting.php | 2 +- src/application/migrations/005_add_require_captcha_setting.php | 2 +- src/application/models/admins_model.php | 2 +- src/application/models/appointments_model.php | 2 +- src/application/models/customers_model.php | 2 +- src/application/models/providers_model.php | 2 +- src/application/models/roles_model.php | 2 +- src/application/models/secretaries_model.php | 2 +- src/application/models/services_model.php | 2 +- src/application/models/settings_model.php | 2 +- src/application/models/user_model.php | 2 +- src/assets/css/backend.css | 2 +- src/assets/css/frontend.css | 2 +- src/assets/css/general.css | 2 +- src/assets/js/backend.js | 2 +- src/assets/js/backend_calendar.js | 2 +- src/assets/js/backend_customers.js | 2 +- src/assets/js/backend_services.js | 2 +- src/assets/js/backend_settings.js | 2 +- src/assets/js/backend_users.js | 2 +- src/assets/js/backend_users_admins.js | 2 +- src/assets/js/backend_users_providers.js | 2 +- src/assets/js/backend_users_secretaries.js | 2 +- src/assets/js/frontend_book.js | 2 +- src/assets/js/frontend_book_success.js | 2 +- src/assets/js/general_functions.js | 2 +- src/assets/js/installation.js | 2 +- src/assets/js/working_plan.js | 2 +- src/assets/sql/structure.sql | 2 +- src/config-sample.php | 2 +- 56 files changed, 56 insertions(+), 56 deletions(-) diff --git a/src/application/controllers/appointments.php b/src/application/controllers/appointments.php index 14d09e20..72d56bb6 100755 --- a/src/application/controllers/appointments.php +++ b/src/application/controllers/appointments.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/controllers/backend.php b/src/application/controllers/backend.php index 6eafc045..23a8f634 100644 --- a/src/application/controllers/backend.php +++ b/src/application/controllers/backend.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/controllers/backend_api.php b/src/application/controllers/backend_api.php index cd7b6c77..f793d9ea 100644 --- a/src/application/controllers/backend_api.php +++ b/src/application/controllers/backend_api.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/controllers/captcha.php b/src/application/controllers/captcha.php index 7c64de76..23fd157c 100644 --- a/src/application/controllers/captcha.php +++ b/src/application/controllers/captcha.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/controllers/errors.php b/src/application/controllers/errors.php index 529f1730..2aac3bb1 100644 --- a/src/application/controllers/errors.php +++ b/src/application/controllers/errors.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/controllers/google.php b/src/application/controllers/google.php index 787b3fae..7b881545 100644 --- a/src/application/controllers/google.php +++ b/src/application/controllers/google.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/controllers/installation.php b/src/application/controllers/installation.php index 168056c6..29fab3d6 100644 --- a/src/application/controllers/installation.php +++ b/src/application/controllers/installation.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.1.0 diff --git a/src/application/controllers/test.php b/src/application/controllers/test.php index 725ef67a..bdaed42a 100644 --- a/src/application/controllers/test.php +++ b/src/application/controllers/test.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/controllers/user.php b/src/application/controllers/user.php index c299803d..b5cddce6 100644 --- a/src/application/controllers/user.php +++ b/src/application/controllers/user.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/helpers/custom_exceptions_helper.php b/src/application/helpers/custom_exceptions_helper.php index 015617b6..fbb64f54 100644 --- a/src/application/helpers/custom_exceptions_helper.php +++ b/src/application/helpers/custom_exceptions_helper.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/helpers/data_validation_helper.php b/src/application/helpers/data_validation_helper.php index acb4e9c2..c74bfac3 100644 --- a/src/application/helpers/data_validation_helper.php +++ b/src/application/helpers/data_validation_helper.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/helpers/general_helper.php b/src/application/helpers/general_helper.php index 29546ccd..2b3b6c46 100644 --- a/src/application/helpers/general_helper.php +++ b/src/application/helpers/general_helper.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/helpers/installation_helper.php b/src/application/helpers/installation_helper.php index 109c4f1c..fe2c2b12 100644 --- a/src/application/helpers/installation_helper.php +++ b/src/application/helpers/installation_helper.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.1.0 diff --git a/src/application/libraries/Unit_tests/Unit_tests.php b/src/application/libraries/Unit_tests/Unit_tests.php index 841a1918..0296110e 100644 --- a/src/application/libraries/Unit_tests/Unit_tests.php +++ b/src/application/libraries/Unit_tests/Unit_tests.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/libraries/Unit_tests/drivers/Unit_tests_admins_model.php b/src/application/libraries/Unit_tests/drivers/Unit_tests_admins_model.php index 07da8ada..fe28afdc 100644 --- a/src/application/libraries/Unit_tests/drivers/Unit_tests_admins_model.php +++ b/src/application/libraries/Unit_tests/drivers/Unit_tests_admins_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/libraries/Unit_tests/drivers/Unit_tests_appointments_model.php b/src/application/libraries/Unit_tests/drivers/Unit_tests_appointments_model.php index b9c00a11..ebf5885b 100644 --- a/src/application/libraries/Unit_tests/drivers/Unit_tests_appointments_model.php +++ b/src/application/libraries/Unit_tests/drivers/Unit_tests_appointments_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/libraries/Unit_tests/drivers/Unit_tests_customers_model.php b/src/application/libraries/Unit_tests/drivers/Unit_tests_customers_model.php index 0cf716dc..8f32a97a 100644 --- a/src/application/libraries/Unit_tests/drivers/Unit_tests_customers_model.php +++ b/src/application/libraries/Unit_tests/drivers/Unit_tests_customers_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/libraries/Unit_tests/drivers/Unit_tests_providers_model.php b/src/application/libraries/Unit_tests/drivers/Unit_tests_providers_model.php index d21c58b2..5399b6a2 100644 --- a/src/application/libraries/Unit_tests/drivers/Unit_tests_providers_model.php +++ b/src/application/libraries/Unit_tests/drivers/Unit_tests_providers_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/libraries/Unit_tests/drivers/Unit_tests_secretaries_model.php b/src/application/libraries/Unit_tests/drivers/Unit_tests_secretaries_model.php index 0a72efc4..cdffd815 100644 --- a/src/application/libraries/Unit_tests/drivers/Unit_tests_secretaries_model.php +++ b/src/application/libraries/Unit_tests/drivers/Unit_tests_secretaries_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/libraries/Unit_tests/drivers/Unit_tests_services_model.php b/src/application/libraries/Unit_tests/drivers/Unit_tests_services_model.php index 07b44ccd..bbd885dc 100644 --- a/src/application/libraries/Unit_tests/drivers/Unit_tests_services_model.php +++ b/src/application/libraries/Unit_tests/drivers/Unit_tests_services_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/libraries/Unit_tests/drivers/Unit_tests_settings_model.php b/src/application/libraries/Unit_tests/drivers/Unit_tests_settings_model.php index c24bedd8..28f849f2 100644 --- a/src/application/libraries/Unit_tests/drivers/Unit_tests_settings_model.php +++ b/src/application/libraries/Unit_tests/drivers/Unit_tests_settings_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/libraries/google_sync.php b/src/application/libraries/google_sync.php index ab3fa004..966b04c5 100644 --- a/src/application/libraries/google_sync.php +++ b/src/application/libraries/google_sync.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/libraries/notifications.php b/src/application/libraries/notifications.php index 87a59d0c..bd2cd3b2 100644 --- a/src/application/libraries/notifications.php +++ b/src/application/libraries/notifications.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/migrations/001_specific_calendar_sync.php b/src/application/migrations/001_specific_calendar_sync.php index 6c318e07..5d7c9fcb 100644 --- a/src/application/migrations/001_specific_calendar_sync.php +++ b/src/application/migrations/001_specific_calendar_sync.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/migrations/002_add_google_analytics_setting.php b/src/application/migrations/002_add_google_analytics_setting.php index fb177f77..5cc3c4d6 100644 --- a/src/application/migrations/002_add_google_analytics_setting.php +++ b/src/application/migrations/002_add_google_analytics_setting.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.1.0 diff --git a/src/application/migrations/003_add_customer_notifications_setting.php b/src/application/migrations/003_add_customer_notifications_setting.php index 36b452fd..f42e9050 100644 --- a/src/application/migrations/003_add_customer_notifications_setting.php +++ b/src/application/migrations/003_add_customer_notifications_setting.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.1.0 diff --git a/src/application/migrations/004_add_date_format_setting.php b/src/application/migrations/004_add_date_format_setting.php index 8c147b65..274a9ac3 100644 --- a/src/application/migrations/004_add_date_format_setting.php +++ b/src/application/migrations/004_add_date_format_setting.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.1.0 diff --git a/src/application/migrations/005_add_require_captcha_setting.php b/src/application/migrations/005_add_require_captcha_setting.php index 1524896e..3693c66a 100644 --- a/src/application/migrations/005_add_require_captcha_setting.php +++ b/src/application/migrations/005_add_require_captcha_setting.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.1.0 diff --git a/src/application/models/admins_model.php b/src/application/models/admins_model.php index 816948c9..7630e46e 100644 --- a/src/application/models/admins_model.php +++ b/src/application/models/admins_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/models/appointments_model.php b/src/application/models/appointments_model.php index f99fb645..4cc6dba8 100644 --- a/src/application/models/appointments_model.php +++ b/src/application/models/appointments_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/models/customers_model.php b/src/application/models/customers_model.php index fd4d66d5..04dd0925 100644 --- a/src/application/models/customers_model.php +++ b/src/application/models/customers_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/models/providers_model.php b/src/application/models/providers_model.php index e60a4cb4..270cd745 100644 --- a/src/application/models/providers_model.php +++ b/src/application/models/providers_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/models/roles_model.php b/src/application/models/roles_model.php index 9de65ba7..8f4671af 100644 --- a/src/application/models/roles_model.php +++ b/src/application/models/roles_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/models/secretaries_model.php b/src/application/models/secretaries_model.php index 412a5767..c4c2a839 100644 --- a/src/application/models/secretaries_model.php +++ b/src/application/models/secretaries_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/models/services_model.php b/src/application/models/services_model.php index d2dd295b..8e79c225 100644 --- a/src/application/models/services_model.php +++ b/src/application/models/services_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/models/settings_model.php b/src/application/models/settings_model.php index f3f95b23..7e17290e 100644 --- a/src/application/models/settings_model.php +++ b/src/application/models/settings_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/application/models/user_model.php b/src/application/models/user_model.php index 89154114..1f506ea1 100644 --- a/src/application/models/user_model.php +++ b/src/application/models/user_model.php @@ -5,7 +5,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/css/backend.css b/src/assets/css/backend.css index 4908c9cc..fb514c2c 100644 --- a/src/assets/css/backend.css +++ b/src/assets/css/backend.css @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/css/frontend.css b/src/assets/css/frontend.css index d612e26d..37091a0a 100644 --- a/src/assets/css/frontend.css +++ b/src/assets/css/frontend.css @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/css/general.css b/src/assets/css/general.css index b2d3dc08..1c0fdf01 100644 --- a/src/assets/css/general.css +++ b/src/assets/css/general.css @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/backend.js b/src/assets/js/backend.js index 2bd7a9b7..dfcc665a 100644 --- a/src/assets/js/backend.js +++ b/src/assets/js/backend.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/backend_calendar.js b/src/assets/js/backend_calendar.js index 04f0e800..6ce32a5a 100644 --- a/src/assets/js/backend_calendar.js +++ b/src/assets/js/backend_calendar.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/backend_customers.js b/src/assets/js/backend_customers.js index 574044fc..edc8e608 100644 --- a/src/assets/js/backend_customers.js +++ b/src/assets/js/backend_customers.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/backend_services.js b/src/assets/js/backend_services.js index 75ef4683..8b344f93 100644 --- a/src/assets/js/backend_services.js +++ b/src/assets/js/backend_services.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/backend_settings.js b/src/assets/js/backend_settings.js index cd2456d2..d1eb9964 100644 --- a/src/assets/js/backend_settings.js +++ b/src/assets/js/backend_settings.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/backend_users.js b/src/assets/js/backend_users.js index 5bbd3c7c..2e534346 100644 --- a/src/assets/js/backend_users.js +++ b/src/assets/js/backend_users.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/backend_users_admins.js b/src/assets/js/backend_users_admins.js index 690e9a79..bce4aad2 100644 --- a/src/assets/js/backend_users_admins.js +++ b/src/assets/js/backend_users_admins.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/backend_users_providers.js b/src/assets/js/backend_users_providers.js index cfbe9c7b..c8604481 100644 --- a/src/assets/js/backend_users_providers.js +++ b/src/assets/js/backend_users_providers.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/backend_users_secretaries.js b/src/assets/js/backend_users_secretaries.js index 2a96ebfb..6fab2966 100644 --- a/src/assets/js/backend_users_secretaries.js +++ b/src/assets/js/backend_users_secretaries.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/frontend_book.js b/src/assets/js/frontend_book.js index f9bea6fe..b29d5e65 100644 --- a/src/assets/js/frontend_book.js +++ b/src/assets/js/frontend_book.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/frontend_book_success.js b/src/assets/js/frontend_book_success.js index a73bdcd0..c6570d94 100644 --- a/src/assets/js/frontend_book_success.js +++ b/src/assets/js/frontend_book_success.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/general_functions.js b/src/assets/js/general_functions.js index a19ecaef..0a845787 100644 --- a/src/assets/js/general_functions.js +++ b/src/assets/js/general_functions.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/installation.js b/src/assets/js/installation.js index d8052ce2..9cafc370 100644 --- a/src/assets/js/installation.js +++ b/src/assets/js/installation.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/js/working_plan.js b/src/assets/js/working_plan.js index 3a2f15e3..8f6d5099 100644 --- a/src/assets/js/working_plan.js +++ b/src/assets/js/working_plan.js @@ -3,7 +3,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0 diff --git a/src/assets/sql/structure.sql b/src/assets/sql/structure.sql index f2b0d3b7..f1aa79a9 100644 --- a/src/assets/sql/structure.sql +++ b/src/assets/sql/structure.sql @@ -3,7 +3,7 @@ -- -- @package EasyAppointments -- @author A.Tselegidis --- @copyright Copyright (c) 2013 - 2015, Alex Tselegidis +-- @copyright Copyright (c) 2013 - 2016, Alex Tselegidis -- @license http://opensource.org/licenses/GPL-3.0 - GPLv3 -- @link http://easyappointments.org -- @since v1.0.0 diff --git a/src/config-sample.php b/src/config-sample.php index 8dd03aa8..5411537e 100644 --- a/src/config-sample.php +++ b/src/config-sample.php @@ -4,7 +4,7 @@ * * @package EasyAppointments * @author A.Tselegidis - * @copyright Copyright (c) 2013 - 2015, Alex Tselegidis + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 * @link http://easyappointments.org * @since v1.0.0