'; print_r($dir); echo ''; */ switch($dim){ case 1: $poz = 'poz_cat'; $cat_link = $dir[1]; $link = $dir[1]; $fpag = 'categorie.php'; break; case 2: $poz = 'poz_subcat'; $a = explode('-',$dir[2]); $max = count($a); $s = $a[$max-1]; $cat_link = $dir[1]; $subcat_link = $dir[2]; if($s=='i'){ $link = $dir[1]; $link_oferta = $dir[2]; $fpag = 'afisare.php'; }else{ $link = $dir[2]; $fpag = 'categorie.php'; } break; case 3: $poz = 'poz_subsubcat'; $a = explode('-',$dir[3]); $max = count($a); $s = $a[$max-1]; $cat_link = $dir[1]; $subcat_link = $dir[2]; $subsubcat_link = $dir[3]; if($s=='i'){ $link = $dir[2]; $link_oferta = $dir[3]; $fpag = 'afisare.php'; }else{ $link = $dir[3]; $fpag = 'categorie.php'; } break; case 4: $cat_link = $dir[1]; $subcat_link = $dir[2]; $subsubcat_link = $dir[3]; $link = $dir[3]; $link_oferta = $dir[4]; $fpag = 'afisare.php'; break; default: $fpag = '404.html'; } //echo $fpag; if($fpag) include($fpag); ?>