Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
home/lmsyaran/public_html/j3/htaccess.back/cms/html/tag.php000064400000011116151156763410017657
0ustar00<?php
/**
* @package Joomla.Libraries
* @subpackage HTML
*
* @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('JPATH_PLATFORM') or die;
use Joomla\Utilities\ArrayHelper;
/**
* Utility class for tags
*
* @since 3.1
*/
abstract class JHtmlTag
{
/**
* Cached array of the tag items.
*
* @var array
* @since 3.1
*/
protected static $items = array();
/**
* Returns an array of tags.
*
* @param array $config An array of configuration options. By default,
only
* published and unpublished categories are
returned.
*
* @return array
*
* @since 3.1
*/
public static function options($config =
array('filter.published' => array(0, 1)))
{
$hash = md5(serialize($config));
if (!isset(static::$items[$hash]))
{
$config = (array) $config;
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('a.id, a.title, a.level')
->from('#__tags AS a')
->where('a.parent_id > 0');
// Filter on the published state
if (isset($config['filter.published']))
{
if (is_numeric($config['filter.published']))
{
$query->where('a.published = ' . (int)
$config['filter.published']);
}
elseif (is_array($config['filter.published']))
{
$config['filter.published'] =
ArrayHelper::toInteger($config['filter.published']);
$query->where('a.published IN (' . implode(',',
$config['filter.published']) . ')');
}
}
// Filter on the language
if (isset($config['filter.language']))
{
if (is_string($config['filter.language']))
{
$query->where('a.language = ' .
$db->quote($config['filter.language']));
}
elseif (is_array($config['filter.language']))
{
foreach ($config['filter.language'] as &$language)
{
$language = $db->quote($language);
}
$query->where('a.language IN (' . implode(',',
$config['filter.language']) . ')');
}
}
$query->order('a.lft');
$db->setQuery($query);
$items = $db->loadObjectList();
// Assemble the list options.
static::$items[$hash] = array();
foreach ($items as &$item)
{
$repeat = ($item->level - 1 >= 0) ? $item->level - 1 : 0;
$item->title = str_repeat('- ', $repeat) .
$item->title;
static::$items[$hash][] = JHtml::_('select.option',
$item->id, $item->title);
}
}
return static::$items[$hash];
}
/**
* Returns an array of tags.
*
* @param array $config An array of configuration options. By default,
only published and unpublished tags are returned.
*
* @return array Tag data
*
* @since 3.1
*/
public static function tags($config = array('filter.published'
=> array(0, 1)))
{
$hash = md5(serialize($config));
$config = (array) $config;
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('a.id, a.title, a.level, a.parent_id')
->from('#__tags AS a')
->where('a.parent_id > 0');
// Filter on the published state
if (isset($config['filter.published']))
{
if (is_numeric($config['filter.published']))
{
$query->where('a.published = ' . (int)
$config['filter.published']);
}
elseif (is_array($config['filter.published']))
{
$config['filter.published'] =
ArrayHelper::toInteger($config['filter.published']);
$query->where('a.published IN (' . implode(',',
$config['filter.published']) . ')');
}
}
$query->order('a.lft');
$db->setQuery($query);
$items = $db->loadObjectList();
// Assemble the list options.
static::$items[$hash] = array();
foreach ($items as &$item)
{
$repeat = ($item->level - 1 >= 0) ? $item->level - 1 : 0;
$item->title = str_repeat('- ', $repeat) . $item->title;
static::$items[$hash][] = JHtml::_('select.option',
$item->id, $item->title);
}
return static::$items[$hash];
}
/**
* This is just a proxy for the formbehavior.ajaxchosen method
*
* @param string $selector DOM id of the tag field
* @param boolean $allowCustom Flag to allow custom values
*
* @return void
*
* @since 3.1
*/
public static function ajaxfield($selector = '#jform_tags',
$allowCustom = true)
{
// Get the component parameters
$params = JComponentHelper::getParams('com_tags');
$minTermLength = (int) $params->get('min_term_length', 3);
$displayData = array(
'minTermLength' => $minTermLength,
'selector' => $selector,
'allowCustom' =>
JFactory::getUser()->authorise('core.create',
'com_tags') ? $allowCustom : false,
);
JLayoutHelper::render('joomla.html.tag', $displayData);
return;
}
}
home/lmsyaran/public_html/libraries/fof/form/field/tag.php000064400000011633151157630420017674
0ustar00<?php
/**
* @package FrameworkOnFramework
* @subpackage form
* @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba
Ltd. All rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Protect from unauthorized access
defined('FOF_INCLUDED') or die;
JFormHelper::loadFieldClass('tag');
/**
* Form Field class for FOF
* Tag Fields
*
* @package FrameworkOnFramework
* @since 2.1
*/
class FOFFormFieldTag extends JFormFieldTag implements FOFFormField
{
protected $static;
protected $repeatable;
/** @var FOFTable The item being rendered in a repeatable form field */
public $item;
/** @var int A monotonically increasing number, denoting the row number in
a repeatable view */
public $rowid;
/**
* Method to get certain otherwise inaccessible properties from the form
field object.
*
* @param string $name The property name for which to the the value.
*
* @return mixed The property value or null.
*
* @since 2.0
*/
public function __get($name)
{
switch ($name)
{
case 'static':
if (empty($this->static))
{
$this->static = $this->getStatic();
}
return $this->static;
break;
case 'repeatable':
if (empty($this->repeatable))
{
$this->repeatable = $this->getRepeatable();
}
return $this->repeatable;
break;
default:
return parent::__get($name);
}
}
/**
* Method to get a list of tags
*
* @return array The field option objects.
*
* @since 3.1
*/
protected function getOptions()
{
$options = array();
$published = $this->element['published']?
$this->element['published'] : array(0,1);
$db = FOFPlatform::getInstance()->getDbo();
$query = $db->getQuery(true)
->select('DISTINCT a.id AS value, a.path, a.title AS text,
a.level, a.published, a.lft')
->from('#__tags AS a')
->join('LEFT', $db->quoteName('#__tags') .
' AS b ON a.lft > b.lft AND a.rgt < b.rgt');
if ($this->item instanceof FOFTable)
{
$item = $this->item;
}
else
{
$item = $this->form->getModel()->getItem();
}
if ($item instanceof FOFTable)
{
// Fake value for selected tags
$keyfield = $item->getKeyName();
$content_id = $item->$keyfield;
$type = $item->getContentType();
$selected_query = $db->getQuery(true);
$selected_query
->select('tag_id')
->from('#__contentitem_tag_map')
->where('content_item_id = ' . (int) $content_id)
->where('type_alias = ' . $db->quote($type));
$db->setQuery($selected_query);
$this->value = $db->loadColumn();
}
// Filter language
if (!empty($this->element['language']))
{
$query->where('a.language = ' .
$db->quote($this->element['language']));
}
$query->where($db->qn('a.lft') . ' > 0');
// Filter to only load active items
// Filter on the published state
if (is_numeric($published))
{
$query->where('a.published = ' . (int) $published);
}
elseif (is_array($published))
{
FOFUtilsArray::toInteger($published);
$query->where('a.published IN (' . implode(',',
$published) . ')');
}
$query->order('a.lft ASC');
// Get the options.
$db->setQuery($query);
try
{
$options = $db->loadObjectList();
}
catch (RuntimeException $e)
{
return false;
}
// Prepare nested data
if ($this->isNested())
{
$this->prepareOptionsNested($options);
}
else
{
$options = JHelperTags::convertPathsToNames($options);
}
return $options;
}
/**
* Get the rendering of this field type for static display, e.g. in a
single
* item view (typically a "read" task).
*
* @since 2.0
*
* @return string The field HTML
*/
public function getStatic()
{
$class = $this->element['class'] ? (string)
$this->element['class'] : '';
$translate = $this->element['translate'] ? (string)
$this->element['translate'] : false;
$options = $this->getOptions();
$html = '';
foreach ($options as $option) {
$html .= '<span>';
if ($translate == true)
{
$html .= JText::_($option->text);
}
else
{
$html .= $option->text;
}
$html .= '</span>';
}
return '<span id="' . $this->id . '"
class="' . $class . '">' .
$html .
'</span>';
}
/**
* Get the rendering of this field type for a repeatable (grid) display,
* e.g. in a view listing many item (typically a "browse" task)
*
* @since 2.1
*
* @return string The field HTML
*/
public function getRepeatable()
{
$class = $this->element['class'] ? (string)
$this->element['class'] : '';
$translate = $this->element['translate'] ? (string)
$this->element['translate'] : false;
$options = $this->getOptions();
$html = '';
foreach ($options as $option) {
$html .= '<span>';
if ($translate == true)
{
$html .= JText::_($option->text);
}
else
{
$html .= $option->text;
}
$html .= '</span>';
}
return '<span class="' . $this->id . ' ' .
$class . '">' .
$html .
'</span>';
}
}
home/lmsyaran/public_html/j3/libraries/cms/html/tag.php000064400000011116151160262770017135
0ustar00<?php
/**
* @package Joomla.Libraries
* @subpackage HTML
*
* @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('JPATH_PLATFORM') or die;
use Joomla\Utilities\ArrayHelper;
/**
* Utility class for tags
*
* @since 3.1
*/
abstract class JHtmlTag
{
/**
* Cached array of the tag items.
*
* @var array
* @since 3.1
*/
protected static $items = array();
/**
* Returns an array of tags.
*
* @param array $config An array of configuration options. By default,
only
* published and unpublished categories are
returned.
*
* @return array
*
* @since 3.1
*/
public static function options($config =
array('filter.published' => array(0, 1)))
{
$hash = md5(serialize($config));
if (!isset(static::$items[$hash]))
{
$config = (array) $config;
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('a.id, a.title, a.level')
->from('#__tags AS a')
->where('a.parent_id > 0');
// Filter on the published state
if (isset($config['filter.published']))
{
if (is_numeric($config['filter.published']))
{
$query->where('a.published = ' . (int)
$config['filter.published']);
}
elseif (is_array($config['filter.published']))
{
$config['filter.published'] =
ArrayHelper::toInteger($config['filter.published']);
$query->where('a.published IN (' . implode(',',
$config['filter.published']) . ')');
}
}
// Filter on the language
if (isset($config['filter.language']))
{
if (is_string($config['filter.language']))
{
$query->where('a.language = ' .
$db->quote($config['filter.language']));
}
elseif (is_array($config['filter.language']))
{
foreach ($config['filter.language'] as &$language)
{
$language = $db->quote($language);
}
$query->where('a.language IN (' . implode(',',
$config['filter.language']) . ')');
}
}
$query->order('a.lft');
$db->setQuery($query);
$items = $db->loadObjectList();
// Assemble the list options.
static::$items[$hash] = array();
foreach ($items as &$item)
{
$repeat = ($item->level - 1 >= 0) ? $item->level - 1 : 0;
$item->title = str_repeat('- ', $repeat) .
$item->title;
static::$items[$hash][] = JHtml::_('select.option',
$item->id, $item->title);
}
}
return static::$items[$hash];
}
/**
* Returns an array of tags.
*
* @param array $config An array of configuration options. By default,
only published and unpublished tags are returned.
*
* @return array Tag data
*
* @since 3.1
*/
public static function tags($config = array('filter.published'
=> array(0, 1)))
{
$hash = md5(serialize($config));
$config = (array) $config;
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('a.id, a.title, a.level, a.parent_id')
->from('#__tags AS a')
->where('a.parent_id > 0');
// Filter on the published state
if (isset($config['filter.published']))
{
if (is_numeric($config['filter.published']))
{
$query->where('a.published = ' . (int)
$config['filter.published']);
}
elseif (is_array($config['filter.published']))
{
$config['filter.published'] =
ArrayHelper::toInteger($config['filter.published']);
$query->where('a.published IN (' . implode(',',
$config['filter.published']) . ')');
}
}
$query->order('a.lft');
$db->setQuery($query);
$items = $db->loadObjectList();
// Assemble the list options.
static::$items[$hash] = array();
foreach ($items as &$item)
{
$repeat = ($item->level - 1 >= 0) ? $item->level - 1 : 0;
$item->title = str_repeat('- ', $repeat) . $item->title;
static::$items[$hash][] = JHtml::_('select.option',
$item->id, $item->title);
}
return static::$items[$hash];
}
/**
* This is just a proxy for the formbehavior.ajaxchosen method
*
* @param string $selector DOM id of the tag field
* @param boolean $allowCustom Flag to allow custom values
*
* @return void
*
* @since 3.1
*/
public static function ajaxfield($selector = '#jform_tags',
$allowCustom = true)
{
// Get the component parameters
$params = JComponentHelper::getParams('com_tags');
$minTermLength = (int) $params->get('min_term_length', 3);
$displayData = array(
'minTermLength' => $minTermLength,
'selector' => $selector,
'allowCustom' =>
JFactory::getUser()->authorise('core.create',
'com_tags') ? $allowCustom : false,
);
JLayoutHelper::render('joomla.html.tag', $displayData);
return;
}
}
home/lmsyaran/public_html/j3/htaccess.back/fof/form/field/tag.php000064400000011633151160371350020726
0ustar00<?php
/**
* @package FrameworkOnFramework
* @subpackage form
* @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba
Ltd. All rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
// Protect from unauthorized access
defined('FOF_INCLUDED') or die;
JFormHelper::loadFieldClass('tag');
/**
* Form Field class for FOF
* Tag Fields
*
* @package FrameworkOnFramework
* @since 2.1
*/
class FOFFormFieldTag extends JFormFieldTag implements FOFFormField
{
protected $static;
protected $repeatable;
/** @var FOFTable The item being rendered in a repeatable form field */
public $item;
/** @var int A monotonically increasing number, denoting the row number in
a repeatable view */
public $rowid;
/**
* Method to get certain otherwise inaccessible properties from the form
field object.
*
* @param string $name The property name for which to the the value.
*
* @return mixed The property value or null.
*
* @since 2.0
*/
public function __get($name)
{
switch ($name)
{
case 'static':
if (empty($this->static))
{
$this->static = $this->getStatic();
}
return $this->static;
break;
case 'repeatable':
if (empty($this->repeatable))
{
$this->repeatable = $this->getRepeatable();
}
return $this->repeatable;
break;
default:
return parent::__get($name);
}
}
/**
* Method to get a list of tags
*
* @return array The field option objects.
*
* @since 3.1
*/
protected function getOptions()
{
$options = array();
$published = $this->element['published']?
$this->element['published'] : array(0,1);
$db = FOFPlatform::getInstance()->getDbo();
$query = $db->getQuery(true)
->select('DISTINCT a.id AS value, a.path, a.title AS text,
a.level, a.published, a.lft')
->from('#__tags AS a')
->join('LEFT', $db->quoteName('#__tags') .
' AS b ON a.lft > b.lft AND a.rgt < b.rgt');
if ($this->item instanceof FOFTable)
{
$item = $this->item;
}
else
{
$item = $this->form->getModel()->getItem();
}
if ($item instanceof FOFTable)
{
// Fake value for selected tags
$keyfield = $item->getKeyName();
$content_id = $item->$keyfield;
$type = $item->getContentType();
$selected_query = $db->getQuery(true);
$selected_query
->select('tag_id')
->from('#__contentitem_tag_map')
->where('content_item_id = ' . (int) $content_id)
->where('type_alias = ' . $db->quote($type));
$db->setQuery($selected_query);
$this->value = $db->loadColumn();
}
// Filter language
if (!empty($this->element['language']))
{
$query->where('a.language = ' .
$db->quote($this->element['language']));
}
$query->where($db->qn('a.lft') . ' > 0');
// Filter to only load active items
// Filter on the published state
if (is_numeric($published))
{
$query->where('a.published = ' . (int) $published);
}
elseif (is_array($published))
{
FOFUtilsArray::toInteger($published);
$query->where('a.published IN (' . implode(',',
$published) . ')');
}
$query->order('a.lft ASC');
// Get the options.
$db->setQuery($query);
try
{
$options = $db->loadObjectList();
}
catch (RuntimeException $e)
{
return false;
}
// Prepare nested data
if ($this->isNested())
{
$this->prepareOptionsNested($options);
}
else
{
$options = JHelperTags::convertPathsToNames($options);
}
return $options;
}
/**
* Get the rendering of this field type for static display, e.g. in a
single
* item view (typically a "read" task).
*
* @since 2.0
*
* @return string The field HTML
*/
public function getStatic()
{
$class = $this->element['class'] ? (string)
$this->element['class'] : '';
$translate = $this->element['translate'] ? (string)
$this->element['translate'] : false;
$options = $this->getOptions();
$html = '';
foreach ($options as $option) {
$html .= '<span>';
if ($translate == true)
{
$html .= JText::_($option->text);
}
else
{
$html .= $option->text;
}
$html .= '</span>';
}
return '<span id="' . $this->id . '"
class="' . $class . '">' .
$html .
'</span>';
}
/**
* Get the rendering of this field type for a repeatable (grid) display,
* e.g. in a view listing many item (typically a "browse" task)
*
* @since 2.1
*
* @return string The field HTML
*/
public function getRepeatable()
{
$class = $this->element['class'] ? (string)
$this->element['class'] : '';
$translate = $this->element['translate'] ? (string)
$this->element['translate'] : false;
$options = $this->getOptions();
$html = '';
foreach ($options as $option) {
$html .= '<span>';
if ($translate == true)
{
$html .= JText::_($option->text);
}
else
{
$html .= $option->text;
}
$html .= '</span>';
}
return '<span class="' . $this->id . ' ' .
$class . '">' .
$html .
'</span>';
}
}
home/lmsyaran/public_html/libraries/cms/html/tag.php000064400000011116151161140400016603
0ustar00<?php
/**
* @package Joomla.Libraries
* @subpackage HTML
*
* @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('JPATH_PLATFORM') or die;
use Joomla\Utilities\ArrayHelper;
/**
* Utility class for tags
*
* @since 3.1
*/
abstract class JHtmlTag
{
/**
* Cached array of the tag items.
*
* @var array
* @since 3.1
*/
protected static $items = array();
/**
* Returns an array of tags.
*
* @param array $config An array of configuration options. By default,
only
* published and unpublished categories are
returned.
*
* @return array
*
* @since 3.1
*/
public static function options($config =
array('filter.published' => array(0, 1)))
{
$hash = md5(serialize($config));
if (!isset(static::$items[$hash]))
{
$config = (array) $config;
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('a.id, a.title, a.level')
->from('#__tags AS a')
->where('a.parent_id > 0');
// Filter on the published state
if (isset($config['filter.published']))
{
if (is_numeric($config['filter.published']))
{
$query->where('a.published = ' . (int)
$config['filter.published']);
}
elseif (is_array($config['filter.published']))
{
$config['filter.published'] =
ArrayHelper::toInteger($config['filter.published']);
$query->where('a.published IN (' . implode(',',
$config['filter.published']) . ')');
}
}
// Filter on the language
if (isset($config['filter.language']))
{
if (is_string($config['filter.language']))
{
$query->where('a.language = ' .
$db->quote($config['filter.language']));
}
elseif (is_array($config['filter.language']))
{
foreach ($config['filter.language'] as &$language)
{
$language = $db->quote($language);
}
$query->where('a.language IN (' . implode(',',
$config['filter.language']) . ')');
}
}
$query->order('a.lft');
$db->setQuery($query);
$items = $db->loadObjectList();
// Assemble the list options.
static::$items[$hash] = array();
foreach ($items as &$item)
{
$repeat = ($item->level - 1 >= 0) ? $item->level - 1 : 0;
$item->title = str_repeat('- ', $repeat) .
$item->title;
static::$items[$hash][] = JHtml::_('select.option',
$item->id, $item->title);
}
}
return static::$items[$hash];
}
/**
* Returns an array of tags.
*
* @param array $config An array of configuration options. By default,
only published and unpublished tags are returned.
*
* @return array Tag data
*
* @since 3.1
*/
public static function tags($config = array('filter.published'
=> array(0, 1)))
{
$hash = md5(serialize($config));
$config = (array) $config;
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('a.id, a.title, a.level, a.parent_id')
->from('#__tags AS a')
->where('a.parent_id > 0');
// Filter on the published state
if (isset($config['filter.published']))
{
if (is_numeric($config['filter.published']))
{
$query->where('a.published = ' . (int)
$config['filter.published']);
}
elseif (is_array($config['filter.published']))
{
$config['filter.published'] =
ArrayHelper::toInteger($config['filter.published']);
$query->where('a.published IN (' . implode(',',
$config['filter.published']) . ')');
}
}
$query->order('a.lft');
$db->setQuery($query);
$items = $db->loadObjectList();
// Assemble the list options.
static::$items[$hash] = array();
foreach ($items as &$item)
{
$repeat = ($item->level - 1 >= 0) ? $item->level - 1 : 0;
$item->title = str_repeat('- ', $repeat) . $item->title;
static::$items[$hash][] = JHtml::_('select.option',
$item->id, $item->title);
}
return static::$items[$hash];
}
/**
* This is just a proxy for the formbehavior.ajaxchosen method
*
* @param string $selector DOM id of the tag field
* @param boolean $allowCustom Flag to allow custom values
*
* @return void
*
* @since 3.1
*/
public static function ajaxfield($selector = '#jform_tags',
$allowCustom = true)
{
// Get the component parameters
$params = JComponentHelper::getParams('com_tags');
$minTermLength = (int) $params->get('min_term_length', 3);
$displayData = array(
'minTermLength' => $minTermLength,
'selector' => $selector,
'allowCustom' =>
JFactory::getUser()->authorise('core.create',
'com_tags') ? $allowCustom : false,
);
JLayoutHelper::render('joomla.html.tag', $displayData);
return;
}
}