| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/plats-individuels/lyon/components/com_mymaplocations/views/location/tmpl/ |
Upload File : |
<?php
/**
* @version 4.6.0
* @package com_mymaplocations
* @copyright JoomUnited (C) 2011. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* ****@author joomunited - contact@joomunited.com
*/
// no direct access
defined('_JEXEC') or die;
?>
<style type="text/css">
#locationlocator .mymap-group .mymap-success, #locationlocator #locationsearch_div .input-append .mymap-primary,#resulttop .label-important, #resulttop.badge-important,#locationsearch_div input.labelauty:checked + label{
background: none repeat scroll 0 0 <?php echo $this->globalcolor;?>;
border-color: -moz-use-text-color -moz-use-text-color <?php echo $this->globalcolor;?>;
box-shadow: 0 -2px <?php echo $this->globalcolor;?> inset;
}
.locationsearch.location_<?php echo $this->item->id; ?> .mmlmap
{
margin-right:20px;
}
.mml_address{
margin-left:<?php echo $this->width?>;
}
.mmllogo{max-width:90%;}
.changeloc
{
float:right;
max-width:180px;
}
.cmml-toolbar a,.mml-back
{
color: #1f1d22;
}
.address ul.tags li .label
{
padding: 5px 10px;
line-height: 15px;
font-size: 12px;
margin: 5px 8px 5px 0;
display: table;
font-size: 11px;
padding: 10px;
background-color: #eeeeee;
color: #444444;
cursor: pointer;
margin: 2px 2px;
border-radius: 3px 3px 3px 3px;
-moz-border-radius: 3px 3px 3px 3px;
-webkit-border-radius: 3px 3px 3px 3px;
transition: background-color 0.25s;
-moz-transition: background-color 0.25s;
-webkit-transition: background-color 0.25s;
-o-transition: background-color 0.25s;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-o-user-select: none;
float: left;
}
@media screen and (max-width: 767px) {
.mml_address{
margin-left:0px !important;
padding-left:0px;
float:left;
}
}
</style>
<?php
if ($this->item) :
$isModal = JFactory::getApplication()->input->getString('print') == 1; // 'print=1' will only be present in the url of the modal window, not in the presentation of the page
if ($isModal) {
?>
<a onclick="window.print();return false;" href="#"><span class="mml-print"></span> <?php echo JTEXT::_('JGLOBAL_PRINT'); ?> </a>
<?php }
?>
<div class="locationsearch location_<?php echo $this->item->id; ?> mainview" id="locationsearch">
<?php if (!($isModal)) { ?>
<span class="cmml-toolbar"> <a rel="nofollow" onclick="window.open(this.href,'win2','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no'); return false;" title="Print" href="index.php?option=com_mymaplocations&view=location&id=<?php echo $this->item->id; ?>&tmpl=component&print=1&page="><span class="mml-print"></span> <?php echo JTEXT::_('JGLOBAL_PRINT'); ?> </a>
</span>
<?php } ?>
<h3> <?php if(!empty($_SERVER['HTTP_REFERER'])) {?> <a class="backbtn" href="<?php echo $_SERVER['HTTP_REFERER'];?>"><span class="mml-back"></span></a><?php } ?><span itemprop="name"><?php echo $this->item->name; ?></span>
<?php if(MyMaplocationsHelper::getAllowEdit($this->item)) {?>
<a
href="<?php echo JRoute::_('index.php?option=com_mymaplocations&view=form&layout=edit&id='.$this->item->id); ?>" class="mymap mymap-inverse resultmymap"><i class="mml-edit" class="edit"></i><?php echo JTEXT::_('JACTION_EDIT'); ?></a>
<?php } ?>
</h3>
<?php
if(file_exists( JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'))
{
foreach ($this->item->jcfields as $field) : ?>
<?php
if($field->params->get('display')==1)
{
if(($field->value != ''))
{
echo FieldsHelper::render($field->context, 'field.render', array('field' => $field));
echo "<br/>";
}
}
?>
<?php endforeach;
}?>
<?php
if(@$this->item->use_category_image)
{
$categoriesModel = JCategories::getInstance('mymaplocations');
$category = ($categoriesModel->get($this->item->catid));
$catdata=json_decode($category->params);
if(@$catdata->icon)
{
$this->item->icon=$catdata->icon;
}
}
$data = $this->item->latitude . "," . $this->item->longitude;
$address = "";
$address.="<span class='locationaddress'>".stripslashes(MyMaplocationsHelper::formatAddress($this->item))."</span>";
if (!empty($this->item->hours)) {
$address.='<br/><span><i class="mml-calendar" class="calendar"></i> ' . $this->item->hours . '</span>';
}
?>
<?php
$this->item->map_layer=$this->map_layer;
$this->item->maplayer_url=$this->maplayer_url;
$items[0] = $this->item;
echo MyMaplocationsHelper::createMap($items, $this->width, $this->height, $this->viewzoom, $this->map);
?>
<div class="mml_address">
<div>
<?php if (!empty($this->item->logo)) { ?>
<img src="<?php echo $this->item->logo; ?>" itemprop="logo" class="mmllogo"/><br/>
<?php } ?>
<div class="address">
<?php
if ($this->show_locationlist == 1) {
if(!empty($this->selectLocation)) {
?>
<div class="changeloc"> <?php echo $this->selectLocation; ?>
</div>
<?php } }?>
<?php echo $address; ?>
<span class="mytool" style="float:none;">
<?php if (($this->contact_link == 1) && (!empty($this->item->contactlink))) {
?>
<br/>
<?php
echo MyMaplocationsHelper::createContactLink($this->item->contactlink, $this->target);
?>
<?php }
?>
</span>
<?php
if($this->item->tags->itemTags)
{
$c=0;
?>
<ul class="tags inline">
<?php foreach($this->item->tags->itemTags as $tag) {
?>
<li itemprop="keywords" class="tag-<?php echo $tag->id;?> tag-list<?php echo $c; ?>">
<span class="label">
<?php echo $tag->title;?>
</span>
</li>
<?php
$c++;
}?>
</ul>
<?php }
?>
</div>
</div>
<?php
if(file_exists( JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'))
{
foreach ($this->item->jcfields as $field) : ?>
<?php
if($field->params->get('display')==2)
{
if(($field->value != ''))
{
echo FieldsHelper::render($field->context, 'field.render', array('field' => $field));
echo "<br/>";
}
}
?>
<?php endforeach;
}?>
</div>
<?php if (!empty($this->item->description)) { ?>
<div class="mml_description">
<?php
$text = @JHtml::_('content.prepare', $this->item->description);
echo $text;
?>
</div>
<?php } ?>
<?php if(($this->googlereview)&&($this->item->googleapi)) {
$file='https://maps.googleapis.com/maps/api/place/details/json?placeid='.$this->item->place_id.'&key='.$this->item->googleapi;
$content="";
if (function_exists('curl_version'))
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $file);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec($curl);
curl_close($curl);
}
else if (file_get_contents(__FILE__) && ini_get('allow_url_fopen'))
{
$content = file_get_contents($file);
}
$geoloc = json_decode($content, true);
if($geoloc)
{
if(@$geoloc['result']['rating'])
{?>
<?php
$review='<div itemscope itemtype="http://schema.org/Product">
<span itemprop="name">'.$this->item->name.'</span><span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <span itemprop="ratingValue">'.$geoloc['result']['rating'].'</span> <span class="star-rating-wrap"><span style="width:'.($geoloc['result']['rating']*20).'%;" class="star-rating-size"></span></span> <span itemprop="reviewCount"><a href="'.$geoloc['result']['url'].'" target="_blank">'.@$geoloc['result']['user_ratings_total']." ". JText::_('COM_MYAMPLOCATIONS_RATING').'</a></span>
</div>';
foreach($geoloc['result']['reviews'] as $res)
{
$review.='<p>'.substr($res['text'],0,150).'-- <a href="'.$res['author_url'].'" target="_blank">'.$res['author_name'].'</a><span class="star-rating-wrap"><span style="width:'.($res['aspects'][0]['rating']*20).'%;" class="star-rating-size"></span></span></p>';
}
echo $review;
}
}
} ?>
<?php
$itemAPI = JPATH_SITE . '/components/com_itemrating/helpers/itemrating.php';
if (is_file( $itemAPI)) {
require_once $itemAPI;
$catallow=ItemratingHelper::allowCategory($this->item->catid,"com_mymaplocations");
if($catallow)
{
$itemgroup=$catallow->id;
$item=new stdClass();
$item->id=$this->item->id;
$item->introtext='';
$item->title=$this->item->name;
$item->author=JFactory::getUser($this->item->created_by)->name;
$item->created=new JDate('now');
$item->modified=new JDate('now');
$item->voteallowed=1;
$item->attribs=json_encode(array("groupdata"=>$itemgroup,'',''));
$html = ItemratingHelper::loadWidget($item,"top");
if(!$html)
{
$html = ItemratingHelper::loadWidget($item,"bottom");
}
echo $html;
}
}
?>
<?php if($this->jcomments==1) {?>
<?php
$commentsAPI = JPATH_SITE . '/components/com_jcomments/jcomments.php';
if (is_file($commentsAPI)) {
require_once($commentsAPI);
$result = JComments::show($this->item->id, 'com_mymaplocations', $this->item->name);
echo $result;
}
}
else if($this->jcomments==2)
{
$path = JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . 'bootstrap.php';
if (is_file($path)) {
$options = array( 'params' => new JRegistry(''), 'context' => 'com_mymaplocations' );
require_once($path);
$res=new stdClass();
$res->id=$this->item->id;
$res->catid=$this->item->catid;
$res->introtext=$this->item->description;
$res->text="";
$res->hits=0;
$html = Komento::commentify( 'com_mymaplocations', $res, $options );
print $html;
}
?>
<?php }?>
<?php else: ?>
<?php echo JText::_('COM_MYMAPLOCATIONS_NORESULT'); ?>
<?php endif; ?>
<?php
if(file_exists( JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'))
{
foreach ($this->item->jcfields as $field) : ?>
<?php
if($field->params->get('display')==3)
{
if(($field->value != ''))
{
echo FieldsHelper::render($field->context, 'field.render', array('field' => $field));
echo "<br/>";
}
}
?>
<?php endforeach;
}?>
<div class="clearfix"></div>
</div>