| Server IP : 54.36.91.62 / Your IP : 216.73.217.111 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/valence/modules/mod_djc2producers/ |
Upload File : |
<?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');
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
require_once(dirname(__FILE__).'/helper.php');
require_once(JPATH_ROOT.'/components/com_djcatalog2/helpers/route.php');
require_once(JPATH_ROOT.'/components/com_djcatalog2/helpers/theme.php');
require_once(JPATH_ADMINISTRATOR.'/components/com_djcatalog2/lib/categories.php');
require_once(JPATH_ROOT.'/administrator/components/com_djcatalog2/helpers/image.php');
$app = JFactory::getApplication();
$db = JFactory::getDbo();
$lang = JFactory::GetLanguage();
$lang->load('com_djcatalog2');
$p = new DJCatalog2ModProducer();
$cid = null;
if ($app->input->getInt('cid',0) != 0 && !$params->get('filter')) {
$cid = $app->input->get('cid',0, 'string');
}
else $cid = 0;
$producers = $p->getProducers($cid, $params);
$order = $app->input->get('order',false,'default','string');
$orderDir = $app->input->get('dir',false,'cmd');
$prod_slug = $app->input->get('pid', 0, 'string');
$prod_id = (int)$prod_slug;
$Itemid = $app->input->get('Itemid', 0, 'int');
$document= JFactory::getDocument();
$module_id = $module->id;
DJCatalog2ThemeHelper::setThemeAssets();
if ($params->get('layout', 'default') == 'grid') {
$module_css = array();
$module_float = $params->get('module_float','');
$module_width = $params->get('module_width','');
$module_height = $params->get('module_height','');
$module_text_align = $params->get('module_text_align','');
$columns = (int)$params->get('bootstrap_columns', 1);
if ($columns > 1) {
$module_float = null;
$module_width = null;
}
if ($module_float == 'left') {
$module_css[] = 'float: left;';
//$module_css[] = 'clear: right;';
$module_css[] = 'margin: auto;';
} else if ($module_float == 'right') {
$module_css[] = 'float: right;';
//$module_css[] = 'clear: left;';
$module_css[] = 'margin: auto;';
}
if ($module_text_align) {
$module_css[] = 'text-align: '.$module_text_align.';';
}
if (preg_match('#^(\d+)(px|%)?$#', $module_width, $width_matches)) {
$unit = 'px';
$width = $width_matches[1];
if (count($width_matches) == 3) {
$unit = $width_matches[2];
}
$module_css[] = 'width: '.$width.$unit.';';
}
if (preg_match('#^(\d+)(px|%)?$#', $module_height, $height_matches)) {
$unit = 'px';
$height = $height_matches[1];
if (count($height_matches) == 3) {
$unit = $height_matches[2];
}
$module_css[] = 'height: '.$height.$unit.';';
}
if (!empty($module_css)) {
$css_style = '#mod_djc_producers-'.$module_id.' .mod_djc_item {'.implode(PHP_EOL, $module_css).'}';
$document->addStyleDeclaration($css_style);
}
}
require(JModuleHelper::getLayoutPath('mod_djc2producers', $params->get('layout', 'default')));