Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.217.35 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/123click/assets/ |
Upload File : |
helpers/route.php 0000604 00000013551 15075174042 0010063 0 ustar 00 <?php
/**
------------------------------------------------------------------------
SOLIDRES - Accommodation booking extension for Joomla
------------------------------------------------------------------------
* @author Solidres Team <contact@solidres.com>
* @website https://www.solidres.com
* @copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved.
* @license GNU General Public License version 3, or later
------------------------------------------------------------------------
*/
defined('_JEXEC') or die;
/**
* Content Component Route Helper
*
* @static
* @package Joomla.Site
* @subpackage com_content
* @since 1.5
*/
abstract class SolidresHelperRoute
{
protected static $lookup = array();
protected static $lang_lookup = array();
public static function getReservationAssetRoute($id, $roomTypeId = null, $language = 0)
{
// view => id
$needles = array();
if (!SRPlugin::isEnabled('hub'))
{
$needles = array(
'reservationasset' => array((int) $id)
);
}
//Create the link
$link = 'index.php?option=com_solidres&view=reservationasset&id=' . $id;
if ($language && $language != "*" && JLanguageMultilang::isEnabled())
{
self::buildLanguageLookup();
if (isset(self::$lang_lookup[$language]))
{
$link .= '&lang=' . self::$lang_lookup[$language];
$needles['language'] = $language;
}
}
if ($item = self::_findItem($needles))
{
$link .= '&Itemid=' . $item;
}
if (isset($roomTypeId))
{
$link .= '#srt_' . $roomTypeId;
}
return $link;
}
public static function getRoomTypeRoute($id, $language = 0)
{
$needles = array(
'roomtype' => array((int) $id)
);
$link = 'index.php?option=com_solidres&view=roomtype&id=' . $id;
if ($language && $language != "*" && JLanguageMultilang::isEnabled())
{
self::buildLanguageLookup();
if (isset(self::$lang_lookup[$language]))
{
$link .= '&lang=' . self::$lang_lookup[$language];
$needles['language'] = $language;
}
}
if ($item = self::_findItem($needles))
{
$link .= '&Itemid=' . $item;
}
return $link;
}
protected static function buildLanguageLookup()
{
if (count(self::$lang_lookup) == 0)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('a.sef AS sef')
->select('a.lang_code AS lang_code')
->from('#__languages AS a');
$db->setQuery($query);
$langs = $db->loadObjectList();
foreach ($langs as $lang)
{
self::$lang_lookup[$lang->lang_code] = $lang->sef;
}
}
}
protected static function _findItem($needles = null)
{
$app = JFactory::getApplication();
$menus = $app->getMenu('site');
$language = isset($needles['language']) ? $needles['language'] : '*';
// Prepare the reverse lookup array.
if (!isset(self::$lookup[$language]))
{
self::$lookup[$language] = array();
$component = JComponentHelper::getComponent('com_solidres');
$attributes = array('component_id');
$values = array($component->id);
if ($language != '*')
{
$attributes[] = 'language';
$values[] = array($needles['language'], '*');
}
$items = $menus->getItems($attributes, $values);
foreach ($items as $item)
{
if (isset($item->query) && isset($item->query['view']))
{
$view = $item->query['view'];
if (!isset(self::$lookup[$language][$view]))
{
self::$lookup[$language][$view] = array();
}
if (isset($item->query['id']))
{
// here it will become a bit tricky
// language != * can override existing entries
// language == * cannot override existing entries
if (!isset(self::$lookup[$language][$view][$item->query['id']]) || $item->language != '*')
{
self::$lookup[$language][$view][$item->query['id']] = $item->id;
}
}
else
{
self::$lookup[$language][$view][0] = $item->id;
}
}
}
}
if ($needles)
{
foreach ($needles as $view => $ids)
{
if (isset(self::$lookup[$language][$view]))
{
foreach ($ids as $id)
{
if (isset(self::$lookup[$language][$view][(int) $id]))
{
return self::$lookup[$language][$view][(int) $id];
}
}
}
}
}
// If not found, return the HUB search page
$component = JComponentHelper::getComponent('com_solidres');
$attributes = array('component_id');
$values = array($component->id);
if ($language != '*')
{
$attributes[] = 'language';
$values[] = array($needles['language'], '*');
}
$items = $menus->getItems($attributes, $values);
foreach ($items as $item)
{
if ($item->query['view'] == 'search')
{
return $item->id;
}
}
// Check if the active menuitem matches the requested language
$active = $menus->getActive();
if ($active && $active->component == 'com_solidres' && ($language == '*' || in_array($active->language, array('*', $language)) || !JLanguageMultilang::isEnabled()))
{
return $active->id;
}
// If not found, return language specific home link
$default = $menus->getDefault($language);
return !empty($default->id) ? $default->id : null;
}
public static function getPartnerRoute($partnerId = null, $language = '*', $layout = 'default')
{
if (null === $partnerId)
{
$partnerId = SRUtilities::getPartnerId();
}
$partnerId = (int) $partnerId;
$needles = ['partner' => [$partnerId, 0]];
$link = 'index.php?option=com_solidres&view=partner&id=' . $partnerId;
if ($language
&& $language !== '*'
&& JLanguageMultilang::isEnabled()
)
{
self::buildLanguageLookup();
if (isset(self::$lang_lookup[$language]))
{
$link .= '&lang=' . self::$lang_lookup[$language];
$needles['language'] = $language;
}
}
if ('default' !== $layout)
{
$link .= '&layout=' . $layout;
}
if ($item = self::_findItem($needles))
{
$link .= '&Itemid=' . $item;
}
return $link;
}
}
helpers/toolbar.php 0000604 00000001112 15075174042 0010355 0 ustar 00 <?php
/**
------------------------------------------------------------------------
SOLIDRES - Accommodation booking extension for Joomla
------------------------------------------------------------------------
* @author Solidres Team <contact@solidres.com>
* @website https://www.solidres.com
* @copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved.
* @license GNU General Public License version 3, or later
------------------------------------------------------------------------
*/
defined('_JEXEC') or die;
JLoader::import('solidres.toolbar.toolbar');
helpers/category.php 0000604 00000001406 15075174042 0010536 0 ustar 00 <?php
/**
------------------------------------------------------------------------
SOLIDRES - Accommodation booking extension for Joomla
------------------------------------------------------------------------
* @author Solidres Team <contact@solidres.com>
* @website https://www.solidres.com
* @copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved.
* @license GNU General Public License version 3, or later
------------------------------------------------------------------------
*/
defined('_JEXEC') or die;
class SolidresCategories extends JCategories
{
public function __construct($options = array())
{
$options['table'] = '#__sr_reservation_assets';
$options['extension'] = 'com_solidres';
parent::__construct($options);
}
} helpers/association.php 0000604 00000002341 15075174042 0011234 0 ustar 00 <?php
/**
------------------------------------------------------------------------
SOLIDRES - Accommodation booking extension for Joomla
------------------------------------------------------------------------
* @author Solidres Team <contact@solidres.com>
* @website https://www.solidres.com
* @copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved.
* @license GNU General Public License version 3, or later
------------------------------------------------------------------------
*/
defined('_JEXEC') or die;
abstract class SolidresHelperAssociation
{
public static function getAssociations($id = 0, $view = null)
{
$jinput = JFactory::getApplication()->input;
$view = $view === null ? $jinput->get('view') : $view;
$id = empty($id) ? $jinput->getInt('id') : $id;
if ($view === 'experience'
&& SRPlugin::isEnabled('experience')
)
{
if ($id)
{
$associations = JLanguageAssociations::getAssociations('com_solidres', '#__sr_experiences', 'com_solidres.experience', $id, 'id', null, null);
$return = [];
foreach ($associations as $tag => $item)
{
$return[$tag] = SRExperienceHelper::getItemRoute($item->id);
}
return $return;
}
}
return [];
}
}
views/map/tmpl/default.php 0000604 00000005643 15075174042 0011600 0 ustar 00 <?php
/**
------------------------------------------------------------------------
SOLIDRES - Accommodation booking extension for Joomla
------------------------------------------------------------------------
* @author Solidres Team <contact@solidres.com>
* @website https://www.solidres.com
* @copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved.
* @license GNU General Public License version 3, or later
------------------------------------------------------------------------
*/
/*
* This layout file can be overridden by copying to:
*
* /templates/TEMPLATENAME/html/com_solidres/map/default.php
*
* However, occasionally we will need to update template/layout related files and it is the template developers'
* responsibility to update the overridden files (if any) to maintain full compatibility with Solidres.
*
* We do not provide support if any of the overridden files are out of date and are not compatible with Solidres.
*
* @version 2.8.0
*/
defined('_JEXEC') or die;
$doc = JFactory::getDocument();
$solidresParams = JComponentHelper::getParams('com_solidres');
$googleMapApiKey = $solidresParams->get('google_map_api_key', '');
$doc->addScript('//maps.google.com/maps/api/js' . (!empty($googleMapApiKey) ? '?key=' . $googleMapApiKey : ''));
$doc->addScriptDeclaration('
var geocoder, map;
function initialize() {
var latlng = new google.maps.LatLng("' . $this->info->lat . '", "' . $this->info->lng . '");
var options = {
zoom: 15,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("inline_map"), options);
var image = new google.maps.MarkerImage("' . SRURI_MEDIA . '/assets/images/icon-hotel-' . $this->info->rating . '.png",
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(0, 32));
var marker = new google.maps.Marker({
map: map,
position: latlng,
icon: image,
});
var windowContent = "<h4>' . $this->info->name . '</h4>" +
' . json_encode($this->info->description) . ' +
"<ul>" +
"<li>' . $this->info->address_1 . " " . $this->info->city . '</li>" +
"<li>' . $this->info->phone . '</li>" +
"<li>' . $this->info->email . '</li>" +
"<li>' . $this->info->website . '</li>" +
"</ul>";
var infowindow = new google.maps.InfoWindow({
content: windowContent,
maxWidth: 350
});
google.maps.event.addListener(marker, "click", function() {
infowindow.open(map,marker);
});
}
jQuery(document).ready(function () {
initialize();
});
');
?>
<style>
body.contentpane,
body.component-body,
div.component-content {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
body.contentpane > div:not(#system-message-container) {
height: 100%;
}
html {
width: 100%;
height: 100%;
}
</style>
<div id="inline_map"></div>
views/map/tmpl/location.php 0000604 00000006366 15075174042 0011767 0 ustar 00 <?php
/**
------------------------------------------------------------------------
SOLIDRES - Accommodation booking extension for Joomla
------------------------------------------------------------------------
* @author Solidres Team <contact@solidres.com>
* @website https://www.solidres.com
* @copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved.
* @license GNU General Public License version 3, or later
------------------------------------------------------------------------
*/
/*
* This layout file can be overridden by copying to:
*
* /templates/TEMPLATENAME/html/com_solidres/map/location.php
*
* However, occasionally we will need to update template/layout related files and it is the template developers'
* responsibility to update the overridden files (if any) to maintain full compatibility with Solidres.
*
* We do not provide support if any of the overridden files are out of date and are not compatible with Solidres.
*
* @version 2.8.0
*/
defined('_JEXEC') or die;
$doc = JFactory::getDocument();
$solidresParams = JComponentHelper::getParams('com_solidres');
$googleMapApiKey = $solidresParams->get('google_map_api_key', '');
$doc->addScript('//maps.google.com/maps/api/js' . (!empty($googleMapApiKey) ? '?key=' . $googleMapApiKey : ''));
?>
<div id="inline_location_map"></div>
<script>
Solidres.jQuery(function ($) {
var map;
var marker;
var markers = new Array();
var infowindow = new google.maps.InfoWindow({
maxWidth: 160
});
$.ajax({
url: Solidres.options.get('BaseURI') + 'index.php?option=com_solidres&task=map.getMarkers&format=json&location=<?php echo $this->location ?>',
data: {},
dataType: "json",
success: function (data) {
// Setup the different icons and shadows
var iconCounter = 0;
map = new google.maps.Map(document.getElementById('inline_location_map'), {
zoom: 10,
center: new google.maps.LatLng(-37.92, 151.25),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
for (var i = 0; i < data.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(data[i]['lat'], data[i]['lng']),
map: map,
icon: '<?php echo SRURI_MEDIA ?>/assets/images/icon-hotel-' + data[i]['rating'] + '.png'
});
markers.push(marker);
google.maps.event.addListener(marker, 'click', (function (marker, i) {
return function () {
infowindow.setContent('<h4>' + data[i]['name'] + '</h4>' +
'<p>' + data[i]['address_1'] + '</p>');
infowindow.open(map, marker);
}
})(marker, i));
}
var bounds = new google.maps.LatLngBounds();
$.each(markers, function (index, marker) {
bounds.extend(marker.position);
});
map.fitBounds(bounds);
}
});
});
</script>