AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.112
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/amisdesseniors-fr/administrator/components/com_jlexreview/models/fields/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/administrator/components/com_jlexreview/models/fields/jobject.php
<?php
/**
 * @package		JLex Review
 * @version		4.2.3
 * @copyright	Copyright (c) 2013-2018 JLexArt. All rights reserved
 * @license		GNU General Public License version 2 or later;
 * @author		www.jlexart.com
 */

defined('_JEXEC') or die;

class JFormFieldModal_JObject extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var		string
	 * @since   1.6
	 */
	protected $type = 'Modal_JObject';

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string	The field input markup.
	 *
	 * @since   1.6
	 */
	protected function getInput()
	{
		$app = JFactory::getApplication();

		// Build the script.
		$script = array();

		// Select button script
		$script[] = 'function jSelectJObject_' . $this->id . '(id, title) {';
			$script[] = 'document.getElementById("' . $this->id . '_id").value = id;';
			$script[] = 'document.getElementById("' . $this->id . '_name").value = title;';
			$script[] = 'jQuery("#' . $this->id . '_clear").removeClass("hidden");';
			$script[] = 'jQuery("#modalJObject' . $this->id . '").modal("hide");';
		$script[] = '}';

		// Add the script to the document head.
		JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));

		// Setup variables for display.
		$html = array();
		if ($app->isClient("site"))
		{
			$link = 'index.php?option=com_jlexreview&amp;view=others&amp;task=items&amp;tmpl=component';
		} else {
			$link = 'index.php?option=com_jlexreview&amp;view=items&amp;layout=modal&amp;tmpl=component';
		}
		
		if (isset($this->element["section_file"]) && $this->element["section_file"]>0)
		{
			$link.= '&amp;section_file=' . $this->element["section_file"];
		}
		$link .= '&amp;function=jSelectJObject_' . $this->id;

		if ((int) $this->value > 0)
		{
			$db    = JFactory::getDbo();
			$query = $db->getQuery(true)
				->select($db->quoteName('object_name'))
				->select($db->quoteName('section_file'))
				->from($db->quoteName('#__jlexreview_entry'))
				->where($db->quoteName('id') . ' = ' . (int) $this->value);
			$db->setQuery($query);

			$item = $db->loadObject();
			if (!$item)
			{
				$title = "Entry item not found";
			} else {
				$title = substr ($item->object_name, 0, 20) . "...";
			}
		}

		if (empty($title))
		{
			$title = "Select an entry item";
		}
		$title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');

		// The active article id field.
		if (0 == (int) $this->value)
		{
			$value = '';
		} else {
			$value = (int) $this->value;
		}

		// The current article display field.
		$html[] = JE_JVERSION=="J4"?'<div class="input-group">':'<span class="input-append">';
		$html[] = '<input type="text" class="input-medium form-control" id="' . $this->id . '_name" value="' . $title . '" disabled="disabled" size="35" />';
		
		$html[] = JHtml::_(
			'bootstrap.renderModal',
			'modalJObject' . $this->id,
			array(
				'url' => $link,
				'title' => "Select an item",
				'width' => '800px',
				'height' => '400px',
				'footer' => '<button class="btn" data-dismiss="modal" aria-hidden="true">'
					. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>'
			)
		);

		if(JE_JVERSION=="J4")
		{
			$html[] = '<span class="input-group-append">';
				$html[]='<a href="#modalJObject' . $this->id . '" class="btn btn-primary button-select" role="button" data-toggle="modal" data-bs-toggle="modal">'
						. '<span class="icon-file"></span> '
						. JText::_('JSELECT') . '</a>';
			$html[] = '</span>';
		} else {
			$html[] = '<a href="#modalJObject' . $this->id . '" class="btn hasTooltip" role="button"  data-toggle="modal" title="Select an item">'
			. '<span class="icon-file"></span> '
			. JText::_('JSELECT') . '</a>';
		}

		$html[] = JE_JVERSION=="J4"?'</div>':'</span>';

		$html[] = '<input type="hidden" id="' . $this->id . '_id" name="' . $this->name . '" value="' . $value . '" />';
		
		return implode("\n", $html);
	}

	/**
	 * Method to get the field label markup.
	 *
	 * @return  string  The field label markup.
	 *
	 * @since   3.4
	 */
	protected function getLabel()
	{
		return str_replace($this->id, $this->id . '_id', parent::getLabel());
	}
}

Anon7 - 2022
AnonSec Team