AnonSec Shell
Server IP : 213.186.33.4  /  Your IP : 216.73.216.59
Web Server : Apache
System : Linux webm006.cluster103.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 : awebpaca ( 35430)
PHP Version : 8.5.0
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/awebpaca/visitevirtuelle/plugins/system/ova/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/awebpaca/visitevirtuelle/plugins/system/ova/shortcode.php
<?php 
/**
 * @version     $Id$
 * @author      OvaTheme
 * @package     Joomla.Site
 * @subpackage  com_ovacomposer
 * @copyright   Copyright (C) 2013 OvaTheme. All rights reserved.
 * @license     License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.
 */
// Learn From Wordpress

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


$shortcode_tags = array();

function add_shortcode($tag, $func){
	global $shortcode_tags;
	if(is_callable($func))
		$shortcode_tags[$tag] = $func;
}


function remove_shortcode($tag){
	global $shortcode_tags;
	unset($shortcode_tags[$tag]);
}


function remove_all_shortcodes(){
	global $shortcode_tags;
	$shortcode_tags = array();
}

function config_shortcode($config){
	global $ova_config;
	$ova_config = $config;
}

function do_shortcode($content){
	global $shortcode_tags;
	if(empty($shortcode_tags) || !is_array($shortcode_tags))
		return urldecode($content) ;
	$pattern = get_shortcode_regex();
	return urldecode(preg_replace_callback('/' . $pattern . '/s', 'do_shortcode_tag', $content));
}


function get_shortcode_regex(){
	global $shortcode_tags;
	$tagnames  = array_keys($shortcode_tags);
	$tagregexp = join('|', array_map('preg_quote', $tagnames));	
	return '(.?)\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)';
}


function do_shortcode_tag($m){
	global $shortcode_tags;

	// allow [[foo]] syntax for escaping a tag
	if($m[1] == '[' && $m[6] == ']') {
		return substr($m[0], 1, -1);
	}

	$tag = $m[2];
	$attr = shortcode_parse_atts($m[3]);

	if(isset($m[5])) {
		// enclosing tag - extra parameter
		return $m[1] . call_user_func($shortcode_tags[$tag], $attr, $m[5], $tag) . $m[6];
	}
	else {
		// self-closing tag
		return $m[1] . call_user_func($shortcode_tags[$tag], $attr, NULL,  $tag) . $m[6];
	}
}


function shortcode_parse_atts($text){
	$atts    = array();
	$pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/';
	$text    = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);
	if(preg_match_all($pattern, $text, $match, PREG_SET_ORDER)) {
		foreach($match as $m) {
			if(!empty($m[1]))
				$atts[strtolower($m[1])] = stripcslashes($m[2]);
			elseif(!empty($m[3]))
				$atts[strtolower($m[3])] = stripcslashes($m[4]);
			elseif(!empty($m[5]))
				$atts[strtolower($m[5])] = stripcslashes($m[6]);
			elseif(isset($m[7]) and strlen($m[7]))
				$atts[] = stripcslashes($m[7]);
			elseif(isset($m[8]))
				$atts[] = stripcslashes($m[8]);
		}
	}
	else {
		$atts = ltrim($text);
	}
	return $atts;
}


function shortcode_atts($pairs, $atts){
	$atts =(array)$atts;
	$out  = array();
	foreach($pairs as $name => $default) {
		if(array_key_exists($name, $atts))
			$out[$name] = $atts[$name];
		else
			$out[$name] = $default;
	}
	return $out;
}

function strip_shortcodes($content){
	global $shortcode_tags;
	if(empty($shortcode_tags) || !is_array($shortcode_tags))
		return $content;
	$pattern = get_shortcode_regex();
	return preg_replace('/' . $pattern . '/s', '$1$6', $content);
}

Anon7 - 2022
AnonSec Team