PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.20
VikAppointments Services Booking Calendar v1.2.20
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / modules / mod_vikappointments_zip / mod_vikappointments_zip.php
vikappointments / modules / mod_vikappointments_zip Last commit date
languages 1 month ago libraries 1 month ago tmpl 1 month ago index.html 1 month ago mod_vikappointments_zip.css 1 month ago mod_vikappointments_zip.php 1 month ago mod_vikappointments_zip.xml 1 month ago vikappointments-zip-widget-block.js 1 month ago widget.php 1 month ago
mod_vikappointments_zip.php
84 lines
1 <?php
2 /**
3 * @package VikAppointments
4 * @subpackage mod_vikappointments_zip
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2023 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access to this file
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 // require autoloader
15 if (defined('JPATH_SITE') && JPATH_SITE !== 'JPATH_SITE')
16 {
17 require_once implode(DIRECTORY_SEPARATOR, array(JPATH_SITE, 'components', 'com_vikappointments', 'helpers', 'libraries', 'autoload.php'));
18 }
19
20 require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR . 'helper.php';
21
22 // backward compatibility
23
24 $options = array(
25 'version' => '1.3.2',
26 );
27
28 $vik = VAPApplication::getInstance();
29
30 /**
31 * Load CSS environment.
32 *
33 * @since 1.3.1
34 */
35 JHtml::fetch('vaphtml.assets.environment');
36
37 $vik->addStyleSheet(VAPMODULES_URI . 'mod_vikappointments_zip/mod_vikappointments_zip.css', $options);
38 $vik->addStyleSheet(VAPASSETS_URI . 'css/input-select.css');
39
40 /**
41 * Load custom CSS file.
42 *
43 * @since 1.3.1
44 */
45 JHtml::fetch('vaphtml.assets.customcss');
46
47 // since jQuery is a required dependency, the framework should be
48 // invoked even if jQuery is disabled
49 $vik->loadFramework('jquery.framework');
50
51 // load dependencies
52 JHtml::fetch('vaphtml.assets.utils');
53 JHtml::fetch('vaphtml.assets.select2');
54
55 /**
56 * Auto set CSRF token to ajaxSetup so all jQuery ajax call will contain CSRF token.
57 *
58 * @since 1.3
59 */
60 JHtml::fetch('vaphtml.sitescripts.ajaxcsrf');
61
62 // get module data
63
64 $services = VikAppointmentsZipCheckerHelper::getServices($params);
65 $employees = array();
66
67 $group = reset($services);
68
69 if ($services && $group['list'])
70 {
71 $service = $group['list'][0];
72
73 if ($service['choose_emp'])
74 {
75 $employees = VikAppointmentsZipCheckerHelper::getEmployees($service['id']);
76 }
77 }
78
79 $module_id = VikAppointmentsZipCheckerHelper::getID($module);
80
81 // load specified layout
82
83 require JModuleHelper::getLayoutPath('mod_vikappointments_zip', $params->get('layout'));
84