uawdijnntqw1x1x1
IP : 216.73.217.126
Hostname : pluto.ca.planethoster.net
Kernel : Linux pluto.ca.planethoster.net 3.10.0-962.3.2.lve1.5.38.el7.x86_64 #1 SMP Thu Jun 18 05:28:41 EDT 2020 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
lili
/
public_html
/
plugins
/
privacy
/
..
/
fields
/
sql
/
tmpl
/
sql.php
/
/
<?php /** * @package Joomla.Plugin * @subpackage Fields.Sql * * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $value = $field->value; if ($value == '') { return; } $db = JFactory::getDbo(); $value = (array) $value; $condition = ''; foreach ($value as $v) { if (!$v) { continue; } $condition .= ', ' . $db->q($v); } $query = $fieldParams->get('query', ''); // Run the query with a having condition because it supports aliases $db->setQuery($query . ' having value in (' . trim($condition, ',') . ')'); try { $items = $db->loadObjectlist(); } catch (Exception $e) { // If the query failed, we fetch all elements $db->setQuery($query); $items = $db->loadObjectlist(); } $texts = array(); foreach ($items as $item) { if (in_array($item->value, $value)) { $texts[] = $item->text; } } echo htmlentities(implode(', ', $texts));
/home/lili/public_html/plugins/privacy/../fields/sql/tmpl/sql.php