| 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_djclassifieds/views/categories/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');
$par = $this->par;
$level_limit = $par->get('cattree_levels','0');
$cols_limit = $par->get('cattree_cols','3');
$items_in_c_type = $par->get('cattree_ic','1');
$img_level = $par->get('cattree_img','0');
$ll_type = $par->get('cattree_last_level_type','0');
$col_limit = 0;
$cats_c=0;
$cats_to_display = array();
if($cols_limit>1){
if($level_limit>0){
foreach($this->cats as $c ){
if($c->level<$level_limit){
$cats_c++;
$cats_to_display[]=$c;
}
}
$this->cats =$cats_to_display;
}else{
$cats_c=count($this->cats);
}
$col_limit = ceil($cats_c/$cols_limit);
}
$ct_type = $par->get('cattree_type','');
if($col_limit==0){
$col_limit = 1;
}
?>
<div id="dj-classifieds" class="clearfix djcftheme-<?php echo $par->get('theme','default');?> <?php echo $par->get('pageclass_sfx'); ?>">
<?php echo DJClassifiedsTheme::renderModule('djcf-top'); ?>
<?php echo DJClassifiedsTheme::renderModule('djcf-cattree-top'); ?>
<div class="dj-cattree-box cols<?php echo $cols_limit; ?>">
<div class="title_top">
<h1><?php echo $this->page_heading ? $this->page_heading : JText::_('COM_DJCLASSIFIEDS_CATEGORY_TREE') ?></h1>
</div>
<div class="dj-cattree-wrap">
<?php if($this->cats){ ?>
<ul class="dj-cattree col1 cat0 lvl0">
<?php
$c_count=0;
$prev_l = 0;
$col_n=1;
$prev_id=0;
foreach($this->cats as $ci => $c){
if($level_limit>0 && $c->level>=$level_limit){
continue;
}
if($prev_l>$c->level){
for($i=0;$i<$prev_l-$c->level;$i++){
echo '</ul>';
}
}else if($prev_l<$c->level){
$cl_ll='';
if($ll_type && $level_limit>1 && $c->level==$level_limit-1){
$cl_ll=' last_level';
}
echo '<ul class="cat'.$prev_id.' lvl'.$c->level.$cl_ll.'">';
}else if($c_count>0){
echo '</li>';
}
if($c->level==0 && $c_count>0){
$prev_id = 0;
if($ct_type){
$col_number = $col_n%$cols_limit;
if($col_number==0){
$col_number++;
echo '</ul><div class="clear_both"></div><ul class="dj-cattree col'.$col_number.' cat'.$prev_id.' lvl'.$c->level.'">';
}else{
$col_number++;
echo '</ul><ul class="dj-cattree col'.$col_number.' cat'.$prev_id.' lvl'.$c->level.'">';
}
$col_n++;
}else{
if(floor($c_count/$col_limit)==$col_n){
$col_number = $col_n%$cols_limit;
$col_number++;
echo '</ul><ul class="dj-cattree col'.$col_number.' cat'.$prev_id.' lvl'.$c->level.'">';
$col_n++;
}
}
}
$prev_l = $c->level;
$prev_id = $c->id;
$cl='';
$items_in_c = '';
if($c->items_count){
if($items_in_c_type==2){
$items_in_c = ' <span>('.$c->items_count.')</span>';
}else if($items_in_c_type==1 && $c->level==0){
$items_in_c = ' <span>('.$c->items_count.')</span>';
}
}
$cl.='cat'.$c->id.' lvl'.$c->level;
if($cl){
$cl= 'class="'.$cl.'"';
}
$cat_img = '';
if($c->level<$img_level && isset($this->cat_images[$c->id])){
$cat_img = '<img class="cat_tree_icon" alt="'.JText::_($c->name).'" src="'.JURI::base(true).$this->cat_images[$c->id]->image_path.'" />';
}
$ll_coma='';
if($ll_type && $level_limit>1 && $c->level==$level_limit-1){
if(isset($this->cats[$ci+1])){
$ll_coma = ($c->level==$this->cats[$ci+1]->level ? ',' : '');
}
}
echo '<li '.$cl.'><a href="'.DJClassifiedsSEO::getCategoryRoute($c->id.':'.$c->alias).'">'.$cat_img.JText::_($c->name).$items_in_c.'</a>'.$ll_coma;
$c_count++;
}
if($prev_l>0){
for($i=0;$i<$prev_l;$i++){
echo '</li></ul>';
}
}
?>
</ul>
<div class="clear_both"></div>
<?php }else{ ?>
<div class="no_results">
<?php echo JText::_('COM_DJCLASSIFIEDS_CATTREE_NO_RESULTS'); ?>
</div>
<?php } ?>
</div>
</div>
<?php echo DJClassifiedsTheme::renderModule('djcf-cattree-bottom'); ?>
</div>