function setshow($id) { global $parents, $base, $expand; array_unshift($expand, $id); if (isset($base)) { if (isset($parents[$id]) && $parents[$id] != $base) { setshow($parents[$id]); } } else { if (isset($parents[$id]) && $parents[$id] != 0) { setshow($parents[$id]); } } }
function setshow($id) { global $parents, $base; echo "document.getElementById({$id}).className = \"show\";"; echo "document.getElementById('b{$id}').innerHTML = \"-\";"; if (isset($base)) { if (isset($parents[$id]) && $parents[$id] != $base) { setshow($parents[$id]); } } else { if (isset($parents[$id]) && $parents[$id] != 0) { setshow($parents[$id]); } } }