$back .= $indent . "|" . $k['name'] . "|tiki-browse_categories.php?parentId=" . $k['categId'] . "&type=" . urlencode($type) . "&deep={$deep}\n";
                    $back .= mktree($k['categId'], ".{$indent}", "");
                }
                return $back;
            } 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"] . '&amp;deep=' . $deep . '&amp;type=' . urlencode($type) . '">' . $c["name"] . '</a><br />');
    }