| 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/montpellier/modules/mod_djclassifieds_regions/tmpl/ |
Upload File : |
<?php
/**
* @package DJ-Classifieds
* @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');
$max_level = $params->get('max_level','0');
?>
<div class="djcf_menu djcf_regions" id="mod_djcf_regions<?php echo $module->id;?>">
<?php if($regs){ ?>
<ul class="menu <?php echo $params->get('moduleclass_sfx',''); ?>">
<?php
$r_count=0;
$prev_l = 0;
$start_l = 0;
foreach($regs as $r){
if($max_level>0 && $r->level>=$max_level){
continue;
}
if($r_count==0){
$prev_l = $r->level;
$start_l= $r->level;
}
if($prev_l>$r->level){
for($i=0;$i<$prev_l-$r->level;$i++){
echo '</ul>';
}
}else if($prev_l<$r->level){
echo '<ul>';
}else if($r_count>0){
echo '</li>';
}
$prev_l = $r->level;
if(strstr($reg_path,','.$r->id.',')){
if($reg_id==$r->id){
$cl='class="active current"';
}else{
$cl='class="active"';
}
}else{
$cl='';
}
$r_name = JText::_($r->name);
if($show_items_c){
$r_name .= ' <span class="items_count">('.$r->items_count.')</span>';
}
echo '<li '.$cl.'><a data-regid="'.$r->id.'" href="'.DJClassifiedsSEO::getRegionRoute($r->id.':'.$r->alias, true).'">'.$r_name.'</a>';
$r_count++;
}
$prev_l = $prev_l-$start_l;
if($prev_l>0){
for($i=0;$i<$prev_l;$i++){
echo '</li></ul>';
}
}
if($r_count>0){
echo '</li>';
}
?>
</ul>
<?php } ?>
</div>
<?php if($params->get('save_region_id',0)){ ?>
<?php JHtml::_('jquery.framework'); ?>
<script>
jQuery(function($){
var exdate = new Date();
exdate.setDate(exdate.getDate() + 30);
$('#mod_djcf_regions<?php echo $module->id;?>').find('ul a').each(function(){
$(this).on('click', function(e){
e.preventDefault();
if($(this).attr('data-regid')){
document.cookie = "djcf_regid=" + $(this).attr('data-regid') + "; path=/; expires=" + exdate.toUTCString();
}
window.location = $(this).attr('href');
});
});
});
</script>
<?php } ?>