403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Old Sites/ict/wp-content/plugins/smart-slider-3/Nextend/Framework/Form/Element/Text/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Old Sites/ict/wp-content/plugins/smart-slider-3/Nextend/Framework/Form/Element/Text/FieldImage.php
<?php


namespace Nextend\Framework\Form\Element\Text;


use Nextend\Framework\Asset\Js\Js;
use Nextend\Framework\Browse\BrowseManager;
use Nextend\Framework\Form\Element\AbstractChooserText;
use Nextend\Framework\Image\Image;
use Nextend\Framework\ResourceTranslator\ResourceTranslator;
use Nextend\Framework\Sanitize;

class FieldImage extends AbstractChooserText {

    protected $attributes = array();

    protected $relatedAlt = '';

    protected $class = ' n2_field_text_image';

    protected function addScript() {

        $options = array();
        if (!empty($this->relatedAlt)) {
            $options['alt'] = $this->relatedAlt;
        }

        Js::addInline("new _N2.FormElementImage('" . $this->fieldID . "', " . json_encode($options) . " );");
    }

    protected function fetchElement() {

        BrowseManager::enqueue($this->getForm());

        $html = parent::fetchElement();

        Image::initLightbox();

        return $html;
    }

    protected function pre() {

        return '<div class="n2_field_text_image__preview" style="' . $this->getImageStyle() . '"></div>';
    }

    protected function getImageStyle() {
        $image = $this->getValue();
        if (empty($image) || $image[0] == '{') {
            return '';
        }

        return 'background-image: url(' . esc_url(ResourceTranslator::toUrl($image)) . ');';
    }

    /**
     * @param string $relatedAlt
     */
    public function setRelatedAlt($relatedAlt) {
        $this->relatedAlt = $relatedAlt;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit