AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.117
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/vesoul0000/modules/mod_djmegamenu/helpers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/vesoul0000/modules/mod_djmegamenu/helpers/helperversion.php
<?php
/**

 * @package DJ-MegaMenu
 * @copyright Copyright (C) 2024 DJ-Extensions.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: https://dj-extensions.com
 * @author email contact@dj-extensions.com
 * @developer Szymon Woronowski, Artur Kaczmarek
 *
 * DJ-MegaMenu is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DJ-MegaMenu is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with DJ-MegaMenu. If not, see <http://www.gnu.org/licenses/>.
 *
 */

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

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ModuleHelper;

require_once (dirname(__FILE__) . DS . 'helper.php');

class modDJMegaMenuHelper extends modDJMMHelper {

	public static function parseParams(&$params) {

		// determine if this is a Pro version
		$params->set('pro', 1);

		parent::parseParams($params);
	}

	public static function loadModules($position, $style = 'xhtml')
	{
		if (!isset(self::$modules[$position])) {
			self::$modules[$position] = '';
			if($style == '0') $style = 'xhtml';
			$document	= Factory::getDocument();
			$renderer	= $document->loadRenderer('module');
			$modules	= ModuleHelper::getModules($position);
			$params		= array('style' => preg_replace('/^[\w]+\-/i', '', $style));
			ob_start();

			foreach ($modules as $module) {
				echo $renderer->render($module, $params);
			}

			self::$modules[$position] = ob_get_clean();
		}
		return self::$modules[$position];
	}

}

if(!function_exists('adjustBrightness')) {
	function adjustBrightness($rgba, $factor) {

		// check for backward compatibility with hex color format
		if(strstr($rgba, '#')) {
			// Normalize into a six character long hex string
			$hex = str_replace('#', '', $rgba);
			if (strlen($hex) == 3) {
				$hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
			}
			// Split into three parts: R, G and B
			$color_parts = str_split($hex, 2);
			$rgba = 'rgba(';
			foreach ($color_parts as $color) {
				$rgba.= hexdec($color).', ';
			}
			$rgba.= '1)';
		}

		$color_parts = explode(',', $rgba);

		if(count($color_parts) != 4) return $rgba;

		$rgba = 'rgba(';
		foreach ($color_parts as $n => $color) {
			$color   = trim($color, 'rgba(), ');
			if($n == 3) {
				$rgba.= $color.')'; // copy opacity
				break;
			} else {
				$rgba.= ' '.max(0,min(255,(int) ($color * $factor))).', '; // Adjust color
			}
		}

		return $rgba;
	}
}

Anon7 - 2022
AnonSec Team