'; }*/ // ------------------------------------------------------------------------ function print_tree($parent_id, &$parent_node, $level=0){ global $tree, $items, $parents; if (!in_array($parent_id, $parents)) return false; if (is_array($tree[$parent_id])) { foreach ($tree[$parent_id] as $item){ $node = print_item($item, $parent_node, $level); print_tree($item['sites_id'], $node, $level+1); } } } // ------------------------------------------------------------------------ function print_dhtml_tree($parent_id, &$parent_node, $level=1){ global $tree, $items, $all_parents; if (is_array($tree[$parent_id])) { foreach ($tree[$parent_id] as $item){ if ($item['sites_inmenu']!='0') { $node = print_dhtml_item($item, $parent_node, $level); if (in_array($item['sites_id'], $all_parents)) { echo 'stm_bpx("p'.$level.'","p0",[1,2,0,0,2,3,0,0]);'."\n"; print_dhtml_tree($item['sites_id'], $node, $level+1); echo "\n".'stm_ep();'."\n\n"; } } } } } // ------------------------------------------------------------------------ function print_item(&$item, &$parent_node, $level=0) { global $tree, $treec; $class = ($item['sites_id'] == $_GET['id'])?"class='act_menu'":"class='menu'"; $lang = (LANG==F_LANG)?"":"&l=".LANG; if ($item['sites_inmenu']!='0') { if ($item['sites_linkout']!='0') { $linkto = $item['sites_link']; $targetto = '_blank'; } else { $url = eregi("http://([a-zA-Z0-9_-])", $item['sites_link']); if ($url) { $linkto = $item['sites_link']; } else { $linkto = HTTP_WWW.'/'.MAIN.'?id='. $item['sites_id']; } $targetto = '_self'; } $exists_subitems = (is_array($tree[$item['sites_id']])); if ($exists_subitems) { if ($item['sites_id'] == '1') { echo "". $item['sites_title'] ."

"; } else { if ($item['sites_parent_id'] != '1') { $level=(NO_INDEX)?$level:$level-1; echo "". $item['sites_title'] ."

"; } else { echo "". $item['sites_title'] ."

"; } } } else { if ($item['sites_parent_id'] != '1') { $level=(NO_INDEX)?$level:$level-1; echo "". $item['sites_title'] ."

"; } else { echo "". $item['sites_title'] ."

"; } } } } // ------------------------------------------------------------------------ function print_dhtml_item(&$item, &$parent_node, $level=1) { echo 'stm_ai("p'.($level-1).'i0",[1,"'.$item['sites_title'].'","","",-1,-1,0,"","_self","","","","",0,0,0,"arrow_r.gif","arrow_r.gif",7,7,0,0,1,"#fffff7",0,"#b5bed6",0,"","",3,3,1,1,"#fffff7","#000000","#000000","#000000","8pt Verdana","8pt Verdana",0,0]);'."\n"; } // ------------------------------------------------------------------------ // nowe menu // ------------------------------------------------------------------------ function print_tree_m($parent_id, &$parent_node, $level=0, $unlinks = array()){ global $tree, $items, $parents,$xtree,$xitems; if (!in_array($parent_id, $parents)) return false; if (is_array($xtree[$parent_id])) { echo ($level==0)?''."\n":''."\n"; // if ($level==0) { // echo ''."\n"; //} else { // if ($item['sites_inmenu']!='0') { // echo ''."\n"; // } //} //dawid do dopracowania } } function print_item_m(&$item, &$parent_node, $level=0, $unlinks = array()) { global $tree, $treec,$parents,$xtree,$parentid,$parents_bread; if ($item['sites_id'] == $_GET['id'] || in_array($item['sites_id'], $parents_bread) ){ $class = "class='level-".$level." current'"; $classlink = "class='level-".$level."-link current-link'"; } else { $class = "class='level-".$level." ".$classX."'"; $classlink = "class='level-".$level."-link ".$classlinkX."'"; } //$lang = (LANG==F_LANG)?"":"&l=".LANG; if ($item['sites_inmenu']!='0') { if ($item['sites_linkout']!='0') { $linkto = $item['sites_link']; $targetto = 'onclick="this.target=\'_blank\'"'; } else { $url = eregi("http://([a-zA-Z0-9_-])|javascript", $item['sites_link']); if ($url) { //$linkto = $item['sites_link']; $flink = $item['sites_link']; } else { //$linkto = HTTP_WWW.'/'.MAIN.'?id='. $item['sites_id']; //link bez polskich znaków, spacji itp $linkname = char_replace($item['sites_title']); $flink = $linkname.','.$item['sites_id'].','.LANG.'.html'; } $targetto = ''; } $exists_subitems = (is_array($xtree[$item['sites_id']])); // unlinks - te ktore maja byc nieklikalne $link = (!in_array($item['sites_id'], $unlinks))?''. $item['sites_title'] .'':''.$item['sites_title'].''; if ($exists_subitems) { echo "
  • ".$link.""."\n"; echo (in_array($item['sites_id'],$parents))?'