$hc[$i] +1 ) { for ($j=$hc[$i]+1; $j <= $hc[$i+1]; $j++) { if (! (strpos( $h[$j] , 'ruler:' ) === false ) || !(strpos( $h[$j] , 'category:' ) === false ) || !(strpos( $h[$j] , 'link:' ) === false ) || !(strpos( $h[$j] , 'link_blank:' ) === false ) ) $hcmem[$hcI++]=$j; } } } $hcmem[$hcI++] = $hc[count($hc)-1]; $hlmem=count($hcmem); $ta=array(); if (isset($start) && !isset($end)) $end=$start; if (!isset($end)) $end=3; if (!isset($start)) $start=1; for ($i=0; $i < $hlmem; $i++) { if ($l[$hcmem[$i]] == 1) { if ($start == 1) $ta[]=$hcmem[$i]; $r1=$r2=$i; } if ($s == $hcmem[$i]) { $s3=true; for ($j=$r1 + 1; $j < $hlmem; $j++) { if ($l[$hcmem[$j]] == 1) break; if ($l[$hcmem[$j]] == 2) { if ($start < 3 && $end > 1) $ta[]=$hcmem[$j]; $r2=$j; $s3=false; } if ($s == $hcmem[$j]) { for ($k=$r2 + 1; $k < $hlmem; $k++) { if ($l[$hcmem[$k]] == 3) { if ($end > 2) $ta[]=$hcmem[$k]; } else { $s3=false; break; } } } if ($l[$hcmem[$j]] == 3 && $l[$s] == 1 && $s3) if ($end > 2) $ta[]=$hcmem[$j]; } } } return wbli($ta, $start, $hcmem, $hlmem); } function aWithClass($i, $x, $clsname) { global $sn, $u; $elip = $x; $title = ''; if ( (strpos( $x, 'link:' ) === false ) && (strpos( $x, 'link_blank:' ) === false ) ) { if (strlen($x) > 21) { $elip = substr($x,0,20) . '...'; $title = ' Title = "'. $x .'"'; } return '' .$elip. '' ; } else { list ($item,$url)= split('@',$x); if (strpos( $x, 'link_blank:' ) === false ) { $item = str_replace('link:','',$item); if (strlen($item) > 21) { $title = ' Title = "'. $item .'"'; $item = substr($item,0,20) . '...'; } return '' .$item. '' ; } else { $item = str_replace('link_blank:','',$item); if (strlen($item) > 21) { $title = ' Title = "'. $item .'"'; $item = substr($item,0,20) . '...'; } return '' .$item. '' ; } } } function wbli($ta, $st, $hc, $hl) { global $s, $l, $h; if (count($ta) == 0) return; $t=''; if ($st == 'submenu' || $st == 'search') $t.=''; return $t; } ?> >