| 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/amisdesseniors-fr/dijon/components/com_mymaplocations/views/locations/ |
Upload File : |
<?php
/**
* @version 4.6.2
* @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;
jimport('joomla.application.component.view');
/**
* View class for a list of MyMaplocations.
*/
class MyMaplocationsViewlocations extends JViewLegacy {
protected $items;
protected $pagination;
protected $state;
protected $params;
/**
* Display the view
*/
public function display($tpl = null) {
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$paginations=$this->pagination->getData();
$paginationhtml="";
if(count(@$paginations->pages)>1)
{
$paginationhtml="<ul class='pagination'>";
$paginationhtml.=$this->buildNavlink($paginations->start);
$paginationhtml.=$this->buildNavlink($paginations->previous);
foreach($paginations->pages as $pagintion)
{
$paginationhtml.=$this->buildNavlink($pagintion);
}
$paginationhtml.=$this->buildNavlink($paginations->next);
$paginationhtml.=$this->buildNavlink($paginations->end);
$paginationhtml.="</ul>";
}
$doc = JFactory::getDocument();
$zipcode = $this->state->get('filter.zip');
$component=$this->state->get('filter.component');
$json_data=MyMaplocationsHelper::CreateJson($this->items,$this->state->get('filter.zip'),$component,$paginationhtml,$this->state->get('filter.lat'),$this->state->get('filter.long'));
$doc->setMimeEncoding('application/json');
echo $json_data;
die();
}
public function buildNavlink($pagintion)
{
$html="<li class='page-item'>";
if(($pagintion->active)||($pagintion->link==""))
{
$html.= "<span class=\"pagenav page-link\">" . $pagintion->text . "</span>";
}
else
{
$html.= "<a title=\"" . $pagintion->text . "\" href=\"javascript:redirectForm('" . $pagintion->link . "')\" class=\"pagenav page-link\">" . $pagintion->text . "</a>";
}
$html.="</li>";
return $html;
}
}