arr = $arr; $this->ret = ''; return is_array($arr); } public function getchild($bid){ $a = $newarr = array(); if(is_array($this->arr)){ foreach($this->arr as $id => $a){ if($a['pid'] == $bid) $newarr[$id] = $a; } } return $newarr ? $newarr : false; } function get_tree($bid, $str, $sid = 0, $adds = '', $strgroup = ''){ $number=1; $child = $this->getchild($bid); if(is_array($child)){ $total = count($child); foreach($child as $id=>$a){ $j=$k=''; if($number==$total){ $j .= $this->icon[2]; }else{ $j .= $this->icon[1]; $k = $adds ? $this->icon[0] : ''; } $spacer = $adds ? $adds.$j : ''; if(empty($a['selected'])){ $selected = ($a['id']==$sid) ? 'selected' : ''; } @extract($a); if($a['module']=="page"){ $action='edit'; $files = 'id'; }else{ $action='index'; $files = 'catid'; } if($a['module']=="feedback"){ $module='plug'; $action='feedback'; $files = 'se'; $id = '48'; } $bid == 0 && $strgroup ? eval("\$newstr = \"$strgroup\";") : eval("\$newstr = \"$str\";"); $this->ret .= $newstr; $nbsp = $this->nbsp; $this->get_tree($id, $str, $sid, $adds.$k.$nbsp,$strgroup); $number++; } } return $this->ret; } function get_nav($bid,$maxlevel,$effected_id='navlist',$style='filetree ' ,$homefont='',$recursion=FALSE ,$child='',$showenname='',$site_url='') { if($showenname) $indexen = 'home'; if($homefont) $homefont='