403Webshell
Server IP : 87.98.154.146  /  Your IP : 216.73.216.101
Web Server : Apache
System : Linux webm005.cluster126.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : bsiadvisil ( 110003)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/bsiadvisil/www/plugins/system/spcookieconsent/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/bsiadvisil/www/plugins/system/spcookieconsent/spcookieconsent.php
<?php
/**
 * @package SP Cookie Consent
 * @author JoomShaper https://www.joomshaper.com
 * @copyright Copyright (c) 2010 - 2018 JoomShaper
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/

defined ('_JEXEC') or die();

class PlgSystemSpcookieconsent extends JPlugin
{

    protected $autoloadLanguage = true;
	protected $app;
	
	function onBeforeRender() {
	
		if ($this->app->isAdmin())
        {
			return;
		}

		$cookie = $this->app->input->cookie;
		if($cookie->get('spcookie_status') != 'ok')
		{
			$bg_color = $this->params->get('bg_color');
			$text_color = $this->params->get('text_color');
			$link_color = $this->params->get('link_color');
			$button_bg_color = $this->params->get('button_bg_color');
			$button_text_color = $this->params->get('button_text_color');
			$css = '#sp-cookie-consent {background-color: '. $bg_color .'; color: '. $text_color .'; }';
			$css .= '#sp-cookie-consent a, #sp-cookie-consent a:hover, #sp-cookie-consent a:focus, #sp-cookie-consent a:active {color: '. $link_color .'; }';
			$css .= '#sp-cookie-consent .sp-cookie-allow {background-color: '. $button_bg_color .'; color: ' . $button_text_color . ';}';
			$css .= '#sp-cookie-consent .sp-cookie-allow:hover, #sp-cookie-consent .sp-cookie-allow:active, #sp-cookie-consent .sp-cookie-allow:focus {color: ' . $button_text_color . ';}';
			$doc = JFactory::getDocument();
			JHtml::_('jquery.framework');
			$doc->addScript(JURI::root(true) . '/plugins/system/spcookieconsent/assets/js/script.js');
			$doc->addStyleDeclaration($css);
			$doc->addStylesheet(JURI::root(true) . '/plugins/system/spcookieconsent/assets/css/style.css');
		}
	}

    function onAfterRender() {
	
		if ($this->app->isAdmin())
        {
			return;
		}

		$cookie = $this->app->input->cookie;

		if($cookie->get('spcookie_status') != 'ok')
		{
			$cookie_content = $this->params->get('cookie_content');
			$button_text = $this->params->get('button_text');
			$position = $this->params->get('display_position');

			$html = '<div id="sp-cookie-consent" class="position-' . $position . '"><div>';
			$html .= '<div class="sp-cookie-consent-content">' . nl2br($cookie_content) . '</div>';
			$html .= '<div class="sp-cookie-consent-action"><a class="sp-cookie-close sp-cookie-allow" href="#">' . $button_text . '</a></div>';
			$html .= '</div></div>';

			$body = JResponse::getBody();
			$body = str_replace('</body>', $html . '</body>', $body);

			JResponse::setBody( $body );
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit