} else { return ""; } } } $itall = mktree(0, ".", ""); include_once "lib/phplayers/lib/PHPLIB.php"; include_once "lib/phplayers_tiki/lib/layersmenu-common.inc.php"; // include Tiki's modified version of that file to keep original intact (luci) include_once "lib/phplayers/lib/treemenu.inc.php"; $phplayers = new TreeMenu(); $phplayers->setDirrootCommon("lib/phplayers"); $phplayers->setLibjsdir("lib/phplayers/libjs/"); $phplayers->setImgdir("lib/phplayers/images/"); $phplayers->setImgwww("lib/phplayers/images/"); $phplayers->setTpldirCommon("lib/phplayers/templates/"); if ($itall) { $phplayers->setMenuStructureString($itall); } $phplayers->parseStructureForMenu("treemenu1"); $phpitall = $phplayers->newTreeMenu("treemenu1"); $smarty->assign('tree', $phpitall); } else { $tree_nodes = array(); foreach ($ctall as $c) { $tree_nodes[] = array("id" => $c["categId"], "parent" => $c["parentId"], "data" => '<a class="catname" href="tiki-browse_categories.php?parentId=' . $c["categId"] . '&deep=' . $deep . '&type=' . urlencode($type) . '">' . $c["name"] . '</a><br />'); } $tm = new CatBrowseTreeMaker("categ"); $res = $tm->make_tree($_REQUEST["parentId"], $tree_nodes); $smarty->assign('tree', $res); }