Spade

Mini Shell

Directory:~$ /home/lmsyaran/.cagefs/tmp/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/.cagefs/tmp/phpYPJCE9

PK�p�[�t�N		3add_product_to_hikashop/add_product_to_hikashop.phpnu�[���<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				fdsh 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.36
	@build			27th July, 2021
	@created		17th December, 2020
	@package		Reservation
	@subpackage		add_product_to_hikashop.php
	@author			farhad shahbazi <http://farhad.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

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

// No direct access to this file
defined('_JEXEC') or die('Restricted access');


/***[JCBGUI.class_extends.head.1.$$$$]***/

use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin;
/***[/JCBGUI$$$$]***/


/***[JCBGUI.class_extends.comment.1.$$$$]***/
/**
 * Content - Add_product_to_hikashop plugin.
 *
 * @package   Add_product_to_hikashop
 * @since     1.0.0
 *//***[/JCBGUI$$$$]***/

class PlgContentAdd_product_to_hikashop extends CMSPlugin
{
    public function onContentAfterSave($context, $table, $isNew)
    {

        if ($context != 'com_reservation.plan')
            return true;


        // file_put_contents($file_name, "data if =
".print_r($data, true) . "\n", FILE_APPEND);
        jimport( 'joomla.plugin.plugin' );
        // file_put_contents($file_name, "data !!! =
".print_r($data, true) . "\n", FILE_APPEND);


        require_once(
JPATH_ADMINISTRATOR.'/components/com_hikashop/helpers/helper.php'
);
//        require_once(
JPATH_SITE.'/components/com_reservation/helpers/reservation.php'
);
        $config = hikashop_config();
        $allowed = $config->get('allowedfiles');
        $imageHelper = hikashop_get('helper.image');

        $file_class = hikashop_get('class.file');
        $uploadPath =
$file_class->getPath('product','');
//        $params = JComponentHelper::getParams('com_moojla');
//        $courses_category =
trim($params->get('courses_category'));

//        $course = $data["course_id"];
//        $db = JFactory::getDbo();
//
//        $db = JFactory::getDbo();
//        $query = $db->getQuery(true);
//        $query->select($db->quoteName(array('id',
'summary_files')))
//            ->from($db->quoteName('#__moojla_course'))
//            ->where($db->quoteName('remoteid') . ' =
' . $db->quote($course));
//        $db->setQuery($query);
//        $moojla_course = $db->loadAssoc();

        //  New product to add to Hikashop
        $plans= [
            1 => 'مشاوره تلفنی',
            2 => 'مشاوره چت آنلاین'
        ];

//        $name = $data["course_name"];
        $plan_type= $plans[$table->get('plantype')];
        $consultant=
ReservationHelper::getConsultant($table->get('consultantid'));
        $consultant_name= $consultant->name;
        $consultant_specialty= $consultant->title;
        $name = $plan_type.' -
'.$consultant_name.'('.$consultant_specialty.')';

//        echo '<pre>';
//        var_dump($table->get('waitingtime'),
$table->get('time'));
//        echo '</pre>';
//        exit();
//        $desc = "
میباشد{$table->get('waitingtime')} برگزار
میگردد و حداکثر زمان لازم برای پاسخگویی
دکتر {$table->get('time')}این پلن به مدت
";
        $desc = "این پلن به مدت
{$table->get('time')} دقیقه برگزار میگردد و
حداکثر زمان لازم برای پاسخگویی دکتر
{$table->get('waitingtime')} ساعت میباشد";
        $cost = $table->price;
        $plan_id = $table->id;
//        $currency = $data["currency"];
        $currency = 'USD';
//        $courses_category= [$plan_type, $consultant->specialty];
//        $courses_category= [14];


        $product_class = hikashop_get('class.product');
        $element = new JObject ();
//        $element->categories = $courses_category;
        $element->related = array();
        $element->options = array();
        $element->product_name = $name;
        $element->product_description = $desc;
        $element->product_code = $plan_id;
        $element->product_published = 1;
        $element->product_min_per_order = 0;
        $element->product_max_per_order = 1;

        $db = JFactory::getDbo();
        $query = $db->getQuery(true);
       
$query->select($db->quoteName(array('category_id')));
       
$query->from($db->quoteName('#__hikashop_category'));
        $query->where($db->quoteName('category_namekey') .
' = ' . $db->quote('default_tax'));

        $db->setQuery($query);
        $tax_id = $db->loadResult();

        if ($tax_id)
        {
            $element->product_tax_id = $tax_id;

            $db = JFactory::getDbo();
            $query = $db->getQuery(true);
           
$query->select($db->quoteName(array('tax_namekey')));
           
$query->from($db->quoteName('#__hikashop_taxation'));
           
$query->where($db->quoteName('category_namekey') . ' =
' . $db->quote('default_tax'));
            $db->setQuery($query);
            $tax_namekey = $db->loadResult();

            $db = JFactory::getDbo();
            $query = $db->getQuery(true);
           
$query->select($db->quoteName(array('tax_rate')));
           
$query->from($db->quoteName('#__hikashop_tax'));
            $query->where($db->quoteName('tax_namekey') .
' = ' . $db->quote($tax_namekey));
            $db->setQuery($query);
            $tax_rate = $db->loadResult();

            $div = $tax_rate + 1;
            $price_without_tax = $cost / $div;
            $cost = $price_without_tax;
        }

        $db = JFactory::getDbo();
        $query = $db->getQuery(true);
       
$query->select($db->quoteName(array('product_id')));
       
$query->from($db->quoteName('#__hikashop_product'));
        $query->where($db->quoteName('product_code') .
' = ' . $db->quote($plan_id));
        $db->setQuery($query);
        $products = $db->loadObjectList();

        $db->setQuery($query);
        $products = $db->loadObjectList();
        // // file_put_contents($file_name, "query =
".print_r($query->__toString(), true) . "\n",
FILE_APPEND);
        // file_put_contents($file_name, "products =
".print_r($products, true) . "\n", FILE_APPEND);
        if (count ($products))
        {
            $element->product_id = current($products)->product_id;
        }



        $element->prices[0] = new JObject ();
        $element->prices[0]->price_value = $cost;

        $db = JFactory::getDbo();
        $query = $db->getQuery(true);
       
$query->select($db->quoteName(array('currency_id')));
       
$query->from($db->quoteName('#__hikashop_currency'));
        $query->where($db->quoteName('currency_code') .
' = ' . $db->quote($currency));
        $db->setQuery($query);
        $currency_id = $db->loadResult();


        $element->prices[0]->price_currency_id = $currency_id;
        $element->prices[0]->price_min_quantity = 0;
        $element->product_type = "main";
//        $quantity = intval($enrol_json['customint3']);
        $quantity = 0;
        if($quantity > 0)
            $element->product_quantity = $quantity;

        $status = $product_class->save($element);


        if ($status)
        {
            $product_class->updateCategories($element,$status);
            $product_class->updatePrices($element,$status);
        }
        
        echo '<pre>';
        var_dump($consultant);
        echo '</pre>';
        exit();

    }
}
PK�p�[��	3add_product_to_hikashop/add_product_to_hikashop.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension type="plugin" version="3.8"
group="content" method="upgrade">
	<name>PLG_CONTENT_ADD_PRODUCT_TO_HIKASHOP</name>
	<creationDate>27th July, 2021</creationDate>
	<author>farhad shahbazi</author>
	<authorEmail>farhad.shahbazi0010@gmail.com</authorEmail>
	<authorUrl>http://farhad.com</authorUrl>
	<copyright>Copyright (C) 2015. All Rights Reserved</copyright>
	<license>GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html</license>
	<version>1.0.0</version>
	<description>PLG_CONTENT_ADD_PRODUCT_TO_HIKASHOP_XML_DESCRIPTION</description>

	<!-- Language files -->
	<languages folder="language">
		<language
tag="en-GB">en-GB/en-GB.plg_content_add_product_to_hikashop.ini</language>
		<language
tag="en-GB">en-GB/en-GB.plg_content_add_product_to_hikashop.sys.ini</language>
	</languages>

	<!-- Plugin files -->
	<files>
		<filename
plugin="add_product_to_hikashop">add_product_to_hikashop.php</filename>
		<filename>index.html</filename>
		<folder>language</folder>
	</files>
</extension>PK�p�[�#o,,"add_product_to_hikashop/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�p�[�Q\\Tadd_product_to_hikashop/language/en-GB/en-GB.plg_content_add_product_to_hikashop.ininu�[���PLG_CONTENT_ADD_PRODUCT_TO_HIKASHOP="Content
- Add_product_to_hikashop"
PLG_CONTENT_ADD_PRODUCT_TO_HIKASHOP_XML_DESCRIPTION="<h1>Content
- Add_product_to_hikashop (v.1.0.0)</h1> <div style='clear:
both;'></div><p>Created by <a
href='http://farhad.com' target='_blank'>farhad
shahbazi</a><br /><small>Development started 27th July,
2021</small></p>"PK�p�[�Q\\Xadd_product_to_hikashop/language/en-GB/en-GB.plg_content_add_product_to_hikashop.sys.ininu�[���PLG_CONTENT_ADD_PRODUCT_TO_HIKASHOP="Content
- Add_product_to_hikashop"
PLG_CONTENT_ADD_PRODUCT_TO_HIKASHOP_XML_DESCRIPTION="<h1>Content
- Add_product_to_hikashop (v.1.0.0)</h1> <div style='clear:
both;'></div><p>Created by <a
href='http://farhad.com' target='_blank'>farhad
shahbazi</a><br /><small>Development started 27th July,
2021</small></p>"PK�p�[�#o,,1add_product_to_hikashop/language/en-GB/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�p�[�#o,,+add_product_to_hikashop/language/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�p�[V�����!confirmconsent/confirmconsent.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.confirmconsent
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;

/**
 * The Joomla Core confirm consent plugin
 *
 * @since  3.9.0
 */
class PlgContentConfirmConsent extends CMSPlugin
{
	/**
	 * The Application object
	 *
	 * @var    JApplicationSite
	 * @since  3.9.0
	 */
	protected $app;

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

	/**
	 * The supported form contexts
	 *
	 * @var    array
	 * @since  3.9.0
	 */
	protected $supportedContext = array(
		'com_contact.contact',
		'com_mailto.mailto',
		'com_privacy.request',
	);

	/**
	 * Add additional fields to the supported forms
	 *
	 * @param   JForm  $form  The form to be altered.
	 * @param   mixed  $data  The associated data for the form.
	 *
	 * @return  boolean
	 *
	 * @since   3.9.0
	 */
	public function onContentPrepareForm(JForm $form, $data)
	{
		if ($this->app->isClient('administrator') ||
!in_array($form->getName(), $this->supportedContext))
		{
			return true;
		}

		// Get the consent box Text & the selected privacyarticle
		$consentboxText  = (string)
$this->params->get('consentbox_text',
Text::_('PLG_CONTENT_CONFIRMCONSENT_FIELD_NOTE_DEFAULT'));
		$privacyArticle  = $this->params->get('privacy_article',
false);

		$form->load('
			<form>
				<fieldset name="default"
addfieldpath="/plugins/content/confirmconsent/fields">
					<field
						name="consentbox"
						type="consentbox"
						articleid="' . $privacyArticle . '"
						label="PLG_CONTENT_CONFIRMCONSENT_CONSENTBOX_LABEL"
						required="true"
						>
						<option value="0">' .
htmlspecialchars($consentboxText, ENT_COMPAT, 'UTF-8') .
'</option>
					</field>
				</fieldset>
			</form>'
		);

		return true;
	}
}
PK�p�[�]o�XX!confirmconsent/confirmconsent.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension version="3.9" type="plugin"
group="content" method="upgrade">
	<name>plg_content_confirmconsent</name>
	<author>Joomla! Project</author>
	<creationDate>May 2018</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</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_CONTENT_CONFIRMCONSENT_XML_DESCRIPTION</description>
	<files>
		<filename
plugin="confirmconsent">confirmconsent.php</filename>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_content_confirmconsent.ini</language>
		<language
tag="en-GB">en-GB.plg_content_confirmconsent.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic"
addfieldpath="/administrator/components/com_content/models/fields">
				<field
					name="consentbox_text"
					type="textarea"
					label="PLG_CONTENT_CONFIRMCONSENT_FIELD_NOTE_LABEL"
					description="PLG_CONTENT_CONFIRMCONSENT_FIELD_NOTE_DESC"
					hint="PLG_CONTENT_CONFIRMCONSENT_FIELD_NOTE_DEFAULT"
					class="span12"
					rows="7"
					cols="20"
					filter="html"
				/>

				<field
					name="privacy_article"
					type="modal_article"
					label="PLG_CONTENT_CONFIRMCONSENT_FIELD_ARTICLE_LABEL"
					description="PLG_CONTENT_CONFIRMCONSENT_FIELD_ARTICLE_DESC"
					select="true"
					new="true"
					edit="true"
					clear="true"
					filter="integer"
				/>
			</fieldset>
		</fields>
	</config>
</extension>
PK�p�[�O��$confirmconsent/fields/consentbox.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.confirmconsent
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('JPATH_PLATFORM') or die;

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

JFormHelper::loadFieldClass('Checkboxes');

/**
 * Consentbox Field class for the Confirm Consent Plugin.
 *
 * @since  3.9.1
 */
class JFormFieldConsentBox extends JFormFieldCheckboxes
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.9.1
	 */
	protected $type = 'ConsentBox';

	/**
	 * Flag to tell the field to always be in multiple values mode.
	 *
	 * @var    boolean
	 * @since  3.9.1
	 */
	protected $forceMultiple = false;

	/**
	 * The article ID.
	 *
	 * @var    integer
	 * @since  3.9.1
	 */
	protected $articleid;

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.9.1
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'articleid':
				$this->articleid = (int) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.9.1
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'articleid':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.9.1
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->articleid = (int) $this->element['articleid'];
		}

		return $return;
	}

	/**
	 * Method to get the field label markup.
	 *
	 * @return  string  The field label markup.
	 *
	 * @since   3.9.1
	 */
	protected function getLabel()
	{
		if ($this->hidden)
		{
			return '';
		}

		$data = $this->getLayoutData();

		// Forcing the Alias field to display the tip below
		$position = $this->element['name'] == 'alias' ?
' data-placement="bottom" ' : '';

		// When we have an article let's add the modal and make the title
clickable
		if ($data['articleid'])
		{
			$attribs['data-toggle'] = 'modal';

			$data['label'] = HTMLHelper::_(
				'link',
				'#modal-' . $this->id,
				$data['label'],
				$attribs
			);
		}

		// Here mainly for B/C with old layouts. This can be done in the layouts
directly
		$extraData = array(
			'text'     => $data['label'],
			'for'      => $this->id,
			'classes'  => explode(' ',
$data['labelclass']),
			'position' => $position,
		);

		return
$this->getRenderer($this->renderLabelLayout)->render(array_merge($data,
$extraData));
	}

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   3.9.2
	 */
	protected function getInput()
	{
		$modalHtml  = '';
		$layoutData = $this->getLayoutData();

		if ($this->articleid)
		{
			$modalParams['title']  = $layoutData['label'];
			$modalParams['url']    = $this->getAssignedArticleUrl();
			$modalParams['height'] = 800;
			$modalParams['width']  = '100%';
			$modalHtml = HTMLHelper::_('bootstrap.renderModal',
'modal-' . $this->id, $modalParams);
		}

		return $modalHtml . parent::getInput();
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since   3.9.1
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		$extraData = array(
			'articleid' => (integer) $this->articleid,
		);

		return array_merge($data, $extraData);
	}

	/**
	 * Return the url of the assigned article based on the current user
language
	 *
	 * @return  string  Returns the link to the article
	 *
	 * @since   3.9.1
	 */
	private function getAssignedArticleUrl()
	{
		$db = Factory::getDbo();

		// Get the info from the article
		$query = $db->getQuery(true)
			->select($db->quoteName(array('id', 'catid',
'language')))
			->from($db->quoteName('#__content'))
			->where($db->quoteName('id') . ' = ' . (int)
$this->articleid);
		$db->setQuery($query);

		try
		{
			$article = $db->loadObject();
		}
		catch (JDatabaseExceptionExecuting $e)
		{
			// Something at the database layer went wrong
			return Route::_(
				'index.php?option=com_content&view=article&id='
				. $this->articleid . '&tmpl=component'
			);
		}

		if (!is_object($article))
		{
			// We have not found the article object lets show a 404 to the user
			return Route::_(
				'index.php?option=com_content&view=article&id='
				. $this->articleid . '&tmpl=component'
			);
		}

		// Register ContentHelperRoute
		JLoader::register('ContentHelperRoute', JPATH_BASE .
'/components/com_content/helpers/route.php');

		if (!Associations::isEnabled())
		{
			return Route::_(
				ContentHelperRoute::getArticleRoute(
					$article->id,
					$article->catid,
					$article->language
				) . '&tmpl=component'
			);
		}

		$associatedArticles =
Associations::getAssociations('com_content',
'#__content', 'com_content.item', $article->id);
		$currentLang        = Factory::getLanguage()->getTag();

		if (isset($associatedArticles) && $currentLang !==
$article->language && array_key_exists($currentLang,
$associatedArticles))
		{
			return Route::_(
				ContentHelperRoute::getArticleRoute(
					$associatedArticles[$currentLang]->id,
					$associatedArticles[$currentLang]->catid,
					$associatedArticles[$currentLang]->language
				) . '&tmpl=component'
			);
		}

		// Association is enabled but this article is not associated
		return Route::_(
			'index.php?option=com_content&view=article&id='
				. $article->id . '&catid=' . $article->catid
				. '&tmpl=component&lang=' . $article->language
		);
	}
}
PK�p�[<c

contact/contact.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.Contact
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

/**
 * Contact Plugin
 *
 * @since  3.2
 */
class PlgContentContact extends JPlugin
{
	/**
	 * Database object
	 *
	 * @var    JDatabaseDriver
	 * @since  3.3
	 */
	protected $db;

	/**
	 * 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, &$row, $params, $page = 0)
	{
		$allowed_contexts = array('com_content.category',
'com_content.article', 'com_content.featured');

		if (!in_array($context, $allowed_contexts))
		{
			return true;
		}

		// Return if we don't have valid params or don't link the
author
		if (!($params instanceof Registry) ||
!$params->get('link_author'))
		{
			return true;
		}

		// Return if an alias is used
		if ((int) $this->params->get('link_to_alias', 0) === 0
&& $row->created_by_alias != '')
		{
			return true;
		}

		// Return if we don't have a valid article id
		if (!isset($row->id) || !(int) $row->id)
		{
			return true;
		}

		$contact        = $this->getContactData($row->created_by);
		$row->contactid = $contact->contactid;
		$row->webpage   = $contact->webpage;
		$row->email     = $contact->email_to;
		$url            = $this->params->get('url',
'url');

		if ($row->contactid && $url === 'url')
		{
			JLoader::register('ContactHelperRoute', JPATH_SITE .
'/components/com_contact/helpers/route.php');
			$row->contact_link =
JRoute::_(ContactHelperRoute::getContactRoute($contact->contactid .
':' . $contact->alias, $contact->catid));
		}
		elseif ($row->webpage && $url === 'webpage')
		{
			$row->contact_link = $row->webpage;
		}
		elseif ($row->email && $url === 'email')
		{
			$row->contact_link = 'mailto:' . $row->email;
		}
		else
		{
			$row->contact_link = '';
		}

		return true;
	}

	/**
	 * Retrieve Contact
	 *
	 * @param   int  $userId  Id of the user who created the article
	 *
	 * @return  mixed|null|integer
	 */
	protected function getContactData($userId)
	{
		static $contacts = array();

		if (isset($contacts[$userId]))
		{
			return $contacts[$userId];
		}

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

		$query->select('MAX(contact.id) AS contactid, contact.alias,
contact.catid, contact.webpage, contact.email_to');
		$query->from($this->db->quoteName('#__contact_details',
'contact'));
		$query->where('contact.published = 1');
		$query->where('contact.user_id = ' . (int) $userId);

		if (JLanguageMultilang::isEnabled() === true)
		{
			$query->where('(contact.language in '
				. '(' .
$this->db->quote(JFactory::getLanguage()->getTag()) .
',' . $this->db->quote('*') . ') '
				. ' OR contact.language IS NULL)');
		}

		$this->db->setQuery($query);

		$contacts[$userId] = $this->db->loadObject();

		return $contacts[$userId];
	}
}
PK�p�[�k����contact/contact.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension version="3.2" type="plugin"
group="content" method="upgrade">
	<name>plg_content_contact</name>
	<author>Joomla! Project</author>
	<creationDate>January 2014</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</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.2.2</version>
	<description>PLG_CONTENT_CONTACT_XML_DESCRIPTION</description>
	<files>
		<filename plugin="contact">contact.php</filename>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_content_contact.ini</language>
		<language
tag="en-GB">en-GB.plg_content_contact.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="url"
					type="list"
					label="PLG_CONTENT_CONTACT_PARAM_URL_LABEL"
					description="PLG_CONTENT_CONTACT_PARAM_URL_DESCRIPTION"
					default="url"
					>
					<option
value="url">PLG_CONTENT_CONTACT_PARAM_URL_URL</option>
					<option
value="webpage">PLG_CONTENT_CONTACT_PARAM_URL_WEBPAGE</option>
					<option
value="email">PLG_CONTENT_CONTACT_PARAM_URL_EMAIL</option>
				</field>

				<field
					name="link_to_alias"
					type="radio"
					label="PLG_CONTENT_CONTACT_PARAM_ALIAS_LABEL"
					description="PLG_CONTENT_CONTACT_PARAM_ALIAS_DESCRIPTION"
					default="0"
					class="btn-group btn-group-yesno"
					filter="integer"
					>
					<option value="0">JNO</option>
					<option value="1">JYES</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
PK�p�[
��2;;$course_progress/tmpl/assets/step.cssnu�[���.moojla-progress-wrapper
{
    background-color: brown;
}PK�p�[�"�&��
course_progress/tmpl/default.phpnu�[���<div
class="moojla-progress-wrapper">
    <div class="title">
        <i class="fas fa-spinner"></i>
        <span>درصد پیشرفت درس</span>
        <span> : <?=
floor($percentages['percentage']);?>%</span>
    </div>
    <div class="moojla-progress">
        <span class="moojla-progress-bar" style="width:
<?=
floor($percentages['percentage']);?>%"></span>
    </div>
</div>
<style>
    .moojla-progress-wrapper .title{
        margin-bottom: 15px;
        display: flex;
    }
    .moojla-progress-wrapper .title i{
        font-size: 1.7rem;
        padding-left: 15px;
        color: #a5afbb;
    }
    .moojla-progress-wrapper .title span{
        align-self: center;
    }
    .moojla-progress-wrapper
    {
        background: white;
        border: 1px solid #e6e6e6;
        border-radius: 5px;
        box-shadow: 2px 0px 5px #e5e5e5;
        font-weight: 100;
        font-size: 0.9rem;
        padding: 8px;
        margin: 20px 0px;
        margin-right: 0px;
    }
    .moojla-progress {
        width: 100%;
        max-width: 260px;
        height: 9px;
        background: #e1e4e8;
        border-radius: 3px;
        overflow: hidden;
    }

    .moojla-progress-bar {
        display: block;
        height: 100%;
        background: linear-gradient(90deg, #ffd33d, #ea4aaa 17%, #b34bff
34%, #01feff 51%, #ffd33d 68%, #ea4aaa 85%, #b34bff);
        background-size: 300% 100%;
        animation: progress-animation 20s linear infinite;
    }

    @keyframes progress-animation {
    0%
    {
        background-position: 0%;
    }
    100%
    {
        background-position: 100%;
    }
    }
</style>PK�p�[�ׇ��course_progress/tmpl/step.phpnu�[���<?php
	$document = JFactory::getDocument();
	$document->addStyleSheet('/plugins/content/course_progress/tmpl/assets/step.css');
?>

<div class="moojla-progress-wrapper">
    <h5 class="title">
        <!-- <i class="fas fa-spinner"></i>
-->
        <span>درصد پیشرفت درس</span>
     
    </h5>
    <div class="moojla-progress">
        <span class="moojla-progress-bar" style="width:
<?=
floor($percentages['percentage']);?>%"></span>
    </div>
    <span class="progress-number"><?=
floor($percentages['percentage']);?>%</span>
</div>
<style>
    .moojla-progress-wrapper .title{
        margin-bottom: 15px;
        margin-right:10px;
        display: flex;
    }

    .moojla-progress-wrapper .progress-number{
        color: #069c35;
        text-align: center;
        display: block;
        padding-top: 10px;
        font-size: 20px;
        font-family: cursive;
    }

    .moojla-progress-wrapper .title i{
        font-size: 1.7rem;
        padding-left: 15px;
        color: #a5afbb;
    }
    .moojla-progress-wrapper .title span{
        align-self: center;
    }
    .moojla-progress-wrapper
    {
        background: white;
        border: 1px solid #ebeef1;
        border-radius: 5px;
        box-shadow: 0px 0px 13px 1px rgb(70 72 77 / 8%);
        font-weight: 100;
        font-size: 0.9rem;
        padding: 8px;
        margin: 20px 0px;
        margin-right: 0px;
    }
    .moojla-progress {
        width: 95%;
        max-width: 100%;
        height: 11px;
        background: #dce5e8;
        border-radius: 25px;
        overflow: hidden;
        border: 1px solid #ebebeb;
    }

    .moojla-progress-bar {
        display: block;
        height: 100%;
        background: linear-gradient( 
    -45deg,#4cca73 19%,#1fbd50 25%,#1fbd50 50%,#4cca73 50%,#4cca73
75%,#1fbd50 75%,#1fbd50);
        background-size: 1rem 1rem;
        animation: progress-animation 10s linear infinite;
        border-radius: 25px;
    }

    @keyframes progress-animation {
    0%
    {
        background-position: 105%;
    }
    100%
    {
        background-position: 0%;
    }
    }
</style>PK�p�[]U��
E
Eemailcloak/emailcloak.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.emailcloak
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\String\StringHelper;

/**
 * Email cloack plugin class.
 *
 * @since  1.5
 */
class PlgContentEmailcloak extends JPlugin
{
	/**
	 * Plugin that cloaks all emails in content from spambots via Javascript.
	 *
	 * @param   string   $context  The context of the content being passed to
the plugin.
	 * @param   mixed    &$row     An object with a "text"
property or the string to be cloaked.
	 * @param   mixed    &$params  Additional parameters. See {@see
PlgContentEmailcloak()}.
	 * @param   integer  $page     Optional page number. Unused. Defaults to
zero.
	 *
	 * @return  boolean	True on success.
	 */
	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 (is_object($row))
		{
			return $this->_cloak($row->text, $params);
		}

		return $this->_cloak($row, $params);
	}

	/**
	 * Generate a search pattern based on link and text.
	 *
	 * @param   string  $link  The target of an email link.
	 * @param   string  $text  The text enclosed by the link.
	 *
	 * @return  string	A regular expression that matches a link containing the
parameters.
	 */
	protected function _getPattern ($link, $text)
	{
		$pattern = '~(?:<a ([^>]*)href\s*=\s*"mailto:' .
$link . '"([^>]*))>' . $text .
'</a>~i';

		return $pattern;
	}

	/**
	 * Adds an attributes to the js cloaked email.
	 *
	 * @param   string  $jsEmail  Js cloaked email.
	 * @param   string  $before   Attributes before email.
	 * @param   string  $after    Attributes after email.
	 *
	 * @return string Js cloaked email with attributes.
	 */
	protected function _addAttributesToEmail($jsEmail, $before, $after)
	{
		if ($before !== '')
		{
			$before = str_replace("'", "\'", $before);
			$jsEmail = str_replace(".innerHTML += '<a '",
".innerHTML += '<a {$before}'", $jsEmail);
		}

		if ($after !== '')
		{
			$after = str_replace("'", "\'", $after);
			$jsEmail = str_replace("'\'>'",
"'\'{$after}>'", $jsEmail);
		}

		return $jsEmail;
	}

	/**
	 * Cloak all emails in text from spambots via Javascript.
	 *
	 * @param   string  &$text    The string to be cloaked.
	 * @param   mixed   &$params  Additional parameters. Parameter
"mode" (integer, default 1)
	 *                             replaces addresses with "mailto:"
links if nonzero.
	 *
	 * @return  boolean  True on success.
	 */
	protected function _cloak(&$text, &$params)
	{
		/*
		 * Check for presence of {emailcloak=off} which is explicits disables
this
		 * bot for the item.
		 */
		if (StringHelper::strpos($text, '{emailcloak=off}') !== false)
		{
			$text = StringHelper::str_ireplace('{emailcloak=off}',
'', $text);

			return true;
		}

		// Simple performance check to determine whether bot should process
further.
		if (StringHelper::strpos($text, '@') === false)
		{
			return true;
		}

		$mode = $this->params->def('mode', 1);

		// Example: any@example.org
		$searchEmail =
'([\w\.\'\-\+]+\@(?:[a-z0-9\.\-]+\.)+(?:[a-zA-Z0-9\-]{2,10}))';

		// Example: any@example.org?subject=anyText
		$searchEmailLink = $searchEmail .
'([?&][\x20-\x7f][^"<>]+)';

		// Any Text
		$searchText =
'((?:[\x20-\x7f]|[\xA1-\xFF]|[\xC2-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF4][\x80-\xBF]{3})[^<>]+)';

		// Any Image link
		$searchImage = '(<img[^>]+>)';

		// Any Text with <span or <strong
		$searchTextSpan =
'(<span[^>]+>|<span>|<strong>|<strong><span[^>]+>|<strong><span>)'
. $searchText .
'(</span>|</strong>|</span></strong>)';

		// Any address with <span or <strong
		$searchEmailSpan =
'(<span[^>]+>|<span>|<strong>|<strong><span[^>]+>|<strong><span>)'
. $searchEmail .
'(</span>|</strong>|</span></strong>)';

		/*
		 * Search and fix derivatives of link code <a
href="http://mce_host/ourdirectory/email@example.org"
		 * >email@example.org</a>. This happens when inserting an email
in TinyMCE, cancelling its suggestion to add
		 * the mailto: prefix...
		 */
		$pattern = $this->_getPattern($searchEmail, $searchEmail);
		$pattern = str_replace('"mailto:',
'"http://mce_host([\x20-\x7f][^<>]+/)', $pattern);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[3][0];
			$mailText = $regs[5][0];

			// Check to see if mail text is different from mail addy
			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement = $this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[4][0]);

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search and fix derivatives of link code <a
href="http://mce_host/ourdirectory/email@example.org"
		 * >anytext</a>. This happens when inserting an email in
TinyMCE, cancelling its suggestion to add
		 * the mailto: prefix...
		 */
		$pattern = $this->_getPattern($searchEmail, $searchText);
		$pattern = str_replace('"mailto:',
'"http://mce_host([\x20-\x7f][^<>]+/)', $pattern);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[3][0];
			$mailText = $regs[5][0];

			// Check to see if mail text is different from mail addy
			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText, 0);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement = $this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[4][0]);

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code <a
href="mailto:email@example.org"
		 * >email@example.org</a>
		 */
		$pattern = $this->_getPattern($searchEmail, $searchEmail);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[2][0];
			$mailText = $regs[4][0];

			// Check to see if mail text is different from mail addy
			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement = $this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[3][0]);

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code <a
href="mailto:email@amail.com"
		 * ><anyspan >email@amail.com</anyspan></a>
		 */
		$pattern = $this->_getPattern($searchEmail, $searchEmailSpan);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[2][0];
			$mailText = $regs[4][0] . $regs[5][0] . $regs[6][0];

			// Check to see if mail text is different from mail addy
			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement =
html_entity_decode($this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[3][0]));

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code <a
href="mailto:email@amail.com">
		 * <anyspan >anytext</anyspan></a>
		 */
		$pattern = $this->_getPattern($searchEmail, $searchTextSpan);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[2][0];
			$mailText = $regs[4][0] . addslashes($regs[5][0]) . $regs[6][0];

			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText, 0);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement =
html_entity_decode($this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[3][0]));

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code <a
href="mailto:email@example.org">
		 * anytext</a>
		 */
		$pattern = $this->_getPattern($searchEmail, $searchText);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[2][0];
			$mailText = addslashes($regs[4][0]);

			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText, 0);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement = $this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[3][0]);

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code <a
href="mailto:email@example.org">
		 * <img anything></a>
		 */
		$pattern = $this->_getPattern($searchEmail, $searchImage);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[2][0];
			$mailText = $regs[4][0];

			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText, 0);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement =
html_entity_decode($this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[3][0]));

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code <a
href="mailto:email@example.org">
		 * <img anything>email@example.org</a>
		 */
		$pattern = $this->_getPattern($searchEmail, $searchImage .
$searchEmail);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[2][0];
			$mailText = $regs[4][0] . $regs[5][0];

			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement =
html_entity_decode($this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[3][0]));

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code <a
href="mailto:email@example.org">
		 * <img anything>any text</a>
		 */
		$pattern = $this->_getPattern($searchEmail, $searchImage .
$searchText);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[2][0];
			$mailText = $regs[4][0] . addslashes($regs[5][0]);

			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText, 0);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement =
html_entity_decode($this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[3][0]));

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code <a
href="mailto:email@example.org?
		 * subject=Text">email@example.org</a>
		 */
		$pattern = $this->_getPattern($searchEmailLink, $searchEmail);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[2][0] . $regs[3][0];
			$mailText = $regs[5][0];

			// Needed for handling of Body parameter
			$mail = str_replace('&amp;', '&', $mail);

			// Check to see if mail text is different from mail addy
			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement = $this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[4][0]);

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code <a
href="mailto:email@example.org?
		 * subject=Text">anytext</a>
		 */
		$pattern = $this->_getPattern($searchEmailLink, $searchText);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[2][0] . $regs[3][0];
			$mailText = addslashes($regs[5][0]);

			// Needed for handling of Body parameter
			$mail = str_replace('&amp;', '&', $mail);

			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText, 0);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement = $this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[4][0]);

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code <a
href="mailto:email@amail.com?subject= Text"
		 * ><anyspan >email@amail.com</anyspan></a>
		 */
		$pattern = $this->_getPattern($searchEmailLink, $searchEmailSpan);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[2][0] . $regs[3][0];
			$mailText = $regs[5][0] . $regs[6][0] . $regs[7][0];

			// Check to see if mail text is different from mail addy
			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement =
html_entity_decode($this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[4][0]));

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code <a
href="mailto:email@amail.com?subject= Text">
		 * <anyspan >anytext</anyspan></a>
		 */
		$pattern = $this->_getPattern($searchEmailLink, $searchTextSpan);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[2][0] . $regs[3][0];
			$mailText = $regs[5][0] . addslashes($regs[6][0]) . $regs[7][0];

			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText, 0);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement =
html_entity_decode($this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[4][0]));

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code
		 * <a href="mailto:email@amail.com?subject=Text"><img
anything></a>
		 */
		$pattern = $this->_getPattern($searchEmailLink, $searchImage);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[1][0] . $regs[2][0] . $regs[3][0];
			$mailText = $regs[5][0];

			// Needed for handling of Body parameter
			$mail = str_replace('&amp;', '&', $mail);

			// Check to see if mail text is different from mail addy
			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText, 0);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement =
html_entity_decode($this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[4][0]));

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code
		 * <a href="mailto:email@amail.com?subject=Text"><img
anything>email@amail.com</a>
		 */
		$pattern = $this->_getPattern($searchEmailLink, $searchImage .
$searchEmail);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[1][0] . $regs[2][0] . $regs[3][0];
			$mailText = $regs[4][0] . $regs[5][0] . $regs[6][0];

			// Needed for handling of Body parameter
			$mail = str_replace('&amp;', '&', $mail);

			// Check to see if mail text is different from mail addy
			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement =
html_entity_decode($this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[4][0]));

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for derivatives of link code
		 * <a href="mailto:email@amail.com?subject=Text"><img
anything>any text</a>
		 */
		$pattern = $this->_getPattern($searchEmailLink, $searchImage .
$searchText);

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[1][0] . $regs[2][0] . $regs[3][0];
			$mailText = $regs[4][0] . $regs[5][0] . addslashes($regs[6][0]);

			// Needed for handling of Body parameter
			$mail = str_replace('&amp;', '&', $mail);

			// Check to see if mail text is different from mail addy
			$replacement = JHtml::_('email.cloak', $mail, $mode,
$mailText, 0);

			// Ensure that attributes is not stripped out by email cloaking
			$replacement =
html_entity_decode($this->_addAttributesToEmail($replacement,
$regs[1][0], $regs[4][0]));

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[0][1],
strlen($regs[0][0]));
		}

		/*
		 * Search for plain text email addresses, such as email@example.org but
not within HTML tags:
		 * <img src="..." title="email@example.org"> or
<input type="text"
placeholder="email@example.org">
		 * The '<[^<]*>(*SKIP)(*F)|' trick is used to exclude
this kind of occurrences
		 */
		$pattern = '~<[^<]*>(*SKIP)(*F)|' . $searchEmail .
'~i';

		while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE))
		{
			$mail = $regs[1][0];
			$replacement = JHtml::_('email.cloak', $mail, $mode);

			// Replace the found address with the js cloaked email
			$text = substr_replace($text, $replacement, $regs[1][1], strlen($mail));
		}

		return true;
	}
}
PK�p�[�]����emailcloak/emailcloak.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin"
group="content" method="upgrade">
	<name>plg_content_emailcloak</name>
	<author>Joomla! Project</author>
	<creationDate>November 2005</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</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_EMAILCLOAK_XML_DESCRIPTION</description>
	<files>
		<filename
plugin="emailcloak">emailcloak.php</filename>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_content_emailcloak.ini</language>
		<language
tag="en-GB">en-GB.plg_content_emailcloak.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="mode"
					type="list"
					label="PLG_CONTENT_EMAILCLOAK_MODE_LABEL"
					description="PLG_CONTENT_EMAILCLOAK_MODE_DESC"
					default="1"
					filter="integer"
					>
					<option
value="0">PLG_CONTENT_EMAILCLOAK_NONLINKABLE</option>
					<option
value="1">PLG_CONTENT_EMAILCLOAK_LINKABLE</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
PK�p�[�d8mmfields/fields.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.Fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die();

/**
 * 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�p�[4�T���fields/fields.xmlnu�[���<?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>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</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�p�[�R����finder/finder.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.finder
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Smart Search Content Plugin
 *
 * @since  2.5
 */
class PlgContentFinder extends JPlugin
{
	/**
	 * Smart Search after save content method.
	 * Content 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   bool    $isNew    If the content has just been created
	 *
	 * @return  void
	 *
	 * @since   2.5
	 */
	public function onContentAfterSave($context, $article, $isNew)
	{
		$dispatcher = JEventDispatcher::getInstance();
		JPluginHelper::importPlugin('finder');

		// Trigger the onFinderAfterSave event.
		$dispatcher->trigger('onFinderAfterSave', array($context,
$article, $isNew));
	}

	/**
	 * Smart Search before save content method.
	 * Content is passed by reference. Method is called before 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   bool    $isNew    If the content is just about to be created.
	 *
	 * @return  void
	 *
	 * @since   2.5
	 */
	public function onContentBeforeSave($context, $article, $isNew)
	{
		$dispatcher = JEventDispatcher::getInstance();
		JPluginHelper::importPlugin('finder');

		// Trigger the onFinderBeforeSave event.
		$dispatcher->trigger('onFinderBeforeSave', array($context,
$article, $isNew));
	}

	/**
	 * Smart Search after delete content method.
	 * Content is passed by reference, but after the deletion.
	 *
	 * @param   string  $context  The context of the content passed to the
plugin (added in 1.6).
	 * @param   object  $article  A JTableContent object.
	 *
	 * @return  void
	 *
	 * @since   2.5
	 */
	public function onContentAfterDelete($context, $article)
	{
		$dispatcher = JEventDispatcher::getInstance();
		JPluginHelper::importPlugin('finder');

		// Trigger the onFinderAfterDelete event.
		$dispatcher->trigger('onFinderAfterDelete', array($context,
$article));
	}

	/**
	 * Smart Search content state change method.
	 * Method to update the link information for items that have been changed
	 * from outside the edit screen. This is fired when the item is published,
	 * unpublished, archived, or unarchived from the list view.
	 *
	 * @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  void
	 *
	 * @since   2.5
	 */
	public function onContentChangeState($context, $pks, $value)
	{
		$dispatcher = JEventDispatcher::getInstance();
		JPluginHelper::importPlugin('finder');

		// Trigger the onFinderChangeState event.
		$dispatcher->trigger('onFinderChangeState', array($context,
$pks, $value));
	}

	/**
	 * Smart Search change category state content method.
	 * Method is called when the state of the category to which the
	 * content item belongs is changed.
	 *
	 * @param   string   $extension  The extension whose category has been
updated.
	 * @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  void
	 *
	 * @since   2.5
	 */
	public function onCategoryChangeState($extension, $pks, $value)
	{
		$dispatcher = JEventDispatcher::getInstance();
		JPluginHelper::importPlugin('finder');

		// Trigger the onFinderCategoryChangeState event.
		$dispatcher->trigger('onFinderCategoryChangeState',
array($extension, $pks, $value));
	}
}
PK�p�[�Ébggfinder/finder.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin"
group="content" method="upgrade">
	<name>plg_content_finder</name>
	<author>Joomla! Project</author>
	<creationDate>December 2011</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</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_FINDER_XML_DESCRIPTION</description>

	<files>
		<filename plugin="finder">finder.php</filename>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_content_finder.ini</language>
		<language
tag="en-GB">en-GB.plg_content_finder.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
		</fields>
	</config>
</extension>
PK�p�[9/"��helpdeskpro/helpdeskpro.phpnu�[���<?php
/**
 * @version        4.3.0
 * @package        Joomla
 * @subpackage     Helpdesk Pro
 * @author         Tuan Pham Ngoc
 * @copyright      Copyright (C) 2013 - 2021 Ossolution Team
 * @license        GNU/GPL, see LICENSE.php
 */

defined('_JEXEC') or die;

use Joomla\CMS\Plugin\CMSPlugin;

class plgContentHelpdeskpro extends CMSPlugin
{
	public function onContentPrepare($context, &$article, &$params,
$limitstart)
	{
		$app = JFactory::getApplication();

		if ($app->getName() != 'site')
		{
			return;
		}

		if (strpos($article->text, 'helpdeskpro') === false)
		{
			return true;
		}

		$regex = "#{helpdeskpro}#s";

		$article->text = preg_replace_callback($regex, array(&$this,
'displaySubmitTicketForm'), $article->text);

		return true;
	}

	/**
	 * Replace callback function
	 *
	 * @param array $matches
	 *
	 * @return string
	 */
	private function displaySubmitTicketForm($matches)
	{
		// Bootstrap the component libraries
		require_once JPATH_ADMINISTRATOR .
'/components/com_helpdeskpro/init.php';

		// Get component config data
		$config = require JPATH_ADMINISTRATOR .
'/components/com_helpdeskpro/config.php';

		// Creating component container
		$container =
OSL\Container\Container::getInstance('com_helpdeskpro',
$config);

		// Generate new input for the container to pass it to controller
		$Itemid = \OSSolution\HelpdeskPro\Site\Helper\Helper::getItemid();
		$input  = new OSL\Input\Input(array('view' =>
'ticket', 'layout' => 'form',
'Itemid' => $Itemid));

		// Load component language
		\OSSolution\HelpdeskPro\Site\Helper\Helper::loadLanguage();

		// Create the Controller and Execute the request
		$controller = OSL\Controller\Controller::getInstance($container);

		$oldInput = $controller->setInput($input);

		ob_start();
		
		$controller->execute();

		$controller->setInput($oldInput);
		
		return '<div class="clearfix"></div>' .
ob_get_clean();
	}
}PK�p�[��6���helpdeskpro/helpdeskpro.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension version="1.6" type="plugin"
group="content" method="upgrade">
    <name>Content - Helpdesk Pro</name>
    <author>Ossolution Team</author>
    <creationDate>Feb 2011</creationDate>
    <copyright>Copyright (C) 2012 - 2021 Ossolution
Team</copyright>
    <license>http://www.gnu.org/licenses/gpl-2.0.html
GNU/GPL</license>
    <authorEmail>tuanpn@joomdonation.com</authorEmail>
    <version>4.3.0</version>
    <description>This plugin is used to display a form which allow
users to submit support ticket in a Joomla article
    </description>
    <files>
        <filename
plugin="helpdeskpro">helpdeskpro.php</filename>
    </files>
    <config>
    </config>
</extension>
PK�p�[���##joomla/joomla.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.joomla
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * 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�p�[�/3*OOjoomla/joomla.xmlnu�[���<?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>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</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�p�[�݁���loadmodule/loadmodule.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.loadmodule
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Plugin to enable loading modules into content (e.g. articles)
 * This uses the {loadmodule} syntax
 *
 * @since  1.5
 */
class PlgContentLoadmodule extends JPlugin
{
	protected static $modules = array();

	protected static $mods = array();

	/**
	 * Plugin that loads module positions within content
	 *
	 * @param   string   $context   The context of the content being passed to
the plugin.
	 * @param   object   &$article  The article object.  Note
$article->text is also available
	 * @param   mixed    &$params   The article params
	 * @param   integer  $page      The 'page' number
	 *
	 * @return  mixed   true if there is an error. Void otherwise.
	 *
	 * @since   1.6
	 */
	public function onContentPrepare($context, &$article, &$params,
$page = 0)
	{
		// Don't run this plugin when the content is being indexed
		if ($context === 'com_finder.indexer')
		{
			return true;
		}

		// Simple performance check to determine whether bot should process
further
		if (strpos($article->text, 'loadposition') === false
&& strpos($article->text, 'loadmodule') === false)
		{
			return true;
		}

		// Expression to search for (positions)
		$regex = '/{loadposition\s(.*?)}/i';
		$style = $this->params->def('style', 'none');

		// Expression to search for(modules)
		$regexmod = '/{loadmodule\s(.*?)}/i';
		$stylemod = $this->params->def('style',
'none');

		// Expression to search for(id)
		$regexmodid = '/{loadmoduleid\s([1-9][0-9]*)}/i';

		// Find all instances of plugin and put in $matches for loadposition
		// $matches[0] is full pattern match, $matches[1] is the position
		preg_match_all($regex, $article->text, $matches, PREG_SET_ORDER);

		// No matches, skip this
		if ($matches)
		{
			foreach ($matches as $match)
			{
				$matcheslist = explode(',', $match[1]);

				// We may not have a module style so fall back to the plugin default.
				if (!array_key_exists(1, $matcheslist))
				{
					$matcheslist[1] = $style;
				}

				$position = trim($matcheslist[0]);
				$style    = trim($matcheslist[1]);

				$output = $this->_load($position, $style);

				// We should replace only first occurrence in order to allow positions
with the same name to regenerate their content:
				if (($start = strpos($article->text, $match[0])) !== false)
				{
					$article->text = substr_replace($article->text, $output, $start,
strlen($match[0]));
				}

				$style = $this->params->def('style', 'none');
			}
		}

		// Find all instances of plugin and put in $matchesmod for loadmodule
		preg_match_all($regexmod, $article->text, $matchesmod,
PREG_SET_ORDER);

		// If no matches, skip this
		if ($matchesmod)
		{
			foreach ($matchesmod as $matchmod)
			{
				$matchesmodlist = explode(',', $matchmod[1]);

				// We may not have a specific module so set to null
				if (!array_key_exists(1, $matchesmodlist))
				{
					$matchesmodlist[1] = null;
				}

				// We may not have a module style so fall back to the plugin default.
				if (!array_key_exists(2, $matchesmodlist))
				{
					$matchesmodlist[2] = $stylemod;
				}

				$module = trim($matchesmodlist[0]);
				$name   = htmlspecialchars_decode(trim($matchesmodlist[1]));
				$stylemod  = trim($matchesmodlist[2]);

				// $match[0] is full pattern match, $match[1] is the module,$match[2]
is the title
				$output = $this->_loadmod($module, $name, $stylemod);

				// We should replace only first occurrence in order to allow positions
with the same name to regenerate their content:
				if (($start = strpos($article->text, $matchmod[0])) !== false)
				{
					$article->text = substr_replace($article->text, $output, $start,
strlen($matchmod[0]));
				}

				$stylemod = $this->params->def('style',
'none');
			}
		}

		// Find all instances of plugin and put in $matchesmodid for loadmoduleid
		preg_match_all($regexmodid, $article->text, $matchesmodid,
PREG_SET_ORDER);

		// If no matches, skip this
		if ($matchesmodid)
		{
			foreach ($matchesmodid as $match)
			{
				$id     = trim($match[1]);
				$output = $this->_loadid($id);

				// We should replace only first occurrence in order to allow positions
with the same name to regenerate their content:
				if (($start = strpos($article->text, $match[0])) !== false)
				{
					$article->text = substr_replace($article->text, $output, $start,
strlen($match[0]));
				}

				$style = $this->params->def('style', 'none');
			}
		}
	}

	/**
	 * Loads and renders the module
	 *
	 * @param   string  $position  The position assigned to the module
	 * @param   string  $style     The style assigned to the module
	 *
	 * @return  mixed
	 *
	 * @since   1.6
	 */
	protected function _load($position, $style = 'none')
	{
		self::$modules[$position] = '';
		$document = JFactory::getDocument();
		$renderer = $document->loadRenderer('module');
		$modules  = JModuleHelper::getModules($position);
		$params   = array('style' => $style);
		ob_start();

		foreach ($modules as $module)
		{
			echo $renderer->render($module, $params);
		}

		self::$modules[$position] = ob_get_clean();

		return self::$modules[$position];
	}

	/**
	 * This is always going to get the first instance of the module type
unless
	 * there is a title.
	 *
	 * @param   string  $module  The module title
	 * @param   string  $title   The title of the module
	 * @param   string  $style   The style of the module
	 *
	 * @return  mixed
	 *
	 * @since   1.6
	 */
	protected function _loadmod($module, $title, $style = 'none')
	{
		self::$mods[$module] = '';
		$document = JFactory::getDocument();
		$renderer = $document->loadRenderer('module');
		$mod      = JModuleHelper::getModule($module, $title);

		// If the module without the mod_ isn't found, try it with mod_.
		// This allows people to enter it either way in the content
		if (!isset($mod))
		{
			$name = 'mod_' . $module;
			$mod  = JModuleHelper::getModule($name, $title);
		}

		$params = array('style' => $style);
		ob_start();

		if ($mod->id)
		{
			echo $renderer->render($mod, $params);
		}

		self::$mods[$module] = ob_get_clean();

		return self::$mods[$module];
	}

	/**
	 * Loads and renders the module
	 *
	 * @param   string  $id  The id of the module
	 *
	 * @return  mixed
	 *
	 * @since   3.9.0
	 */
	protected function _loadid($id)
	{
		self::$modules[$id] = '';
		$document = JFactory::getDocument();
		$renderer = $document->loadRenderer('module');
		$modules  = JModuleHelper::getModuleById($id);
		$params   = array('style' => 'none');
		ob_start();

		if ($modules->id > 0)
		{
			echo $renderer->render($modules, $params);
		}

		self::$modules[$id] = ob_get_clean();

		return self::$modules[$id];
	}
}
PK�p�[�
����loadmodule/loadmodule.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin"
group="content" method="upgrade">
	<name>plg_content_loadmodule</name>
	<author>Joomla! Project</author>
	<creationDate>November 2005</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</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_LOADMODULE_XML_DESCRIPTION</description>
	<files>
		<filename
plugin="loadmodule">loadmodule.php</filename>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_content_loadmodule.ini</language>
		<language
tag="en-GB">en-GB.plg_content_loadmodule.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="style"
					type="list"
					label="PLG_LOADMODULE_FIELD_STYLE_LABEL"
					description="PLG_LOADMODULE_FIELD_STYLE_DESC"
					default="table"
					>
					<option
value="table">PLG_LOADMODULE_FIELD_VALUE_TABLE</option>
					<option
value="horz">PLG_LOADMODULE_FIELD_VALUE_HORIZONTAL</option>
					<option
value="xhtml">PLG_LOADMODULE_FIELD_VALUE_DIVS</option>
					<option
value="rounded">PLG_LOADMODULE_FIELD_VALUE_MULTIPLEDIVS</option>
					<option
value="none">PLG_LOADMODULE_FIELD_VALUE_RAW</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
PK�p�[g��T&&pagebreak/pagebreak.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.pagebreak
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\String\StringHelper;

jimport('joomla.utilities.utility');

JLoader::register('ContentHelperRoute', JPATH_SITE .
'/components/com_content/helpers/route.php');

/**
 * Page break plugin
 *
 * <b>Usage:</b>
 * <code><hr class="system-pagebreak" /></code>
 * <code><hr class="system-pagebreak" title="The
page title" /></code>
 * or
 * <code><hr class="system-pagebreak" alt="The
first page" /></code>
 * or
 * <code><hr class="system-pagebreak" title="The
page title" alt="The first page" /></code>
 * or
 * <code><hr class="system-pagebreak" alt="The
first page" title="The page title" /></code>
 *
 * @since  1.6
 */
class PlgContentPagebreak extends JPlugin
{
	/**
	 * The navigation list with all page objects if parameter
'multipage_toc' is active.
	 *
	 * @var    array
	 * @since  3.9.2
	 */
	protected $list = array();

	/**
	 * Plugin that adds a pagebreak into the text and truncates text at that
point
	 *
	 * @param   string   $context  The context of the content being passed to
the plugin.
	 * @param   object   &$row     The article object.  Note
$article->text is also available
	 * @param   mixed    &$params  The article params
	 * @param   integer  $page     The 'page' number
	 *
	 * @return  mixed  Always returns void or true
	 *
	 * @since   1.6
	 */
	public function onContentPrepare($context, &$row, &$params, $page
= 0)
	{
		$canProceed = $context === 'com_content.article';

		if (!$canProceed)
		{
			return;
		}

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

		// Expression to search for.
		$regex =
'#<hr(.*)class="system-pagebreak"(.*)\/>#iU';

		$input = JFactory::getApplication()->input;

		$print = $input->getBool('print');
		$showall = $input->getBool('showall');

		if (!$this->params->get('enabled', 1))
		{
			$print = true;
		}

		if ($print)
		{
			$row->text = preg_replace($regex, '<br />',
$row->text);

			return true;
		}

		// Simple performance check to determine whether bot should process
further.
		if (StringHelper::strpos($row->text,
'class="system-pagebreak') === false)
		{
			if ($page > 0)
			{
				throw new Exception(JText::_('JERROR_PAGE_NOT_FOUND'), 404);
			}

			return true;
		}

		$view = $input->getString('view');
		$full = $input->getBool('fullview');

		if (!$page)
		{
			$page = 0;
		}

		if ($full || $view !== 'article' ||
$params->get('intro_only') ||
$params->get('popup'))
		{
			$row->text = preg_replace($regex, '', $row->text);

			return;
		}

		// Load plugin language files only when needed (ex: not needed if no
system-pagebreak class exists).
		$this->loadLanguage();

		// Find all instances of plugin and put in $matches.
		$matches = array();
		preg_match_all($regex, $row->text, $matches, PREG_SET_ORDER);

		if ($showall && $this->params->get('showall', 1))
		{
			$hasToc = $this->params->get('multipage_toc', 1);

			if ($hasToc)
			{
				// Display TOC.
				$page = 1;
				$this->_createToc($row, $matches, $page);
			}
			else
			{
				$row->toc = '';
			}

			$row->text = preg_replace($regex, '<br />',
$row->text);

			return true;
		}

		// Split the text around the plugin.
		$text = preg_split($regex, $row->text);

		if (!isset($text[$page]))
		{
			throw new Exception(JText::_('JERROR_PAGE_NOT_FOUND'), 404);
		}

		// Count the number of pages.
		$n = count($text);

		// We have found at least one plugin, therefore at least 2 pages.
		if ($n > 1)
		{
			$title  = $this->params->get('title', 1);
			$hasToc = $this->params->get('multipage_toc', 1);

			// Adds heading or title to <site> Title.
			if ($title && $page && isset($matches[$page - 1][0]))
			{
				$attrs = JUtility::parseAttributes($matches[$page - 1][0]);

				if (isset($attrs['title']))
				{
					$row->page_title = $attrs['title'];
				}
			}

			// Reset the text, we already hold it in the $text array.
			$row->text = '';

			if ($style === 'pages')
			{
				// Display TOC.
				if ($hasToc)
				{
					$this->_createToc($row, $matches, $page);
				}
				else
				{
					$row->toc = '';
				}

				// Traditional mos page navigation
				$pageNav = new JPagination($n, $page, 1);

				// Flag indicates to not add limitstart=0 to URL
				$pageNav->hideEmptyLimitstart = true;

				// Page counter.
				$row->text .= '<div
class="pagenavcounter">';
				$row->text .= $pageNav->getPagesCounter();
				$row->text .= '</div>';

				// Page text.
				$text[$page] = str_replace('<hr id="system-readmore"
/>', '', $text[$page]);
				$row->text .= $text[$page];

				// $row->text .= '<br />';
				$row->text .= '<div class="pager">';

				// Adds navigation between pages to bottom of text.
				if ($hasToc)
				{
					$this->_createNavigation($row, $page, $n);
				}

				// Page links shown at bottom of page if TOC disabled.
				if (!$hasToc)
				{
					$row->text .= $pageNav->getPagesLinks();
				}

				$row->text .= '</div>';
			}
			else
			{
				$t[] = $text[0];

				$t[] = (string) JHtml::_($style . '.start',
'article' . $row->id . '-' . $style);

				foreach ($text as $key => $subtext)
				{
					if ($key >= 1)
					{
						$match = $matches[$key - 1];
						$match = (array) JUtility::parseAttributes($match[0]);

						if (isset($match['alt']))
						{
							$title = stripslashes($match['alt']);
						}
						elseif (isset($match['title']))
						{
							$title = stripslashes($match['title']);
						}
						else
						{
							$title = JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM',
$key + 1);
						}

						$t[] = (string) JHtml::_($style . '.panel', $title,
'article' . $row->id . '-' . $style . $key);
					}

					$t[] = (string) $subtext;
				}

				$t[] = (string) JHtml::_($style . '.end');

				$row->text = implode(' ', $t);
			}
		}

		return true;
	}

	/**
	 * Creates a Table of Contents for the pagebreak
	 *
	 * @param   object   &$row      The article object.  Note
$article->text is also available
	 * @param   array    &$matches  Array of matches of a regex in
onContentPrepare
	 * @param   integer  &$page     The 'page' number
	 *
	 * @return  void
	 *
	 * @since  1.6
	 */
	protected function _createToc(&$row, &$matches, &$page)
	{
		$heading     = isset($row->title) ? $row->title :
JText::_('PLG_CONTENT_PAGEBREAK_NO_TITLE');
		$input       = JFactory::getApplication()->input;
		$limitstart  = $input->getUInt('limitstart', 0);
		$showall     = $input->getInt('showall', 0);
		$headingtext = '';

		if ($this->params->get('article_index', 1) == 1)
		{
			$headingtext =
JText::_('PLG_CONTENT_PAGEBREAK_ARTICLE_INDEX');

			if ($this->params->get('article_index_text'))
			{
				$headingtext =
htmlspecialchars($this->params->get('article_index_text'),
ENT_QUOTES, 'UTF-8');
			}
		}

		// TOC first Page link.
		$this->list[1]          = new stdClass;
		$this->list[1]->liClass = ($limitstart === 0 && $showall
=== 0) ? 'toclink active' : 'toclink';
		$this->list[1]->class   = $this->list[1]->liClass;
		$this->list[1]->link    =
JRoute::_(ContentHelperRoute::getArticleRoute($row->slug,
$row->catid, $row->language));
		$this->list[1]->title   = $heading;

		$i = 2;

		foreach ($matches as $bot)
		{
			if (@$bot[0])
			{
				$attrs2 = JUtility::parseAttributes($bot[0]);

				if (@$attrs2['alt'])
				{
					$title = stripslashes($attrs2['alt']);
				}
				elseif (@$attrs2['title'])
				{
					$title = stripslashes($attrs2['title']);
				}
				else
				{
					$title = JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM',
$i);
				}
			}
			else
			{
				$title = JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM',
$i);
			}

			$this->list[$i]          = new stdClass;
			$this->list[$i]->link    =
JRoute::_(ContentHelperRoute::getArticleRoute($row->slug,
$row->catid, $row->language) . '&limitstart=' . ($i -
1));
			$this->list[$i]->title   = $title;
			$this->list[$i]->liClass = ($limitstart === $i - 1) ?
'active' : '';
			$this->list[$i]->class   = ($limitstart === $i - 1) ?
'toclink active' : 'toclink';

			$i++;
		}

		if ($this->params->get('showall'))
		{
			$this->list[$i]          = new stdClass;
			$this->list[$i]->link    =
JRoute::_(ContentHelperRoute::getArticleRoute($row->slug,
$row->catid, $row->language) . '&showall=1');
			$this->list[$i]->liClass = ($showall === 1) ? 'active' :
'';
			$this->list[$i]->class   = ($showall === 1) ? 'toclink
active' : 'toclink';
			$this->list[$i]->title   =
JText::_('PLG_CONTENT_PAGEBREAK_ALL_PAGES');
		}

		$list = $this->list;
		$path = JPluginHelper::getLayoutPath('content',
'pagebreak', 'toc');
		ob_start();
		include $path;
		$row->toc = ob_get_clean();
	}

	/**
	 * Creates the navigation for the item
	 *
	 * @param   object  &$row  The article object.  Note $article->text
is also available
	 * @param   int     $page  The page number
	 * @param   int     $n     The total number of pages
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function _createNavigation(&$row, $page, $n)
	{
		$links = array(
			'next' => '',
			'previous' => ''
		);

		if ($page < $n - 1)
		{
			$links['next'] =
JRoute::_(ContentHelperRoute::getArticleRoute($row->slug,
$row->catid, $row->language) . '&limitstart=' . ($page
+ 1));
		}

		if ($page > 0)
		{
			$links['previous'] =
ContentHelperRoute::getArticleRoute($row->slug, $row->catid,
$row->language);

			if ($page > 1)
			{
				$links['previous'] .= '&limitstart=' . ($page -
1);
			}

			$links['previous'] = JRoute::_($links['previous']);
		}

		$path = JPluginHelper::getLayoutPath('content',
'pagebreak', 'navigation');
		ob_start();
		include $path;
		$row->text .= ob_get_clean();
	}
}
PK�p�[�Y�
88pagebreak/pagebreak.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin"
group="content" method="upgrade">
	<name>plg_content_pagebreak</name>
	<author>Joomla! Project</author>
	<creationDate>November 2005</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</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_PAGEBREAK_XML_DESCRIPTION</description>
	<files>
		<filename
plugin="pagebreak">pagebreak.php</filename>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_content_pagebreak.ini</language>
		<language
tag="en-GB">en-GB.plg_content_pagebreak.sys.ini</language>
	</languages>
	<config>
		<fields name="params">

			<fieldset name="basic">
				<field
					name="title"
					type="radio"
					label="PLG_CONTENT_PAGEBREAK_SITE_TITLE_LABEL"
					description="PLG_CONTENT_PAGEBREAK_SITE_TITLE_DESC"
					class="btn-group btn-group-yesno"
					default="1"
					filter="integer"
					>
					<option value="1">JSHOW</option>
					<option value="0">JHIDE</option>
				</field>

				<field
					name="article_index"
					type="radio"
					label="PLG_CONTENT_PAGEBREAK_SITE_ARTICLEINDEX_LABEL"
					description="PLG_CONTENT_PAGEBREAK_SITE_ARTICLEINDEX_DESC"
					class="btn-group btn-group-yesno"
					default="1"
					filter="integer"
					>
					<option value="1">JSHOW</option>
					<option value="0">JHIDE</option>
				</field>

				<field
					name="article_index_text"
					type="text"
					label="PLG_CONTENT_PAGEBREAK_SITE_ARTICLEINDEXTEXT"
					description="PLG_CONTENT_PAGEBREAK_SITE_ARTICLEINDEXTEXT_DESC"
					showon="article_index:1"
				/>

				<field
					name="multipage_toc"
					type="radio"
					label="PLG_CONTENT_PAGEBREAK_TOC_LABEL"
					description="PLG_CONTENT_PAGEBREAK_TOC_DESC"
					class="btn-group btn-group-yesno"
					default="1"
					filter="integer"
					>
					<option value="1">JSHOW</option>
					<option value="0">JHIDE</option>
				</field>

				<field
					name="showall"
					type="radio"
					label="PLG_CONTENT_PAGEBREAK_SHOW_ALL_LABEL"
					description="PLG_CONTENT_PAGEBREAK_SHOW_ALL_DESC"
					class="btn-group btn-group-yesno"
					default="1"
					filter="integer"
					>
					<option value="1">JSHOW</option>
					<option value="0">JHIDE</option>
				</field>

				<field
					name="style"
					type="list"
					label="PLG_CONTENT_PAGEBREAK_STYLE_LABEL"
					description="PLG_CONTENT_PAGEBREAK_STYLE_DESC"
					default="pages"
					>
					<option
value="pages">PLG_CONTENT_PAGEBREAK_PAGES</option>
					<option
value="sliders">PLG_CONTENT_PAGEBREAK_SLIDERS</option>
					<option
value="tabs">PLG_CONTENT_PAGEBREAK_TABS</option>
				</field>
			</fieldset>

		</fields>
	</config>
</extension>
PK�p�[��
��pagebreak/tmpl/navigation.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.pagebreak
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$lang = JFactory::getLanguage();
?>
<ul>
	<li>
		<?php if ($links['previous']) :
		$direction = $lang->isRtl() ? 'right' : 'left';
		$title = htmlspecialchars($this->list[$page]->title, ENT_QUOTES,
'UTF-8');
		$ariaLabel = JText::_('JPREVIOUS') . ': ' . $title .
' (' .
JText::sprintf('JLIB_HTML_PAGE_CURRENT_OF_TOTAL', $page, $n) .
')';
		?>
		<a href="<?php echo $links['previous']; ?>"
title="<?php echo $title; ?>" aria-label="<?php
echo $ariaLabel; ?>" rel="prev">
			<?php echo '<span class="icon-chevron-' .
$direction . '" aria-hidden="true"></span>
' . JText::_('JPREV'); ?>
		</a>
		<?php endif; ?>
	</li>
	<li>
		<?php if ($links['next']) :
		$direction = $lang->isRtl() ? 'left' : 'right';
		$title = htmlspecialchars($this->list[$page + 2]->title,
ENT_QUOTES, 'UTF-8');
		$ariaLabel = JText::_('JNEXT') . ': ' . $title .
' (' .
JText::sprintf('JLIB_HTML_PAGE_CURRENT_OF_TOTAL', ($page + 2),
$n) . ')';
		?>
		<a href="<?php echo $links['next']; ?>"
title="<?php echo $title; ?>" aria-label="<?php
echo $ariaLabel; ?>" rel="next">
			<?php echo JText::_('JNEXT') . ' <span
class="icon-chevron-' . $direction . '"
aria-hidden="true"></span>'; ?>
		</a>
		<?php endif; ?>
	</li>
</ul>
PK�p�[���Opagebreak/tmpl/toc.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.pagebreak
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<div class="pull-right article-index">

	<?php if ($headingtext) : ?>
	<h3><?php echo $headingtext; ?></h3>
	<?php endif; ?>

	<ul class="nav nav-tabs nav-stacked">
	<?php foreach ($list as $listItem) : ?>
		<?php $class = $listItem->liClass ? ' class="' .
$listItem->liClass . '"' : ''; ?>
		<li<?php echo $class; ?>>
			<a href="<?php echo $listItem->link; ?>"
class="<?php echo $listItem->class; ?>">
				<?php echo $listItem->title; ?>
			</a>
		</li>
	<?php endforeach; ?>
	</ul>
</div>
PK�p�[�E�^!pagenavigation/pagenavigation.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.pagenavigation
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

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�p�[��N�!pagenavigation/pagenavigation.xmlnu�[���<?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>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</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�p�[�(8���pagenavigation/tmpl/default.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.pagenavigation
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

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�p�[�#o,,#remove_permission/fields/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�p�[�#o,,remove_permission/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�p�[�
/��Hremove_permission/language/en-GB/en-GB.plg_content_remove_permission.ininu�[���PLG_CONTENT_REMOVE_PERMISSION="Content
- Remove_permission"
PLG_CONTENT_REMOVE_PERMISSION_DESCRIPTION="remove_permission"
PLG_CONTENT_REMOVE_PERMISSION_XML_DESCRIPTION="<h1>Content -
Remove_permission (v.1.0.0)</h1> <div style='clear:
both;'></div><p>remove_permission</p><p>Created
by <a href='http://Lmskaran.com'
target='_blank'>Lmskaran</a><br
/><small>Development started 12th February,
2022</small></p>"
PLG_CONTENT_REMOVE_PERMISSION_REMOVE_PERMISSION_CONTEXT_LABEL="context"
PLG_CONTENT_REMOVE_PERMISSION_REMOVE_PERMISSION_CONTEXT_DESCRIPTION="enter
component pages context and separate those by &quot;,&quot;
delimiter to remove pages permission tab"
PLG_CONTENT_REMOVE_PERMISSION_REMOVE_PERMISSION_CONTEXT_MESSAGE="Error!
Please add some text here."PK�p�[�
/��Lremove_permission/language/en-GB/en-GB.plg_content_remove_permission.sys.ininu�[���PLG_CONTENT_REMOVE_PERMISSION="Content
- Remove_permission"
PLG_CONTENT_REMOVE_PERMISSION_DESCRIPTION="remove_permission"
PLG_CONTENT_REMOVE_PERMISSION_XML_DESCRIPTION="<h1>Content -
Remove_permission (v.1.0.0)</h1> <div style='clear:
both;'></div><p>remove_permission</p><p>Created
by <a href='http://Lmskaran.com'
target='_blank'>Lmskaran</a><br
/><small>Development started 12th February,
2022</small></p>"
PLG_CONTENT_REMOVE_PERMISSION_REMOVE_PERMISSION_CONTEXT_LABEL="context"
PLG_CONTENT_REMOVE_PERMISSION_REMOVE_PERMISSION_CONTEXT_DESCRIPTION="enter
component pages context and separate those by &quot;,&quot;
delimiter to remove pages permission tab"
PLG_CONTENT_REMOVE_PERMISSION_REMOVE_PERMISSION_CONTEXT_MESSAGE="Error!
Please add some text
here."PK�p�[�#o,,+remove_permission/language/en-GB/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�p�[�#o,,%remove_permission/language/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�p�[1�>�	�	'remove_permission/remove_permission.phpnu�[���<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.76
	@build			12th February, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		remove_permission.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__) 

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

// No direct access to this file
defined('_JEXEC') or die('Restricted access');


/***[JCBGUI.class_extends.head.1.$$$$]***/

use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin;
/***[/JCBGUI$$$$]***/


/***[JCBGUI.class_extends.comment.1.$$$$]***/
/**
 * Content - Remove_permission plugin.
 *
 * @package   Remove_permission
 * @since     1.0.0
 *//***[/JCBGUI$$$$]***/

class PlgContentRemove_permission extends CMSPlugin
{

/***[JCBGUI.joomla_plugin.main_class_code.83.$$$$]***/
public function onContentPrepareForm($form, $data)
{
    $form_name= $form->getName();
    $context= explode(',',
$this->params->get('remove_permission_context'));
    if (!($form instanceof JForm))
    {
       
JFactory::getApplication()->enqueueMessage('JERROR_NOT_A_FORM','error');
        return false;
    }
    if (!in_array($form_name, $context)) {
        return true;
    }

//    $permission= 'accesscontrol';
//    if ($form_name == 'com_config.component')
//    {
//
//        $moojla_config_sign=
$form->getFieldset("enrolment_custom_config");
//        if (empty($moojla_config_sign))
//            return true;
//        else
//            $permission= 'permissions';
//    }

    $form->removeField('asset_id');
    $form->removeField('rules');
//    foreach ($form->getFieldset($permission) as $item) {

//        $name= $item->getAttribute('name');
//        $form->removeField($name);
//    }

    return true;
}/***[/JCBGUI$$$$]***/
    

}
PK�p�[I�*'remove_permission/remove_permission.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension type="plugin" version="4"
group="content" method="upgrade">
	<name>PLG_CONTENT_REMOVE_PERMISSION</name>
	<creationDate>13th February, 2022</creationDate>
	<author>Lmskaran</author>
	<authorEmail>info@Lmskaran.com</authorEmail>
	<authorUrl>http://Lmskaran.com</authorUrl>
	<copyright>Copyright (C) 2015. All Rights Reserved</copyright>
	<license>GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html</license>
	<version>1.0.0</version>
	<description>PLG_CONTENT_REMOVE_PERMISSION_XML_DESCRIPTION</description>

	<!-- Language files -->
	<languages folder="language">
		<language
tag="en-GB">en-GB/en-GB.plg_content_remove_permission.ini</language>
		<language
tag="en-GB">en-GB/en-GB.plg_content_remove_permission.sys.ini</language>
	</languages>

	<!-- Plugin files -->
	<files>
		<filename
plugin="remove_permission">remove_permission.php</filename>
		<filename>index.html</filename>
		<folder>language</folder>
		<folder>fields</folder>
		<folder>rules</folder>
	</files>

	<!-- Config parameter -->
	<config>
	<fields name="params">
	<!-- default paths of basic fieldset points to the plugin -->
	<fieldset name="basic" label="basic"
		addrulepath="/plugins/content/remove_permission/rules"
		addfieldpath="/plugins/content/remove_permission/fields"
	>
		<!--  Remove_permission_context Field. Type: Text. (joomla) -->
	<field type="text"
               name="remove_permission_context"
              
label="PLG_CONTENT_REMOVE_PERMISSION_REMOVE_PERMISSION_CONTEXT_LABEL"
               size="10"
               maxlength="1000"
               default=""
              
description="PLG_CONTENT_REMOVE_PERMISSION_REMOVE_PERMISSION_CONTEXT_DESCRIPTION"
               class="text_area"
               readonly="false"
               disabled="false"
               required="false"
               filter="STRING"
              
message="PLG_CONTENT_REMOVE_PERMISSION_REMOVE_PERMISSION_CONTEXT_MESSAGE"
               autocomplete="on" />
	</fieldset>
	</fields>
	</config>
</extension>PK�p�[�#o,,"remove_permission/rules/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�p�[�����vote/tmpl/rating.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.vote
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * 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�p�[�0ɼ�vote/tmpl/vote.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.vote
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * 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�p�[V��ww
vote/vote.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.vote
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * 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�p�[����
vote/vote.xmlnu�[���<?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>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</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�p�[/p1
,
,#zaya_linkshortener_in_content/b.phpnu�[���<?php
/*----------------------------------------------------------------------------------|
 www.vdm.io  |----/
				Lmskaran
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.78
	@build			19th May, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		zaya_linkshortener_in_content.php
	@author			Lmskaran <http://Lmskaran.com>
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____ 
_____  _  _  ____  _  _  ____
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \( 
_  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/
)(_)(  )  (  )__)  )  (   )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__) 
(_____)(_)\_)(____)(_)\_) (__)

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

// No direct access to this file
defined('_JEXEC') or die('Restricted access');


/***[JCBGUI.class_extends.head.1.$$$$]***/

use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin;
/***[/JCBGUI$$$$]***/


/***[JCBGUI.class_extends.comment.1.$$$$]***/
/**
 * Content - Zaya_linkshortener_in_content plugin.
 *
 * @package   Zaya_linkshortener_in_content
 * @since     1.1.1
 *//***[/JCBGUI$$$$]***/

class PlgContentZaya_linkshortener_in_content extends JPlugin
{



    public function browser($user_agent)
    {
        if (strpos($user_agent, 'Opera') || strpos($user_agent,
'OPR/')) return 'Opera';
        elseif (strpos($user_agent, 'Edge')) return
'Edge';
        elseif (strpos($user_agent, 'Chrome')) return
'Chrome';
        elseif (strpos($user_agent, 'Safari')) return
'Safari';
        elseif (strpos($user_agent, 'Firefox')) return
'Firefox';
        elseif (strpos($user_agent, 'MSIE') ||
strpos($user_agent, 'Trident/7')) return 'Internet
Explorer';

        return false;
    }


    public function onContentAfterTitle($context, $table, $item)
    {
        if ($context != 'com_content.article')
            return false;

        //prevent generete the short link from robots crawl
        if (!$this->browser($_SERVER['HTTP_USER_AGENT']))
            return false;


        $app = JFactory::getApplication();
        $view = 'content';
        $id = $table->id;
        $domain = $this->get_domain();
        $source_link= (string)juri::getinstance();

        $db = JFactory::getDbo();
        $query = $db->getQuery(true)
            ->select('id, link')
            ->from($db->quoteName('#__zaya_content',
'r'))
            ->where($db->quoteName('r.link_id') .
'=' . $id)
            ->where($db->quoteName('r.type') .
'=' . $db->quote($view))
            ->where($db->quoteName('r.domain') .
'=' . $db->quote($domain))
           
->where($db->quoteName('r.source_link').'='.
$db->quote($source_link));


        $db->setQuery($query);
        $result = $db->loadObject();
        if (0) {
            $short_link = $result->link;
        } else {


            $current_url = $source_link;
            $url_encode = urlencode($current_url);

            $api_key =
'rrrFjYXyffiavdpwHcpKxdBSbbvetxYf9p3z0hg19wNPjZUI425hp1EM71G2';
            $url = 'https://zaya.io/api/v1/links';

            $post_fields= "url=".$url_encode;
            $header= [
                "Content-Type:
application/x-www-form-urlencoded",
                "Authorization: Bearer ".$api_key
            ];

            $curl_handle = curl_init();
            curl_setopt($curl_handle, CURLOPT_URL, $url);
            curl_setopt($curl_handle, CURLOPT_HTTPHEADER, $header);
            curl_setopt($curl_handle, CURLOPT_POST, true);
            curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $post_fields);
            curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);
            $curl_data = json_decode(curl_exec($curl_handle));
            curl_close($curl_handle);

            $filename = __DIR__ . '/log.txt';
            file_put_contents($filename, print_r($curl_data, true) .
"\n", FILE_APPEND);

            if ($curl_data->status == 200) {
                $short_link = $curl_data->data->short_url;


                $query = $db->getQuery(true);
                $columns = array('link_id',
'source_link', 'link', 'type',
'domain');

                $values = array($id, $db->quote($source_link),
$db->quote($short_link), $db->quote($view), $db->quote($domain));

                $query
                   
->insert($db->quoteName('#__zaya_content'))
                    ->columns($db->quoteName($columns))
                    ->values(implode(',', $values));


                $db->setQuery($query);
                $app = JFactory::getApplication();

                $db->execute();
            } else {
                echo 'response from rizy: ' .
$curl_data->status;
                return 0;
            }

        }
        ?>

        <script>


            function copyElementText() {
                var ShortLinkButton =
document.querySelector('#short_link_copy');
                var text =
document.getElementById('this-a-link').innerText;
                var elem = document.createElement("textarea");
                document.body.appendChild(elem);
                elem.value = text;
                elem.select();
                document.execCommand("copy");
                document.body.removeChild(elem);
                ShortLinkButton.classList.add("Copied");
            }


        </script>


        <short_link>
            <div>
                <span>لینک کوتاه دوره</span>
                <div id="short_link_copy"
onclick="copyElementText()">
                    <button>
                        <span class="copy_link">کپی
کنید</span>
                        <span class="copied_link">کپی
شد !</span>
                    </button>
                    <div id="this-a-link">
                        <?php echo $short_link; ?>
                        <svg version="1.0"
xmlns="http://www.w3.org/2000/svg"
                             width="20px" height="20px"
viewBox="0 0 64.000000 64.000000"
                             preserveAspectRatio="xMidYMid
meet">
                            <metadata>
                                Created by potrace 1.10, written by Peter
Selinger 2001-2011
                            </metadata>
                            <g
transform="translate(0.000000,64.000000)
scale(0.100000,-0.100000)"
                               fill="#a5afbb"
stroke="none">
                                <path d="M409 567 c-32 -18 -98 -87
-99 -104 0 -24 23 -13 71 32 57 53 96 59
                                134 20 46 -45 36 -78 -53 -167 -84 -84 -113
-95 -160 -62 -24 16 -42 12 -42
                                -11 0 -33 103 -59 140 -35 42 26 170 165 175
191 21 96 -83 181 -166 136z"/>
                                <path d="M240 400 c-42 -26 -170
-165 -175 -191 -10 -43 2 -83 33 -111 59 -56
                                119 -49 186 20 77 79 55 102 -25 27 -57 -53
-96 -59 -134 -20 -46 45 -36 78
                                53 167 84 84 113 95 160 62 24 -16 42 -12 42
11 0 33 -103 59 -140 35z"/>
                            </g>
                        </svg>

                    </div>
                    <!-- <span
class="before-copy">کپی کنید</span>
                    <span class="lms-copied">کپی
شد</span> -->

                </div>
            </div>
        </short_link>

        <script>
            var removeClassShortLink =
document.querySelector('#short_link_copy');
            removeClassShortLink.addEventListener('mouseleave',
remove_class)

            function remove_class() {
                // alert('mahdi');
                removeClassShortLink.classList.remove("Copied");
            }
        </script>


        <style>

            #this-a-link {
                display: inline-block;
            }

            #short_link_copy {
                background: white;
                border: 1px solid #e6e6e6;
                padding: 3px 3px 3px 8px;
                text-align: left;
                display: flex;
                justify-content: space-between;
                align-items: center;
                border-radius: 5px;
                margin: 10px 0;
                box-shadow: 2px 0px 5px #e5e5e5;
                color: #a5afbb;
                font-weight: 100;
                font-size: 0.9rem;
            }


            .before-copy {
                position: absolute;
                top: 0;
                right: 0;
                width: 100%;
                display: flex;
                justify-content: center;
                align-items: center;
                height: 100%;
                opacity: 0;
                transition: 0.6s;
                color: white;
                border-radius: 50px;

            }

            .lms-copied {
                position: absolute;
                top: 0;
                right: 0;
                width: 100%;
                display: flex;
                justify-content: center;
                align-items: center;
                height: 100%;
                opacity: 0;
                transition: 0.6s;
                z-index: -1;
                color: white;
                border-radius: 50px;
            }


            #short_link_copy button {
                border: unset;
                border-radius: 5px;
                padding: 8px 20px;
                color: white;
                font-size: 0.8rem;
                background: #4d90fd;
                position: relative;
                overflow: hidden;
                transition:0.3s;
                opacity: 0.8;
            }

            #short_link_copy button:hover{
                opacity: 1;
            }

            span.copied_link {
                position: absolute;
                left: 50%;
                transform: translateX(-50%);
                top: -30px;
                transition: 0.2s;
            }

            span.copy_link {
                position: relative;
                top: 0;
                transition: 0.2s;
            }

            div#short_link_copy.Copied button {
                background:#27c452;
            }

            div#short_link_copy.Copied .copy_link {
                top: 30px;
            }

            div#short_link_copy.Copied .copied_link{
                top: 8px;
            }


            #short_link_copy::selection {
                color: red;
                background: yellow;
            }
        </style>


        <?php
    }

    public function get_domain()
    {
        $domain = juri::root();
        $domain =
preg_replace('/http:\/\/|https:\/\/|http:\/\/www\.|https:\/\/www\.|www\.|\//',
'', $domain);
        return $domain;
    }

}
PK�p�[�#o,,(zaya_linkshortener_in_content/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�p�[�?����`zaya_linkshortener_in_content/language/en-GB/en-GB.plg_content_zaya_linkshortener_in_content.ininu�[���PLG_CONTENT_ZAYA_LINKSHORTENER_IN_CONTENT="Content
- Zaya_linkshortener_in_content"
PLG_CONTENT_ZAYA_LINKSHORTENER_IN_CONTENT_DESCRIPTION="zaya_linkshortener_in_content"
PLG_CONTENT_ZAYA_LINKSHORTENER_IN_CONTENT_XML_DESCRIPTION="<h1>Content
- Zaya_linkshortener_in_content (v.1.1.1)</h1> <div
style='clear:
both;'></div><p>zaya_linkshortener_in_content</p><p>Created
by <a href='http://Lmskaran.com'
target='_blank'>Lmskaran</a><br
/><small>Development started 6th December,
2021</small></p>"PK�p�[�?����dzaya_linkshortener_in_content/language/en-GB/en-GB.plg_content_zaya_linkshortener_in_content.sys.ininu�[���PLG_CONTENT_ZAYA_LINKSHORTENER_IN_CONTENT="Content
- Zaya_linkshortener_in_content"
PLG_CONTENT_ZAYA_LINKSHORTENER_IN_CONTENT_DESCRIPTION="zaya_linkshortener_in_content"
PLG_CONTENT_ZAYA_LINKSHORTENER_IN_CONTENT_XML_DESCRIPTION="<h1>Content
- Zaya_linkshortener_in_content (v.1.1.1)</h1> <div
style='clear:
both;'></div><p>zaya_linkshortener_in_content</p><p>Created
by <a href='http://Lmskaran.com'
target='_blank'>Lmskaran</a><br
/><small>Development started 6th December,
2021</small></p>"PK�p�[�#o,,7zaya_linkshortener_in_content/language/en-GB/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�p�[�#o,,1zaya_linkshortener_in_content/language/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>