AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.112
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/components/com_djcatalog2/layouts/com_djcatalog2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/components/com_djcatalog2/layouts/com_djcatalog2/labels.php
<?php
/**
 * @package DJ-Catalog2
 * @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: http://dj-extensions.com
 * @author email contact@dj-extensions.com
 */

defined ('_JEXEC') or die('Restricted access');
use Joomla\CMS\Router\Route;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\Helpers\Bootstrap;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
$item = $displayData['item'];
if (empty($item->_labels)) {
	return;
}

$app = Factory::getApplication();

//Joomla\CMS\HTML\HTMLHelper::_('bootstrap.tooltip');
Bootstrap::popover('.djcHasPopover', array('trigger' => 'hover focus click'));

?>

<ul class="djc_items_labels djc_labels list-inline inline list-unstyled unstyled">
	<?php foreach($item->_labels as $label) {?>
		<?php
		$hasText = (bool)(trim((string)$label->label) != '');
		$hasDesc = (bool)((trim(strip_tags($label->description))));
		$hasImg = (bool)($label->image != '');
		$bg = (($label->background) ? $label->background : null);

		$popOverContent = $hasDesc ? 'data-content="'.htmlspecialchars($label->description).'"' : '';
		$popOverTitle = $hasText ? 'title="'.htmlspecialchars($label->description).'"' : 'title=""';
		$popOverAttrs = ($hasDesc || ($hasImg && ($hasDesc || $hasText))) ? $popOverTitle.' '.$popOverContent : '';

		$labelLink = null;
		if ($label->type == 'link') {
			switch ($label->params->get('link_type')) {
				case 'ext': {
					$labelLink = Route::_(trim((string)$label->params->get('link_url')));
					break;
				}
				case 'menu' : {
					$Itemid = $label->params->get('link_menu');
					if ($Itemid) {
						$menu = $app->getMenu();
						if ($menuitem = $menu->getItem($Itemid)) {

							if ((strpos($menuitem->link, 'index.php?') === 0) && (strpos($menuitem->link, 'Itemid=') === false))
							{

								// If this is an internal Joomla link, ensure the Itemid is set.
								$labelLink = $menuitem->link . '&Itemid=' . $menuitem->id;

							} else {
								$labelLink = $menuitem->link;
							}

							if (strcasecmp(substr($labelLink, 0, 4), 'http') && (strpos($labelLink, 'index.php?') !== false))
							{
								$labelLink = Route::_($labelLink, true);

							}
							else
							{
								$labelLink = Route::_($labelLink);
							}
						}
					}
					break;
				}
				case 'article' : {
					$contentId = $label->params->get('link_article');
					if ($contentId) {
						jimport('joomla.application.component.model');
						require_once(JPATH_BASE.'/components/com_content/helpers/route.php');
						BaseDatabaseModel::addIncludePath(JPATH_BASE.'/components/com_content/models');
						$model = BaseDatabaseModel::getInstance('Articles', 'ContentModel', array('ignore_request'=>true));
						$model->setState('params', $app->getParams());
						$model->setState('filter.article_id', $contentId);
						$model->setState('filter.article_id.include', true); // Include
						$items = $model->getItems();
						if($items && $art = $items[0]) {
							$art->slug = $art->alias ? ($art->id . ':' . $art->alias) : $art->id;
							$labelLink = Route::_(ContentHelperRoute::getArticleRoute($art->slug, $art->catid));
						}
					}
					break;
				}
				default: break;
			}
		} else if ($label->type == 'tag') {
			$labelLink = Route::_(DJCatalog2HelperRoute::getCategoryRoute(0).'&tag=' . $label->id);
		}


		?>
        <li <?php echo (($bg) ? 'style="background:' . $bg . '"' : '') ?>  class="badge djc_label_item djc_label_item-<?php echo $label->id; ?> <?php echo ($popOverAttrs) ? 'djcHasPopover': ''; ?>" <?php echo $popOverAttrs; ?>>
			<?php if ($labelLink) {?>
            <a href="<?php echo $labelLink; ?>">
				<?php } ?>
				<?php if ($hasImg) {?>
                    <img alt="<?php echo $this->escape($label->label); ?>" src="<?php echo htmlspecialchars($label->image, ENT_COMPAT, 'UTF-8'); ?>"/>
				<?php } ?>
				<?php if ($hasText) {?>
                    <span><?php echo $this->escape($label->label); ?></span>
				<?php } ?>
				<?php if ($labelLink) {?>
            </a>
		<?php } ?>
        </li>
	<?php } ?>
</ul>

Anon7 - 2022
AnonSec Team