2021-12-16 10:37:55 +03:00
|
|
|
|
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
|
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------------
|
2023-12-31 21:46:27 +03:00
|
|
|
|
* IFLRandevu - İzmir Fen Lisesi Randevu Portalı
|
2021-12-16 10:37:55 +03:00
|
|
|
|
*
|
|
|
|
|
* @package EasyAppointments
|
|
|
|
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
2021-12-18 19:43:45 +03:00
|
|
|
|
* @copyright Copyright (c) Alex Tselegidis
|
2021-12-16 10:37:55 +03:00
|
|
|
|
* @license https://opensource.org/licenses/GPL-3.0 - GPLv3
|
|
|
|
|
* @link https://easyappointments.org
|
|
|
|
|
* @since v1.5.0
|
|
|
|
|
* ---------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Booking confirmation controller.
|
|
|
|
|
*
|
|
|
|
|
* Handles the booking confirmation related operations.
|
|
|
|
|
*
|
|
|
|
|
* @package Controllers
|
|
|
|
|
*/
|
2023-11-29 12:24:09 +03:00
|
|
|
|
class Booking_confirmation extends EA_Controller
|
|
|
|
|
{
|
2021-12-16 10:37:55 +03:00
|
|
|
|
/**
|
2022-10-03 17:04:31 +03:00
|
|
|
|
* Booking_confirmation constructor.
|
2021-12-16 10:37:55 +03:00
|
|
|
|
*/
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
parent::__construct();
|
|
|
|
|
|
|
|
|
|
$this->load->model('appointments_model');
|
|
|
|
|
$this->load->model('providers_model');
|
|
|
|
|
$this->load->model('services_model');
|
|
|
|
|
$this->load->model('customers_model');
|
2023-11-29 12:24:09 +03:00
|
|
|
|
|
2022-03-28 09:18:00 +03:00
|
|
|
|
$this->load->library('google_sync');
|
2021-12-16 10:37:55 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Display the appointment registration success page.
|
2023-11-29 12:24:09 +03:00
|
|
|
|
*
|
2023-03-13 11:06:18 +03:00
|
|
|
|
* @throws Exception
|
2021-12-16 10:37:55 +03:00
|
|
|
|
*/
|
2021-12-18 19:22:40 +03:00
|
|
|
|
public function of()
|
2021-12-16 10:37:55 +03:00
|
|
|
|
{
|
2022-01-13 13:33:46 +03:00
|
|
|
|
$appointment_hash = $this->uri->segment(3);
|
2021-12-18 19:22:40 +03:00
|
|
|
|
|
2021-12-16 10:37:55 +03:00
|
|
|
|
$occurrences = $this->appointments_model->get(['hash' => $appointment_hash]);
|
|
|
|
|
|
2023-11-29 12:24:09 +03:00
|
|
|
|
if (empty($occurrences)) {
|
2021-12-16 10:37:55 +03:00
|
|
|
|
redirect('appointments'); // The appointment does not exist.
|
2021-12-18 19:22:40 +03:00
|
|
|
|
|
2021-12-16 10:37:55 +03:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$appointment = $occurrences[0];
|
|
|
|
|
|
2023-11-29 12:24:09 +03:00
|
|
|
|
$add_to_google_url = $this->google_sync->get_add_to_google_url($appointment['id']);
|
2022-01-13 13:33:46 +03:00
|
|
|
|
|
|
|
|
|
html_vars([
|
|
|
|
|
'page_title' => lang('success'),
|
2022-06-02 10:41:30 +03:00
|
|
|
|
'company_color' => setting('company_color'),
|
2022-01-19 12:18:00 +03:00
|
|
|
|
'google_analytics_code' => setting('google_analytics_code'),
|
|
|
|
|
'matomo_analytics_url' => setting('matomo_analytics_url'),
|
2023-12-22 13:35:41 +03:00
|
|
|
|
'add_to_google_url' => $add_to_google_url,
|
2021-12-16 10:37:55 +03:00
|
|
|
|
]);
|
2022-01-13 13:33:46 +03:00
|
|
|
|
|
2022-01-19 12:21:05 +03:00
|
|
|
|
$this->load->view('pages/booking_confirmation');
|
2021-12-16 10:37:55 +03:00
|
|
|
|
}
|
|
|
|
|
}
|