| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package VikBooking |
| 4 |
* @subpackage mod_vikbooking_horizontalsearch |
| 5 |
* @author Alessio Gaggii - E4J s.r.l |
| 6 |
* @copyright Copyright (C) 2018 E4J s.r.l. All rights reserved. |
| 7 |
* @license GNU General Public License version 2 or later; see LICENSE |
| 8 |
* @link https://vikwp.com |
| 9 |
*/ |
| 10 |
|
| 11 |
// No direct access |
| 12 |
defined('ABSPATH') or die('No script kiddies please!'); |
| 13 |
|
| 14 |
require_once VBO_SITE_PATH . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'lib.vikbooking.php'; |
| 15 |
|
| 16 |
// require helper class |
| 17 |
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'helper.php'; |
| 18 |
|
| 19 |
// module main file |
| 20 |
|
| 21 |
VikBooking::loadFontAwesome(); |
| 22 |
if (method_exists('VikBooking', 'getTracker')) { |
| 23 |
// invoke the Tracker Class |
| 24 |
VikBooking::getTracker(); |
| 25 |
} |
| 26 |
if (method_exists('VikBooking', 'loadPreferredColorStyles')) { |
| 27 |
VikBooking::loadPreferredColorStyles(); |
| 28 |
} |
| 29 |
|
| 30 |
// get widget id |
| 31 |
$randid = str_replace('mod_vikbooking_horizontalsearch-', '', $params->get('widget_id', rand(1, 999))); |
| 32 |
// get widget base URL |
| 33 |
$baseurl = VBO_MODULES_URI; |
| 34 |
|
| 35 |
// module layout file |
| 36 |
require JModuleHelper::getLayoutPath('mod_vikbooking_horizontalsearch', $params->get('layout', 'default')); |
| 37 |
|